├── .dockerignore ├── .env.example ├── .github └── workflows │ ├── cd.yml │ └── release.yml ├── .gitignore ├── .vscode └── settings.json ├── Dockerfile ├── LICENSE ├── README.md ├── cog.toml ├── docker-compose.yml ├── package-lock.json ├── package.json ├── prisma └── schema.prisma ├── src ├── handlers │ └── verify.ts ├── index.ts ├── middlewares │ └── captchaVerification.ts ├── services │ └── prisma.ts └── utils │ ├── errors.ts │ ├── index.ts │ └── types.ts ├── terraform ├── backend.tf ├── ecs │ ├── iam.tf │ ├── main.tf │ ├── outputs.tf │ ├── terraform.tf │ └── variables.tf ├── main.tf ├── provider.tf ├── redis │ ├── main.tf │ ├── outputs.tf │ └── variables.tf ├── variables.tf └── vars │ ├── dev.tfvars │ ├── prod.tfvars │ └── staging.tfvars └── tsconfig.json /.dockerignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | dist 3 | node_modules/ 4 | npm-debug 5 | .vscode 6 | .env 7 | README.md -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | NODE_ENV=development 2 | PORT=3333 3 | COOKIE_NAME=sb-token 4 | SUPABASE_JWT_SECRET= 5 | COOKIE_SECRET= 6 | HCAPTCHA_SECRET= 7 | DIRECT_URL="postgres://postgres.[YOUR_SUPABASE_PROJECT_ID]:[YOUR_DB_PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:6543/postgres" 8 | DATABASE_URL="postgres://postgres.[YOUR_SUPABASE_PROJECT_ID]:[YOUR_DB_PASSWORD]@aws-0-eu-central-1.pooler.supabase.com:6543/postgres?pgbouncer=true" 9 | REDIS_PASSWORD="authpassword" 10 | REDIS_HOST=redis 11 | REDIS_PORT=6379 12 | WALLETCONNECT_PROJECT_ID= 13 | -------------------------------------------------------------------------------- /.github/workflows/cd.yml: -------------------------------------------------------------------------------- 1 | name: cd 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: 6 | - "main" 7 | paths: 8 | - "terraform/**" 9 | release: 10 | types: ["published"] 11 | 12 | concurrency: 13 | # Only allow for one action to run at once, queue any others 14 | group: cd 15 | # Don't cancel existing 16 | cancel-in-progress: false 17 | 18 | jobs: 19 | get-version: 20 | runs-on: ubuntu-latest 21 | outputs: 22 | version: ${{ steps.clean_version.outputs.version }} 23 | steps: 24 | - id: get 25 | uses: actions/github-script@v6 26 | env: 27 | LATEST_TAG: ${{ steps.latest_release.outputs.release }} 28 | with: 29 | result-encoding: string 30 | script: | 31 | if (context.eventName == "release") { 32 | return context.payload.release.tag_name 33 | } else { 34 | return "" 35 | } 36 | 37 | - id: clean_version 38 | run: | 39 | version=$(echo "${{ steps.get.outputs.result }}" | sed 's/v//g') 40 | echo "version=$version" >> $GITHUB_OUTPUT 41 | 42 | deploy-infra-staging: 43 | runs-on: ubuntu-latest 44 | environment: 45 | name: staging 46 | url: https://staging.cloud-auth-api.reown.com/health 47 | needs: 48 | - get-version 49 | steps: 50 | - name: Checkout 51 | uses: actions/checkout@v3 52 | 53 | - id: deploy-staging 54 | uses: WalletConnect/actions/actions/deploy-terraform/@2.5.4 55 | env: 56 | TF_LOG: DEBUG 57 | TF_VAR_node_env: staging 58 | TF_VAR_supabase_jwt_secret: ${{ secrets.SUPABASE_JWT_SECRET }} 59 | TF_VAR_cookie_name: ${{ secrets.COOKIE_NAME }} 60 | TF_VAR_cookie_secret: ${{ secrets.COOKIE_SECRET }} 61 | TF_VAR_hcaptcha_secret: ${{ secrets.HCAPTCHA_SECRET }} 62 | TF_VAR_direct_url: ${{ secrets.DIRECT_URL }} 63 | TF_VAR_database_url: ${{ secrets.DATABASE_URL }} 64 | TF_VAR_redis_host: ${{ secrets.REDIS_HOST }} 65 | TF_VAR_redis_port: ${{ secrets.REDIS_PORT }} 66 | TF_VAR_redis_password: ${{ secrets.REDIS_PASSWORD }} 67 | TF_VAR_walletconnect_project_id: ${{ secrets.WALLETCONNECT_PROJECT_ID }} 68 | with: 69 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 70 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 71 | aws-region: eu-central-1 72 | environment: staging 73 | app-name: ${{ github.event.repository.name }} 74 | 75 | # TODO add validation 76 | # validate-staging: 77 | # needs: [deploy-infra-staging] 78 | # uses: ./.github/workflows/validate.yml 79 | # with: 80 | # environment: 'staging' 81 | 82 | deploy-infra-prod: 83 | runs-on: ubuntu-latest 84 | environment: 85 | name: prod 86 | url: https://cloud-auth-api.reown.com/health 87 | needs: 88 | - get-version 89 | # - validate-staging 90 | - deploy-infra-staging 91 | steps: 92 | - name: Checkout 93 | uses: actions/checkout@v3 94 | 95 | - id: deploy-prod 96 | uses: WalletConnect/actions/actions/deploy-terraform/@2.5.4 97 | env: 98 | TF_LOG: DEBUG 99 | TF_VAR_node_env: production 100 | TF_VAR_supabase_jwt_secret: ${{ secrets.SUPABASE_JWT_SECRET }} 101 | TF_VAR_cookie_name: ${{ secrets.COOKIE_NAME }} 102 | TF_VAR_cookie_secret: ${{ secrets.COOKIE_SECRET }} 103 | TF_VAR_hcaptcha_secret: ${{ secrets.HCAPTCHA_SECRET }} 104 | TF_VAR_direct_url: ${{ secrets.DIRECT_URL }} 105 | TF_VAR_database_url: ${{ secrets.DATABASE_URL }} 106 | TF_VAR_redis_host: ${{ secrets.REDIS_HOST }} 107 | TF_VAR_redis_port: ${{ secrets.REDIS_PORT }} 108 | TF_VAR_redis_password: ${{ secrets.REDIS_PASSWORD }} 109 | TF_VAR_walletconnect_project_id: ${{ secrets.WALLETCONNECT_PROJECT_ID }} 110 | with: 111 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 112 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 113 | aws-region: eu-central-1 114 | environment: prod 115 | app-name: ${{ github.event.repository.name }} 116 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | paths-ignore: 8 | - "terraform/**" 9 | 10 | permissions: 11 | contents: write 12 | 13 | jobs: 14 | release: 15 | runs-on: 16 | group: ubuntu-runners 17 | outputs: 18 | version: ${{ steps.clean_version.outputs.version }} 19 | steps: 20 | - uses: actions/checkout@v3 21 | with: 22 | fetch-depth: 0 23 | 24 | - name: "Cocogitto release" 25 | id: release 26 | uses: cocogitto/cocogitto-action@v3 27 | with: 28 | check: true 29 | check-latest-tag-only: true 30 | release: true 31 | git-user: 'github-actions[bot]' 32 | git-user-email: "github-actions[bot]@users.noreply.github.com" 33 | 34 | - name: "Update Github release notes" 35 | uses: softprops/action-gh-release@v1 36 | with: 37 | #body_path: GITHUB_CHANGELOG.md 38 | body: "Generated Release" 39 | tag_name: ${{ steps.release.outputs.version }} 40 | token: ${{ secrets.GITHUB_TOKEN }} 41 | 42 | - id: clean_version 43 | run: | 44 | version=$(echo "${{ steps.release.outputs.version }}" | sed 's/v//g') 45 | echo "version=$version" >> $GITHUB_OUTPUT 46 | 47 | build-container: 48 | runs-on: 49 | group: ubuntu-runners 50 | needs: 51 | - release 52 | steps: 53 | - uses: actions/checkout@v3 54 | with: 55 | fetch-depth: 0 56 | 57 | - name: Configure AWS Credentials 58 | uses: aws-actions/configure-aws-credentials@v1 59 | with: 60 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 61 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 62 | aws-region: eu-central-1 63 | 64 | # Authenticate with ECR 65 | - name: Login to Amazon ECR 66 | id: login-ecr 67 | uses: aws-actions/amazon-ecr-login@v1 68 | 69 | - name: Docker meta 70 | id: meta 71 | uses: docker/metadata-action@v4 72 | with: 73 | images: | 74 | ${{ steps.login-ecr.outputs.registry }}/cloud-auth-api 75 | walletconnect/cloud-auth-api,enable=false 76 | flavor: | 77 | latest=auto 78 | tags: | 79 | type=semver,pattern={{version}} 80 | type=semver,pattern={{major}}.{{minor}} 81 | type=raw,value=${{ needs.release.outputs.version }} 82 | 83 | # Setup Buildkit 84 | - name: Set up Docker Buildx 85 | uses: docker/setup-buildx-action@v2 86 | 87 | - name: Build, tag, and push image 88 | uses: docker/build-push-action@v3 89 | with: 90 | context: . 91 | push: true 92 | tags: ${{ steps.meta.outputs.tags }} 93 | labels: ${{ steps.meta.outputs.labels }} 94 | cache-from: type=gha 95 | cache-to: type=gha,mode=max 96 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | 5 | /dist 6 | 7 | # Terraform 8 | terraform/.terraform* 9 | 10 | # Misc 11 | .DS_store 12 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "prettier.singleQuote": true, 3 | "prettier.trailingComma": "none", 4 | "prettier.semi": false 5 | } 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage 2 | FROM node:18.16.0-bullseye-slim as build 3 | 4 | # Set the working directory inside the container 5 | WORKDIR /app 6 | 7 | ENV NODE_ENV development 8 | # Copy package.json and package-lock.json to the working directory 9 | COPY package*.json ./ 10 | 11 | # Install dev dependencies 12 | RUN npm ci --only-dev --ignore-scripts 13 | 14 | # Copy the rest of the application code to the working directory 15 | COPY . . 16 | 17 | # Compile TypeScript 18 | RUN npm run build 19 | 20 | # Production stage 21 | FROM node:18.16.0-bullseye-slim as production 22 | 23 | # Set the working directory inside the container 24 | WORKDIR /app 25 | 26 | # install dumb-init 27 | RUN apt-get update && apt-get install -y --no-install-recommends dumb-init 28 | 29 | # Set node env to prod 30 | ENV NODE_ENV production 31 | 32 | # Copy package.json and package-lock.json to the working directory 33 | COPY package*.json ./ 34 | 35 | # Install prod dependencies 36 | RUN npm ci --only=production --ignore-scripts 37 | 38 | # Copy the compiled code from the build stage 39 | COPY --from=build /app/dist /app 40 | 41 | # generated prisma files 42 | COPY --from=build /app/node_modules/.prisma /app/node_modules/.prisma 43 | 44 | # Expose port 3333 defined in .env 45 | EXPOSE 3333 46 | 47 | # Make sure we don't run the container as root 48 | USER node 49 | 50 | # Pass environment variables to the container 51 | # ENV PORT ${PORT} 52 | # ENV SUPABASE_JWT_SECRET ${SUPABASE_JWT_SECRET} 53 | # ENV COOKIE_NAME ${COOKIE_NAME} 54 | # ENV COOKIE_SECRET ${COOKIE_SECRET} 55 | # ENV DIRECT_URL ${DIRECT_URL} 56 | # ENV DATABASE_URL ${DATABASE_URL} 57 | 58 | # Start the application 59 | CMD ["dumb-init", "node", "index.js"] 60 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 WalletConnect 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cloud Auth API 2 | 3 | This is an API built with Express, Prisma and TypeScript which aims to replace our self-hosted Supabase GoTrue instance. 4 | 5 | ## Prerequisites 6 | 7 | To run this API, you will need: 8 | 9 | - Node.js (version 16 or higher) 10 | - npm 11 | 12 | ## Getting Started 13 | 14 | 1. Clone this repository to your local machine. 15 | 16 | ```sh 17 | git clone https://github.com/WalletConnect/cloud-auth-api.git 18 | ``` 19 | 20 | 2. Install the dependencies. 21 | 22 | ```sh 23 | cd cloud-auth-api 24 | npm install 25 | ``` 26 | 27 | 3. Set up your environment variables 28 | 29 | ```sh 30 | cp .env.example .env 31 | ``` 32 | 33 | 4. Set up Prisma 34 | 35 | ```sh 36 | npx prisma generate 37 | 38 | // optionally, you can run Prisma Studio 39 | npx prisma studio 40 | ``` 41 | 42 | 5. Start the development server. 43 | 44 | ```sh 45 | npm run dev 46 | ``` 47 | 48 | The server will start on port 3333. You can access it at `http://localhost:3333`. 49 | 50 | 6. Alternatively you can run the docker containers 51 | 52 | ```sh 53 | docker-compose build && docker-compose up 54 | ``` 55 | 56 | ## API Endpoints 57 | 58 | This API has the following endpoints: 59 | 60 | - `GET /nonce` - Gets a nonce. 61 | - `POST /connect` - Creates a new user along with a session, an identity and gerenates access and refresh tokens. 62 | If the user already exists, it'll get updated and new access and refresh tokens will be generated. 63 | 64 | ## Health checks 65 | 66 | - Staging: https://staging.cloud-auth-api.reown.com/health 67 | - Production: https://cloud-auth-api.reown.com/health 68 | -------------------------------------------------------------------------------- /cog.toml: -------------------------------------------------------------------------------- 1 | tag_prefix = "v" 2 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | api: 4 | build: . 5 | image: cloud-auth-api 6 | ports: 7 | - ${PORT}:${PORT} 8 | environment: 9 | PORT: ${PORT} 10 | NODE_ENV: ${NODE_ENV} 11 | SUPABASE_JWT_SECRET: ${SUPABASE_JWT_SECRET} 12 | COOKIE_NAME: ${COOKIE_NAME} 13 | COOKIE_SECRET: ${COOKIE_SECRET} 14 | HCAPTCHA_SECRET: ${HCAPTCHA_SECRET} 15 | DIRECT_URL: ${DIRECT_URL} 16 | DATABASE_URL: ${DATABASE_URL} 17 | REDIS_URL: ${REDIS_URL} 18 | REDIS_PASSWORD: ${REDIS_PASSWORD} 19 | REDIS_HOST: ${REDIS_HOST} 20 | REDIS_PORT: ${REDIS_PORT} 21 | WALLETCONNECT_PROJECT_ID: ${WALLETCONNECT_PROJECT_ID} 22 | depends_on: 23 | redis: 24 | condition: service_healthy 25 | links: 26 | - redis 27 | redis: 28 | image: redis:6.2.12 29 | command: redis-server --requirepass ${REDIS_PASSWORD} 30 | healthcheck: 31 | test: ['CMD', 'redis-cli', 'ping'] 32 | ports: 33 | - '6379:6379' 34 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cloud-auth-api", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "cloud-auth-api", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@prisma/client": "^5.9.1", 13 | "connect-redis": "^7.1.1", 14 | "cookie": "^0.5.0", 15 | "cors": "^2.8.5", 16 | "dotenv": "^16.4.1", 17 | "ethers": "^6.10.0", 18 | "express": "^4.18.2", 19 | "express-rate-limit": "^7.1.5", 20 | "express-session": "^1.18.0", 21 | "ioredis": "^5.3.2", 22 | "jsonwebtoken": "^9.0.2", 23 | "siwe": "^2.1.4" 24 | }, 25 | "devDependencies": { 26 | "@types/cookie": "^0.5.4", 27 | "@types/cors": "^2.8.17", 28 | "@types/express": "^4.17.21", 29 | "@types/express-session": "^1.17.10", 30 | "@types/jsonwebtoken": "^9.0.5", 31 | "@types/node": "^18.19.14", 32 | "concurrently": "^7.6.0", 33 | "nodemon": "^3.0.3", 34 | "prisma": "^5.9.1", 35 | "typescript": "^4.9.5" 36 | } 37 | }, 38 | "node_modules/@adraffy/ens-normalize": { 39 | "version": "1.10.0", 40 | "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz", 41 | "integrity": "sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==" 42 | }, 43 | "node_modules/@babel/runtime": { 44 | "version": "7.23.9", 45 | "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", 46 | "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", 47 | "dev": true, 48 | "dependencies": { 49 | "regenerator-runtime": "^0.14.0" 50 | }, 51 | "engines": { 52 | "node": ">=6.9.0" 53 | } 54 | }, 55 | "node_modules/@ioredis/commands": { 56 | "version": "1.2.0", 57 | "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", 58 | "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" 59 | }, 60 | "node_modules/@noble/curves": { 61 | "version": "1.2.0", 62 | "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", 63 | "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", 64 | "dependencies": { 65 | "@noble/hashes": "1.3.2" 66 | }, 67 | "funding": { 68 | "url": "https://paulmillr.com/funding/" 69 | } 70 | }, 71 | "node_modules/@noble/hashes": { 72 | "version": "1.3.2", 73 | "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", 74 | "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", 75 | "engines": { 76 | "node": ">= 16" 77 | }, 78 | "funding": { 79 | "url": "https://paulmillr.com/funding/" 80 | } 81 | }, 82 | "node_modules/@prisma/client": { 83 | "version": "5.9.1", 84 | "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.9.1.tgz", 85 | "integrity": "sha512-caSOnG4kxcSkhqC/2ShV7rEoWwd3XrftokxJqOCMVvia4NYV/TPtJlS9C2os3Igxw/Qyxumj9GBQzcStzECvtQ==", 86 | "hasInstallScript": true, 87 | "engines": { 88 | "node": ">=16.13" 89 | }, 90 | "peerDependencies": { 91 | "prisma": "*" 92 | }, 93 | "peerDependenciesMeta": { 94 | "prisma": { 95 | "optional": true 96 | } 97 | } 98 | }, 99 | "node_modules/@prisma/debug": { 100 | "version": "5.9.1", 101 | "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.9.1.tgz", 102 | "integrity": "sha512-yAHFSFCg8KVoL0oRUno3m60GAjsUKYUDkQ+9BA2X2JfVR3kRVSJFc/GpQ2fSORi4pSHZR9orfM4UC9OVXIFFTA==", 103 | "devOptional": true 104 | }, 105 | "node_modules/@prisma/engines": { 106 | "version": "5.9.1", 107 | "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.9.1.tgz", 108 | "integrity": "sha512-gkdXmjxQ5jktxWNdDA5aZZ6R8rH74JkoKq6LD5mACSvxd2vbqWeWIOV0Py5wFC8vofOYShbt6XUeCIUmrOzOnQ==", 109 | "devOptional": true, 110 | "hasInstallScript": true, 111 | "dependencies": { 112 | "@prisma/debug": "5.9.1", 113 | "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", 114 | "@prisma/fetch-engine": "5.9.1", 115 | "@prisma/get-platform": "5.9.1" 116 | } 117 | }, 118 | "node_modules/@prisma/engines-version": { 119 | "version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", 120 | "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64.tgz", 121 | "integrity": "sha512-HFl7275yF0FWbdcNvcSRbbu9JCBSLMcurYwvWc8WGDnpu7APxQo2ONtZrUggU3WxLxUJ2uBX+0GOFIcJeVeOOQ==", 122 | "devOptional": true 123 | }, 124 | "node_modules/@prisma/fetch-engine": { 125 | "version": "5.9.1", 126 | "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.9.1.tgz", 127 | "integrity": "sha512-l0goQOMcNVOJs1kAcwqpKq3ylvkD9F04Ioe1oJoCqmz05mw22bNAKKGWuDd3zTUoUZr97va0c/UfLNru+PDmNA==", 128 | "devOptional": true, 129 | "dependencies": { 130 | "@prisma/debug": "5.9.1", 131 | "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", 132 | "@prisma/get-platform": "5.9.1" 133 | } 134 | }, 135 | "node_modules/@prisma/get-platform": { 136 | "version": "5.9.1", 137 | "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.9.1.tgz", 138 | "integrity": "sha512-6OQsNxTyhvG+T2Ksr8FPFpuPeL4r9u0JF0OZHUBI/Uy9SS43sPyAIutt4ZEAyqWQt104ERh70EZedkHZKsnNbg==", 139 | "devOptional": true, 140 | "dependencies": { 141 | "@prisma/debug": "5.9.1" 142 | } 143 | }, 144 | "node_modules/@spruceid/siwe-parser": { 145 | "version": "2.0.2", 146 | "resolved": "https://registry.npmjs.org/@spruceid/siwe-parser/-/siwe-parser-2.0.2.tgz", 147 | "integrity": "sha512-9WuA0ios2537cWYu39MMeH0O2KdrMKgKlOBUTWRTXQjCYu5B+mHCA0JkCbFaJ/0EjxoVIcYCXIW/DoPEpw+PqA==", 148 | "dependencies": { 149 | "@noble/hashes": "^1.1.2", 150 | "apg-js": "^4.1.1", 151 | "uri-js": "^4.4.1", 152 | "valid-url": "^1.0.9" 153 | } 154 | }, 155 | "node_modules/@stablelib/binary": { 156 | "version": "1.0.1", 157 | "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", 158 | "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", 159 | "dependencies": { 160 | "@stablelib/int": "^1.0.1" 161 | } 162 | }, 163 | "node_modules/@stablelib/int": { 164 | "version": "1.0.1", 165 | "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", 166 | "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==" 167 | }, 168 | "node_modules/@stablelib/random": { 169 | "version": "1.0.2", 170 | "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz", 171 | "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==", 172 | "dependencies": { 173 | "@stablelib/binary": "^1.0.1", 174 | "@stablelib/wipe": "^1.0.1" 175 | } 176 | }, 177 | "node_modules/@stablelib/wipe": { 178 | "version": "1.0.1", 179 | "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", 180 | "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==" 181 | }, 182 | "node_modules/@types/body-parser": { 183 | "version": "1.19.5", 184 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", 185 | "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", 186 | "dev": true, 187 | "dependencies": { 188 | "@types/connect": "*", 189 | "@types/node": "*" 190 | } 191 | }, 192 | "node_modules/@types/connect": { 193 | "version": "3.4.38", 194 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", 195 | "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", 196 | "dev": true, 197 | "dependencies": { 198 | "@types/node": "*" 199 | } 200 | }, 201 | "node_modules/@types/cookie": { 202 | "version": "0.5.4", 203 | "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.4.tgz", 204 | "integrity": "sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==", 205 | "dev": true 206 | }, 207 | "node_modules/@types/cors": { 208 | "version": "2.8.17", 209 | "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", 210 | "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", 211 | "dev": true, 212 | "dependencies": { 213 | "@types/node": "*" 214 | } 215 | }, 216 | "node_modules/@types/express": { 217 | "version": "4.17.21", 218 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", 219 | "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", 220 | "dev": true, 221 | "dependencies": { 222 | "@types/body-parser": "*", 223 | "@types/express-serve-static-core": "^4.17.33", 224 | "@types/qs": "*", 225 | "@types/serve-static": "*" 226 | } 227 | }, 228 | "node_modules/@types/express-serve-static-core": { 229 | "version": "4.17.43", 230 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz", 231 | "integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==", 232 | "dev": true, 233 | "dependencies": { 234 | "@types/node": "*", 235 | "@types/qs": "*", 236 | "@types/range-parser": "*", 237 | "@types/send": "*" 238 | } 239 | }, 240 | "node_modules/@types/express-session": { 241 | "version": "1.17.10", 242 | "resolved": "https://registry.npmjs.org/@types/express-session/-/express-session-1.17.10.tgz", 243 | "integrity": "sha512-U32bC/s0ejXijw5MAzyaV4tuZopCh/K7fPoUDyNbsRXHvPSeymygYD1RFL99YOLhF5PNOkzswvOTRaVHdL1zMw==", 244 | "dev": true, 245 | "dependencies": { 246 | "@types/express": "*" 247 | } 248 | }, 249 | "node_modules/@types/http-errors": { 250 | "version": "2.0.4", 251 | "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", 252 | "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", 253 | "dev": true 254 | }, 255 | "node_modules/@types/jsonwebtoken": { 256 | "version": "9.0.5", 257 | "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.5.tgz", 258 | "integrity": "sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==", 259 | "dev": true, 260 | "dependencies": { 261 | "@types/node": "*" 262 | } 263 | }, 264 | "node_modules/@types/mime": { 265 | "version": "1.3.5", 266 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", 267 | "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", 268 | "dev": true 269 | }, 270 | "node_modules/@types/node": { 271 | "version": "18.19.14", 272 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz", 273 | "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==", 274 | "dev": true, 275 | "dependencies": { 276 | "undici-types": "~5.26.4" 277 | } 278 | }, 279 | "node_modules/@types/qs": { 280 | "version": "6.9.11", 281 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", 282 | "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==", 283 | "dev": true 284 | }, 285 | "node_modules/@types/range-parser": { 286 | "version": "1.2.7", 287 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", 288 | "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", 289 | "dev": true 290 | }, 291 | "node_modules/@types/send": { 292 | "version": "0.17.4", 293 | "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", 294 | "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", 295 | "dev": true, 296 | "dependencies": { 297 | "@types/mime": "^1", 298 | "@types/node": "*" 299 | } 300 | }, 301 | "node_modules/@types/serve-static": { 302 | "version": "1.15.5", 303 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", 304 | "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", 305 | "dev": true, 306 | "dependencies": { 307 | "@types/http-errors": "*", 308 | "@types/mime": "*", 309 | "@types/node": "*" 310 | } 311 | }, 312 | "node_modules/abbrev": { 313 | "version": "1.1.1", 314 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 315 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", 316 | "dev": true 317 | }, 318 | "node_modules/accepts": { 319 | "version": "1.3.8", 320 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 321 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 322 | "dependencies": { 323 | "mime-types": "~2.1.34", 324 | "negotiator": "0.6.3" 325 | }, 326 | "engines": { 327 | "node": ">= 0.6" 328 | } 329 | }, 330 | "node_modules/aes-js": { 331 | "version": "4.0.0-beta.5", 332 | "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", 333 | "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" 334 | }, 335 | "node_modules/ansi-regex": { 336 | "version": "5.0.1", 337 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 338 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 339 | "dev": true, 340 | "engines": { 341 | "node": ">=8" 342 | } 343 | }, 344 | "node_modules/ansi-styles": { 345 | "version": "4.3.0", 346 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 347 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 348 | "dev": true, 349 | "dependencies": { 350 | "color-convert": "^2.0.1" 351 | }, 352 | "engines": { 353 | "node": ">=8" 354 | }, 355 | "funding": { 356 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 357 | } 358 | }, 359 | "node_modules/anymatch": { 360 | "version": "3.1.3", 361 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 362 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 363 | "dev": true, 364 | "dependencies": { 365 | "normalize-path": "^3.0.0", 366 | "picomatch": "^2.0.4" 367 | }, 368 | "engines": { 369 | "node": ">= 8" 370 | } 371 | }, 372 | "node_modules/apg-js": { 373 | "version": "4.3.0", 374 | "resolved": "https://registry.npmjs.org/apg-js/-/apg-js-4.3.0.tgz", 375 | "integrity": "sha512-8U8MULS+JocCnm11bfrVS4zxtAcE3uOiCAI21SnjDrV9LNhMSGwTGGeko3QfyK1JLWwT7KebFqJMB2puzfdFMQ==" 376 | }, 377 | "node_modules/array-flatten": { 378 | "version": "1.1.1", 379 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 380 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 381 | }, 382 | "node_modules/balanced-match": { 383 | "version": "1.0.2", 384 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 385 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 386 | "dev": true 387 | }, 388 | "node_modules/binary-extensions": { 389 | "version": "2.2.0", 390 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 391 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 392 | "dev": true, 393 | "engines": { 394 | "node": ">=8" 395 | } 396 | }, 397 | "node_modules/body-parser": { 398 | "version": "1.20.1", 399 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 400 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 401 | "dependencies": { 402 | "bytes": "3.1.2", 403 | "content-type": "~1.0.4", 404 | "debug": "2.6.9", 405 | "depd": "2.0.0", 406 | "destroy": "1.2.0", 407 | "http-errors": "2.0.0", 408 | "iconv-lite": "0.4.24", 409 | "on-finished": "2.4.1", 410 | "qs": "6.11.0", 411 | "raw-body": "2.5.1", 412 | "type-is": "~1.6.18", 413 | "unpipe": "1.0.0" 414 | }, 415 | "engines": { 416 | "node": ">= 0.8", 417 | "npm": "1.2.8000 || >= 1.4.16" 418 | } 419 | }, 420 | "node_modules/brace-expansion": { 421 | "version": "1.1.11", 422 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 423 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 424 | "dev": true, 425 | "dependencies": { 426 | "balanced-match": "^1.0.0", 427 | "concat-map": "0.0.1" 428 | } 429 | }, 430 | "node_modules/braces": { 431 | "version": "3.0.2", 432 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 433 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 434 | "dev": true, 435 | "dependencies": { 436 | "fill-range": "^7.0.1" 437 | }, 438 | "engines": { 439 | "node": ">=8" 440 | } 441 | }, 442 | "node_modules/buffer-equal-constant-time": { 443 | "version": "1.0.1", 444 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 445 | "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" 446 | }, 447 | "node_modules/bytes": { 448 | "version": "3.1.2", 449 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 450 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 451 | "engines": { 452 | "node": ">= 0.8" 453 | } 454 | }, 455 | "node_modules/call-bind": { 456 | "version": "1.0.5", 457 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", 458 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", 459 | "dependencies": { 460 | "function-bind": "^1.1.2", 461 | "get-intrinsic": "^1.2.1", 462 | "set-function-length": "^1.1.1" 463 | }, 464 | "funding": { 465 | "url": "https://github.com/sponsors/ljharb" 466 | } 467 | }, 468 | "node_modules/chalk": { 469 | "version": "4.1.2", 470 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 471 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 472 | "dev": true, 473 | "dependencies": { 474 | "ansi-styles": "^4.1.0", 475 | "supports-color": "^7.1.0" 476 | }, 477 | "engines": { 478 | "node": ">=10" 479 | }, 480 | "funding": { 481 | "url": "https://github.com/chalk/chalk?sponsor=1" 482 | } 483 | }, 484 | "node_modules/chalk/node_modules/supports-color": { 485 | "version": "7.2.0", 486 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 487 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 488 | "dev": true, 489 | "dependencies": { 490 | "has-flag": "^4.0.0" 491 | }, 492 | "engines": { 493 | "node": ">=8" 494 | } 495 | }, 496 | "node_modules/chokidar": { 497 | "version": "3.5.3", 498 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 499 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 500 | "dev": true, 501 | "funding": [ 502 | { 503 | "type": "individual", 504 | "url": "https://paulmillr.com/funding/" 505 | } 506 | ], 507 | "dependencies": { 508 | "anymatch": "~3.1.2", 509 | "braces": "~3.0.2", 510 | "glob-parent": "~5.1.2", 511 | "is-binary-path": "~2.1.0", 512 | "is-glob": "~4.0.1", 513 | "normalize-path": "~3.0.0", 514 | "readdirp": "~3.6.0" 515 | }, 516 | "engines": { 517 | "node": ">= 8.10.0" 518 | }, 519 | "optionalDependencies": { 520 | "fsevents": "~2.3.2" 521 | } 522 | }, 523 | "node_modules/cliui": { 524 | "version": "8.0.1", 525 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", 526 | "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", 527 | "dev": true, 528 | "dependencies": { 529 | "string-width": "^4.2.0", 530 | "strip-ansi": "^6.0.1", 531 | "wrap-ansi": "^7.0.0" 532 | }, 533 | "engines": { 534 | "node": ">=12" 535 | } 536 | }, 537 | "node_modules/cluster-key-slot": { 538 | "version": "1.1.2", 539 | "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", 540 | "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", 541 | "engines": { 542 | "node": ">=0.10.0" 543 | } 544 | }, 545 | "node_modules/color-convert": { 546 | "version": "2.0.1", 547 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 548 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 549 | "dev": true, 550 | "dependencies": { 551 | "color-name": "~1.1.4" 552 | }, 553 | "engines": { 554 | "node": ">=7.0.0" 555 | } 556 | }, 557 | "node_modules/color-name": { 558 | "version": "1.1.4", 559 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 560 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 561 | "dev": true 562 | }, 563 | "node_modules/concat-map": { 564 | "version": "0.0.1", 565 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 566 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 567 | "dev": true 568 | }, 569 | "node_modules/concurrently": { 570 | "version": "7.6.0", 571 | "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-7.6.0.tgz", 572 | "integrity": "sha512-BKtRgvcJGeZ4XttiDiNcFiRlxoAeZOseqUvyYRUp/Vtd+9p1ULmeoSqGsDA+2ivdeDFpqrJvGvmI+StKfKl5hw==", 573 | "dev": true, 574 | "dependencies": { 575 | "chalk": "^4.1.0", 576 | "date-fns": "^2.29.1", 577 | "lodash": "^4.17.21", 578 | "rxjs": "^7.0.0", 579 | "shell-quote": "^1.7.3", 580 | "spawn-command": "^0.0.2-1", 581 | "supports-color": "^8.1.0", 582 | "tree-kill": "^1.2.2", 583 | "yargs": "^17.3.1" 584 | }, 585 | "bin": { 586 | "conc": "dist/bin/concurrently.js", 587 | "concurrently": "dist/bin/concurrently.js" 588 | }, 589 | "engines": { 590 | "node": "^12.20.0 || ^14.13.0 || >=16.0.0" 591 | }, 592 | "funding": { 593 | "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" 594 | } 595 | }, 596 | "node_modules/connect-redis": { 597 | "version": "7.1.1", 598 | "resolved": "https://registry.npmjs.org/connect-redis/-/connect-redis-7.1.1.tgz", 599 | "integrity": "sha512-M+z7alnCJiuzKa8/1qAYdGUXHYfDnLolOGAUjOioB07pP39qxjG+X9ibsud7qUBc4jMV5Mcy3ugGv8eFcgamJQ==", 600 | "engines": { 601 | "node": ">=16" 602 | }, 603 | "peerDependencies": { 604 | "express-session": ">=1" 605 | } 606 | }, 607 | "node_modules/content-disposition": { 608 | "version": "0.5.4", 609 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 610 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 611 | "dependencies": { 612 | "safe-buffer": "5.2.1" 613 | }, 614 | "engines": { 615 | "node": ">= 0.6" 616 | } 617 | }, 618 | "node_modules/content-type": { 619 | "version": "1.0.5", 620 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 621 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 622 | "engines": { 623 | "node": ">= 0.6" 624 | } 625 | }, 626 | "node_modules/cookie": { 627 | "version": "0.5.0", 628 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 629 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 630 | "engines": { 631 | "node": ">= 0.6" 632 | } 633 | }, 634 | "node_modules/cookie-signature": { 635 | "version": "1.0.6", 636 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 637 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 638 | }, 639 | "node_modules/cors": { 640 | "version": "2.8.5", 641 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 642 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 643 | "dependencies": { 644 | "object-assign": "^4", 645 | "vary": "^1" 646 | }, 647 | "engines": { 648 | "node": ">= 0.10" 649 | } 650 | }, 651 | "node_modules/date-fns": { 652 | "version": "2.30.0", 653 | "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", 654 | "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", 655 | "dev": true, 656 | "dependencies": { 657 | "@babel/runtime": "^7.21.0" 658 | }, 659 | "engines": { 660 | "node": ">=0.11" 661 | }, 662 | "funding": { 663 | "type": "opencollective", 664 | "url": "https://opencollective.com/date-fns" 665 | } 666 | }, 667 | "node_modules/debug": { 668 | "version": "2.6.9", 669 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 670 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 671 | "dependencies": { 672 | "ms": "2.0.0" 673 | } 674 | }, 675 | "node_modules/define-data-property": { 676 | "version": "1.1.1", 677 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", 678 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", 679 | "dependencies": { 680 | "get-intrinsic": "^1.2.1", 681 | "gopd": "^1.0.1", 682 | "has-property-descriptors": "^1.0.0" 683 | }, 684 | "engines": { 685 | "node": ">= 0.4" 686 | } 687 | }, 688 | "node_modules/denque": { 689 | "version": "2.1.0", 690 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", 691 | "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", 692 | "engines": { 693 | "node": ">=0.10" 694 | } 695 | }, 696 | "node_modules/depd": { 697 | "version": "2.0.0", 698 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 699 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 700 | "engines": { 701 | "node": ">= 0.8" 702 | } 703 | }, 704 | "node_modules/destroy": { 705 | "version": "1.2.0", 706 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 707 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 708 | "engines": { 709 | "node": ">= 0.8", 710 | "npm": "1.2.8000 || >= 1.4.16" 711 | } 712 | }, 713 | "node_modules/dotenv": { 714 | "version": "16.4.1", 715 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", 716 | "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", 717 | "engines": { 718 | "node": ">=12" 719 | }, 720 | "funding": { 721 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 722 | } 723 | }, 724 | "node_modules/ecdsa-sig-formatter": { 725 | "version": "1.0.11", 726 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 727 | "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 728 | "dependencies": { 729 | "safe-buffer": "^5.0.1" 730 | } 731 | }, 732 | "node_modules/ee-first": { 733 | "version": "1.1.1", 734 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 735 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 736 | }, 737 | "node_modules/emoji-regex": { 738 | "version": "8.0.0", 739 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 740 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 741 | "dev": true 742 | }, 743 | "node_modules/encodeurl": { 744 | "version": "1.0.2", 745 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 746 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 747 | "engines": { 748 | "node": ">= 0.8" 749 | } 750 | }, 751 | "node_modules/es-errors": { 752 | "version": "1.3.0", 753 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 754 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 755 | "engines": { 756 | "node": ">= 0.4" 757 | } 758 | }, 759 | "node_modules/escalade": { 760 | "version": "3.1.1", 761 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 762 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 763 | "dev": true, 764 | "engines": { 765 | "node": ">=6" 766 | } 767 | }, 768 | "node_modules/escape-html": { 769 | "version": "1.0.3", 770 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 771 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 772 | }, 773 | "node_modules/etag": { 774 | "version": "1.8.1", 775 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 776 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 777 | "engines": { 778 | "node": ">= 0.6" 779 | } 780 | }, 781 | "node_modules/ethers": { 782 | "version": "6.10.0", 783 | "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.10.0.tgz", 784 | "integrity": "sha512-nMNwYHzs6V1FR3Y4cdfxSQmNgZsRj1RiTU25JwvnJLmyzw9z3SKxNc2XKDuiXXo/v9ds5Mp9m6HBabgYQQ26tA==", 785 | "funding": [ 786 | { 787 | "type": "individual", 788 | "url": "https://github.com/sponsors/ethers-io/" 789 | }, 790 | { 791 | "type": "individual", 792 | "url": "https://www.buymeacoffee.com/ricmoo" 793 | } 794 | ], 795 | "dependencies": { 796 | "@adraffy/ens-normalize": "1.10.0", 797 | "@noble/curves": "1.2.0", 798 | "@noble/hashes": "1.3.2", 799 | "@types/node": "18.15.13", 800 | "aes-js": "4.0.0-beta.5", 801 | "tslib": "2.4.0", 802 | "ws": "8.5.0" 803 | }, 804 | "engines": { 805 | "node": ">=14.0.0" 806 | } 807 | }, 808 | "node_modules/ethers/node_modules/@types/node": { 809 | "version": "18.15.13", 810 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", 811 | "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" 812 | }, 813 | "node_modules/express": { 814 | "version": "4.18.2", 815 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 816 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 817 | "dependencies": { 818 | "accepts": "~1.3.8", 819 | "array-flatten": "1.1.1", 820 | "body-parser": "1.20.1", 821 | "content-disposition": "0.5.4", 822 | "content-type": "~1.0.4", 823 | "cookie": "0.5.0", 824 | "cookie-signature": "1.0.6", 825 | "debug": "2.6.9", 826 | "depd": "2.0.0", 827 | "encodeurl": "~1.0.2", 828 | "escape-html": "~1.0.3", 829 | "etag": "~1.8.1", 830 | "finalhandler": "1.2.0", 831 | "fresh": "0.5.2", 832 | "http-errors": "2.0.0", 833 | "merge-descriptors": "1.0.1", 834 | "methods": "~1.1.2", 835 | "on-finished": "2.4.1", 836 | "parseurl": "~1.3.3", 837 | "path-to-regexp": "0.1.7", 838 | "proxy-addr": "~2.0.7", 839 | "qs": "6.11.0", 840 | "range-parser": "~1.2.1", 841 | "safe-buffer": "5.2.1", 842 | "send": "0.18.0", 843 | "serve-static": "1.15.0", 844 | "setprototypeof": "1.2.0", 845 | "statuses": "2.0.1", 846 | "type-is": "~1.6.18", 847 | "utils-merge": "1.0.1", 848 | "vary": "~1.1.2" 849 | }, 850 | "engines": { 851 | "node": ">= 0.10.0" 852 | } 853 | }, 854 | "node_modules/express-rate-limit": { 855 | "version": "7.1.5", 856 | "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.1.5.tgz", 857 | "integrity": "sha512-/iVogxu7ueadrepw1bS0X0kaRC/U0afwiYRSLg68Ts+p4Dc85Q5QKsOnPS/QUjPMHvOJQtBDrZgvkOzf8ejUYw==", 858 | "engines": { 859 | "node": ">= 16" 860 | }, 861 | "funding": { 862 | "url": "https://github.com/sponsors/express-rate-limit" 863 | }, 864 | "peerDependencies": { 865 | "express": "4 || 5 || ^5.0.0-beta.1" 866 | } 867 | }, 868 | "node_modules/express-session": { 869 | "version": "1.18.0", 870 | "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.0.tgz", 871 | "integrity": "sha512-m93QLWr0ju+rOwApSsyso838LQwgfs44QtOP/WBiwtAgPIo/SAh1a5c6nn2BR6mFNZehTpqKDESzP+fRHVbxwQ==", 872 | "dependencies": { 873 | "cookie": "0.6.0", 874 | "cookie-signature": "1.0.7", 875 | "debug": "2.6.9", 876 | "depd": "~2.0.0", 877 | "on-headers": "~1.0.2", 878 | "parseurl": "~1.3.3", 879 | "safe-buffer": "5.2.1", 880 | "uid-safe": "~2.1.5" 881 | }, 882 | "engines": { 883 | "node": ">= 0.8.0" 884 | } 885 | }, 886 | "node_modules/express-session/node_modules/cookie": { 887 | "version": "0.6.0", 888 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", 889 | "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", 890 | "engines": { 891 | "node": ">= 0.6" 892 | } 893 | }, 894 | "node_modules/express-session/node_modules/cookie-signature": { 895 | "version": "1.0.7", 896 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", 897 | "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==" 898 | }, 899 | "node_modules/fill-range": { 900 | "version": "7.0.1", 901 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 902 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 903 | "dev": true, 904 | "dependencies": { 905 | "to-regex-range": "^5.0.1" 906 | }, 907 | "engines": { 908 | "node": ">=8" 909 | } 910 | }, 911 | "node_modules/finalhandler": { 912 | "version": "1.2.0", 913 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 914 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 915 | "dependencies": { 916 | "debug": "2.6.9", 917 | "encodeurl": "~1.0.2", 918 | "escape-html": "~1.0.3", 919 | "on-finished": "2.4.1", 920 | "parseurl": "~1.3.3", 921 | "statuses": "2.0.1", 922 | "unpipe": "~1.0.0" 923 | }, 924 | "engines": { 925 | "node": ">= 0.8" 926 | } 927 | }, 928 | "node_modules/forwarded": { 929 | "version": "0.2.0", 930 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 931 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 932 | "engines": { 933 | "node": ">= 0.6" 934 | } 935 | }, 936 | "node_modules/fresh": { 937 | "version": "0.5.2", 938 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 939 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 940 | "engines": { 941 | "node": ">= 0.6" 942 | } 943 | }, 944 | "node_modules/fsevents": { 945 | "version": "2.3.3", 946 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 947 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 948 | "dev": true, 949 | "hasInstallScript": true, 950 | "optional": true, 951 | "os": [ 952 | "darwin" 953 | ], 954 | "engines": { 955 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 956 | } 957 | }, 958 | "node_modules/function-bind": { 959 | "version": "1.1.2", 960 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 961 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 962 | "funding": { 963 | "url": "https://github.com/sponsors/ljharb" 964 | } 965 | }, 966 | "node_modules/get-caller-file": { 967 | "version": "2.0.5", 968 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 969 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 970 | "dev": true, 971 | "engines": { 972 | "node": "6.* || 8.* || >= 10.*" 973 | } 974 | }, 975 | "node_modules/get-intrinsic": { 976 | "version": "1.2.3", 977 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.3.tgz", 978 | "integrity": "sha512-JIcZczvcMVE7AUOP+X72bh8HqHBRxFdz5PDHYtNG/lE3yk9b3KZBJlwFcTyPYjg3L4RLLmZJzvjxhaZVapxFrQ==", 979 | "dependencies": { 980 | "es-errors": "^1.0.0", 981 | "function-bind": "^1.1.2", 982 | "has-proto": "^1.0.1", 983 | "has-symbols": "^1.0.3", 984 | "hasown": "^2.0.0" 985 | }, 986 | "engines": { 987 | "node": ">= 0.4" 988 | }, 989 | "funding": { 990 | "url": "https://github.com/sponsors/ljharb" 991 | } 992 | }, 993 | "node_modules/glob-parent": { 994 | "version": "5.1.2", 995 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 996 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 997 | "dev": true, 998 | "dependencies": { 999 | "is-glob": "^4.0.1" 1000 | }, 1001 | "engines": { 1002 | "node": ">= 6" 1003 | } 1004 | }, 1005 | "node_modules/gopd": { 1006 | "version": "1.0.1", 1007 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 1008 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 1009 | "dependencies": { 1010 | "get-intrinsic": "^1.1.3" 1011 | }, 1012 | "funding": { 1013 | "url": "https://github.com/sponsors/ljharb" 1014 | } 1015 | }, 1016 | "node_modules/has-flag": { 1017 | "version": "4.0.0", 1018 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1019 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1020 | "dev": true, 1021 | "engines": { 1022 | "node": ">=8" 1023 | } 1024 | }, 1025 | "node_modules/has-property-descriptors": { 1026 | "version": "1.0.1", 1027 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", 1028 | "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", 1029 | "dependencies": { 1030 | "get-intrinsic": "^1.2.2" 1031 | }, 1032 | "funding": { 1033 | "url": "https://github.com/sponsors/ljharb" 1034 | } 1035 | }, 1036 | "node_modules/has-proto": { 1037 | "version": "1.0.1", 1038 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 1039 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 1040 | "engines": { 1041 | "node": ">= 0.4" 1042 | }, 1043 | "funding": { 1044 | "url": "https://github.com/sponsors/ljharb" 1045 | } 1046 | }, 1047 | "node_modules/has-symbols": { 1048 | "version": "1.0.3", 1049 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 1050 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 1051 | "engines": { 1052 | "node": ">= 0.4" 1053 | }, 1054 | "funding": { 1055 | "url": "https://github.com/sponsors/ljharb" 1056 | } 1057 | }, 1058 | "node_modules/hasown": { 1059 | "version": "2.0.0", 1060 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", 1061 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", 1062 | "dependencies": { 1063 | "function-bind": "^1.1.2" 1064 | }, 1065 | "engines": { 1066 | "node": ">= 0.4" 1067 | } 1068 | }, 1069 | "node_modules/http-errors": { 1070 | "version": "2.0.0", 1071 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 1072 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 1073 | "dependencies": { 1074 | "depd": "2.0.0", 1075 | "inherits": "2.0.4", 1076 | "setprototypeof": "1.2.0", 1077 | "statuses": "2.0.1", 1078 | "toidentifier": "1.0.1" 1079 | }, 1080 | "engines": { 1081 | "node": ">= 0.8" 1082 | } 1083 | }, 1084 | "node_modules/iconv-lite": { 1085 | "version": "0.4.24", 1086 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 1087 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 1088 | "dependencies": { 1089 | "safer-buffer": ">= 2.1.2 < 3" 1090 | }, 1091 | "engines": { 1092 | "node": ">=0.10.0" 1093 | } 1094 | }, 1095 | "node_modules/ignore-by-default": { 1096 | "version": "1.0.1", 1097 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 1098 | "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", 1099 | "dev": true 1100 | }, 1101 | "node_modules/inherits": { 1102 | "version": "2.0.4", 1103 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1104 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 1105 | }, 1106 | "node_modules/ioredis": { 1107 | "version": "5.3.2", 1108 | "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.2.tgz", 1109 | "integrity": "sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==", 1110 | "dependencies": { 1111 | "@ioredis/commands": "^1.1.1", 1112 | "cluster-key-slot": "^1.1.0", 1113 | "debug": "^4.3.4", 1114 | "denque": "^2.1.0", 1115 | "lodash.defaults": "^4.2.0", 1116 | "lodash.isarguments": "^3.1.0", 1117 | "redis-errors": "^1.2.0", 1118 | "redis-parser": "^3.0.0", 1119 | "standard-as-callback": "^2.1.0" 1120 | }, 1121 | "engines": { 1122 | "node": ">=12.22.0" 1123 | }, 1124 | "funding": { 1125 | "type": "opencollective", 1126 | "url": "https://opencollective.com/ioredis" 1127 | } 1128 | }, 1129 | "node_modules/ioredis/node_modules/debug": { 1130 | "version": "4.3.4", 1131 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 1132 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 1133 | "dependencies": { 1134 | "ms": "2.1.2" 1135 | }, 1136 | "engines": { 1137 | "node": ">=6.0" 1138 | }, 1139 | "peerDependenciesMeta": { 1140 | "supports-color": { 1141 | "optional": true 1142 | } 1143 | } 1144 | }, 1145 | "node_modules/ioredis/node_modules/ms": { 1146 | "version": "2.1.2", 1147 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1148 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1149 | }, 1150 | "node_modules/ipaddr.js": { 1151 | "version": "1.9.1", 1152 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 1153 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 1154 | "engines": { 1155 | "node": ">= 0.10" 1156 | } 1157 | }, 1158 | "node_modules/is-binary-path": { 1159 | "version": "2.1.0", 1160 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1161 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1162 | "dev": true, 1163 | "dependencies": { 1164 | "binary-extensions": "^2.0.0" 1165 | }, 1166 | "engines": { 1167 | "node": ">=8" 1168 | } 1169 | }, 1170 | "node_modules/is-extglob": { 1171 | "version": "2.1.1", 1172 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1173 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1174 | "dev": true, 1175 | "engines": { 1176 | "node": ">=0.10.0" 1177 | } 1178 | }, 1179 | "node_modules/is-fullwidth-code-point": { 1180 | "version": "3.0.0", 1181 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1182 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1183 | "dev": true, 1184 | "engines": { 1185 | "node": ">=8" 1186 | } 1187 | }, 1188 | "node_modules/is-glob": { 1189 | "version": "4.0.3", 1190 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1191 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1192 | "dev": true, 1193 | "dependencies": { 1194 | "is-extglob": "^2.1.1" 1195 | }, 1196 | "engines": { 1197 | "node": ">=0.10.0" 1198 | } 1199 | }, 1200 | "node_modules/is-number": { 1201 | "version": "7.0.0", 1202 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1203 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1204 | "dev": true, 1205 | "engines": { 1206 | "node": ">=0.12.0" 1207 | } 1208 | }, 1209 | "node_modules/jsonwebtoken": { 1210 | "version": "9.0.2", 1211 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", 1212 | "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", 1213 | "dependencies": { 1214 | "jws": "^3.2.2", 1215 | "lodash.includes": "^4.3.0", 1216 | "lodash.isboolean": "^3.0.3", 1217 | "lodash.isinteger": "^4.0.4", 1218 | "lodash.isnumber": "^3.0.3", 1219 | "lodash.isplainobject": "^4.0.6", 1220 | "lodash.isstring": "^4.0.1", 1221 | "lodash.once": "^4.0.0", 1222 | "ms": "^2.1.1", 1223 | "semver": "^7.5.4" 1224 | }, 1225 | "engines": { 1226 | "node": ">=12", 1227 | "npm": ">=6" 1228 | } 1229 | }, 1230 | "node_modules/jsonwebtoken/node_modules/ms": { 1231 | "version": "2.1.3", 1232 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1233 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1234 | }, 1235 | "node_modules/jwa": { 1236 | "version": "1.4.1", 1237 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 1238 | "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 1239 | "dependencies": { 1240 | "buffer-equal-constant-time": "1.0.1", 1241 | "ecdsa-sig-formatter": "1.0.11", 1242 | "safe-buffer": "^5.0.1" 1243 | } 1244 | }, 1245 | "node_modules/jws": { 1246 | "version": "3.2.2", 1247 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 1248 | "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 1249 | "dependencies": { 1250 | "jwa": "^1.4.1", 1251 | "safe-buffer": "^5.0.1" 1252 | } 1253 | }, 1254 | "node_modules/lodash": { 1255 | "version": "4.17.21", 1256 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 1257 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 1258 | "dev": true 1259 | }, 1260 | "node_modules/lodash.defaults": { 1261 | "version": "4.2.0", 1262 | "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", 1263 | "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" 1264 | }, 1265 | "node_modules/lodash.includes": { 1266 | "version": "4.3.0", 1267 | "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 1268 | "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" 1269 | }, 1270 | "node_modules/lodash.isarguments": { 1271 | "version": "3.1.0", 1272 | "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", 1273 | "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==" 1274 | }, 1275 | "node_modules/lodash.isboolean": { 1276 | "version": "3.0.3", 1277 | "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 1278 | "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" 1279 | }, 1280 | "node_modules/lodash.isinteger": { 1281 | "version": "4.0.4", 1282 | "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 1283 | "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" 1284 | }, 1285 | "node_modules/lodash.isnumber": { 1286 | "version": "3.0.3", 1287 | "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 1288 | "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" 1289 | }, 1290 | "node_modules/lodash.isplainobject": { 1291 | "version": "4.0.6", 1292 | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 1293 | "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" 1294 | }, 1295 | "node_modules/lodash.isstring": { 1296 | "version": "4.0.1", 1297 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 1298 | "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" 1299 | }, 1300 | "node_modules/lodash.once": { 1301 | "version": "4.1.1", 1302 | "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 1303 | "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" 1304 | }, 1305 | "node_modules/lru-cache": { 1306 | "version": "6.0.0", 1307 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 1308 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 1309 | "dependencies": { 1310 | "yallist": "^4.0.0" 1311 | }, 1312 | "engines": { 1313 | "node": ">=10" 1314 | } 1315 | }, 1316 | "node_modules/media-typer": { 1317 | "version": "0.3.0", 1318 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 1319 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 1320 | "engines": { 1321 | "node": ">= 0.6" 1322 | } 1323 | }, 1324 | "node_modules/merge-descriptors": { 1325 | "version": "1.0.1", 1326 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 1327 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 1328 | }, 1329 | "node_modules/methods": { 1330 | "version": "1.1.2", 1331 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 1332 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 1333 | "engines": { 1334 | "node": ">= 0.6" 1335 | } 1336 | }, 1337 | "node_modules/mime": { 1338 | "version": "1.6.0", 1339 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1340 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 1341 | "bin": { 1342 | "mime": "cli.js" 1343 | }, 1344 | "engines": { 1345 | "node": ">=4" 1346 | } 1347 | }, 1348 | "node_modules/mime-db": { 1349 | "version": "1.52.0", 1350 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1351 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 1352 | "engines": { 1353 | "node": ">= 0.6" 1354 | } 1355 | }, 1356 | "node_modules/mime-types": { 1357 | "version": "2.1.35", 1358 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1359 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1360 | "dependencies": { 1361 | "mime-db": "1.52.0" 1362 | }, 1363 | "engines": { 1364 | "node": ">= 0.6" 1365 | } 1366 | }, 1367 | "node_modules/minimatch": { 1368 | "version": "3.1.2", 1369 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1370 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1371 | "dev": true, 1372 | "dependencies": { 1373 | "brace-expansion": "^1.1.7" 1374 | }, 1375 | "engines": { 1376 | "node": "*" 1377 | } 1378 | }, 1379 | "node_modules/ms": { 1380 | "version": "2.0.0", 1381 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1382 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 1383 | }, 1384 | "node_modules/negotiator": { 1385 | "version": "0.6.3", 1386 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 1387 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 1388 | "engines": { 1389 | "node": ">= 0.6" 1390 | } 1391 | }, 1392 | "node_modules/nodemon": { 1393 | "version": "3.0.3", 1394 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.3.tgz", 1395 | "integrity": "sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ==", 1396 | "dev": true, 1397 | "dependencies": { 1398 | "chokidar": "^3.5.2", 1399 | "debug": "^4", 1400 | "ignore-by-default": "^1.0.1", 1401 | "minimatch": "^3.1.2", 1402 | "pstree.remy": "^1.1.8", 1403 | "semver": "^7.5.3", 1404 | "simple-update-notifier": "^2.0.0", 1405 | "supports-color": "^5.5.0", 1406 | "touch": "^3.1.0", 1407 | "undefsafe": "^2.0.5" 1408 | }, 1409 | "bin": { 1410 | "nodemon": "bin/nodemon.js" 1411 | }, 1412 | "engines": { 1413 | "node": ">=10" 1414 | }, 1415 | "funding": { 1416 | "type": "opencollective", 1417 | "url": "https://opencollective.com/nodemon" 1418 | } 1419 | }, 1420 | "node_modules/nodemon/node_modules/debug": { 1421 | "version": "4.3.4", 1422 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 1423 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 1424 | "dev": true, 1425 | "dependencies": { 1426 | "ms": "2.1.2" 1427 | }, 1428 | "engines": { 1429 | "node": ">=6.0" 1430 | }, 1431 | "peerDependenciesMeta": { 1432 | "supports-color": { 1433 | "optional": true 1434 | } 1435 | } 1436 | }, 1437 | "node_modules/nodemon/node_modules/has-flag": { 1438 | "version": "3.0.0", 1439 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1440 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 1441 | "dev": true, 1442 | "engines": { 1443 | "node": ">=4" 1444 | } 1445 | }, 1446 | "node_modules/nodemon/node_modules/ms": { 1447 | "version": "2.1.2", 1448 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1449 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1450 | "dev": true 1451 | }, 1452 | "node_modules/nodemon/node_modules/supports-color": { 1453 | "version": "5.5.0", 1454 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1455 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1456 | "dev": true, 1457 | "dependencies": { 1458 | "has-flag": "^3.0.0" 1459 | }, 1460 | "engines": { 1461 | "node": ">=4" 1462 | } 1463 | }, 1464 | "node_modules/nopt": { 1465 | "version": "1.0.10", 1466 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", 1467 | "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", 1468 | "dev": true, 1469 | "dependencies": { 1470 | "abbrev": "1" 1471 | }, 1472 | "bin": { 1473 | "nopt": "bin/nopt.js" 1474 | }, 1475 | "engines": { 1476 | "node": "*" 1477 | } 1478 | }, 1479 | "node_modules/normalize-path": { 1480 | "version": "3.0.0", 1481 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1482 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1483 | "dev": true, 1484 | "engines": { 1485 | "node": ">=0.10.0" 1486 | } 1487 | }, 1488 | "node_modules/object-assign": { 1489 | "version": "4.1.1", 1490 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1491 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 1492 | "engines": { 1493 | "node": ">=0.10.0" 1494 | } 1495 | }, 1496 | "node_modules/object-inspect": { 1497 | "version": "1.13.1", 1498 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", 1499 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", 1500 | "funding": { 1501 | "url": "https://github.com/sponsors/ljharb" 1502 | } 1503 | }, 1504 | "node_modules/on-finished": { 1505 | "version": "2.4.1", 1506 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 1507 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 1508 | "dependencies": { 1509 | "ee-first": "1.1.1" 1510 | }, 1511 | "engines": { 1512 | "node": ">= 0.8" 1513 | } 1514 | }, 1515 | "node_modules/on-headers": { 1516 | "version": "1.0.2", 1517 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", 1518 | "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", 1519 | "engines": { 1520 | "node": ">= 0.8" 1521 | } 1522 | }, 1523 | "node_modules/parseurl": { 1524 | "version": "1.3.3", 1525 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1526 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 1527 | "engines": { 1528 | "node": ">= 0.8" 1529 | } 1530 | }, 1531 | "node_modules/path-to-regexp": { 1532 | "version": "0.1.7", 1533 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1534 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 1535 | }, 1536 | "node_modules/picomatch": { 1537 | "version": "2.3.1", 1538 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1539 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1540 | "dev": true, 1541 | "engines": { 1542 | "node": ">=8.6" 1543 | }, 1544 | "funding": { 1545 | "url": "https://github.com/sponsors/jonschlinkert" 1546 | } 1547 | }, 1548 | "node_modules/prisma": { 1549 | "version": "5.9.1", 1550 | "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.9.1.tgz", 1551 | "integrity": "sha512-Hy/8KJZz0ELtkw4FnG9MS9rNWlXcJhf98Z2QMqi0QiVMoS8PzsBkpla0/Y5hTlob8F3HeECYphBjqmBxrluUrQ==", 1552 | "devOptional": true, 1553 | "hasInstallScript": true, 1554 | "dependencies": { 1555 | "@prisma/engines": "5.9.1" 1556 | }, 1557 | "bin": { 1558 | "prisma": "build/index.js" 1559 | }, 1560 | "engines": { 1561 | "node": ">=16.13" 1562 | } 1563 | }, 1564 | "node_modules/proxy-addr": { 1565 | "version": "2.0.7", 1566 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 1567 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 1568 | "dependencies": { 1569 | "forwarded": "0.2.0", 1570 | "ipaddr.js": "1.9.1" 1571 | }, 1572 | "engines": { 1573 | "node": ">= 0.10" 1574 | } 1575 | }, 1576 | "node_modules/pstree.remy": { 1577 | "version": "1.1.8", 1578 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 1579 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", 1580 | "dev": true 1581 | }, 1582 | "node_modules/punycode": { 1583 | "version": "2.3.1", 1584 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 1585 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 1586 | "engines": { 1587 | "node": ">=6" 1588 | } 1589 | }, 1590 | "node_modules/qs": { 1591 | "version": "6.11.0", 1592 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 1593 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 1594 | "dependencies": { 1595 | "side-channel": "^1.0.4" 1596 | }, 1597 | "engines": { 1598 | "node": ">=0.6" 1599 | }, 1600 | "funding": { 1601 | "url": "https://github.com/sponsors/ljharb" 1602 | } 1603 | }, 1604 | "node_modules/random-bytes": { 1605 | "version": "1.0.0", 1606 | "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", 1607 | "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==", 1608 | "engines": { 1609 | "node": ">= 0.8" 1610 | } 1611 | }, 1612 | "node_modules/range-parser": { 1613 | "version": "1.2.1", 1614 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1615 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 1616 | "engines": { 1617 | "node": ">= 0.6" 1618 | } 1619 | }, 1620 | "node_modules/raw-body": { 1621 | "version": "2.5.1", 1622 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 1623 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 1624 | "dependencies": { 1625 | "bytes": "3.1.2", 1626 | "http-errors": "2.0.0", 1627 | "iconv-lite": "0.4.24", 1628 | "unpipe": "1.0.0" 1629 | }, 1630 | "engines": { 1631 | "node": ">= 0.8" 1632 | } 1633 | }, 1634 | "node_modules/readdirp": { 1635 | "version": "3.6.0", 1636 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1637 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1638 | "dev": true, 1639 | "dependencies": { 1640 | "picomatch": "^2.2.1" 1641 | }, 1642 | "engines": { 1643 | "node": ">=8.10.0" 1644 | } 1645 | }, 1646 | "node_modules/redis-errors": { 1647 | "version": "1.2.0", 1648 | "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", 1649 | "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", 1650 | "engines": { 1651 | "node": ">=4" 1652 | } 1653 | }, 1654 | "node_modules/redis-parser": { 1655 | "version": "3.0.0", 1656 | "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", 1657 | "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", 1658 | "dependencies": { 1659 | "redis-errors": "^1.0.0" 1660 | }, 1661 | "engines": { 1662 | "node": ">=4" 1663 | } 1664 | }, 1665 | "node_modules/regenerator-runtime": { 1666 | "version": "0.14.1", 1667 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", 1668 | "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", 1669 | "dev": true 1670 | }, 1671 | "node_modules/require-directory": { 1672 | "version": "2.1.1", 1673 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1674 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 1675 | "dev": true, 1676 | "engines": { 1677 | "node": ">=0.10.0" 1678 | } 1679 | }, 1680 | "node_modules/rxjs": { 1681 | "version": "7.8.1", 1682 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", 1683 | "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", 1684 | "dev": true, 1685 | "dependencies": { 1686 | "tslib": "^2.1.0" 1687 | } 1688 | }, 1689 | "node_modules/safe-buffer": { 1690 | "version": "5.2.1", 1691 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1692 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1693 | "funding": [ 1694 | { 1695 | "type": "github", 1696 | "url": "https://github.com/sponsors/feross" 1697 | }, 1698 | { 1699 | "type": "patreon", 1700 | "url": "https://www.patreon.com/feross" 1701 | }, 1702 | { 1703 | "type": "consulting", 1704 | "url": "https://feross.org/support" 1705 | } 1706 | ] 1707 | }, 1708 | "node_modules/safer-buffer": { 1709 | "version": "2.1.2", 1710 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1711 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1712 | }, 1713 | "node_modules/semver": { 1714 | "version": "7.5.4", 1715 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", 1716 | "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", 1717 | "dependencies": { 1718 | "lru-cache": "^6.0.0" 1719 | }, 1720 | "bin": { 1721 | "semver": "bin/semver.js" 1722 | }, 1723 | "engines": { 1724 | "node": ">=10" 1725 | } 1726 | }, 1727 | "node_modules/send": { 1728 | "version": "0.18.0", 1729 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 1730 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 1731 | "dependencies": { 1732 | "debug": "2.6.9", 1733 | "depd": "2.0.0", 1734 | "destroy": "1.2.0", 1735 | "encodeurl": "~1.0.2", 1736 | "escape-html": "~1.0.3", 1737 | "etag": "~1.8.1", 1738 | "fresh": "0.5.2", 1739 | "http-errors": "2.0.0", 1740 | "mime": "1.6.0", 1741 | "ms": "2.1.3", 1742 | "on-finished": "2.4.1", 1743 | "range-parser": "~1.2.1", 1744 | "statuses": "2.0.1" 1745 | }, 1746 | "engines": { 1747 | "node": ">= 0.8.0" 1748 | } 1749 | }, 1750 | "node_modules/send/node_modules/ms": { 1751 | "version": "2.1.3", 1752 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1753 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1754 | }, 1755 | "node_modules/serve-static": { 1756 | "version": "1.15.0", 1757 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 1758 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 1759 | "dependencies": { 1760 | "encodeurl": "~1.0.2", 1761 | "escape-html": "~1.0.3", 1762 | "parseurl": "~1.3.3", 1763 | "send": "0.18.0" 1764 | }, 1765 | "engines": { 1766 | "node": ">= 0.8.0" 1767 | } 1768 | }, 1769 | "node_modules/set-function-length": { 1770 | "version": "1.2.0", 1771 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", 1772 | "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", 1773 | "dependencies": { 1774 | "define-data-property": "^1.1.1", 1775 | "function-bind": "^1.1.2", 1776 | "get-intrinsic": "^1.2.2", 1777 | "gopd": "^1.0.1", 1778 | "has-property-descriptors": "^1.0.1" 1779 | }, 1780 | "engines": { 1781 | "node": ">= 0.4" 1782 | } 1783 | }, 1784 | "node_modules/setprototypeof": { 1785 | "version": "1.2.0", 1786 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1787 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 1788 | }, 1789 | "node_modules/shell-quote": { 1790 | "version": "1.8.1", 1791 | "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", 1792 | "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", 1793 | "dev": true, 1794 | "funding": { 1795 | "url": "https://github.com/sponsors/ljharb" 1796 | } 1797 | }, 1798 | "node_modules/side-channel": { 1799 | "version": "1.0.4", 1800 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1801 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1802 | "dependencies": { 1803 | "call-bind": "^1.0.0", 1804 | "get-intrinsic": "^1.0.2", 1805 | "object-inspect": "^1.9.0" 1806 | }, 1807 | "funding": { 1808 | "url": "https://github.com/sponsors/ljharb" 1809 | } 1810 | }, 1811 | "node_modules/simple-update-notifier": { 1812 | "version": "2.0.0", 1813 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", 1814 | "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", 1815 | "dev": true, 1816 | "dependencies": { 1817 | "semver": "^7.5.3" 1818 | }, 1819 | "engines": { 1820 | "node": ">=10" 1821 | } 1822 | }, 1823 | "node_modules/siwe": { 1824 | "version": "2.1.4", 1825 | "resolved": "https://registry.npmjs.org/siwe/-/siwe-2.1.4.tgz", 1826 | "integrity": "sha512-Dke1Qqa3mgiLm3vjqw/+SQ7dl8WV/Pfk3AlQBF94cBFydTYhztngqYrikzE3X5UTsJ6565dfVbQptszsuYZNYg==", 1827 | "dependencies": { 1828 | "@spruceid/siwe-parser": "*", 1829 | "@stablelib/random": "^1.0.1", 1830 | "uri-js": "^4.4.1", 1831 | "valid-url": "^1.0.9" 1832 | }, 1833 | "peerDependencies": { 1834 | "ethers": "^5.6.8 || ^6.0.8" 1835 | } 1836 | }, 1837 | "node_modules/spawn-command": { 1838 | "version": "0.0.2-1", 1839 | "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", 1840 | "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", 1841 | "dev": true 1842 | }, 1843 | "node_modules/standard-as-callback": { 1844 | "version": "2.1.0", 1845 | "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", 1846 | "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==" 1847 | }, 1848 | "node_modules/statuses": { 1849 | "version": "2.0.1", 1850 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1851 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1852 | "engines": { 1853 | "node": ">= 0.8" 1854 | } 1855 | }, 1856 | "node_modules/string-width": { 1857 | "version": "4.2.3", 1858 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1859 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1860 | "dev": true, 1861 | "dependencies": { 1862 | "emoji-regex": "^8.0.0", 1863 | "is-fullwidth-code-point": "^3.0.0", 1864 | "strip-ansi": "^6.0.1" 1865 | }, 1866 | "engines": { 1867 | "node": ">=8" 1868 | } 1869 | }, 1870 | "node_modules/strip-ansi": { 1871 | "version": "6.0.1", 1872 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1873 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1874 | "dev": true, 1875 | "dependencies": { 1876 | "ansi-regex": "^5.0.1" 1877 | }, 1878 | "engines": { 1879 | "node": ">=8" 1880 | } 1881 | }, 1882 | "node_modules/supports-color": { 1883 | "version": "8.1.1", 1884 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1885 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1886 | "dev": true, 1887 | "dependencies": { 1888 | "has-flag": "^4.0.0" 1889 | }, 1890 | "engines": { 1891 | "node": ">=10" 1892 | }, 1893 | "funding": { 1894 | "url": "https://github.com/chalk/supports-color?sponsor=1" 1895 | } 1896 | }, 1897 | "node_modules/to-regex-range": { 1898 | "version": "5.0.1", 1899 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1900 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1901 | "dev": true, 1902 | "dependencies": { 1903 | "is-number": "^7.0.0" 1904 | }, 1905 | "engines": { 1906 | "node": ">=8.0" 1907 | } 1908 | }, 1909 | "node_modules/toidentifier": { 1910 | "version": "1.0.1", 1911 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1912 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1913 | "engines": { 1914 | "node": ">=0.6" 1915 | } 1916 | }, 1917 | "node_modules/touch": { 1918 | "version": "3.1.0", 1919 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 1920 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", 1921 | "dev": true, 1922 | "dependencies": { 1923 | "nopt": "~1.0.10" 1924 | }, 1925 | "bin": { 1926 | "nodetouch": "bin/nodetouch.js" 1927 | } 1928 | }, 1929 | "node_modules/tree-kill": { 1930 | "version": "1.2.2", 1931 | "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", 1932 | "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", 1933 | "dev": true, 1934 | "bin": { 1935 | "tree-kill": "cli.js" 1936 | } 1937 | }, 1938 | "node_modules/tslib": { 1939 | "version": "2.4.0", 1940 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", 1941 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" 1942 | }, 1943 | "node_modules/type-is": { 1944 | "version": "1.6.18", 1945 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1946 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1947 | "dependencies": { 1948 | "media-typer": "0.3.0", 1949 | "mime-types": "~2.1.24" 1950 | }, 1951 | "engines": { 1952 | "node": ">= 0.6" 1953 | } 1954 | }, 1955 | "node_modules/typescript": { 1956 | "version": "4.9.5", 1957 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", 1958 | "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", 1959 | "dev": true, 1960 | "bin": { 1961 | "tsc": "bin/tsc", 1962 | "tsserver": "bin/tsserver" 1963 | }, 1964 | "engines": { 1965 | "node": ">=4.2.0" 1966 | } 1967 | }, 1968 | "node_modules/uid-safe": { 1969 | "version": "2.1.5", 1970 | "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", 1971 | "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", 1972 | "dependencies": { 1973 | "random-bytes": "~1.0.0" 1974 | }, 1975 | "engines": { 1976 | "node": ">= 0.8" 1977 | } 1978 | }, 1979 | "node_modules/undefsafe": { 1980 | "version": "2.0.5", 1981 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", 1982 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", 1983 | "dev": true 1984 | }, 1985 | "node_modules/undici-types": { 1986 | "version": "5.26.5", 1987 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 1988 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", 1989 | "dev": true 1990 | }, 1991 | "node_modules/unpipe": { 1992 | "version": "1.0.0", 1993 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1994 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1995 | "engines": { 1996 | "node": ">= 0.8" 1997 | } 1998 | }, 1999 | "node_modules/uri-js": { 2000 | "version": "4.4.1", 2001 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 2002 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 2003 | "dependencies": { 2004 | "punycode": "^2.1.0" 2005 | } 2006 | }, 2007 | "node_modules/utils-merge": { 2008 | "version": "1.0.1", 2009 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 2010 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 2011 | "engines": { 2012 | "node": ">= 0.4.0" 2013 | } 2014 | }, 2015 | "node_modules/valid-url": { 2016 | "version": "1.0.9", 2017 | "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", 2018 | "integrity": "sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA==" 2019 | }, 2020 | "node_modules/vary": { 2021 | "version": "1.1.2", 2022 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 2023 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 2024 | "engines": { 2025 | "node": ">= 0.8" 2026 | } 2027 | }, 2028 | "node_modules/wrap-ansi": { 2029 | "version": "7.0.0", 2030 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 2031 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 2032 | "dev": true, 2033 | "dependencies": { 2034 | "ansi-styles": "^4.0.0", 2035 | "string-width": "^4.1.0", 2036 | "strip-ansi": "^6.0.0" 2037 | }, 2038 | "engines": { 2039 | "node": ">=10" 2040 | }, 2041 | "funding": { 2042 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 2043 | } 2044 | }, 2045 | "node_modules/ws": { 2046 | "version": "8.5.0", 2047 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", 2048 | "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", 2049 | "engines": { 2050 | "node": ">=10.0.0" 2051 | }, 2052 | "peerDependencies": { 2053 | "bufferutil": "^4.0.1", 2054 | "utf-8-validate": "^5.0.2" 2055 | }, 2056 | "peerDependenciesMeta": { 2057 | "bufferutil": { 2058 | "optional": true 2059 | }, 2060 | "utf-8-validate": { 2061 | "optional": true 2062 | } 2063 | } 2064 | }, 2065 | "node_modules/y18n": { 2066 | "version": "5.0.8", 2067 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 2068 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 2069 | "dev": true, 2070 | "engines": { 2071 | "node": ">=10" 2072 | } 2073 | }, 2074 | "node_modules/yallist": { 2075 | "version": "4.0.0", 2076 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 2077 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 2078 | }, 2079 | "node_modules/yargs": { 2080 | "version": "17.7.2", 2081 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", 2082 | "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", 2083 | "dev": true, 2084 | "dependencies": { 2085 | "cliui": "^8.0.1", 2086 | "escalade": "^3.1.1", 2087 | "get-caller-file": "^2.0.5", 2088 | "require-directory": "^2.1.1", 2089 | "string-width": "^4.2.3", 2090 | "y18n": "^5.0.5", 2091 | "yargs-parser": "^21.1.1" 2092 | }, 2093 | "engines": { 2094 | "node": ">=12" 2095 | } 2096 | }, 2097 | "node_modules/yargs-parser": { 2098 | "version": "21.1.1", 2099 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", 2100 | "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", 2101 | "dev": true, 2102 | "engines": { 2103 | "node": ">=12" 2104 | } 2105 | } 2106 | } 2107 | } 2108 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cloud-auth-api", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build:dev": "npx tsc", 8 | "prisma:gen": "npx prisma generate", 9 | "build": "npm run prisma:gen && npx tsc", 10 | "start": "node dist/index.js", 11 | "dev": "concurrently \"npx tsc --watch\" \"nodemon -q dist/index.js\"" 12 | }, 13 | "keywords": [], 14 | "author": "", 15 | "license": "ISC", 16 | "dependencies": { 17 | "@prisma/client": "^5.9.1", 18 | "connect-redis": "^7.1.1", 19 | "cookie": "^0.5.0", 20 | "cors": "^2.8.5", 21 | "dotenv": "^16.4.1", 22 | "ethers": "^6.10.0", 23 | "express": "^4.18.2", 24 | "express-rate-limit": "^7.1.5", 25 | "express-session": "^1.18.0", 26 | "ioredis": "^5.3.2", 27 | "jsonwebtoken": "^9.0.2", 28 | "siwe": "^2.1.4" 29 | }, 30 | "devDependencies": { 31 | "@types/cookie": "^0.5.4", 32 | "@types/cors": "^2.8.17", 33 | "@types/express": "^4.17.21", 34 | "@types/express-session": "^1.17.10", 35 | "@types/jsonwebtoken": "^9.0.5", 36 | "@types/node": "^18.19.14", 37 | "concurrently": "^7.6.0", 38 | "nodemon": "^3.0.3", 39 | "prisma": "^5.9.1", 40 | "typescript": "^4.9.5" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | generator client { 2 | provider = "prisma-client-js" 3 | previewFeatures = ["multiSchema", "postgresqlExtensions"] 4 | } 5 | 6 | datasource db { 7 | provider = "postgresql" 8 | url = env("DATABASE_URL") 9 | directUrl = env("DIRECT_URL") 10 | extensions = [uuid_ossp(map: "uuid-ossp", schema: "extensions")] 11 | schemas = ["auth", "extensions", "public"] 12 | } 13 | 14 | model audit_log_entries { 15 | instance_id String? @db.Uuid 16 | id String @id @db.Uuid 17 | payload Json? @db.Json 18 | created_at DateTime? @db.Timestamptz(6) 19 | ip_address String @default("") @db.VarChar(64) 20 | 21 | @@index([instance_id], map: "audit_logs_instance_id_idx") 22 | @@schema("auth") 23 | } 24 | 25 | model identities { 26 | provider_id String 27 | user_id String @db.Uuid 28 | identity_data Json 29 | provider String 30 | last_sign_in_at DateTime? @db.Timestamptz(6) 31 | created_at DateTime? @default(now()) @db.Timestamptz(6) 32 | updated_at DateTime? @updatedAt @db.Timestamptz(6) 33 | email String? @default(dbgenerated("lower((identity_data ->> 'email'::text))")) 34 | id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid 35 | users users @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 36 | 37 | @@unique([provider_id, provider], map: "identities_provider_id_provider_unique") 38 | @@index([email]) 39 | @@index([user_id]) 40 | @@schema("auth") 41 | } 42 | 43 | model instances { 44 | id String @id @db.Uuid 45 | uuid String? @db.Uuid 46 | raw_base_config String? 47 | created_at DateTime? @default(now()) @db.Timestamptz(6) 48 | updated_at DateTime? @updatedAt @db.Timestamptz(6) 49 | 50 | @@schema("auth") 51 | } 52 | 53 | model mfa_amr_claims { 54 | session_id String @db.Uuid 55 | created_at DateTime @db.Timestamptz(6) 56 | updated_at DateTime @db.Timestamptz(6) 57 | authentication_method String 58 | id String @id(map: "amr_id_pk") @db.Uuid 59 | sessions sessions @relation(fields: [session_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 60 | 61 | @@unique([session_id, authentication_method], map: "mfa_amr_claims_session_id_authentication_method_pkey") 62 | @@schema("auth") 63 | } 64 | 65 | model mfa_challenges { 66 | id String @id @db.Uuid 67 | factor_id String @db.Uuid 68 | created_at DateTime @db.Timestamptz(6) 69 | verified_at DateTime? @db.Timestamptz(6) 70 | ip_address String @db.Inet 71 | mfa_factors mfa_factors @relation(fields: [factor_id], references: [id], onDelete: Cascade, onUpdate: NoAction, map: "mfa_challenges_auth_factor_id_fkey") 72 | 73 | @@index([created_at(sort: Desc)], map: "mfa_challenge_created_at_idx") 74 | @@schema("auth") 75 | } 76 | 77 | model mfa_factors { 78 | id String @id @db.Uuid 79 | user_id String @db.Uuid 80 | friendly_name String? 81 | factor_type factor_type 82 | status factor_status 83 | created_at DateTime @db.Timestamptz(6) 84 | updated_at DateTime @db.Timestamptz(6) 85 | secret String? 86 | mfa_challenges mfa_challenges[] 87 | users users @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 88 | 89 | @@index([user_id, created_at], map: "factor_id_created_at_idx") 90 | @@index([user_id]) 91 | @@schema("auth") 92 | } 93 | 94 | model refresh_tokens { 95 | instance_id String? @db.Uuid 96 | id BigInt @id @default(autoincrement()) 97 | token String? @unique(map: "refresh_tokens_token_unique") @db.VarChar(255) 98 | user_id String? @db.VarChar(255) 99 | revoked Boolean? @default(false) 100 | created_at DateTime? @default(now()) @db.Timestamptz(6) 101 | updated_at DateTime? @updatedAt @db.Timestamptz(6) 102 | parent String? @db.VarChar(255) 103 | session_id String? @db.Uuid 104 | sessions sessions? @relation(fields: [session_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 105 | 106 | @@index([instance_id]) 107 | @@index([instance_id, user_id]) 108 | @@index([parent]) 109 | @@index([session_id, revoked]) 110 | @@index([session_id], map: "refresh_token_session_id") 111 | @@index([updated_at(sort: Desc)]) 112 | @@schema("auth") 113 | } 114 | 115 | model saml_providers { 116 | id String @id @db.Uuid 117 | sso_provider_id String @db.Uuid 118 | entity_id String @unique 119 | metadata_xml String 120 | metadata_url String? 121 | attribute_mapping Json? 122 | created_at DateTime? @db.Timestamptz(6) 123 | updated_at DateTime? @db.Timestamptz(6) 124 | sso_providers sso_providers @relation(fields: [sso_provider_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 125 | 126 | @@index([sso_provider_id]) 127 | @@schema("auth") 128 | } 129 | 130 | model saml_relay_states { 131 | id String @id @db.Uuid 132 | sso_provider_id String @db.Uuid 133 | request_id String 134 | for_email String? 135 | redirect_to String? 136 | from_ip_address String? @db.Inet 137 | created_at DateTime? @db.Timestamptz(6) 138 | updated_at DateTime? @db.Timestamptz(6) 139 | flow_state_id String? @db.Uuid 140 | flow_state flow_state? @relation(fields: [flow_state_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 141 | sso_providers sso_providers @relation(fields: [sso_provider_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 142 | 143 | @@index([for_email]) 144 | @@index([sso_provider_id]) 145 | @@index([created_at(sort: Desc)]) 146 | @@schema("auth") 147 | } 148 | 149 | model schema_migrations { 150 | version String @id @db.VarChar(255) 151 | 152 | @@schema("auth") 153 | } 154 | 155 | model sessions { 156 | id String @id @default(uuid()) @db.Uuid 157 | user_id String @db.Uuid 158 | created_at DateTime? @default(now()) @db.Timestamptz(6) 159 | updated_at DateTime? @updatedAt @db.Timestamptz(6) 160 | factor_id String? @db.Uuid 161 | aal aal_level? 162 | not_after DateTime? @db.Timestamptz(6) 163 | mfa_amr_claims mfa_amr_claims[] 164 | refresh_tokens refresh_tokens[] 165 | users users @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 166 | 167 | @@index([user_id]) 168 | @@index([user_id, created_at], map: "user_id_created_at_idx") 169 | @@index([not_after(sort: Desc)]) 170 | @@schema("auth") 171 | } 172 | 173 | model sso_domains { 174 | id String @id @db.Uuid 175 | sso_provider_id String @db.Uuid 176 | domain String 177 | created_at DateTime? @db.Timestamptz(6) 178 | updated_at DateTime? @db.Timestamptz(6) 179 | sso_providers sso_providers @relation(fields: [sso_provider_id], references: [id], onDelete: Cascade, onUpdate: NoAction) 180 | 181 | @@index([sso_provider_id]) 182 | @@schema("auth") 183 | } 184 | 185 | model sso_providers { 186 | id String @id @db.Uuid 187 | resource_id String? 188 | created_at DateTime? @db.Timestamptz(6) 189 | updated_at DateTime? @db.Timestamptz(6) 190 | saml_providers saml_providers[] 191 | saml_relay_states saml_relay_states[] 192 | sso_domains sso_domains[] 193 | 194 | @@schema("auth") 195 | } 196 | 197 | model users { 198 | id String @id @default(uuid()) @db.Uuid 199 | instance_id String? @db.Uuid 200 | aud String? @db.VarChar(255) 201 | role String? @db.VarChar(255) 202 | email String? @db.VarChar(255) 203 | encrypted_password String? @default("") @db.VarChar(255) 204 | email_confirmed_at DateTime? @db.Timestamptz(6) 205 | invited_at DateTime? @db.Timestamptz(6) 206 | confirmation_token String? @default("") @db.VarChar(255) 207 | confirmation_sent_at DateTime? @db.Timestamptz(6) 208 | recovery_token String? @default("") @db.VarChar(255) 209 | recovery_sent_at DateTime? @db.Timestamptz(6) 210 | email_change_token_new String? @default("") @db.VarChar(255) 211 | email_change String? @default("") @db.VarChar(255) 212 | email_change_sent_at DateTime? @db.Timestamptz(6) 213 | last_sign_in_at DateTime? @db.Timestamptz(6) 214 | raw_app_meta_data Json? 215 | raw_user_meta_data Json? 216 | is_super_admin Boolean? @default(false) 217 | created_at DateTime? @default(now()) @db.Timestamptz(6) 218 | updated_at DateTime? @updatedAt @db.Timestamptz(6) 219 | phone String? @unique 220 | phone_confirmed_at DateTime? @db.Timestamptz(6) 221 | phone_change String? @default("") 222 | phone_change_token String? @default("") @db.VarChar(255) 223 | phone_change_sent_at DateTime? @db.Timestamptz(6) 224 | confirmed_at DateTime? @default(dbgenerated("LEAST(email_confirmed_at, phone_confirmed_at)")) @db.Timestamptz(6) 225 | email_change_token_current String? @default("") @db.VarChar(255) 226 | email_change_confirm_status Int? @default(0) @db.SmallInt 227 | banned_until DateTime? @db.Timestamptz(6) 228 | reauthentication_token String? @default("") @db.VarChar(255) 229 | reauthentication_sent_at DateTime? @db.Timestamptz(6) 230 | is_sso_user Boolean @default(false) 231 | deleted_at DateTime? @db.Timestamptz(6) 232 | is_anonymous Boolean @default(false) 233 | identities identities[] 234 | mfa_factors mfa_factors[] 235 | sessions sessions[] 236 | 237 | @@index([instance_id]) 238 | @@index([is_anonymous]) 239 | @@schema("auth") 240 | } 241 | 242 | /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments 243 | model flow_state { 244 | id String @id @db.Uuid 245 | user_id String? @db.Uuid 246 | auth_code String 247 | code_challenge String 248 | provider_type String 249 | provider_access_token String? 250 | provider_refresh_token String? 251 | created_at DateTime? @db.Timestamptz(6) 252 | updated_at DateTime? @db.Timestamptz(6) 253 | authentication_method String 254 | saml_relay_states saml_relay_states[] 255 | 256 | @@index([created_at(sort: Desc)]) 257 | @@index([auth_code], map: "idx_auth_code") 258 | @@index([user_id, authentication_method], map: "idx_user_id_auth_method") 259 | @@schema("auth") 260 | } 261 | 262 | enum aal_level { 263 | aal1 264 | aal2 265 | aal3 266 | 267 | @@schema("auth") 268 | } 269 | 270 | enum factor_status { 271 | unverified 272 | verified 273 | 274 | @@schema("auth") 275 | } 276 | 277 | enum factor_type { 278 | totp 279 | webauthn 280 | 281 | @@schema("auth") 282 | } 283 | -------------------------------------------------------------------------------- /src/handlers/verify.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from 'ethers' 2 | import { Request, Response } from 'express' 3 | import { SiweErrorType, SiweMessage } from 'siwe' 4 | import { createOrUpdateUser } from '../services/prisma' 5 | import { SiweDeprecationError } from '../utils/errors' 6 | 7 | const provider = new ethers.JsonRpcProvider( 8 | `https://rpc.walletconnect.com/v1?chainId=eip155:1&projectId=${process.env.WALLETCONNECT_PROJECT_ID}` 9 | ) 10 | 11 | export const verifyAndSignIn = async (req: Request, res: Response) => { 12 | try { 13 | if (!req.body.message) { 14 | return res.status(422).json({ message: 'Expected prepareMessage object as body.' }) 15 | } 16 | 17 | const message = new SiweMessage(req.body.message) 18 | const fields = await message.verify( 19 | { 20 | signature: req.body.signature, 21 | nonce: req.session.nonce 22 | }, 23 | { 24 | provider 25 | } 26 | ) 27 | 28 | req.session.siwe = fields.data 29 | 30 | const expirationTime = fields.data.expirationTime 31 | if (expirationTime) { 32 | req.session.cookie.expires = new Date(expirationTime) 33 | } else { 34 | // 7 days from now 35 | req.session.cookie.expires = new Date(new Date().getTime() + 7 * 24 * 60 * 60 * 1000) 36 | } 37 | 38 | const { accessToken, refreshToken } = await createOrUpdateUser(fields.data) 39 | 40 | return req.session.save(() => { 41 | return res.status(200).json({ 42 | accessToken: accessToken, 43 | refreshToken: refreshToken 44 | }) 45 | }) 46 | } catch (e: any) { 47 | console.error(e) 48 | req.session.siwe = undefined 49 | req.session.nonce = undefined 50 | if (e instanceof SiweDeprecationError) { 51 | return req.session.save(() => 52 | res.status(403).json({ cause: 'SIWE_DEPRECATION', message: e.message ?? `${e}` }) 53 | ) 54 | } 55 | try { 56 | switch (e) { 57 | case SiweErrorType.EXPIRED_MESSAGE: { 58 | req.session.save(() => res.status(440).json({ message: e.message })) 59 | break 60 | } 61 | case SiweErrorType.INVALID_SIGNATURE: { 62 | req.session.save(() => res.status(422).json({ message: e.message })) 63 | break 64 | } 65 | case SiweErrorType.INVALID_ADDRESS: { 66 | req.session.save(() => res.status(422).json({ message: e.message })) 67 | break 68 | } 69 | case SiweErrorType.NONCE_MISMATCH: { 70 | req.session.save(() => res.status(400).json({ message: e.message })) 71 | break 72 | } 73 | case SiweErrorType.DOMAIN_MISMATCH: { 74 | req.session.save(() => res.status(400).json({ message: e.message })) 75 | break 76 | } 77 | default: { 78 | req.session.save(() => res.status(500).json({ message: e.message ?? `${e}` })) 79 | break 80 | } 81 | } 82 | } catch (sessionError) { 83 | console.error(`Failed to save session, ${JSON.stringify(sessionError)}`) 84 | } 85 | 86 | return 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from '@prisma/client' 2 | import RedisStore from 'connect-redis' 3 | import cors, { CorsOptions } from 'cors' 4 | import dotenv from 'dotenv' 5 | import express, { NextFunction, Request, Response } from 'express' 6 | import rateLimit from 'express-rate-limit' 7 | import Session from 'express-session' 8 | import { Redis } from 'ioredis' 9 | import { SiweMessage, generateNonce } from 'siwe' 10 | import { verifyAndSignIn } from './handlers/verify' 11 | import { captchaVerification } from './middlewares/captchaVerification' 12 | 13 | dotenv.config() 14 | 15 | declare module 'express-session' { 16 | interface SessionData { 17 | nonce?: string 18 | siwe?: SiweMessage 19 | } 20 | } 21 | 22 | const { PORT, COOKIE_SECRET, COOKIE_NAME, REDIS_PASSWORD, REDIS_HOST, REDIS_PORT } = process.env 23 | if (!COOKIE_NAME) { 24 | throw new ReferenceError('COOKIE_NAME missing in environment variables') 25 | } 26 | if (!COOKIE_SECRET) { 27 | throw new ReferenceError('COOKIE_SECRET missing in environment variables') 28 | } 29 | if (!REDIS_HOST) { 30 | throw new ReferenceError('REDIS_HOST missing in environment variables') 31 | } 32 | if (!REDIS_HOST) { 33 | throw new ReferenceError('REDIS_HOST missing in environment variables') 34 | } 35 | if (!REDIS_PASSWORD) { 36 | throw new ReferenceError('REDIS_PASSWORD missing in environment variables') 37 | } 38 | 39 | const isProd = process.env.NODE_ENV === 'production' 40 | const isStage = process.env.NODE_ENV === 'staging' 41 | const isDev = process.env.NODE_ENV === 'development' 42 | 43 | const prismaClient = new PrismaClient() 44 | 45 | // Initialize redis client 46 | const redisClient = new Redis({ 47 | host: REDIS_HOST ?? 'redis', 48 | port: REDIS_PORT ? parseInt(REDIS_PORT, 10) : 6379, 49 | password: REDIS_PASSWORD 50 | }) 51 | 52 | // Initialize connect-redis store for express-session 53 | const redisStore = new RedisStore({ 54 | client: redisClient 55 | }) 56 | 57 | const app = express() 58 | 59 | // Disable header "x-powered-by: express" 60 | app.disable('x-powered-by') 61 | // Enable body parser 62 | app.use(express.json()) 63 | app.set('trust proxy', 1) 64 | 65 | const allowedOrigins = isProd 66 | ? ['https://cloud.walletconnect.com', 'https://cloud.reown.com'] 67 | : [ 68 | 'http://localhost', 69 | 'https://wc-cloud-staging.vercel.app', 70 | /\.?-walletconnect1\.vercel\.app$/, 71 | /\.?-reown-com\.vercel\.app$/ 72 | ] 73 | 74 | const corsOptions: CorsOptions = { 75 | credentials: true, 76 | methods: ['OPTIONS', 'GET', 'POST'], 77 | origin: (origin, callback) => { 78 | if ( 79 | !origin || 80 | isDev || 81 | allowedOrigins.some((allowedOrigin) => new RegExp(allowedOrigin).test(origin)) 82 | ) { 83 | callback(null, true) 84 | } else { 85 | callback(new Error(`Origin ${origin} is not allowed by CORS`)) 86 | } 87 | } 88 | } 89 | app.use(cors(corsOptions)) 90 | 91 | app.use( 92 | Session({ 93 | name: COOKIE_NAME, 94 | secret: COOKIE_SECRET, 95 | resave: false, 96 | saveUninitialized: false, 97 | store: redisStore, 98 | cookie: { 99 | secure: isDev ? false : true, 100 | sameSite: isStage ? 'none' : 'strict', 101 | maxAge: 144 * 60 * 60 * 1000, 102 | httpOnly: true 103 | } 104 | }) 105 | ) 106 | 107 | const limiter = rateLimit({ 108 | windowMs: 10 * 60 * 1000, // 10 minutes 109 | max: 200, // Limit each IP to 200 requests per `window` (here, per 10 minutes) 110 | standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers 111 | legacyHeaders: false // Disable the `X-RateLimit-*` headers 112 | }) 113 | 114 | // Apply the rate limiting middleware to all requests 115 | app.use(limiter) 116 | 117 | app.get('/health', async function (req, res) { 118 | try { 119 | await prismaClient.$queryRaw`SELECT 1;` 120 | return res.status(200).json({ status: 'OK' }) 121 | } catch (error) { 122 | console.error('/health -> DB connection failed') 123 | return res.status(500).json({ status: 'NOT OK' }) 124 | } 125 | }) 126 | 127 | app.get('/nonce', async function (req, res) { 128 | req.session.nonce = generateNonce() 129 | 130 | return req.session.save(() => res.status(200).json({ nonce: req.session.nonce })) 131 | }) 132 | 133 | app.get('/session', async function (req, res) { 134 | const siweSession = req.session.siwe 135 | if (!siweSession) { 136 | return res.status(401).json({ error: 'Unauthorized' }) 137 | } 138 | 139 | return res.status(200).json({ session: siweSession }) 140 | }) 141 | 142 | app.post('/connect', captchaVerification, verifyAndSignIn) 143 | 144 | app.post('/disconnect', async function (req, res) { 145 | res.clearCookie(COOKIE_NAME) 146 | return req.session.destroy((err) => { 147 | if (err) { 148 | return res.status(500).json({ error: 'Failed to destroy session' }) 149 | } 150 | return res.status(200).json({ status: 'Disconnected' }) 151 | }) 152 | }) 153 | 154 | // custom 404 155 | app.use((req, res, next) => { 156 | return res.status(404).json({ error: "Sorry can't find that!" }) 157 | }) 158 | 159 | // custom error handler 160 | app.use((err: Error, req: Request, res: Response, next: NextFunction) => { 161 | console.error(err) 162 | return res.status(500).json({ error: 'Something went wrong!' }) 163 | }) 164 | 165 | const server = app.listen(PORT, () => { 166 | console.log(`⚡️[server]: Server is running on port ${PORT}`) 167 | }) 168 | 169 | // Create a function to close the server and exit the process 170 | const exitProcess = () => { 171 | console.log('Closing server and exiting process...') 172 | return server.close(() => { 173 | console.log('Server closed.') 174 | return process.exit(1) 175 | }) 176 | } 177 | 178 | // Gracefully handle uncaught exceptions and rejections 179 | process.on('uncaughtException', (err) => { 180 | console.log(`Uncaught exception: ${JSON.stringify(err)}`) 181 | return exitProcess() 182 | }) 183 | process.on('unhandledRejection', (err) => { 184 | console.log(`Unhandled rejection: ${JSON.stringify(err)}`) 185 | return exitProcess() 186 | }) 187 | -------------------------------------------------------------------------------- /src/middlewares/captchaVerification.ts: -------------------------------------------------------------------------------- 1 | import { NextFunction, Request, Response } from "express"; 2 | 3 | export const captchaVerification = async ( 4 | req: Request, 5 | res: Response, 6 | next: NextFunction 7 | ) => { 8 | if (process.env.NODE_ENV === "development" || process.env.NODE_ENV === "staging") { 9 | return next(); 10 | } 11 | 12 | const captchaSecret = process.env.HCAPTCHA_SECRET; 13 | if (!captchaSecret) { 14 | throw new Error("Missing captcha secret environment variable"); 15 | } 16 | 17 | const captchaToken = req.body?.captchaToken; 18 | if (!captchaToken) { 19 | return res 20 | .status(400) 21 | .json({ error: "Bad request - missing 'captchaToken' in body" }); 22 | } 23 | 24 | try { 25 | const hCaptchaRawResponse = await fetch( 26 | `https://hcaptcha.com/siteverify?secret=${captchaSecret}&response=${captchaToken}`, 27 | { 28 | method: "POST", 29 | } 30 | ); 31 | const hCaptchaResponse = (await hCaptchaRawResponse.json()) as { 32 | success: boolean; 33 | challenge_ts: string; 34 | hostname: string; 35 | }; 36 | 37 | if (!hCaptchaResponse?.success) { 38 | return res.status(403).json({ error: "hCaptcha verification failed" }); 39 | } 40 | next(); 41 | } catch (error) { 42 | console.error(error); 43 | return res 44 | .status(500) 45 | .json({ error: "Error occurred during hCaptcha verification" }); 46 | } 47 | }; 48 | -------------------------------------------------------------------------------- /src/services/prisma.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient, users } from '@prisma/client' 2 | import jwt from 'jsonwebtoken' 3 | import { SiweMessage } from 'siwe' 4 | import { DEFAULT_INSTANCE_ID, SEVEN_DAYS_IN_SECONDS, secureToken } from '../utils' 5 | import { SiweDeprecationError } from '../utils/errors' 6 | import { GoTrueClaims, TPrismaTransaction } from '../utils/types' 7 | 8 | const prisma = new PrismaClient() 9 | 10 | export const generateAccessToken = async ( 11 | user: users, 12 | expiresIn: number, 13 | tx: TPrismaTransaction, 14 | sessionId?: string 15 | ): Promise => { 16 | if (sessionId) { 17 | const session = await tx.sessions.findUnique({ 18 | where: { 19 | id: sessionId 20 | } 21 | }) 22 | 23 | if (!session) { 24 | throw new Error('Session not found') 25 | } 26 | } 27 | 28 | if (!user.aud || !user.role || !sessionId) { 29 | throw new Error('Missing user information') 30 | } 31 | 32 | const claims: GoTrueClaims = { 33 | sub: user.id, 34 | aud: user.aud, 35 | exp: Math.floor(Date.now() / 1000) + expiresIn, 36 | app_metadata: user.raw_app_meta_data, 37 | user_metadata: user.raw_user_meta_data, 38 | role: user.role, 39 | session_id: sessionId, 40 | email: '', 41 | phone: '' 42 | } 43 | 44 | if (!process.env.SUPABASE_JWT_SECRET) { 45 | throw new Error('Missing secret') 46 | } 47 | 48 | const token = jwt.sign(claims, process.env.SUPABASE_JWT_SECRET) 49 | return token 50 | } 51 | 52 | export async function createOrUpdateUser(siweMsg: SiweMessage) { 53 | const tokens = await prisma.$transaction(async (tx) => { 54 | const existingUser = await tx.users.findFirst({ 55 | where: { 56 | raw_user_meta_data: { 57 | path: ['address'], 58 | equals: siweMsg.address 59 | }, 60 | AND: { 61 | raw_user_meta_data: { 62 | path: ['chain_id'], 63 | equals: siweMsg.chainId.toString() 64 | } 65 | } 66 | } 67 | }) 68 | 69 | if (!existingUser) { 70 | throw new SiweDeprecationError( 71 | 'Wallet account sign-ups are deprecated. Please sign up with your email and password.' 72 | ) 73 | } 74 | 75 | // Check for an existing session and update the last sign in date 76 | let existingSession = await tx.sessions.findFirst({ 77 | where: { 78 | user_id: existingUser.id 79 | } 80 | }) 81 | await tx.users.update({ 82 | where: { 83 | id: existingUser.id 84 | }, 85 | data: { 86 | last_sign_in_at: siweMsg.issuedAt 87 | } 88 | }) 89 | if (!existingSession) { 90 | existingSession = await tx.sessions.create({ 91 | data: { 92 | user_id: existingUser.id 93 | } 94 | }) 95 | } 96 | 97 | let existingIdentity = await tx.identities.findFirst({ 98 | where: { 99 | user_id: existingUser.id 100 | } 101 | }) 102 | if (!existingIdentity) { 103 | await tx.identities.create({ 104 | data: { 105 | id: existingUser.id, 106 | provider: 'eth', 107 | user_id: existingUser.id, 108 | provider_id: siweMsg.address, 109 | identity_data: { 110 | sub: existingUser.id, 111 | address: siweMsg.address 112 | }, 113 | last_sign_in_at: siweMsg.issuedAt 114 | } 115 | }) 116 | } 117 | 118 | // Generate access and refresh tokens 119 | const generatedRefreshToken = secureToken() 120 | 121 | const refreshToken = await tx.refresh_tokens.create({ 122 | data: { 123 | session_id: existingSession.id, 124 | user_id: existingUser.id, 125 | instance_id: DEFAULT_INSTANCE_ID, 126 | parent: '', 127 | token: generatedRefreshToken 128 | } 129 | }) 130 | const accessToken = await generateAccessToken( 131 | existingUser, 132 | SEVEN_DAYS_IN_SECONDS, 133 | tx, 134 | existingSession.id 135 | ) 136 | 137 | return { refreshToken: refreshToken.token, accessToken } 138 | }) 139 | 140 | return tokens 141 | } 142 | -------------------------------------------------------------------------------- /src/utils/errors.ts: -------------------------------------------------------------------------------- 1 | export class SiweDeprecationError extends Error { 2 | constructor(message: string) { 3 | super(message) 4 | this.name = 'SiweDeprecationError' 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { randomBytes } from "crypto"; 2 | 3 | export const SEVEN_DAYS_IN_SECONDS = 604800; 4 | export const DEFAULT_INSTANCE_ID = "00000000-0000-0000-0000-000000000000"; 5 | 6 | export const secureToken = (...options: number[]): string => { 7 | let length = 16; 8 | if (options.length > 0) { 9 | length = options[0]; 10 | } 11 | const buffer = randomBytes(length); 12 | let token = buffer.toString("base64"); 13 | token = token.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); 14 | return token; 15 | }; 16 | -------------------------------------------------------------------------------- /src/utils/types.ts: -------------------------------------------------------------------------------- 1 | import { Prisma, PrismaClient } from "@prisma/client"; 2 | import { DefaultArgs } from "@prisma/client/runtime/library"; 3 | 4 | export interface GoTrueClaims { 5 | sub: string; 6 | aud: string; 7 | exp: number; 8 | email?: string; 9 | phone?: string; 10 | app_metadata: any; 11 | user_metadata: any; 12 | role: string; 13 | session_id: string; 14 | authenticator_assurance_level?: string; 15 | authentication_method_reference?: any[]; 16 | } 17 | 18 | export type TPrismaTransaction = Omit< 19 | PrismaClient, 20 | "$connect" | "$disconnect" | "$on" | "$transaction" | "$use" | "$extends" 21 | >; 22 | -------------------------------------------------------------------------------- /terraform/backend.tf: -------------------------------------------------------------------------------- 1 | # Terraform Configuration 2 | terraform { 3 | required_version = "~> 1.0" 4 | required_providers { 5 | assert = { 6 | source = "bwoznicki/assert" 7 | } 8 | aws = { 9 | source = "hashicorp/aws" 10 | version = "~> 4.31" 11 | } 12 | github = { 13 | source = "integrations/github" 14 | version = "5.7.0" 15 | } 16 | } 17 | 18 | backend "s3" { 19 | region = "eu-central-1" 20 | bucket = "opz" 21 | workspace_key_prefix = "infra/env" 22 | key = "apps/cloud-auth-api.tfstate" 23 | 24 | force_path_style = true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /terraform/ecs/iam.tf: -------------------------------------------------------------------------------- 1 | resource "aws_iam_role" "ecs_task_execution_role" { 2 | name = "${var.app_name}-ecs-task-execution-role" 3 | assume_role_policy = data.aws_iam_policy_document.assume_role_policy.json 4 | } 5 | 6 | data "aws_iam_policy_document" "assume_role_policy" { 7 | statement { 8 | actions = ["sts:AssumeRole"] 9 | 10 | principals { 11 | type = "Service" 12 | identifiers = ["ecs-tasks.amazonaws.com"] 13 | } 14 | } 15 | } 16 | 17 | resource "aws_iam_role_policy_attachment" "ecs_task_execution_role_policy" { 18 | role = aws_iam_role.ecs_task_execution_role.name 19 | policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy" 20 | } 21 | 22 | # Prometheus Access 23 | resource "aws_iam_role_policy_attachment" "prometheus_write_policy" { 24 | role = aws_iam_role.ecs_task_execution_role.name 25 | policy_arn = "arn:aws:iam::aws:policy/AmazonPrometheusRemoteWriteAccess" 26 | } 27 | 28 | # CloudWatch Access 29 | resource "aws_iam_role_policy_attachment" "cloudwatch_write_policy" { 30 | role = aws_iam_role.ecs_task_execution_role.name 31 | policy_arn = "arn:aws:iam::aws:policy/CloudWatchLogsFullAccess" 32 | } 33 | 34 | resource "aws_iam_role_policy_attachment" "ssm_read_only_policy" { 35 | role = aws_iam_role.ecs_task_execution_role.name 36 | policy_arn = "arn:aws:iam::aws:policy/AmazonSSMReadOnlyAccess" 37 | } 38 | 39 | resource "aws_iam_role_policy_attachment" "ecs_task_execution_role_xray_policy" { 40 | role = aws_iam_role.ecs_task_execution_role.name 41 | policy_arn = "arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess" 42 | } 43 | -------------------------------------------------------------------------------- /terraform/ecs/main.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | file_descriptor_soft_limit = pow(2, 18) 3 | file_descriptor_hard_limit = local.file_descriptor_soft_limit * 2 4 | } 5 | 6 | # Log Group for our App 7 | resource "aws_cloudwatch_log_group" "cluster_logs" { 8 | name = "${var.app_name}_logs" 9 | retention_in_days = 14 10 | } 11 | 12 | # ECS Cluster 13 | resource "aws_ecs_cluster" "app_cluster" { 14 | name = var.app_name 15 | 16 | configuration { 17 | execute_command_configuration { 18 | logging = "OVERRIDE" 19 | 20 | log_configuration { 21 | cloud_watch_encryption_enabled = false 22 | cloud_watch_log_group_name = aws_cloudwatch_log_group.cluster_logs.name 23 | } 24 | } 25 | } 26 | 27 | # Disabling because metrics not used currently 28 | setting { 29 | name = "containerInsights" 30 | value = "disabled" 31 | } 32 | } 33 | 34 | ## Task Definition 35 | resource "aws_ecs_task_definition" "app_task_definition" { 36 | family = var.app_name 37 | cpu = var.cpu 38 | memory = var.memory 39 | requires_compatibilities = [ 40 | "FARGATE" 41 | ] 42 | network_mode = "awsvpc" # Required because of fargate 43 | execution_role_arn = aws_iam_role.ecs_task_execution_role.arn 44 | task_role_arn = aws_iam_role.ecs_task_execution_role.arn 45 | container_definitions = jsonencode([ 46 | { 47 | name = var.app_name, 48 | image = var.image, 49 | cpu = var.cpu - 128, # Remove sidecar memory/cpu so rest is assigned to primary container 50 | ulimits = [{ 51 | name : "nofile", 52 | softLimit : local.file_descriptor_soft_limit, 53 | hardLimit : local.file_descriptor_hard_limit 54 | }], 55 | memory = var.memory - 128, 56 | essential = true, 57 | portMappings = [ 58 | { 59 | containerPort = 8080, 60 | hostPort = 8080 61 | }, 62 | { 63 | containerPort = 8081, 64 | hostPort = 8081 65 | } 66 | ], 67 | environment = [ 68 | { name = "NODE_ENV", value = var.node_env }, 69 | { name = "PORT", value = "8080" }, 70 | { name = "COOKIE_NAME", value = var.cookie_name }, 71 | { name = "COOKIE_SECRET", value = var.cookie_secret }, 72 | { name = "HCAPTCHA_SECRET", value = var.hcaptcha_secret }, 73 | { name = "DATABASE_URL", value = var.database_url }, 74 | { name = "DIRECT_URL", value = var.direct_url }, 75 | { name = "SUPABASE_JWT_SECRET", value = var.supabase_jwt_secret }, 76 | { name = "REDIS_PASSWORD", value = var.redis_password }, 77 | { name = "REDIS_HOST", value = var.redis_host }, 78 | { name = "REDIS_PORT", value = var.redis_port }, 79 | { name = "WALLETCONNECT_PROJECT_ID", value = var.walletconnect_project_id }, 80 | ], 81 | logConfiguration = { 82 | logDriver = "awslogs", 83 | options = { 84 | awslogs-group = aws_cloudwatch_log_group.cluster_logs.name, 85 | awslogs-region = var.region, 86 | awslogs-stream-prefix = "ecs" 87 | } 88 | } 89 | } 90 | ]) 91 | 92 | runtime_platform { 93 | operating_system_family = "LINUX" 94 | } 95 | } 96 | 97 | ## Service 98 | resource "aws_ecs_service" "app_service" { 99 | name = "${var.app_name}-service" 100 | cluster = aws_ecs_cluster.app_cluster.id 101 | task_definition = aws_ecs_task_definition.app_task_definition.arn 102 | launch_type = "FARGATE" 103 | desired_count = var.desired_count 104 | 105 | # Wait for the service deployment to succeed 106 | wait_for_steady_state = true 107 | 108 | # Allow external changes without Terraform plan difference 109 | lifecycle { 110 | ignore_changes = [desired_count] 111 | } 112 | 113 | network_configuration { 114 | subnets = var.private_subnets 115 | assign_public_ip = true # We do public ingress through the LB 116 | security_groups = [aws_security_group.app_ingress.id] # Setting the security group 117 | } 118 | 119 | load_balancer { 120 | target_group_arn = aws_lb_target_group.target_group.arn # Referencing our target group 121 | container_name = var.app_name 122 | container_port = 8080 # Specifying the container port 123 | } 124 | } 125 | 126 | # Load Balancers & Networking 127 | resource "aws_lb" "application_load_balancer" { 128 | name = "${var.app_name}-load-balancer" 129 | load_balancer_type = "application" 130 | subnets = var.public_subnets 131 | 132 | security_groups = [aws_security_group.lb_ingress.id] 133 | } 134 | 135 | resource "aws_lb_target_group" "target_group" { 136 | name = "${var.app_name}-target-group" 137 | port = 8080 138 | protocol = "HTTP" 139 | target_type = "ip" 140 | vpc_id = var.vpc_id # Referencing the default VPC 141 | slow_start = 30 # Give a 30 second delay to allow the service to startup 142 | 143 | health_check { 144 | protocol = "HTTP" 145 | path = "/health" # health path 146 | port = 8080 147 | interval = 15 148 | timeout = 10 149 | healthy_threshold = 3 150 | unhealthy_threshold = 3 151 | } 152 | 153 | lifecycle { 154 | create_before_destroy = true 155 | } 156 | } 157 | 158 | resource "aws_lb_listener" "listener" { 159 | load_balancer_arn = aws_lb.application_load_balancer.arn # Referencing our load balancer 160 | port = "443" 161 | protocol = "HTTPS" 162 | certificate_arn = var.acm_certificate_arn 163 | 164 | default_action { 165 | type = "forward" 166 | target_group_arn = aws_lb_target_group.target_group.arn # Referencing our target group 167 | } 168 | } 169 | 170 | resource "aws_lb_listener" "listener-http" { 171 | load_balancer_arn = aws_lb.application_load_balancer.arn 172 | port = "80" 173 | protocol = "HTTP" 174 | 175 | default_action { 176 | type = "redirect" 177 | 178 | redirect { 179 | port = "443" 180 | protocol = "HTTPS" 181 | status_code = "HTTP_301" 182 | } 183 | } 184 | } 185 | 186 | # DNS Records 187 | resource "aws_route53_record" "dns_load_balancer" { 188 | zone_id = var.route53_zone_id 189 | name = var.fqdn 190 | type = "A" 191 | 192 | alias { 193 | name = aws_lb.application_load_balancer.dns_name 194 | zone_id = aws_lb.application_load_balancer.zone_id 195 | evaluate_target_health = true 196 | } 197 | } 198 | 199 | # Security Groups 200 | resource "aws_security_group" "app_ingress" { 201 | name = "${var.app_name}-ingress-to-app" 202 | description = "Allow app port ingress" 203 | vpc_id = var.vpc_id 204 | 205 | ingress { 206 | from_port = 0 207 | to_port = 0 208 | protocol = "-1" 209 | security_groups = [aws_security_group.lb_ingress.id] 210 | } 211 | 212 | ingress { 213 | from_port = 0 214 | to_port = 0 215 | protocol = "-1" 216 | cidr_blocks = [var.vpc_cidr] 217 | } 218 | 219 | egress { 220 | from_port = 0 # Allowing any incoming port 221 | to_port = 0 # Allowing any outgoing port 222 | protocol = "-1" # Allowing any outgoing protocol 223 | cidr_blocks = ["0.0.0.0/0"] # Allowing traffic out to all IP addresses 224 | } 225 | 226 | lifecycle { 227 | create_before_destroy = true 228 | } 229 | } 230 | 231 | resource "aws_security_group" "lb_ingress" { 232 | name = "${var.app_name}-lb-ingress" 233 | description = "Allow app port ingress from vpc" 234 | vpc_id = var.vpc_id 235 | 236 | ingress { 237 | from_port = 443 238 | to_port = 443 239 | protocol = "tcp" 240 | cidr_blocks = ["0.0.0.0/0"] # Allowing traffic in from all sources 241 | } 242 | 243 | ingress { 244 | from_port = 80 245 | to_port = 80 246 | protocol = "tcp" 247 | cidr_blocks = ["0.0.0.0/0"] # Allowing traffic in from all sources 248 | } 249 | 250 | egress { 251 | from_port = 0 # Allowing any incoming port 252 | to_port = 0 # Allowing any outgoing port 253 | protocol = "-1" # Allowing any outgoing protocol 254 | cidr_blocks = [var.vpc_cidr] # Allowing traffic out to all VPC IP addresses 255 | } 256 | 257 | lifecycle { 258 | create_before_destroy = true 259 | } 260 | } 261 | 262 | # Autoscaling 263 | # We can scale by 264 | # ECSServiceAverageCPUUtilization, ECSServiceAverageMemoryUtilization, and ALBRequestCountPerTarget 265 | # out of the box or use custom metrics 266 | resource "aws_appautoscaling_target" "ecs_target" { 267 | max_capacity = var.autoscaling_max_capacity 268 | min_capacity = var.autoscaling_min_capacity 269 | resource_id = "service/${aws_ecs_cluster.app_cluster.name}/${aws_ecs_service.app_service.name}" 270 | scalable_dimension = "ecs:service:DesiredCount" 271 | service_namespace = "ecs" 272 | } 273 | 274 | resource "aws_appautoscaling_policy" "cpu_scaling" { 275 | name = "${var.app_name}-application-scaling-policy-cpu" 276 | policy_type = "TargetTrackingScaling" 277 | resource_id = aws_appautoscaling_target.ecs_target.resource_id 278 | scalable_dimension = aws_appautoscaling_target.ecs_target.scalable_dimension 279 | service_namespace = aws_appautoscaling_target.ecs_target.service_namespace 280 | 281 | target_tracking_scaling_policy_configuration { 282 | predefined_metric_specification { 283 | predefined_metric_type = "ECSServiceAverageCPUUtilization" 284 | } 285 | target_value = 30 286 | scale_in_cooldown = 180 287 | scale_out_cooldown = 180 288 | } 289 | depends_on = [aws_appautoscaling_target.ecs_target] 290 | } 291 | 292 | resource "aws_appautoscaling_policy" "memory_scaling" { 293 | name = "${var.app_name}-application-scaling-policy-memory" 294 | policy_type = "TargetTrackingScaling" 295 | resource_id = aws_appautoscaling_target.ecs_target.resource_id 296 | scalable_dimension = aws_appautoscaling_target.ecs_target.scalable_dimension 297 | service_namespace = aws_appautoscaling_target.ecs_target.service_namespace 298 | 299 | target_tracking_scaling_policy_configuration { 300 | predefined_metric_specification { 301 | predefined_metric_type = "ECSServiceAverageMemoryUtilization" 302 | } 303 | target_value = 30 304 | scale_in_cooldown = 180 305 | scale_out_cooldown = 180 306 | } 307 | depends_on = [aws_appautoscaling_target.ecs_target] 308 | } 309 | -------------------------------------------------------------------------------- /terraform/ecs/outputs.tf: -------------------------------------------------------------------------------- 1 | output "load_balancer_arn" { 2 | value = aws_lb.application_load_balancer.arn 3 | } 4 | -------------------------------------------------------------------------------- /terraform/ecs/terraform.tf: -------------------------------------------------------------------------------- 1 | # Terraform Configuration 2 | terraform { 3 | required_version = "~> 1.0" 4 | 5 | required_providers { 6 | aws = { 7 | source = "hashicorp/aws" 8 | version = "~> 4.31" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /terraform/ecs/variables.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | type = string 3 | } 4 | 5 | variable "app_name" { 6 | type = string 7 | } 8 | 9 | variable "environment" { 10 | type = string 11 | } 12 | 13 | variable "image" { 14 | type = string 15 | } 16 | 17 | variable "image_version" { 18 | type = string 19 | } 20 | 21 | variable "vpc_id" { 22 | type = string 23 | } 24 | 25 | variable "vpc_cidr" { 26 | type = string 27 | } 28 | 29 | variable "route53_zone_id" { 30 | type = string 31 | } 32 | 33 | variable "fqdn" { 34 | type = string 35 | } 36 | 37 | variable "acm_certificate_arn" { 38 | type = string 39 | } 40 | 41 | variable "public_subnets" { 42 | type = set(string) 43 | } 44 | 45 | variable "private_subnets" { 46 | type = set(string) 47 | } 48 | 49 | variable "cpu" { 50 | type = number 51 | } 52 | 53 | variable "memory" { 54 | type = number 55 | } 56 | 57 | variable "desired_count" { 58 | type = number 59 | } 60 | 61 | variable "autoscaling_max_capacity" { 62 | type = number 63 | } 64 | 65 | variable "autoscaling_min_capacity" { 66 | type = number 67 | } 68 | 69 | variable "node_env" { 70 | type = string 71 | } 72 | 73 | variable "database_url" { 74 | type = string 75 | sensitive = true 76 | } 77 | 78 | variable "direct_url" { 79 | type = string 80 | sensitive = true 81 | } 82 | 83 | variable "cookie_name" { 84 | type = string 85 | } 86 | 87 | variable "cookie_secret" { 88 | type = string 89 | sensitive = true 90 | } 91 | 92 | variable "hcaptcha_secret" { 93 | type = string 94 | sensitive = true 95 | } 96 | 97 | variable "supabase_jwt_secret" { 98 | type = string 99 | sensitive = true 100 | } 101 | 102 | variable "redis_host" { 103 | type = string 104 | sensitive = true 105 | } 106 | 107 | variable "redis_port" { 108 | type = string 109 | sensitive = true 110 | } 111 | 112 | variable "redis_password" { 113 | type = string 114 | sensitive = true 115 | } 116 | 117 | variable "walletconnect_project_id" { 118 | type = string 119 | sensitive = true 120 | } 121 | 122 | -------------------------------------------------------------------------------- /terraform/main.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | app_name = "cloud-auth" 3 | environment = terraform.workspace 4 | 5 | fqdn = local.environment == "prod" ? var.public_url : "${local.environment}.${var.public_url}" 6 | 7 | latest_release_name = data.github_release.latest_release.name 8 | version = coalesce(var.image_version, substr(local.latest_release_name, 1, length(local.latest_release_name))) 9 | redis_cluster_id = module.redis_global.cluster_id 10 | } 11 | 12 | #tflint-ignore: terraform_required_providers,terraform_unused_declarations 13 | data "assert_test" "workspace" { 14 | test = terraform.workspace != "default" 15 | throw = "default workspace is not valid in this project" 16 | } 17 | 18 | data "github_release" "latest_release" { 19 | repository = "cloud-auth-api" 20 | owner = "walletconnect" 21 | retrieve_by = "latest" 22 | } 23 | 24 | module "vpc" { 25 | source = "terraform-aws-modules/vpc/aws" 26 | version = "3.19.0" 27 | 28 | name = "${local.environment}-${local.app_name}" 29 | 30 | cidr = "10.0.0.0/16" 31 | 32 | azs = var.azs 33 | private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] 34 | public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"] 35 | 36 | private_subnet_tags = { 37 | Visibility = "private" 38 | } 39 | public_subnet_tags = { 40 | Visibility = "public" 41 | } 42 | 43 | enable_dns_support = true 44 | enable_dns_hostnames = true 45 | enable_nat_gateway = true 46 | single_nat_gateway = true 47 | one_nat_gateway_per_az = false 48 | } 49 | 50 | module "tags" { 51 | source = "github.com/WalletConnect/terraform-modules.git//modules/tags?ref=52a74ee5bcaf5cacb5664c6f88d9dbce28500581" 52 | 53 | application = local.app_name 54 | env = local.environment 55 | } 56 | 57 | module "dns" { 58 | source = "github.com/WalletConnect/terraform-modules.git//modules/dns?ref=52a74ee5bcaf5cacb5664c6f88d9dbce28500581" 59 | hosted_zone_name = var.public_url 60 | fqdn = local.fqdn 61 | } 62 | 63 | module "ecs" { 64 | source = "./ecs" 65 | 66 | app_name = "${local.environment}-${local.app_name}" 67 | environment = local.environment 68 | image = "${data.aws_ecr_repository.repository.repository_url}:${local.version}" 69 | image_version = local.version 70 | acm_certificate_arn = module.dns.certificate_arn 71 | cpu = 512 72 | fqdn = local.fqdn 73 | memory = 1024 74 | private_subnets = module.vpc.private_subnets 75 | public_subnets = module.vpc.public_subnets 76 | region = var.region 77 | route53_zone_id = module.dns.zone_id 78 | vpc_cidr = module.vpc.vpc_cidr_block 79 | vpc_id = module.vpc.vpc_id 80 | 81 | // Note: Stores nonces in memory cannot be scaled! 82 | autoscaling_max_capacity = local.environment == "prod" ? 1 : 1 83 | autoscaling_min_capacity = local.environment == "prod" ? 1 : 1 84 | desired_count = local.environment == "prod" ? 1 : 1 85 | 86 | node_env = var.node_env 87 | database_url = var.database_url 88 | direct_url = var.direct_url 89 | cookie_name = var.cookie_name 90 | cookie_secret = var.cookie_secret 91 | hcaptcha_secret = var.hcaptcha_secret 92 | supabase_jwt_secret = var.supabase_jwt_secret 93 | redis_host = var.redis_host 94 | redis_port = var.redis_port 95 | redis_password = var.redis_port 96 | walletconnect_project_id = var.walletconnect_project_id 97 | 98 | depends_on = [module.redis_global] 99 | } 100 | 101 | data "aws_ecr_repository" "repository" { 102 | name = "cloud-auth-api" 103 | } 104 | 105 | // Generate a random string for redis auth token, no special chars 106 | resource "random_string" "redis_auth_token" { 107 | length = 64 108 | special = false 109 | } 110 | 111 | module "redis_global" { 112 | source = "./redis" 113 | redis_name = "cloud-auth-redis" 114 | app_name = "${terraform.workspace}_redis_${local.app_name}" 115 | vpc_id = module.vpc.vpc_id 116 | node_type = "cache.t2.micro" 117 | private_subnet_ids = module.vpc.private_subnets 118 | 119 | allowed_ingress_cidr_blocks = ["0.0.0.0/0"] 120 | } 121 | -------------------------------------------------------------------------------- /terraform/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | region = var.region 3 | 4 | # Make it faster by skipping something 5 | skip_metadata_api_check = true 6 | skip_region_validation = true 7 | skip_credentials_validation = true 8 | skip_requesting_account_id = true 9 | 10 | default_tags { 11 | tags = module.tags.tags 12 | } 13 | } 14 | 15 | provider "random" {} 16 | 17 | provider "github" {} 18 | -------------------------------------------------------------------------------- /terraform/redis/main.tf: -------------------------------------------------------------------------------- 1 | resource "aws_elasticache_subnet_group" "private_subnets" { 2 | name = replace("${var.app_name}-${var.redis_name}-private-subnet-group", "_", "-") 3 | subnet_ids = var.private_subnet_ids 4 | } 5 | 6 | # Allow only the app to access Redis 7 | resource "aws_security_group" "service_security_group" { 8 | name = "${var.app_name}-${var.redis_name}-redis-service-ingress" 9 | description = "Allow ingress from the application" 10 | vpc_id = var.vpc_id 11 | ingress { 12 | from_port = 6379 13 | to_port = 6379 14 | protocol = "TCP" 15 | cidr_blocks = var.allowed_ingress_cidr_blocks 16 | } 17 | 18 | egress { 19 | from_port = 0 # Allowing any incoming port 20 | to_port = 0 # Allowing any outgoing port 21 | protocol = "-1" # Allowing any outgoing protocol 22 | cidr_blocks = ["0.0.0.0/0"] # Allowing traffic out to all IP addresses 23 | } 24 | } 25 | 26 | resource "aws_elasticache_cluster" "cache" { 27 | cluster_id = replace("${var.app_name}-${var.redis_name}", "_", "-") 28 | engine = "redis" 29 | node_type = var.node_type 30 | num_cache_nodes = 1 31 | parameter_group_name = "default.redis6.x" 32 | engine_version = "6.x" 33 | port = 6379 34 | subnet_group_name = aws_elasticache_subnet_group.private_subnets.name 35 | security_group_ids = [ 36 | aws_security_group.service_security_group.id 37 | ] 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /terraform/redis/outputs.tf: -------------------------------------------------------------------------------- 1 | output "cluster_id" { 2 | value = aws_elasticache_cluster.cache.cache_nodes.0.address 3 | } 4 | -------------------------------------------------------------------------------- /terraform/redis/variables.tf: -------------------------------------------------------------------------------- 1 | variable "redis_name" { 2 | type = string 3 | } 4 | 5 | variable "node_type" { 6 | type = string 7 | } 8 | 9 | variable "app_name" { 10 | type = string 11 | } 12 | 13 | variable "allowed_ingress_cidr_blocks" { 14 | type = list(string) 15 | } 16 | 17 | variable "private_subnet_ids" { 18 | type = list(string) 19 | } 20 | 21 | variable "vpc_id" { 22 | type = string 23 | } 24 | -------------------------------------------------------------------------------- /terraform/variables.tf: -------------------------------------------------------------------------------- 1 | variable "region" { 2 | type = string 3 | default = "eu-central-1" 4 | } 5 | 6 | variable "azs" { 7 | type = list(string) 8 | default = ["eu-central-1a", "eu-central-1b", "eu-central-1c"] 9 | } 10 | 11 | variable "public_url" { 12 | type = string 13 | default = "cloud-auth-api.reown.com" 14 | } 15 | 16 | variable "image_version" { 17 | type = string 18 | default = "" 19 | } 20 | 21 | variable "node_env" { 22 | type = string 23 | } 24 | 25 | variable "database_url" { 26 | type = string 27 | sensitive = true 28 | } 29 | 30 | variable "direct_url" { 31 | type = string 32 | sensitive = true 33 | } 34 | 35 | variable "cookie_name" { 36 | type = string 37 | } 38 | 39 | variable "cookie_secret" { 40 | type = string 41 | sensitive = true 42 | } 43 | 44 | variable "hcaptcha_secret" { 45 | type = string 46 | sensitive = true 47 | } 48 | 49 | variable "supabase_jwt_secret" { 50 | type = string 51 | sensitive = true 52 | } 53 | 54 | variable "redis_host" { 55 | type = string 56 | sensitive = true 57 | } 58 | 59 | variable "redis_port" { 60 | type = string 61 | sensitive = true 62 | } 63 | 64 | variable "redis_password" { 65 | type = string 66 | sensitive = true 67 | } 68 | 69 | variable "walletconnect_project_id" { 70 | type = string 71 | sensitive = true 72 | } 73 | -------------------------------------------------------------------------------- /terraform/vars/dev.tfvars: -------------------------------------------------------------------------------- 1 | node_env = "development" 2 | -------------------------------------------------------------------------------- /terraform/vars/prod.tfvars: -------------------------------------------------------------------------------- 1 | node_env = "production" 2 | -------------------------------------------------------------------------------- /terraform/vars/staging.tfvars: -------------------------------------------------------------------------------- 1 | node_env = "staging" 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | /* Projects */ 5 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 6 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 7 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 8 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 9 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 10 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 11 | 12 | /* Language and Environment */ 13 | "target": "ES2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, 14 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 15 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 16 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ 17 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 18 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 19 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 20 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 21 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 22 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 23 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 24 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 25 | 26 | /* Modules */ 27 | "module": "commonjs" /* Specify what module code is generated. */, 28 | "rootDir": "./src" /* Specify the root folder within your source files. */, 29 | // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ 30 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 31 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 32 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 33 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 34 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 35 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 36 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 37 | // "resolveJsonModule": true, /* Enable importing .json files. */ 38 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 39 | 40 | /* JavaScript Support */ 41 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 42 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 43 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 44 | 45 | /* Emit */ 46 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 47 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 48 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 49 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 50 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 51 | "outDir": "./dist" /* Specify an output folder for all emitted files. */, 52 | // "removeComments": true, /* Disable emitting comments. */ 53 | // "noEmit": true, /* Disable emitting files from a compilation. */ 54 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 55 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ 56 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 57 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 58 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 59 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 60 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 61 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 62 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 63 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 64 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 65 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 66 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 67 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 68 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ 69 | 70 | /* Interop Constraints */ 71 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 72 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 73 | "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, 74 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 75 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, 76 | 77 | /* Type Checking */ 78 | "strict": true /* Enable all strict type-checking options. */, 79 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 80 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 81 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 82 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 83 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 84 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 85 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 86 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 87 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 88 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 89 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 90 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 91 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 92 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 93 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 94 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 95 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 96 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 97 | 98 | /* Completeness */ 99 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 100 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 101 | } 102 | } 103 | --------------------------------------------------------------------------------