From c57d5af09cbef1bd86c42afebf8fd597ad4bbd60 Mon Sep 17 00:00:00 2001 From: Ismail MOUYAHADA Date: Tue, 27 Aug 2024 19:33:35 +0200 Subject: [PATCH 1/2] commit changes --- .../ansible/inventories/dev/hosts.yml | 9 + .../ansible/inventories/prod/hosts.yml | 9 + .../ansible/inventories/test/hosts.yml | 9 + .../ansible/roles/app/handlers/main.yml | 0 .../ansible/roles/app/tasks/main.yml | 17 ++ .../ansible/roles/app/templates/.env.j2 | 7 + .../ansible/roles/common/handlers/main.yml | 0 .../ansible/roles/common/tasks/main.yml | 36 +++ .../common/templates/docker-compose.yaml.j2 | 0 .../ansible/roles/docker/handlers/main.yml | 0 .../ansible/roles/docker/tasks/main.yml | 18 ++ .../docker/templates/docker-compose.yaml.j2 | 23 ++ .github/workflows/ansible/site.yml | 9 + .github/workflows/ci-cd.dev.yml | 153 ++++++++++ .github/workflows/ci-cd.prod.yml | 152 ++++++++++ .github/workflows/ci-cd.test.yml | 153 ++++++++++ .github/workflows/dev.yaml | 85 ------ .github/workflows/prod.yaml | 146 ---------- README.md | 264 +++++++++++++++++- satsquare/.dockerignore | 42 ++- satsquare/.env.dev | 9 + satsquare/.env.prod | 25 +- satsquare/.env.test | 22 +- satsquare/Docker.md | 9 - satsquare/Dockerfile | 5 +- satsquare/Dockerfile.dev | 26 ++ satsquare/Dockerfile.prod | 26 ++ satsquare/Dockerfile.test | 23 ++ satsquare/docker-compose.dev.yml | 26 ++ satsquare/docker-compose.pod.yml | 22 ++ satsquare/docker-compose.test.yml | 22 ++ satsquare/docker-compose.yaml | 23 +- satsquare/package-lock.json | 194 ++++++++++++- satsquare/package.json | 4 + satsquare/socket/index.js | 176 +++++++++--- satsquare/socket/index.ts | 136 +++++---- satsquare/socket/quiz.config.js | 184 ++++++------ satsquare/socket/quiz.config.ts | 176 ++++-------- satsquare/socket/roles/manager.js | 2 +- satsquare/socket/roles/manager.ts | 4 +- satsquare/socket/wallet.js | 63 +++++ satsquare/socket/wallet.ts | 16 ++ .../src/app/api/associations/[id]/route.ts | 27 ++ satsquare/src/app/home/page.tsx | 3 +- satsquare/src/app/manager/page.tsx | 39 ++- satsquare/src/components/ManagerPassword.tsx | 3 + .../ProfileDetail/ProfileDetail.tsx | 110 +++++--- .../src/components/game/GameWrapper/page.tsx | 13 +- satsquare/src/components/game/SelectQuiz.tsx | 158 +++++++++++ satsquare/src/middleware.ts | 58 ++-- satsquare/src/types/socket/main.d.ts | 35 +++ satsquare/src/utils/ioredis.ts | 2 + satsquare/wait-for-it.sh | 53 ---- satsquare/yarn.lock | 122 +++++++- 54 files changed, 2202 insertions(+), 746 deletions(-) create mode 100644 .github/workflows/ansible/inventories/dev/hosts.yml create mode 100644 .github/workflows/ansible/inventories/prod/hosts.yml create mode 100644 .github/workflows/ansible/inventories/test/hosts.yml create mode 100644 .github/workflows/ansible/roles/app/handlers/main.yml create mode 100644 .github/workflows/ansible/roles/app/tasks/main.yml create mode 100644 .github/workflows/ansible/roles/app/templates/.env.j2 create mode 100644 .github/workflows/ansible/roles/common/handlers/main.yml create mode 100644 .github/workflows/ansible/roles/common/tasks/main.yml create mode 100644 .github/workflows/ansible/roles/common/templates/docker-compose.yaml.j2 create mode 100644 .github/workflows/ansible/roles/docker/handlers/main.yml create mode 100644 .github/workflows/ansible/roles/docker/tasks/main.yml create mode 100644 .github/workflows/ansible/roles/docker/templates/docker-compose.yaml.j2 create mode 100644 .github/workflows/ansible/site.yml create mode 100644 .github/workflows/ci-cd.dev.yml create mode 100644 .github/workflows/ci-cd.prod.yml create mode 100644 .github/workflows/ci-cd.test.yml delete mode 100644 .github/workflows/dev.yaml delete mode 100644 .github/workflows/prod.yaml create mode 100644 satsquare/.env.dev delete mode 100644 satsquare/Docker.md create mode 100644 satsquare/Dockerfile.dev create mode 100644 satsquare/Dockerfile.prod create mode 100644 satsquare/Dockerfile.test create mode 100644 satsquare/docker-compose.dev.yml create mode 100644 satsquare/docker-compose.pod.yml create mode 100644 satsquare/docker-compose.test.yml create mode 100644 satsquare/socket/wallet.js create mode 100644 satsquare/socket/wallet.ts create mode 100644 satsquare/src/components/game/SelectQuiz.tsx create mode 100644 satsquare/src/types/socket/main.d.ts create mode 100644 satsquare/src/utils/ioredis.ts delete mode 100644 satsquare/wait-for-it.sh diff --git a/.github/workflows/ansible/inventories/dev/hosts.yml b/.github/workflows/ansible/inventories/dev/hosts.yml new file mode 100644 index 0000000..a6ffa21 --- /dev/null +++ b/.github/workflows/ansible/inventories/dev/hosts.yml @@ -0,0 +1,9 @@ +all: + hosts: + dev-server: + ansible_host: your_dev_server_ip + ansible_user: your_username + ansible_ssh_private_key_file: /path/to/your/private/key + vars: + env: "development" + docker_compose_file: "docker-compose.dev.yml" diff --git a/.github/workflows/ansible/inventories/prod/hosts.yml b/.github/workflows/ansible/inventories/prod/hosts.yml new file mode 100644 index 0000000..9200b17 --- /dev/null +++ b/.github/workflows/ansible/inventories/prod/hosts.yml @@ -0,0 +1,9 @@ +all: + hosts: + prod-server: + ansible_host: your_prod_server_ip + ansible_user: your_username + ansible_ssh_private_key_file: /path/to/your/private/key + vars: + env: "production" + docker_compose_file: "docker-compose.prod.yml" diff --git a/.github/workflows/ansible/inventories/test/hosts.yml b/.github/workflows/ansible/inventories/test/hosts.yml new file mode 100644 index 0000000..a3125ac --- /dev/null +++ b/.github/workflows/ansible/inventories/test/hosts.yml @@ -0,0 +1,9 @@ +all: + hosts: + test-server: + ansible_host: your_test_server_ip + ansible_user: your_username + ansible_ssh_private_key_file: /path/to/your/private/key + vars: + env: "test" + docker_compose_file: "docker-compose.test.yml" diff --git a/.github/workflows/ansible/roles/app/handlers/main.yml b/.github/workflows/ansible/roles/app/handlers/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/ansible/roles/app/tasks/main.yml b/.github/workflows/ansible/roles/app/tasks/main.yml new file mode 100644 index 0000000..75c5163 --- /dev/null +++ b/.github/workflows/ansible/roles/app/tasks/main.yml @@ -0,0 +1,17 @@ +--- + - name: Create environment file + template: + src: .env.j2 + dest: /home/{{ ansible_user }}/docker/{{ env }}/.env + mode: '0644' + + - name: Pull the latest image + command: docker-compose -f /home/{{ ansible_user }}/docker/{{ env }}/{{ docker_compose_file }} pull + args: + chdir: /home/{{ ansible_user }}/docker/{{ env }} + + - name: Restart the application + command: docker-compose -f /home/{{ ansible_user }}/docker/{{ env }}/{{ docker_compose_file }} up -d + args: + chdir: /home/{{ ansible_user }}/docker/{{ env }} + \ No newline at end of file diff --git a/.github/workflows/ansible/roles/app/templates/.env.j2 b/.github/workflows/ansible/roles/app/templates/.env.j2 new file mode 100644 index 0000000..8443b73 --- /dev/null +++ b/.github/workflows/ansible/roles/app/templates/.env.j2 @@ -0,0 +1,7 @@ +POSTGRES_USER={{ postgres_user }} +POSTGRES_PASSWORD={{ postgres_password }} +POSTGRES_DB={{ postgres_db }} +POSTGRES_PORT=5432 +NEXTAUTH_SECRET={{ nextauth_secret }} +NEXT_PUBLIC_SITE_URL={{ next_public_site_url }} +NEXT_PUBLIC_SOCKET_URL={{ next_public_socket_url }} diff --git a/.github/workflows/ansible/roles/common/handlers/main.yml b/.github/workflows/ansible/roles/common/handlers/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/ansible/roles/common/tasks/main.yml b/.github/workflows/ansible/roles/common/tasks/main.yml new file mode 100644 index 0000000..67ec4fb --- /dev/null +++ b/.github/workflows/ansible/roles/common/tasks/main.yml @@ -0,0 +1,36 @@ +--- + - name: Update and upgrade apt packages + apt: + update_cache: yes + upgrade: dist + cache_valid_time: 86400 + + - name: Install required packages + apt: + name: "{{ item }}" + state: present + loop: + - git + - curl + - software-properties-common + - python3-pip + + - name: Add Docker GPG key + apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present + + - name: Add Docker repository + apt_repository: + repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable + state: present + + - name: Install Docker + apt: + name: docker-ce + state: present + + - name: Install Docker Compose + pip: + name: docker-compose + \ No newline at end of file diff --git a/.github/workflows/ansible/roles/common/templates/docker-compose.yaml.j2 b/.github/workflows/ansible/roles/common/templates/docker-compose.yaml.j2 new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/ansible/roles/docker/handlers/main.yml b/.github/workflows/ansible/roles/docker/handlers/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/ansible/roles/docker/tasks/main.yml b/.github/workflows/ansible/roles/docker/tasks/main.yml new file mode 100644 index 0000000..62a2a64 --- /dev/null +++ b/.github/workflows/ansible/roles/docker/tasks/main.yml @@ -0,0 +1,18 @@ +--- + - name: Create Docker Compose directory + file: + path: /home/{{ ansible_user }}/docker/{{ env }} + state: directory + mode: '0755' + + - name: Copy Docker Compose file + template: + src: docker-compose.yml.j2 + dest: /home/{{ ansible_user }}/docker/{{ env }}/{{ docker_compose_file }} + mode: '0644' + + - name: Start Docker Compose + command: docker-compose -f /home/{{ ansible_user }}/docker/{{ env }}/{{ docker_compose_file }} up -d + args: + chdir: /home/{{ ansible_user }}/docker/{{ env }} + \ No newline at end of file diff --git a/.github/workflows/ansible/roles/docker/templates/docker-compose.yaml.j2 b/.github/workflows/ansible/roles/docker/templates/docker-compose.yaml.j2 new file mode 100644 index 0000000..7734e2e --- /dev/null +++ b/.github/workflows/ansible/roles/docker/templates/docker-compose.yaml.j2 @@ -0,0 +1,23 @@ +version: '3.8' +services: + app: + image: ghcr.io/ismail-mouyahada/sat-square:{{ env }}-latest + env_file: + - .env + ports: + - "3000:3000" + - "5157:5157" + depends_on: + - db + db: + image: postgres:16 + environment: + POSTGRES_USER: {{ postgres_user }} + POSTGRES_PASSWORD: {{ postgres_password }} + POSTGRES_DB: {{ postgres_db }} + ports: + - "5432:5432" + volumes: + - postgres_data:/var/lib/postgresql/data +volumes: + postgres_data: diff --git a/.github/workflows/ansible/site.yml b/.github/workflows/ansible/site.yml new file mode 100644 index 0000000..67ae398 --- /dev/null +++ b/.github/workflows/ansible/site.yml @@ -0,0 +1,9 @@ +--- + - hosts: all + become: yes + + roles: + - role: common + - role: docker + - role: app + \ No newline at end of file diff --git a/.github/workflows/ci-cd.dev.yml b/.github/workflows/ci-cd.dev.yml new file mode 100644 index 0000000..695053f --- /dev/null +++ b/.github/workflows/ci-cd.dev.yml @@ -0,0 +1,153 @@ +name: CI/CD Dev Pipeline + +on: + push: + branches: + - dev + pull_request: + branches: + - dev + +env: + ENVIRONMENT: development + DATABASE_URL: ${{ secrets.DEV_DATABASE_URL }} + NEXTAUTH_SECRET: ${{ secrets.DEV_NEXTAUTH_SECRET }} + NEXT_PUBLIC_SITE_URL: http://dev.ismail-mouyahada.com + NEXT_PUBLIC_SOCKET_URL: ws://dev-socket.ismail-mouyahada.com + +jobs: + deps-vulnerability: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run dependency vulnerability scan + uses: advanced-security/npm-audit-action@v1 + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Linting + run: npm run lint + + unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Jest Unit Tests + run: npm run test:watch + + codecov: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run tests and generate coverage report + run: npm run test -- --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + security: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run security analysis + uses: github/codeql-action/analyze@v2 + + lighthouse: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Lighthouse CI + run: npx lhci autorun + + docker-build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Login to GitHub Container Registry + run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Build Docker image + run: docker build -t ghcr.io/ismail-mouyahada/sat-square:dev-${{ github.sha }} -f Dockerfile.dev . + + - name: Scan Docker image for vulnerabilities + uses: aquasecurity/trivy-action@v0.4.1 + with: + image-ref: ghcr.io/ismail-mouyahada/sat-square:dev-${{ github.sha }} + + - name: Push Docker image to GitHub Container Registry + run: docker push ghcr.io/ismail-mouyahada/sat-square:dev-${{ github.sha }} + + e2e-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run end-to-end tests + run: npm run test:e2e + + stress-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: npm install + + - name: Run stress tests + run: npm run test:stress + + notify: + runs-on: ubuntu-latest + needs: [deps-vulnerability, lint, unit-tests, codecov, security, lighthouse, docker-build, e2e-tests, stress-test] + steps: + - name: Send Discord notification on success + if: success() + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"content": "CI/CD Dev Pipeline succeeded!"}' \ + ${{ secrets.DISCORD_WEBHOOK_URL }} + + - name: Send Discord notification on failure + if: failure() + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"content": "CI/CD Dev Pipeline failed!"}' \ + ${{ secrets.DISCORD_WEBHOOK_URL }} diff --git a/.github/workflows/ci-cd.prod.yml b/.github/workflows/ci-cd.prod.yml new file mode 100644 index 0000000..99d3019 --- /dev/null +++ b/.github/workflows/ci-cd.prod.yml @@ -0,0 +1,152 @@ +name: CI/CD Prod Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + ENVIRONMENT: production + DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }} + NEXTAUTH_SECRET: ${{ secrets.PROD_NEXTAUTH_SECRET }} + NEXT_PUBLIC_SITE_URL: https://satsquare.ismail-mouyahada.com + NEXT_PUBLIC_SOCKET_URL: wss://websocket.ismail-mouyahada.com +jobs: + deps-vulnerability: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run dependency vulnerability scan + uses: advanced-security/npm-audit-action@v1 + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Linting + run: npm run lint + + unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Jest Unit Tests + run: npm run test:watch + + codecov: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run tests and generate coverage report + run: npm run test -- --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + security: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run security analysis + uses: github/codeql-action/analyze@v2 + + lighthouse: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Lighthouse CI + run: npx lhci autorun + + docker-build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Login to GitHub Container Registry + run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Build Docker image + run: docker build -t ghcr.io/ismail-mouyahada/sat-square:prod-${{ github.sha }} -f Dockerfile.prod . + + - name: Scan Docker image for vulnerabilities + uses: aquasecurity/trivy-action@v0.4.1 + with: + image-ref: ghcr.io/ismail-mouyahada/sat-square:prod-${{ github.sha }} + + - name: Push Docker image to GitHub Container Registry + run: docker push ghcr.io/ismail-mouyahada/sat-square:prod-${{ github.sha }} + + e2e-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run end-to-end tests + run: npm run test:e2e + + stress-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run stress tests + run: npm run test:stress + + notify: + runs-on: ubuntu-latest + needs: [deps-vulnerability, lint, unit-tests, codecov, security, lighthouse, docker-build, e2e-tests, stress-test] + steps: + - name: Send Discord notification on success + if: success() + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"content": "CI/CD Prod Pipeline succeeded!"}' \ + ${{ secrets.DISCORD_WEBHOOK_URL }} + + - name: Send Discord notification on failure + if: failure() + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"content": "CI/CD Prod Pipeline failed!"}' \ + ${{ secrets.DISCORD_WEBHOOK_URL }} diff --git a/.github/workflows/ci-cd.test.yml b/.github/workflows/ci-cd.test.yml new file mode 100644 index 0000000..3486575 --- /dev/null +++ b/.github/workflows/ci-cd.test.yml @@ -0,0 +1,153 @@ +name: CI/CD Test Pipeline + +on: + push: + branches: + - test + pull_request: + branches: + - test + +env: + ENVIRONMENT: test + DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }} + NEXTAUTH_SECRET: ${{ secrets.TEST_NEXTAUTH_SECRET }} + NEXT_PUBLIC_SITE_URL: http://test.ismail-mouyahada.com + NEXT_PUBLIC_SOCKET_URL: ws://test-socket.ismail-mouyahada.com + +jobs: + deps-vulnerability: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run dependency vulnerability scan + uses: advanced-security/npm-audit-action@v1 + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Linting + run: npm run lint + + unit-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Jest Unit Tests + run: npm run test:watch + + codecov: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run tests and generate coverage report + run: npm run test -- --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + security: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run security analysis + uses: github/codeql-action/analyze@v2 + + lighthouse: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run Lighthouse CI + run: npx lhci autorun + + docker-build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Login to GitHub Container Registry + run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Build Docker image + run: docker build -t ghcr.io/ismail-mouyahada/sat-square:test-${{ github.sha }} -f Dockerfile.test . + + - name: Scan Docker image for vulnerabilities + uses: aquasecurity/trivy-action@v0.4.1 + with: + image-ref: ghcr.io/ismail-mouyahada/sat-square:test-${{ github.sha }} + + - name: Push Docker image to GitHub Container Registry + run: docker push ghcr.io/ismail-mouyahada/sat-square:test-${{ github.sha }} + + e2e-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run end-to-end tests + run: npm run test:e2e + + stress-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: npm install + + - name: Run stress tests + run: npm run test:stress + + notify: + runs-on: ubuntu-latest + needs: [deps-vulnerability, lint, unit-tests, codecov, security, lighthouse, docker-build, e2e-tests, stress-test] + steps: + - name: Send Discord notification on success + if: success() + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"content": "CI/CD Test Pipeline succeeded!"}' \ + ${{ secrets.DISCORD_WEBHOOK_URL }} + + - name: Send Discord notification on failure + if: failure() + run: | + curl -X POST -H "Content-Type: application/json" \ + -d '{"content": "CI/CD Test Pipeline failed!"}' \ + ${{ secrets.DISCORD_WEBHOOK_URL }} diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml deleted file mode 100644 index e9fdcc1..0000000 --- a/.github/workflows/dev.yaml +++ /dev/null @@ -1,85 +0,0 @@ -name: Development Workflow - -on: - push: - branches: - - develop - -jobs: - create-environment: - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:latest - env: - POSTGRES_USER: satsquare_user - POSTGRES_PASSWORD: satsquare_password - POSTGRES_DB: satsquare_db - ports: - - 5432:5432 - options: >- - --health-cmd="pg_isready -U satsquare_user" - --health-interval=10s - --health-timeout=5s - --health-retries=5 - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Run database migrations - run: npx prisma db push - env: - DATABASE_URL: postgresql://satsquare_user:satsquare_password@localhost:5432/satsquare_db - - - name: Seed the database - run: npx prisma seed - env: - DATABASE_URL: postgresql://satsquare_user:satsquare_password@localhost:5432/satsquare_db - - test: - needs: create-environment - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Run tests - run: npm test - - security: - needs: create-environment - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Run security checks - run: npm audit --audit-level=moderate diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml deleted file mode 100644 index 88288b7..0000000 --- a/.github/workflows/prod.yaml +++ /dev/null @@ -1,146 +0,0 @@ -name: Production Deployment - -on: - push: - branches: - - main - -jobs: - create-environment: - runs-on: ubuntu-latest - - services: - postgres: - image: postgres:latest - env: - POSTGRES_USER: satsquare_user - POSTGRES_PASSWORD: satsquare_password - POSTGRES_DB: satsquare_db - ports: - - 5432:5432 - options: >- - --health-cmd="pg_isready -U satsquare_user" - --health-interval=10s - --health-timeout=5s - --health-retries=5 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Run database migrations - run: npx prisma db push - env: - DATABASE_URL: postgresql://satsquare_user:satsquare_password@localhost:5432/satsquare_db - - - name: Seed the database - run: npx prisma seed - env: - DATABASE_URL: postgresql://satsquare_user:satsquare_password@localhost:5432/satsquare_db - - test: - needs: create-environment - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Run tests - run: npm test - - security: - needs: create-environment - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Run security checks - run: npm audit --audit-level=moderate - - deploy: - needs: [create-environment, test, security] - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ secrets.GHCR_USERNAME }} - password: ${{ secrets.GHCR_TOKEN }} - - - name: Build and push Docker image - run: | - docker buildx build --push --tag ghcr.io/${{ github.repository }}/nextjs-app:latest . - - - name: Deploy to production - run: | - docker-compose down - docker-compose pull - docker-compose up --build -d - env: - DATABASE_URL: postgresql://satsquare_user:satsquare_password@db:5432/satsquare_db - - name: Notification Discord - uses: nobrayner/discord-webhook@v1 - needs: [build, test] - if: always() - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - discord-webhook: ${{ secrets.DISCORD_WEBHOOK }} - username: 'Bob' - avatar-url: 'https://octodex.github.com/images/Terracottocat_Single.png' - title: '${{ github.workflow }}: {{STATUS}}' - description: '${{ github.event_name }} a déclenché cette {{STATUS}} !' - include-details: 'false' - color-success: '#4287f5' - color-failure: 'eb4034' - color-cancelled: '0x42daf5' - footer: 'Bob le Constructeur' - - - name: Notify - uses: nobrayner/discord-webhook@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - discord-webhook: ${{ secrets.DISCORD_WEBHOOK }} - username: 'Bob' - avatar-url: 'https://octodex.github.com/images/Terracottocat_Single.png' - title: '${{ github.workflow }}: {{STATUS}}' - description: '${{ github.event_name }} trigged this {{STATUS}}!' - include-details: 'false' - color-success: '#4287f5' - color-failure: 'eb4034' - color-cancelled: '0x42daf5' - footer: 'Bob the Builder' \ No newline at end of file diff --git a/README.md b/README.md index 9f40e67..fcdca3f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,264 @@ # SATSQUARE APP -SatSquare est une application web progressive (PWA) innovante et inclusive, spécialement conçue pour stimuler l'engagement. En combinant la technologie blockchain avec des jeux interactifs, SatSquare offre aux utilisateurs une expérience unique où ils peuvent participer à des activités amusantes tout en contribuant à des causes caritatives. +### Description : +SatSquare est une application web progressive (PWA) innovante et inclusive, spécialement conçue pour stimuler l'engagement. + +En combinant la technologie blockchain avec des jeux interactifs, SatSquare offre aux utilisateurs une expérience unique où ils peuvent participer à des activités amusantes tout en contribuant à des causes caritatives. + + +### Documentation de démarrage pour SatSquare + +Ce guide vous explique comment démarrer l'application SatSquare en local pour le développement, en environnement de test, et en production, avec ou sans Docker. + +--- + +## 1. **Prérequis** + +### A. **Outils requis** +- **Node.js** : Version 16 ou supérieure. +- **NPM** : Vient généralement avec Node.js. +- **Docker** : Pour la gestion des conteneurs (facultatif si vous ne voulez pas utiliser Docker). +- **Git** : Pour cloner le dépôt. + +### B. **Clonage du dépôt** +Clonez le dépôt SatSquare depuis GitHub : +```bash +git clone https://github.com/your-username/satsquare.git +cd satsquare +``` + +--- + +## 2. **Démarrage en local (Développement)** + +### A. **Configuration des variables d'environnement** + +Créez un fichier `.env.local` à la racine du projet avec le contenu suivant : +```env +POSTGRES_USER=postgres_dev +POSTGRES_PASSWORD=dev_password +POSTGRES_DB=sat_square_dev_db +POSTGRES_PORT=5432 +DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" +NEXTAUTH_SECRET="your_dev_secret_key" +NEXT_PUBLIC_SITE_URL="http://localhost:3000" +NEXT_PUBLIC_SOCKET_URL="ws://localhost:5157" +``` + +### B. **Démarrage sans Docker** + +1. **Installer les dépendances** : + ```bash + npm install + ``` + +2. **Configurer la base de données** (assurez-vous d'avoir PostgreSQL en cours d'exécution) : + ```bash + npx prisma migrate dev + ``` + +3. **Démarrer l'application** : + ```bash + npm run all-dev + ``` + +### C. **Démarrage avec Docker** + +1. **Créer un fichier `docker-compose.dev.yml`** (ou utiliser celui fourni) : + ```yaml + version: '3.8' + services: + app: + build: + context: . + dockerfile: Dockerfile.dev + ports: + - "3000:3000" + - "5157:5157" + env_file: + - .env.local + volumes: + - .:/app + - /app/node_modules + command: npm run all-dev + + db: + image: postgres:13 + environment: + POSTGRES_USER: postgres_dev + POSTGRES_PASSWORD: dev_password + POSTGRES_DB: sat_square_dev_db + ports: + - "5432:5432" + ``` + +2. **Démarrer les conteneurs** : + ```bash + docker-compose -f docker-compose.dev.yml up --build + ``` + +3. **Accéder à l'application** : L'application sera disponible à `http://localhost:3000`. + +--- + +## 3. **Démarrage en environnement de test** + +### A. **Configuration des variables d'environnement** + +Créez un fichier `.env.test` à la racine du projet avec le contenu suivant : +```env +POSTGRES_USER=postgres_test +POSTGRES_PASSWORD=test_password +POSTGRES_DB=sat_square_test_db +POSTGRES_PORT=5432 +DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" +NEXTAUTH_SECRET="your_test_secret_key" +NEXT_PUBLIC_SITE_URL="http://localhost:3001" +NEXT_PUBLIC_SOCKET_URL="ws://localhost:5158" +``` + +### B. **Démarrage sans Docker** + +1. **Installer les dépendances** : + ```bash + npm install + ``` + +2. **Configurer la base de données pour les tests** : + ```bash + npx prisma migrate dev + ``` + +3. **Exécuter les tests** : + ```bash + npm run test:e2e + ``` + +### C. **Démarrage avec Docker** + +1. **Créer un fichier `docker-compose.test.yml`** : + ```yaml + version: '3.8' + services: + app: + build: + context: . + dockerfile: Dockerfile.test + ports: + - "3001:3001" + - "5158:5158" + env_file: + - .env.test + volumes: + - .:/app + - /app/node_modules + command: npm run test:e2e + + db: + image: postgres:13 + environment: + POSTGRES_USER: postgres_test + POSTGRES_PASSWORD: test_password + POSTGRES_DB: sat_square_test_db + ports: + - "5432:5432" + ``` + +2. **Démarrer les conteneurs** : + ```bash + docker-compose -f docker-compose.test.yml up --build + ``` + +3. **Exécuter les tests dans le conteneur** : + ```bash + docker-compose -f docker-compose.test.yml exec app npm run test:e2e + ``` + +--- + +## 4. **Démarrage en production** + +### A. **Configuration des variables d'environnement** + +Créez un fichier `.env.prod` à la racine du projet avec le contenu suivant : +```env +POSTGRES_USER=postgres_prod +POSTGRES_PASSWORD=prod_password +POSTGRES_DB=sat_square_prod_db +POSTGRES_PORT=5432 +DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" +NEXTAUTH_SECRET="your_prod_secret_key" +NEXT_PUBLIC_SITE_URL="https://yourproductionurl.com" +NEXT_PUBLIC_SOCKET_URL="wss://yourproductionurl.com/socket" +``` + +### B. **Démarrage sans Docker** + +1. **Installer les dépendances** : + ```bash + npm install + ``` + +2. **Configurer la base de données pour la production** : + ```bash + npx prisma migrate deploy + ``` + +3. **Construire l'application** : + ```bash + npm run build + ``` + +4. **Démarrer l'application en mode production** : + ```bash + npm run start + ``` + +### C. **Démarrage avec Docker** + +1. **Créer un fichier `docker-compose.prod.yml`** : + ```yaml + version: '3.8' + services: + app: + build: + context: . + dockerfile: Dockerfile.prod + ports: + - "3000:3000" + - "5157:5157" + env_file: + - .env.prod + command: npm run all + + db: + image: postgres:13 + environment: + POSTGRES_USER: postgres_prod + POSTGRES_PASSWORD: prod_password + POSTGRES_DB: sat_square_prod_db + ports: + - "5432:5432" + ``` + +2. **Démarrer les conteneurs** : + ```bash + docker-compose -f docker-compose.prod.yml up --build + ``` + +3. **Accéder à l'application** : L'application sera disponible à `https://yourproductionurl.com`. + +--- + +## 5. **Points à vérifier** + +- **Ports** : Assurez-vous que les ports utilisés ne sont pas déjà occupés par un autre service. +- **Base de données** : Vérifiez que votre base de données PostgreSQL est correctement configurée et accessible. +- **Environnements** : Utilisez les bonnes variables d'environnement pour chaque étape du déploiement. + +--- + +## 6. **Résumé** + +SatSquare peut être démarré facilement en local pour le développement, en test ou en production, avec ou sans Docker. En suivant ce guide, vous pouvez configurer votre environnement en fonction de vos besoins et démarrer rapidement le développement ou le déploiement de l'application. + +Si vous avez besoin de plus d'informations ou rencontrez des problèmes, consultez la documentation ou demandez de l'aide dans votre équipe. \ No newline at end of file diff --git a/satsquare/.dockerignore b/satsquare/.dockerignore index 14f59b3..ad2154f 100644 --- a/satsquare/.dockerignore +++ b/satsquare/.dockerignore @@ -1,3 +1,39 @@ -.next -node_modules -.env.* \ No newline at end of file +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +#.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +*storybook.log + +# Prisma migration development +/prisma/migrations \ No newline at end of file diff --git a/satsquare/.env.dev b/satsquare/.env.dev new file mode 100644 index 0000000..7be949f --- /dev/null +++ b/satsquare/.env.dev @@ -0,0 +1,9 @@ +# .env.dev +POSTGRES_USER=postgres_dev +POSTGRES_PASSWORD=dev_password +POSTGRES_DB=sat_square_dev_db +POSTGRES_PORT=5432 +DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" +NEXTAUTH_SECRET="dev_secret_key" +NEXT_PUBLIC_SITE_URL="http://localhost:3000" +NEXT_PUBLIC_SOCKET_URL="http://localhost:5157" diff --git a/satsquare/.env.prod b/satsquare/.env.prod index fe04990..462c19d 100644 --- a/satsquare/.env.prod +++ b/satsquare/.env.prod @@ -1,17 +1,16 @@ -# Environment variables declared in this file are automatically made available to Prisma. -# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema - -# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. -# See the documentation for all the connection string options: https://pris.ly/d/connection-strings -POSTGRES_USER=postgres -POSTGRES_PASSWORD= -POSTGRES_DB=sat_square_db_prod -POSTGRES_PORT=5432 -# nest run in docker container -# DATABASE_URL="postgresql://postgres:@localhost:5432/sat_square_db" +# .env.prod +# POSTGRES_USER=postgres_prod +# POSTGRES_PASSWORD=prod_password +# POSTGRES_DB=sat_square_prod_db +# POSTGRES_PORT=5432 +# DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" +# NEXTAUTH_SECRET="prod_secret_key" +# NEXT_PUBLIC_SITE_URL="https://satsquare.ismail-mouyahada.com" +# NEXT_PUBLIC_SOCKET_URL="https://websocket.ismail-mouyahada.com" +DATABASE_URL="postgresql://postgres:@localhost:5432/satsquare_db" # nest run locally -DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" +# DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" NEXTAUTH_SECRET="CP912ECDSClsdezoPDZCMSJXCPISJCIY20SmfdsFOYDflHZORdsvdsFOZIRGOIZHGOURHZ" NEXT_PUBLIC_SITE_URL="http://localhost:3000" -NEXT_PUBLIC_SOCKET_URL="http://localhost:5157" \ No newline at end of file +NEXT_PUBLIC_SOCKET_URL="ws://localhost:5157" \ No newline at end of file diff --git a/satsquare/.env.test b/satsquare/.env.test index 8373b0a..2e083ab 100644 --- a/satsquare/.env.test +++ b/satsquare/.env.test @@ -1,17 +1,9 @@ -# Environment variables declared in this file are automatically made available to Prisma. -# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema - -# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. -# See the documentation for all the connection string options: https://pris.ly/d/connection-strings -POSTGRES_USER=postgres -POSTGRES_PASSWORD= -POSTGRES_DB=sat_square_db_test +# .env.test +POSTGRES_USER=postgres_test +POSTGRES_PASSWORD=test_password +POSTGRES_DB=sat_square_test_db POSTGRES_PORT=5432 -# nest run in docker container -# DATABASE_URL="postgresql://postgres:@localhost:5432/sat_square_db" - -# nest run locally DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}" -NEXTAUTH_SECRET="CP912ECDSClsdezoPDZCMSJXCPISJCIY20SmfdsFOYDflHZORdsvdsFOZIRGOIZHGOURHZ" -NEXT_PUBLIC_SITE_URL="http://localhost:3000" -NEXT_PUBLIC_SOCKET_URL="http://localhost:5157" \ No newline at end of file +NEXTAUTH_SECRET="test_secret_key" +NEXT_PUBLIC_SITE_URL="http://localhost:3001" +NEXT_PUBLIC_SOCKET_URL="http://localhost:5158" diff --git a/satsquare/Docker.md b/satsquare/Docker.md deleted file mode 100644 index 6426e8f..0000000 --- a/satsquare/Docker.md +++ /dev/null @@ -1,9 +0,0 @@ -```bash - docker build \ - --build-arg DATABASE_URL="postgresql://ismail:ieMfgjIETD9is76kdkDihSnZQnE9KqOg@dpg-cr6cvj5svqrc73c1f290-a.frankfurt-postgres.render.com/sat_square_db" \ - --build-arg NEXT_AUTH_SECRET="CP912ECDSClsdezoPDZCMSJXCPISJCIY20SmfdsFOYDflHZORdsvdsFOZIRGOIZHGOURHZ" \ - --build-arg NEXT_PUBLIC_SITE_URL="http://localhost:3000" \ - --build-arg NEXT_PUBLIC_SOCKET_URL="http://localhost:5157" \ - -t my-app-image . - -``` diff --git a/satsquare/Dockerfile b/satsquare/Dockerfile index e4473e4..9afeb42 100644 --- a/satsquare/Dockerfile +++ b/satsquare/Dockerfile @@ -15,8 +15,11 @@ COPY . . # Build-time arguments for environment variables ARG DATABASE_URL + ARG NEXT_AUTH_SECRET + ARG NEXT_PUBLIC_SITE_URL + ARG NEXT_PUBLIC_SOCKET_URL # Set environment variables based on build-time arguments @@ -44,4 +47,4 @@ RUN npm run build EXPOSE 3000 5157 # Start the application -CMD ["npm", "start"] +ENTRYPOINT ["npm", "run","all-start"] diff --git a/satsquare/Dockerfile.dev b/satsquare/Dockerfile.dev new file mode 100644 index 0000000..ed8dbef --- /dev/null +++ b/satsquare/Dockerfile.dev @@ -0,0 +1,26 @@ +# Dockerfile.dev +FROM node:18-alpine + +# Set the working directory +WORKDIR /app + +# Copy package.json and package-lock.json +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Install development dependencies +RUN npm install --only=development + +# Set environment variables for development +ENV NODE_ENV=development + +# Expose ports for Next.js and WebSocket +EXPOSE 3000 5157 + +# Start the development server +CMD ["npm", "run", "all-dev"] diff --git a/satsquare/Dockerfile.prod b/satsquare/Dockerfile.prod new file mode 100644 index 0000000..afef65b --- /dev/null +++ b/satsquare/Dockerfile.prod @@ -0,0 +1,26 @@ +# Dockerfile.prod +FROM node:18-alpine + +# Set the working directory +WORKDIR /app + +# Copy package.json and package-lock.json +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Set environment variables for production +ENV NODE_ENV=production + +# Build the Next.js application +RUN npm run build + +# Expose ports for Next.js and WebSocket +EXPOSE 3000 5157 + +# Start the application in production mode +CMD ["npm", "run", "all"] diff --git a/satsquare/Dockerfile.test b/satsquare/Dockerfile.test new file mode 100644 index 0000000..89cdc66 --- /dev/null +++ b/satsquare/Dockerfile.test @@ -0,0 +1,23 @@ +# Dockerfile.test +FROM node:18-alpine + +# Set the working directory +WORKDIR /app + +# Copy package.json and package-lock.json +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Set environment variables for testing +ENV NODE_ENV=test + +# Expose ports for testing +EXPOSE 3000 5157 + +# Run tests +CMD ["npm", "run", "test:e2e"] diff --git a/satsquare/docker-compose.dev.yml b/satsquare/docker-compose.dev.yml new file mode 100644 index 0000000..762c52e --- /dev/null +++ b/satsquare/docker-compose.dev.yml @@ -0,0 +1,26 @@ +# docker-compose.dev.yml +version: '3.8' + +services: + app: + build: + context: . + dockerfile: Dockerfile.dev + ports: + - "3000:3000" + - "5157:5157" + env_file: + - .env.dev + volumes: + - .:/app + - /app/node_modules + command: npm run all-dev + + db: + image: postgres:16 + environment: + POSTGRES_USER: postgres_dev + POSTGRES_PASSWORD: dev_password + POSTGRES_DB: sat_square_dev_db + ports: + - "5432:5432" diff --git a/satsquare/docker-compose.pod.yml b/satsquare/docker-compose.pod.yml new file mode 100644 index 0000000..4374d94 --- /dev/null +++ b/satsquare/docker-compose.pod.yml @@ -0,0 +1,22 @@ +# docker-compose.prod.yml +version: '3.8' + +services: + app: + build: + context: . + dockerfile: Dockerfile.prod + ports: + - "3000:3000" + - "5157:5157" + env_file: + - .env.prod + + db: + image: postgres:16 + environment: + POSTGRES_USER: postgres_prod + POSTGRES_PASSWORD: prod_password + POSTGRES_DB: sat_square_prod_db + ports: + - "5432:5432" diff --git a/satsquare/docker-compose.test.yml b/satsquare/docker-compose.test.yml new file mode 100644 index 0000000..229349c --- /dev/null +++ b/satsquare/docker-compose.test.yml @@ -0,0 +1,22 @@ +# docker-compose.test.yml +version: '3.8' + +services: + app: + build: + context: . + dockerfile: Dockerfile.test + ports: + - "3000:3000" + - "5157:5157" + env_file: + - .env.test + + db: + image: postgres:16 + environment: + POSTGRES_USER: postgres_test + POSTGRES_PASSWORD: test_password + POSTGRES_DB: sat_square_test_db + ports: + - "5432:5432" diff --git a/satsquare/docker-compose.yaml b/satsquare/docker-compose.yaml index ac5e135..20fa9da 100644 --- a/satsquare/docker-compose.yaml +++ b/satsquare/docker-compose.yaml @@ -1,32 +1,31 @@ version: '3.8' + services: nextjs: - build: - context: . - dockerfile: Dockerfile + image: ismailmouyahada/satsquare:latest container_name: nextjs-app restart: always ports: - - 3000:3000 + - "3000:3000" depends_on: - postgres environment: - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/${POSTGRES_DB} - - NEXTAUTH_SECRET=your-nextauth-secret - - NEXT_PUBLIC_SITE_URL=http://nextjs:3000 - - NEXT_PUBLIC_SOCKET_URL=http://nextjs:5157 + - NEXTAUTH_SECRET=${NEXTAUTH_SECRET} + - NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL} + - NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL} postgres: image: postgres:16 container_name: postgres-db restart: always ports: - - 5432:5432 + - "5432:5432" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=yourpassword - POSTGRES_DB=sat_square_db - POSTGRES_PORT=5432 + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + POSTGRES_PORT: ${POSTGRES_PORT} volumes: - postgres_data:/var/lib/postgresql/data diff --git a/satsquare/package-lock.json b/satsquare/package-lock.json index db36021..b0f964e 100644 --- a/satsquare/package-lock.json +++ b/satsquare/package-lock.json @@ -21,6 +21,8 @@ "flowbite-react": "^0.9.0", "framer-motion": "^11.2.12", "html2canvas": "^1.4.1", + "ioredis": "^5.4.1", + "lodash.debounce": "^4.0.8", "next": "14.2.3", "next-auth": "^4.24.7", "next-qrcode": "^2.5.1", @@ -33,6 +35,7 @@ "react-hot-toast": "^2.4.1", "react-icons": "^5.2.1", "react-select": "^5.8.0", + "redis": "^4.7.0", "sharp": "^0.33.4", "socket.io": "^4.7.5", "socket.io-client": "^4.7.5", @@ -47,6 +50,7 @@ "@testing-library/jest-dom": "^6.4.6", "@types/bcrypt": "^5.0.2", "@types/jest": "^29.5.12", + "@types/lodash.debounce": "^4.0.9", "@types/node": "^20.14.8", "@types/react": "^18.3.3", "@types/react-datepicker": "^6.2.0", @@ -3331,6 +3335,12 @@ "@swc/helpers": "^0.5.0" } }, + "node_modules/@ioredis/commands": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", + "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==", + "license": "MIT" + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -5205,6 +5215,65 @@ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" } }, + "node_modules/@redis/bloom": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", + "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/client": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.6.0.tgz", + "integrity": "sha512-aR0uffYI700OEEH4gYnitAnv3vzVGXCFvYfdpu/CJKvk4pHfLPEy/JSZyrpQ+15WhXe1yJRXLtfQ84s4mEXnPg==", + "license": "MIT", + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@redis/graph": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz", + "integrity": "sha512-FEMTcTHZozZciLRl6GiiIB4zGm5z5F3F6a6FZCyrfxdKOhFlGkiAqlexWMBzCi4DcRoyiOsuLfW+cjlGWyExOw==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/json": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.7.tgz", + "integrity": "sha512-6UyXfjVaTBTJtKNG4/9Z8PSpKE6XgSyEb8iwaqDcy+uKrd/DGYHTWkUdnQDyzm727V7p21WUMhsqz5oy65kPcQ==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/search": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.2.0.tgz", + "integrity": "sha512-tYoDBbtqOVigEDMAcTGsRlMycIIjwMCgD8eR2t0NANeQmgK/lvxNAvYyb6bZDD4frHRhIHkJu2TBRvB0ERkOmw==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/time-series": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.1.0.tgz", + "integrity": "sha512-c1Q99M5ljsIuc4YdaCwfUEXsofakb9c8+Zse2qxTadu8TalLXuAESzLvFAvNVbkmSlvlzIQOLpBCmWI9wTOt+g==", + "license": "MIT", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, "node_modules/@rushstack/eslint-patch": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.3.tgz", @@ -6492,6 +6561,23 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/lodash": { + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", + "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/lodash.debounce": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/lodash.debounce/-/lodash.debounce-4.0.9.tgz", + "integrity": "sha512-Ma5JcgTREwpLRwMM+XwBR7DaWe96nC38uCBDFKZWbNKD+osjVzdpnUSwBcqCptrp16sSOLBAUb50Car5I0TCsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", @@ -9056,6 +9142,15 @@ "node": ">=6" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -9966,6 +10061,15 @@ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "license": "MIT" }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -12322,6 +12426,15 @@ "node": ">=10" } }, + "node_modules/generic-pool": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz", + "integrity": "sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -13227,6 +13340,30 @@ "tslib": "^2.4.0" } }, + "node_modules/ioredis": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.4.1.tgz", + "integrity": "sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==", + "license": "MIT", + "dependencies": { + "@ioredis/commands": "^1.1.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" + } + }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -14951,7 +15088,12 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, + "license": "MIT" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", "license": "MIT" }, "node_modules/lodash.foreach": { @@ -14966,6 +15108,12 @@ "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "license": "MIT" }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==", + "license": "MIT" + }, "node_modules/lodash.kebabcase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", @@ -18051,6 +18199,44 @@ "node": ">=8" } }, + "node_modules/redis": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.7.0.tgz", + "integrity": "sha512-zvmkHEAdGMn+hMRXuMBtu4Vo5P6rHQjLoHftu+lBqq8ZTA3RCVC/WzD790bkKKiNFp7d5/9PcSD19fJyyRvOdQ==", + "license": "MIT", + "workspaces": [ + "./packages/*" + ], + "dependencies": { + "@redis/bloom": "1.2.0", + "@redis/client": "1.6.0", + "@redis/graph": "1.1.1", + "@redis/json": "1.0.7", + "@redis/search": "1.2.0", + "@redis/time-series": "1.1.0" + } + }, + "node_modules/redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "license": "MIT", + "dependencies": { + "redis-errors": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", @@ -19047,6 +19233,12 @@ "dev": true, "license": "MIT" }, + "node_modules/standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", + "license": "MIT" + }, "node_modules/start-server-and-test": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.4.tgz", diff --git a/satsquare/package.json b/satsquare/package.json index a2bfaf3..6e773db 100644 --- a/satsquare/package.json +++ b/satsquare/package.json @@ -33,6 +33,8 @@ "flowbite-react": "^0.9.0", "framer-motion": "^11.2.12", "html2canvas": "^1.4.1", + "ioredis": "^5.4.1", + "lodash.debounce": "^4.0.8", "next": "14.2.3", "next-auth": "^4.24.7", "next-qrcode": "^2.5.1", @@ -45,6 +47,7 @@ "react-hot-toast": "^2.4.1", "react-icons": "^5.2.1", "react-select": "^5.8.0", + "redis": "^4.7.0", "sharp": "^0.33.4", "socket.io": "^4.7.5", "socket.io-client": "^4.7.5", @@ -59,6 +62,7 @@ "@testing-library/jest-dom": "^6.4.6", "@types/bcrypt": "^5.0.2", "@types/jest": "^29.5.12", + "@types/lodash.debounce": "^4.0.9", "@types/node": "^20.14.8", "@types/react": "^18.3.3", "@types/react-datepicker": "^6.2.0", diff --git a/satsquare/socket/index.js b/satsquare/socket/index.js index be78ea5..25543b5 100644 --- a/satsquare/socket/index.js +++ b/satsquare/socket/index.js @@ -1,62 +1,172 @@ "use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; Object.defineProperty(exports, "__esModule", { value: true }); var socket_io_1 = require("socket.io"); -var quiz_config_1 = require("./quiz.config"); var manager_1 = require("./roles/manager"); var player_1 = require("./roles/player"); -var cooldown_1 = require("./utils/cooldown"); -var deepClone_1 = require("./utils/deepClone"); -// Initialiser gameState avec la structure correcte -var gameState = (0, deepClone_1.default)(quiz_config_1.GAME_STATE_INIT); +var quiz_config_1 = require("./quiz.config"); +var client_1 = require("@prisma/client"); +var gameState; +var prisma = new client_1.PrismaClient(); var io = new socket_io_1.Server({ cors: { - origin: "*", + origin: '*', }, - path: "/ws/", + path: '/ws/', }); io.listen(5157); -io.on("connection", function (socket) { - console.log("Un utilisateur connect\u00E9 ".concat(socket.id)); - socket.on("player:checkRoom", function (roomId) { +io.on('connection', function (socket) { + console.log("User connected ".concat(socket.id)); + socket.on('game:selectQuiz', function (quizId) { return __awaiter(void 0, void 0, void 0, function () { + var error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, (0, quiz_config_1.getGameState)(quizId)]; + case 1: + gameState = _a.sent(); + socket.emit('game:quizSelected', { success: true, gameState: gameState }); + return [3 /*break*/, 3]; + case 2: + error_1 = _a.sent(); + socket.emit('game:errorMessage', error_1.message); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + io.on('connection', function (socket) { + console.log("User connected: ".concat(socket.id)); + socket.on('requestQuizzes', function () { return __awaiter(void 0, void 0, void 0, function () { + var quizzes, error_2; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, prisma.quiz.findMany({ + select: { + id: true, + subject: true, + }, + })]; + case 1: + quizzes = _a.sent(); + socket.emit('quizzesList', quizzes); + return [3 /*break*/, 3]; + case 2: + error_2 = _a.sent(); + console.error('Error fetching quizzes:', error_2); + socket.emit('game:errorMessage', 'Failed to load quizzes.'); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + socket.on('requestAssociations', function () { return __awaiter(void 0, void 0, void 0, function () { + var quizzes, error_3; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, prisma.association.findMany({ + select: { + id: true, + valide: true, + logoUrl: true, + adresseEclairage: true, + }, + })]; + case 1: + quizzes = _a.sent(); + socket.emit('associationsList', quizzes); + return [3 /*break*/, 3]; + case 2: + error_3 = _a.sent(); + console.error('Error fetching Associations:', error_3); + socket.emit('game:errorMessage', 'Failed to load Associations.'); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + // Other socket event handlers... + }); + socket.on('player:checkRoom', function (roomId) { return player_1.default.checkRoom(gameState, io, socket, roomId); }); - socket.on("player:join", function (player) { + socket.on('player:join', function (player) { return player_1.default.join(gameState, io, socket, player); }); - socket.on("manager:createRoom", function (password) { + socket.on('manager:createRoom', function (password) { return manager_1.default.createRoom(gameState, io, socket, password); }); - socket.on("manager:kickPlayer", function (playerId) { + socket.on('manager:kickPlayer', function (playerId) { return manager_1.default.kickPlayer(gameState, io, socket, playerId); }); - socket.on("manager:startGame", function () { + socket.on('manager:startGame', function () { return manager_1.default.startGame(gameState, io, socket); }); - socket.on("player:selectedAnswer", function (answerKey) { + socket.on('player:selectedAnswer', function (answerKey) { return player_1.default.selectedAnswer(gameState, io, socket, answerKey); }); - socket.on("manager:abortQuiz", function () { + socket.on('manager:abortQuiz', function () { return manager_1.default.abortQuiz(gameState, io, socket); }); - socket.on("manager:nextQuestion", function () { + socket.on('manager:nextQuestion', function () { return manager_1.default.nextQuestion(gameState, io, socket); }); - socket.on("manager:showLeaderboard", function () { + socket.on('manager:showLeaderboard', function () { return manager_1.default.showLeaderboard(gameState, io, socket); }); - socket.on("disconnect", function () { - // console.log(`Utilisateur déconnecté ${socket.id}`); - if (gameState.manager === socket.id) { - console.log("Réinitialisation du jeu"); - io.to(gameState.room).emit("game:reset"); - gameState = (0, deepClone_1.default)(quiz_config_1.GAME_STATE_INIT); - (0, cooldown_1.abortCooldown)(); - return; - } - var playerIndex = gameState.players.findIndex(function (p) { return p.id === socket.id; }); - if (playerIndex !== -1) { - var player = gameState.players.splice(playerIndex, 1)[0]; - io.to(gameState.manager).emit("manager:removePlayer", player.id); - } - }); + // socket.on('disconnect', () => { + // console.log(`User disconnected ${socket.id}`); + // if (gameState.manager === socket.id) { + // console.log('Resetting game'); + // io.to(gameState.room).emit('game:reset'); + // gameState = null; + // abortCooldown(); + // return; + // } + // const playerIndex = gameState.players.findIndex((p: { id: any }) => p.id === socket.id); + // if (playerIndex !== -1) { + // const player = gameState.players.splice(playerIndex, 1)[0]; + // io.to(gameState.manager).emit('manager:removePlayer', player.id); + // } + // }); }); diff --git a/satsquare/socket/index.ts b/satsquare/socket/index.ts index e21634b..aec4d72 100644 --- a/satsquare/socket/index.ts +++ b/satsquare/socket/index.ts @@ -1,92 +1,126 @@ -import { Server, Socket } from "socket.io"; -import { GAME_STATE_INIT } from "./quiz.config"; -import Manager from "./roles/manager"; -import Player from "./roles/player"; -import { abortCooldown } from "./utils/cooldown"; -import deepClone from "./utils/deepClone"; - -interface GameState { - manager: string | null; - room: string; - started: boolean; - players: PlayerData[]; -} - -interface PlayerData { - id: string; - username: string; - room: string; - points: number; -} - -// Initialiser gameState avec la structure correcte -let gameState: any = deepClone(GAME_STATE_INIT); +import { Server, Socket } from 'socket.io'; +import Manager from './roles/manager'; +import Player from './roles/player'; +import { abortCooldown } from './utils/cooldown'; +import { getGameState } from './quiz.config'; +import { PrismaClient } from '@prisma/client'; + +let gameState: any; +const prisma = new PrismaClient(); const io = new Server({ cors: { - origin: "*", + origin: '*', }, - path: "/ws/", + path: '/ws/', }); io.listen(5157); -io.on("connection", (socket: Socket) => { - console.log(`Un utilisateur connecté ${socket.id}`); +io.on('connection', (socket: Socket) => { + console.log(`User connected ${socket.id}`); - socket.on("player:checkRoom", (roomId: string) => + socket.on('game:selectQuiz', async (quizId: number) => { + try { + gameState = await getGameState(quizId); + socket.emit('game:quizSelected', { success: true, gameState }); + } catch (error: any) { + socket.emit('game:errorMessage', error.message); + } + }); + + io.on('connection', (socket: Socket) => { + console.log(`User connected: ${socket.id}`); + + socket.on('requestQuizzes', async () => { + try { + const quizzes = await prisma.quiz.findMany({ + select: { + id: true, + subject: true, + }, + }); + socket.emit('quizzesList', quizzes); + } catch (error) { + console.error('Error fetching quizzes:', error); + socket.emit('game:errorMessage', 'Failed to load quizzes.'); + } + }); + + socket.on('requestAssociations', async () => { + try { + const quizzes = await prisma.association.findMany({ + select: { + id: true, + valide: true, + logoUrl: true, + adresseEclairage: true, + }, + }); + socket.emit('associationsList', quizzes); + } catch (error) { + console.error('Error fetching Associations:', error); + socket.emit('game:errorMessage', 'Failed to load Associations.'); + } + }); + + // Other socket event handlers... + }); + + + socket.on('player:checkRoom', (roomId: string) => Player.checkRoom(gameState, io, socket, roomId) ); - socket.on("player:join", (player: { username: string; room: string }) => + socket.on('player:join', (player: { username: string; room: string }) => Player.join(gameState, io, socket, player) ); - socket.on("manager:createRoom", (password: string) => + socket.on('manager:createRoom', (password: string) => Manager.createRoom(gameState, io, socket, password) ); - socket.on("manager:kickPlayer", (playerId: string) => + socket.on('manager:kickPlayer', (playerId: string) => Manager.kickPlayer(gameState, io, socket, playerId) ); - socket.on("manager:startGame", () => + socket.on('manager:startGame', () => Manager.startGame(gameState, io, socket) ); - socket.on("player:selectedAnswer", (answerKey: any) => + socket.on('player:selectedAnswer', (answerKey: any) => Player.selectedAnswer(gameState, io, socket, answerKey) ); - socket.on("manager:abortQuiz", () => + socket.on('manager:abortQuiz', () => Manager.abortQuiz(gameState, io, socket) ); - socket.on("manager:nextQuestion", () => + socket.on('manager:nextQuestion', () => Manager.nextQuestion(gameState, io, socket) ); - socket.on("manager:showLeaderboard", () => + socket.on('manager:showLeaderboard', () => Manager.showLeaderboard(gameState, io, socket) ); - socket.on("disconnect", () => { - // console.log(`Utilisateur déconnecté ${socket.id}`); + // socket.on('disconnect', () => { + // console.log(`User disconnected ${socket.id}`); - if (gameState.manager === socket.id) { - console.log("Réinitialisation du jeu"); - io.to(gameState.room).emit("game:reset"); - gameState = deepClone(GAME_STATE_INIT); + // if (gameState.manager === socket.id) { + // console.log('Resetting game'); + // io.to(gameState.room).emit('game:reset'); + // gameState = null; - abortCooldown(); - return; - } + // abortCooldown(); + // return; + // } - const playerIndex = gameState.players.findIndex((p: { id: any }) => p.id === socket.id); + // const playerIndex = gameState.players.findIndex((p: { id: any }) => p.id === socket.id); - if (playerIndex !== -1) { - const player = gameState.players.splice(playerIndex, 1)[0]; - io.to(gameState.manager).emit("manager:removePlayer", player.id); - } - }); + // if (playerIndex !== -1) { + // const player = gameState.players.splice(playerIndex, 1)[0]; + // io.to(gameState.manager).emit('manager:removePlayer', player.id); + // } + // }); }); diff --git a/satsquare/socket/quiz.config.js b/satsquare/socket/quiz.config.js index 5d63bb5..0e1e767 100644 --- a/satsquare/socket/quiz.config.js +++ b/satsquare/socket/quiz.config.js @@ -1,109 +1,81 @@ "use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.GAME_STATE_INIT = void 0; -// export const GAME_STATE_INIT = async (): Promise => { -// const response = await fetch("http://localhost:3000/api/quizzes/1"); -// const data = await response.json(); -// return data as GameState; -// }; -exports.GAME_STATE_INIT = { - room: null, - manager: null, - players: [], - started: false, - subject: "Programmation et Bitcoin", - password: "PASSWORD", // for testing only - questions: [ - { - time: 15, - answers: [ - "Vitalik Buterin", - "Satoshi Nakamoto", - "Gavin Andresen", - "Charlie Lee" - ], - cooldown: 5, - question: "Qui a inventé Bitcoin ?", - solution: 1 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1535223289827-42f1e9919769?q=80&w=500&auto=webp", - answers: [ - "Swift", - "Kotlin", - "Python", - "JavaScript" - ], - cooldown: 5, - question: "Quel langage de programmation est principalement utilisé pour le développement d'applications Android ?", - solution: 1 - }, - { - time: 15, - answers: [ - "2005", - "2008", - "2010", - "2012" - ], - cooldown: 5, - question: "Quand le livre blanc de Bitcoin a-t-il été publié ?", - solution: 1 - }, - { - time: 15, - answers: [ - "Centralisation", - "Vitesse des transactions", - "Décentralisation", - "Faible consommation d'électricité" - ], - cooldown: 5, - question: "Quel est le principal avantage de l'utilisation de la technologie blockchain ?", - solution: 2 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1556761175-5973dc0f32e7?q=80&w=500&auto=webp", - answers: [ - "Django", - "Laravel", - "React", - "Spring" - ], - cooldown: 5, - question: "Lequel des éléments suivants est un framework JavaScript pour le front-end ?", - solution: 2 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1543946607-ebfaab77d5a1?q=80&w=500&auto=webp", - answers: [ - "6,25 BTC", - "12,5 BTC", - "25 BTC", - "50 BTC" - ], - cooldown: 5, - question: "Quelle est la récompense de bloc pour le minage d'un bloc Bitcoin ?", - solution: 0 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1581091870627-3c52cda4d0d9?q=80&w=500&auto=webp", - answers: [ - "HTML", - "CSS", - "PHP", - "XML" - ], - cooldown: 5, - question: "Lequel des éléments suivants est utilisé pour le script côté serveur ?", - solution: 2 +exports.getGameState = void 0; +var client_1 = require("@prisma/client"); +var prisma = new client_1.PrismaClient(); +var getGameState = function (quizId) { return __awaiter(void 0, void 0, void 0, function () { + var quiz, gameState; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, prisma.quiz.findUnique({ + where: { id: quizId }, + include: { + questions: true, + }, + })]; + case 1: + quiz = _a.sent(); + if (!quiz) { + throw new Error("Quiz with ID ".concat(quizId, " not found")); + } + gameState = { + room: quiz.room || '', + manager: quiz.manager || null, + started: quiz.started, + players: [], + subject: quiz.subject, + password: quiz.password, + questions: quiz.questions.map(function (q) { return ({ + id: q.id, + question: q.question, + answers: q.answers, + cooldown: q.cooldown, + time: q.time, + solution: q.solution, + image: q.image, + }); }), + playersAnswer: [], + roundStartTime: quiz.roundStartTime, + currentQuestion: quiz.currentQuestion, + }; + return [2 /*return*/, gameState]; } - ], - playersAnswer: [], - roundStartTime: 0, - currentQuestion: 0 -}; + }); +}); }; +exports.getGameState = getGameState; diff --git a/satsquare/socket/quiz.config.ts b/satsquare/socket/quiz.config.ts index f03b0c9..c4165ce 100644 --- a/satsquare/socket/quiz.config.ts +++ b/satsquare/socket/quiz.config.ts @@ -1,128 +1,60 @@ +import { PrismaClient } from '@prisma/client'; + +const prisma = new PrismaClient(); + interface PlayerData { - id: string; - username: string; - room: string; - points: number; - } - + id: string; + username: string; + room: string; + points: number; +} interface GameState { - manager: string | null; - room: string; - started: boolean; - players: PlayerData[]; - questions: any[]; - currentQuestion: number; - playersAnswer: { id: string; answer: string; points: number }[]; - roundStartTime?: number; - [key: string]: any; + manager: string | null; + room: string; + started: boolean; + players: PlayerData[]; + questions: any[]; + currentQuestion: number; + playersAnswer: { id: string; answer: string; points: number }[]; + roundStartTime?: number; + subject: string; + password: string; + [key: string]: any; +} + +export const getGameState = async (quizId: number): Promise => { + const quiz = await prisma.quiz.findUnique({ + where: { id: quizId }, + include: { + questions: true, + }, + }); + + if (!quiz) { + throw new Error(`Quiz with ID ${quizId} not found`); } - -// export const GAME_STATE_INIT = async (): Promise => { -// const response = await fetch("http://localhost:3000/api/quizzes/1"); -// const data = await response.json(); -// return data as GameState; -// }; - - - export const GAME_STATE_INIT = { - room: null, - manager: null, + + const gameState: GameState = { + room: quiz.room || '', + manager: quiz.manager || null, + started: quiz.started, players: [], - started: false, - subject: "Programmation et Bitcoin", - password: "PASSWORD", // for testing only - questions: [ - { - time: 15, - answers: [ - "Vitalik Buterin", - "Satoshi Nakamoto", - "Gavin Andresen", - "Charlie Lee" - ], - cooldown: 5, - question: "Qui a inventé Bitcoin ?", - solution: 1 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1535223289827-42f1e9919769?q=80&w=500&auto=webp", - answers: [ - "Swift", - "Kotlin", - "Python", - "JavaScript" - ], - cooldown: 5, - question: "Quel langage de programmation est principalement utilisé pour le développement d'applications Android ?", - solution: 1 - }, - { - time: 15, - answers: [ - "2005", - "2008", - "2010", - "2012" - ], - cooldown: 5, - question: "Quand le livre blanc de Bitcoin a-t-il été publié ?", - solution: 1 - }, - { - time: 15, - answers: [ - "Centralisation", - "Vitesse des transactions", - "Décentralisation", - "Faible consommation d'électricité" - ], - cooldown: 5, - question: "Quel est le principal avantage de l'utilisation de la technologie blockchain ?", - solution: 2 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1556761175-5973dc0f32e7?q=80&w=500&auto=webp", - answers: [ - "Django", - "Laravel", - "React", - "Spring" - ], - cooldown: 5, - question: "Lequel des éléments suivants est un framework JavaScript pour le front-end ?", - solution: 2 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1543946607-ebfaab77d5a1?q=80&w=500&auto=webp", - answers: [ - "6,25 BTC", - "12,5 BTC", - "25 BTC", - "50 BTC" - ], - cooldown: 5, - question: "Quelle est la récompense de bloc pour le minage d'un bloc Bitcoin ?", - solution: 0 - }, - { - time: 15, - image: "https://images.unsplash.com/photo-1581091870627-3c52cda4d0d9?q=80&w=500&auto=webp", - answers: [ - "HTML", - "CSS", - "PHP", - "XML" - ], - cooldown: 5, - question: "Lequel des éléments suivants est utilisé pour le script côté serveur ?", - solution: 2 - } - ], + subject: quiz.subject, + password: quiz.password, + questions: quiz.questions.map(q => ({ + id: q.id, + question: q.question, + answers: q.answers, + cooldown: q.cooldown, + time: q.time, + solution: q.solution, + image: q.image, + })), playersAnswer: [], - roundStartTime: 0, - currentQuestion: 0 -} + roundStartTime: quiz.roundStartTime, + currentQuestion: quiz.currentQuestion, + }; + + return gameState; +}; diff --git a/satsquare/socket/roles/manager.js b/satsquare/socket/roles/manager.js index b853e6b..0aff43c 100644 --- a/satsquare/socket/roles/manager.js +++ b/satsquare/socket/roles/manager.js @@ -152,7 +152,7 @@ var Manager = { console.error("Error saving top scores:", error_1); return [3 /*break*/, 5]; case 5: - Object.assign(game, (0, deepClone_js_1.default)(quiz_config_js_1.GAME_STATE_INIT)); + Object.assign(game, (0, deepClone_js_1.default)(quiz_config_js_1.getGameState)); return [2 /*return*/]; case 6: socket.emit("game:status", { diff --git a/satsquare/socket/roles/manager.ts b/satsquare/socket/roles/manager.ts index 8868732..300a3ad 100644 --- a/satsquare/socket/roles/manager.ts +++ b/satsquare/socket/roles/manager.ts @@ -1,5 +1,5 @@ import { Server, Socket } from "socket.io"; -import { GAME_STATE_INIT } from "../quiz.config.js"; +import { getGameState } from "../quiz.config.js"; import generateRoomId from "../utils/generateRoomId.js"; import { abortCooldown, cooldown, sleep } from "../utils/cooldown.js"; import deepClone from "../utils/deepClone.js"; @@ -143,7 +143,7 @@ const Manager = { console.error("Error saving top scores:", error); } - Object.assign(game, deepClone(GAME_STATE_INIT)); + Object.assign(game, deepClone(getGameState)); return; } diff --git a/satsquare/socket/wallet.js b/satsquare/socket/wallet.js new file mode 100644 index 0000000..b4d8e95 --- /dev/null +++ b/satsquare/socket/wallet.js @@ -0,0 +1,63 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fetchWalletDetails = fetchWalletDetails; +function fetchWalletDetails(walletId) { + return __awaiter(this, void 0, void 0, function () { + var response, errorDetails; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fetch("https://lightning.ismail-mouyahada.com/api/v1/auth?usr=".concat(walletId), { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + })]; + case 1: + response = _a.sent(); + if (!!response.ok) return [3 /*break*/, 3]; + return [4 /*yield*/, response.text()]; + case 2: + errorDetails = _a.sent(); + console.error('Error fetching wallet details from external API:', errorDetails); + throw new Error(errorDetails); + case 3: return [2 /*return*/, response.json()]; + } + }); + }); +} diff --git a/satsquare/socket/wallet.ts b/satsquare/socket/wallet.ts new file mode 100644 index 0000000..9581bf6 --- /dev/null +++ b/satsquare/socket/wallet.ts @@ -0,0 +1,16 @@ +export async function fetchWalletDetails(walletId: string) { + const response = await fetch(`https://lightning.ismail-mouyahada.com/api/v1/auth?usr=${walletId}`, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + }); + + if (!response.ok) { + const errorDetails = await response.text(); + console.error('Error fetching wallet details from external API:', errorDetails); + throw new Error(errorDetails); + } + + return response.json(); + } \ No newline at end of file diff --git a/satsquare/src/app/api/associations/[id]/route.ts b/satsquare/src/app/api/associations/[id]/route.ts index 9793732..b6ec84d 100644 --- a/satsquare/src/app/api/associations/[id]/route.ts +++ b/satsquare/src/app/api/associations/[id]/route.ts @@ -1,6 +1,33 @@ import { NextRequest, NextResponse } from "next/server"; import prisma from "@/db/prisma"; +// GET: Retrieve an existing association by ID +export async function GET( + req: NextRequest, + { params }: { params: { id: string } } +) { + const { id } = params; + try { + const association = await prisma.association.findUnique({ + where: { id: Number(id) }, + }); + if (association) { + return NextResponse.json(association, { status: 200 }); + } else { + return NextResponse.json( + { error: "Association not found" }, + { status: 404 } + ); + } + } catch (error) { + console.error("Error retrieving association:", error); + return NextResponse.json( + { error: "An error occurred while retrieving the association" }, + { status: 500 } + ); + } +} + // PUT: Mettre à jour une association existante export async function PUT( req: NextRequest, diff --git a/satsquare/src/app/home/page.tsx b/satsquare/src/app/home/page.tsx index 39adc96..10e8e8a 100644 --- a/satsquare/src/app/home/page.tsx +++ b/satsquare/src/app/home/page.tsx @@ -10,6 +10,7 @@ import Room from "@/components/game/join/Room"; import { usePlayerContext } from "@/context/player"; import { useSocketContext } from "@/context/socket"; import Username from "@/components/game/join/Username/page"; +import SelectQuiz from '../../components/game/SelectQuiz'; export default function Home() { const { player } = usePlayerContext(); @@ -35,7 +36,7 @@ export default function Home() { logo - + {!player ? : } ); diff --git a/satsquare/src/app/manager/page.tsx b/satsquare/src/app/manager/page.tsx index 1e400b7..b57d994 100644 --- a/satsquare/src/app/manager/page.tsx +++ b/satsquare/src/app/manager/page.tsx @@ -1,12 +1,18 @@ "use client"; import React, { useEffect, useState } from "react"; -import { useQRCode } from 'next-qrcode'; +import { useQRCode } from "next-qrcode"; import { useSocketContext } from "@/context/socket"; import GameWrapper from "@/components/game/GameWrapper/page"; import ManagerPassword from "@/components/ManagerPassword"; import { GAME_STATES, GAME_STATE_COMPONENTS_MANAGER } from "../constants/db"; +interface GameStatus { + name: string; + data: any; + question: any; +} + export default function Manager() { const { Canvas } = useQRCode(); const { socket } = useSocketContext(); @@ -21,8 +27,8 @@ export default function Manager() { useEffect(() => { if (isMounted) { - const savedState = localStorage.getItem('gameState'); - const savedInviteCode = localStorage.getItem('inviteCode'); + const savedState = localStorage.getItem("gameState"); + const savedInviteCode = localStorage.getItem("inviteCode"); if (savedState) { setState(JSON.parse(savedState)); @@ -34,7 +40,12 @@ export default function Manager() { }, [isMounted]); useEffect(() => { - const handleGameStatus = (status: { name: any; data: any; question: any; }) => { + const handleGameStatus = (status: GameStatus) => { + if (!status || !status.name) { + console.error("Invalid status received:", status); + return; + } + console.log("Received game status:", status); // Debugging log setState((prevState) => { const newState = { @@ -49,8 +60,8 @@ export default function Manager() { current: status.question, }, }; - if (typeof window !== 'undefined') { - localStorage.setItem('gameState', JSON.stringify(newState)); + if (typeof window !== "undefined") { + localStorage.setItem("gameState", JSON.stringify(newState)); } return newState; }); @@ -59,8 +70,8 @@ export default function Manager() { const handleInviteCode = (roomInvite: string) => { console.log("Received invite code:", roomInvite); // Debugging log setInviteCode(roomInvite); - if (typeof window !== 'undefined') { - localStorage.setItem('inviteCode', roomInvite); + if (typeof window !== "undefined") { + localStorage.setItem("inviteCode", roomInvite); } setState((prevState) => { @@ -75,8 +86,8 @@ export default function Manager() { }, }, }; - if (typeof window !== 'undefined') { - localStorage.setItem('gameState', JSON.stringify(newState)); + if (typeof window !== "undefined") { + localStorage.setItem("gameState", JSON.stringify(newState)); } return newState; }); @@ -112,15 +123,15 @@ export default function Manager() { socket.emit("manager:nextQuestion"); break; default: + console.log("No matching case for state:", state.status.name); socket.emit("manager:startGame"); - console.log("No matching case for state:", state.status.name); } }; const handleLogout = () => { - if (typeof window !== 'undefined') { - localStorage.removeItem('gameState'); - localStorage.removeItem('inviteCode'); + if (typeof window !== "undefined") { + localStorage.removeItem("gameState"); + localStorage.removeItem("inviteCode"); } setState({ ...GAME_STATES, diff --git a/satsquare/src/components/ManagerPassword.tsx b/satsquare/src/components/ManagerPassword.tsx index a2d7e02..0f9fef8 100644 --- a/satsquare/src/components/ManagerPassword.tsx +++ b/satsquare/src/components/ManagerPassword.tsx @@ -7,6 +7,7 @@ import logo from "@/assets/logo-header.png"; import toast, { Renderable, Toast, ValueFunction } from "react-hot-toast"; import { socket } from "@/context/socket"; import { FaUser } from "react-icons/fa"; +import SelectQuiz from "./game/SelectQuiz"; export default function ManagerPassword() { const [loading, setLoading] = useState(false); @@ -30,6 +31,7 @@ export default function ManagerPassword() { useEffect(() => { const handleErrorMessage = (message: Renderable | ValueFunction) => { toast.error(message); + setLoading(false); }; socket.on("game:errorMessage", handleErrorMessage); @@ -54,6 +56,7 @@ export default function ManagerPassword() { + { const { data: session } = useSession(); + const { socket } = useSocketContext(); const [userData, setUserData] = useState(null); const [oldPassword, setOldPassword] = useState(""); const [newPassword, setNewPassword] = useState(""); @@ -45,6 +47,32 @@ const ProfileDetail: React.FC = () => { const router = useRouter(); + + useEffect(() => { + if (socket && userData?.walletId) { + socket.emit("wallet:connect", userData?.walletId); + + socket.on("wallet:balance", (data) => { + const balance = BigInt(data.balance) / BigInt(1000); + setWalletDetails({ + id: data.id, + name: data.name, + balance: Number(balance), + }); + toast.success("Wallet details updated."); + }); + + socket.on("game:errorMessage", (message) => { + toast.error(message); + }); + + return () => { + socket.off("wallet:balance"); + socket.off("game:errorMessage"); + }; + } + }, [socket, userData?.walletId]); + useEffect(() => { const fetchUserData = async () => { if (session?.user?.email) { @@ -72,47 +100,47 @@ const ProfileDetail: React.FC = () => { fetchUserData(); }, [session]); - useEffect(() => { - const fetchWalletDetails = async () => { - if (userData?.walletId) { - try { - const response = await fetch( - `/api/get-wallet-details?walletId=${userData.walletId}`, - { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - } - ); - - if (!response.ok) { - throw new Error("Failed to fetch wallet details"); - } - - const data = await response.json(); - const balance = BigInt(data.balance) / BigInt(1000); - - setWalletDetails({ - id: data.id, - name: data.name, - balance: Number(balance), - }); - } catch (error) { - console.error("Error fetching wallet details:", error); - toast.error("Erreur lors de la récupération des détails du portefeuille."); - } - } else { - setWalletDetails(null); - } - }; - - fetchWalletDetails(); - - const intervalId = setInterval(fetchWalletDetails, 10000); // Poll every 10 seconds - - return () => clearInterval(intervalId); // Cleanup on component unmount - }, [userData]); + // useEffect(() => { + // const fetchWalletDetails = async () => { + // if (userData?.walletId) { + // try { + // const response = await fetch( + // `/api/get-wallet-details?walletId=${userData.walletId}`, + // { + // method: "GET", + // headers: { + // "Content-Type": "application/json", + // }, + // } + // ); + + // if (!response.ok) { + // throw new Error("Failed to fetch wallet details"); + // } + + // const data = await response.json(); + // const balance = BigInt(data.balance) / BigInt(1000); + + // setWalletDetails({ + // id: data.id, + // name: data.name, + // balance: Number(balance), + // }); + // } catch (error) { + // console.error("Error fetching wallet details:", error); + // toast.error("Erreur lors de la récupération des détails du portefeuille."); + // } + // } else { + // setWalletDetails(null); + // } + // }; + + // fetchWalletDetails(); + + // const intervalId = setInterval(fetchWalletDetails, 10000); // Poll every 10 seconds + + // return () => clearInterval(intervalId); // Cleanup on component unmount + // }, [userData]); const handlePasswordReset = async () => { if (newPassword !== confirmPassword) { diff --git a/satsquare/src/components/game/GameWrapper/page.tsx b/satsquare/src/components/game/GameWrapper/page.tsx index 6d5b78c..aeff7ed 100644 --- a/satsquare/src/components/game/GameWrapper/page.tsx +++ b/satsquare/src/components/game/GameWrapper/page.tsx @@ -171,13 +171,14 @@ export default function GameWrapper({ children, textNext, onNext, manager }: Pro )} - {manager && waitingList.length > 0 && ( -
-

+ Liste des joueurs en attente

+ {manager && waitingList.length > 0 && ( +
+

+ Liste des joueurs en attente

    - {waitingList.map((user: any) => ( -
  • -

    {user.username || ''}

    {user.points} pt

    + {waitingList.map((user: any) => ( +
  • +

    {user.username || ''}

    +
  • ))}
diff --git a/satsquare/src/components/game/SelectQuiz.tsx b/satsquare/src/components/game/SelectQuiz.tsx new file mode 100644 index 0000000..9b80838 --- /dev/null +++ b/satsquare/src/components/game/SelectQuiz.tsx @@ -0,0 +1,158 @@ +import { useEffect, useState, useCallback } from "react"; +import { useSocketContext } from "@/context/socket"; +import toast from "react-hot-toast"; +import { FaSpinner } from "react-icons/fa"; +import debounce from "lodash.debounce"; +import { Association } from "@/types/main-types/main"; + +interface Quiz { + id: number; + subject: string; +} + +export default function SelectQuiz() { + const { socket } = useSocketContext(); + const [quizzes, setQuizzes] = useState([]); + const [associations, setAssociations] = useState([]); + const [selectedQuiz, setSelectedQuiz] = useState(null); + const [selectedAssociation, setSelectedAssociation] = useState([]); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + const [isSelecting, setIsSelecting] = useState(false); // Track if a quiz is being selected + + useEffect(() => { + socket.emit('requestQuizzes'); + + socket.on('quizzesList', (data: Quiz[]) => { + setQuizzes(data); + setLoading(false); + }); + + socket.on('game:errorMessage', (message: string) => { + toast.dismiss(); // Dismiss any existing toasts + toast.error(message.split(' ')[0] === 'Failed' ? 'Failed to load quizzes.' : message); + setError(message); + setLoading(false); + }); + + return () => { + socket.off('quizzesList'); + socket.off('game:errorMessage'); + }; + }, [socket]); + + useEffect(() => { + socket.emit('requestAssociations'); + + socket.on('associationsList', (data: Association[]) => { + setAssociations(data); + setLoading(false); + }); + + socket.on('game:errorMessage', (message: string) => { + toast.dismiss(); // Dismiss any existing toasts + toast.error(message.split(' ')[0] === 'Failed' ? 'Failed to load associations.' : message); + setError(message); + setLoading(false); + }); + + return () => { + socket.off('associationsList'); + socket.off('game:errorMessage'); + }; + }, [socket]); + + const handleQuizSelect = useCallback((quizId: number) => { + if (!isSelecting) { + setIsSelecting(true); + setSelectedQuiz(quizId); + socket.emit('game:selectQuiz', quizId); + + // Prevent further selections for a short period to avoid spamming + setTimeout(() => { + setIsSelecting(false); + }, 2000); // 2 seconds delay before allowing another selection + } else { + toast("Please wait before selecting another quiz", { icon: "⏳" }); + } + }, [isSelecting, socket]); + + const handleAssociationSelect = useCallback((associationIds: number[]) => { + if (!isSelecting) { + setIsSelecting(true); + setSelectedAssociation(associationIds); + socket.emit('game:selectAssociation', associationIds); + + // Prevent further selections for a short period to avoid spamming + setTimeout(() => { + setIsSelecting(false); + }, 2000); // 2 seconds delay before allowing another selection + } else { + toast("Please wait before selecting another association", { icon: "⏳" }); + } + }, [isSelecting, socket]); + + const debouncedHandleQuizSelect = useCallback( + debounce(handleQuizSelect, 300), // 300ms debounce delay + [isSelecting] + ); + + const debouncedHandleAssociationSelect = useCallback( + debounce(handleAssociationSelect, 300), // 300ms debounce delay + [isSelecting] + ); + + if (loading) { + return
; + } + + if (error) { + toast.dismiss(); // Ensure only one error toast is displayed at a time + toast.error(error); + return null; // Avoid rendering the select elements if there's an error + } + + return ( + <> + + + + + ); +} diff --git a/satsquare/src/middleware.ts b/satsquare/src/middleware.ts index cf89599..6ebc75b 100644 --- a/satsquare/src/middleware.ts +++ b/satsquare/src/middleware.ts @@ -21,39 +21,39 @@ export const config = { '/rewards/:path*', '/roles/:path*', '/profile/:path*', - '/home/:path*', - '/manager/:path*', + // '/home/:path*', + // '/manager/:path*', '/scores/:path*', '/sponsors/:path*', '/update-wallet/:path*', '/users/:path*', '/utilisateurs/:path*', - '/wallet-balance/:path*', - '/api/associations/:path*', - '/api/check-invoice-status/:path*', - '/api/create-invoice/:path*', - '/api/decode-invoice/:path*', - '/api/disassociate-wallet/:path*', - '/api/event/:path*', - '/api/associations/:path*', - '/api/events/:path*', - '/api/get-wallet-details/:path*', - '/api/link-wallet/:path*', - '/api/pay-invoice/:path*', - '/api/questions/:path*', - '/api/quizform/:path*', - '/api/quizzes/:path*', - '/api/ranking/:path*', - '/api/rewards/:path*', - '/api/roles/:path*', - '/api/profile/:path*', - '/api/home/:path*', - '/api/manager/:path*', - '/api/scores/:path*', - '/api/sponsors/:path*', - '/api/update-wallet/:path*', - '/api/users/:path*', - '/api/utilisateurs/:path*', - '/api/wallet-balance/:path*' + // '/wallet-balance/:path*', + // '/api/associations/:path*', + // '/api/check-invoice-status/:path*', + // '/api/create-invoice/:path*', + // '/api/decode-invoice/:path*', + // '/api/disassociate-wallet/:path*', + // '/api/event/:path*', + // '/api/associations/:path*', + // '/api/events/:path*', + // '/api/get-wallet-details/:path*', + // '/api/link-wallet/:path*', + // '/api/pay-invoice/:path*', + // '/api/questions/:path*', + // '/api/quizform/:path*', + // '/api/quizzes/:path*', + // '/api/ranking/:path*', + // '/api/rewards/:path*', + // '/api/roles/:path*', + // '/api/profile/:path*', + // '/api/home/:path*', + // '/api/manager/:path*', + // '/api/scores/:path*', + // '/api/sponsors/:path*', + // '/api/update-wallet/:path*', + // '/api/users/:path*', + // '/api/utilisateurs/:path*', + // '/api/wallet-balance/:path*' ] }; \ No newline at end of file diff --git a/satsquare/src/types/socket/main.d.ts b/satsquare/src/types/socket/main.d.ts new file mode 100644 index 0000000..9629ba2 --- /dev/null +++ b/satsquare/src/types/socket/main.d.ts @@ -0,0 +1,35 @@ +export interface GameState { + room: string; + manager: string | null; + started: boolean; + players: Player[]; + subject: string; + password: string; + questions: Question[]; + currentQuestion: number; + roundStartTime: number; + } + + export interface Player { + id: string; + username: string; + room: string; + points: number; + } + + export interface Question { + id: number; + question: string; + answers: string[]; + cooldown: number; + time: number; + solution: number; + image?: string | null; + } + + export interface Quiz { + id: number; + subject: string; + questions: Question[]; + } + \ No newline at end of file diff --git a/satsquare/src/utils/ioredis.ts b/satsquare/src/utils/ioredis.ts new file mode 100644 index 0000000..586ff8a --- /dev/null +++ b/satsquare/src/utils/ioredis.ts @@ -0,0 +1,2 @@ +import Redis from 'ioredis'; +export const redis = new Redis(); diff --git a/satsquare/wait-for-it.sh b/satsquare/wait-for-it.sh deleted file mode 100644 index a74ad4f..0000000 --- a/satsquare/wait-for-it.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# Use this script to test if a given TCP host/port are available - -TIMEOUT=15 -QUIET=0 -WAITTIME=1 -TCP_HOST=localhost -TCP_PORT= - -echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } - -usage() -{ - cat << USAGE >&2 -Usage: - $0 host:port [-t timeout] [-- command args] - -q | --quiet Do not output any status messages - -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout - -- COMMAND ARGS Execute command with args after the test finishes -USAGE - exit 1 -} - -wait_for() -{ - if [[ $TIMEOUT -gt 0 ]]; then - echoerr "$0: waiting $TIMEOUT seconds for $TCP_HOST:$TCP_PORT" - else - echoerr "$0: waiting for $TCP_HOST:$TCP_PORT without a timeout" - fi - - start_ts=$(date +%s) - while : - do - if [[ $ISBUSY -eq 1 ]]; then - nc -z $TCP_HOST $TCP_PORT - result=$? - else - (echo > /dev/tcp/$TCP_HOST/$TCP_PORT) >/dev/null 2>&1 - result=$? - fi - - if [[ $result -eq 0 ]]; then - end_ts=$(date +%s) - echoerr "$0: $TCP_HOST:$TCP_PORT is available after $((end_ts - start_ts)) seconds" - break - fi - sleep 1 - done - return $result -} - -wait_for "$@" diff --git a/satsquare/yarn.lock b/satsquare/yarn.lock index a4eee8b..e7d4f74 100644 --- a/satsquare/yarn.lock +++ b/satsquare/yarn.lock @@ -1404,6 +1404,11 @@ dependencies: "@swc/helpers" "^0.5.0" +"@ioredis/commands@^1.1.1": + version "1.2.0" + resolved "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz" + integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg== + "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz" @@ -2192,6 +2197,40 @@ "@react-types/overlays" "^3.8.5" "@react-types/shared" "^3.22.1" +"@redis/bloom@1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz" + integrity sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg== + +"@redis/client@^1.0.0", "@redis/client@1.6.0": + version "1.6.0" + resolved "https://registry.npmjs.org/@redis/client/-/client-1.6.0.tgz" + integrity sha512-aR0uffYI700OEEH4gYnitAnv3vzVGXCFvYfdpu/CJKvk4pHfLPEy/JSZyrpQ+15WhXe1yJRXLtfQ84s4mEXnPg== + dependencies: + cluster-key-slot "1.1.2" + generic-pool "3.9.0" + yallist "4.0.0" + +"@redis/graph@1.1.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz" + integrity sha512-FEMTcTHZozZciLRl6GiiIB4zGm5z5F3F6a6FZCyrfxdKOhFlGkiAqlexWMBzCi4DcRoyiOsuLfW+cjlGWyExOw== + +"@redis/json@1.0.7": + version "1.0.7" + resolved "https://registry.npmjs.org/@redis/json/-/json-1.0.7.tgz" + integrity sha512-6UyXfjVaTBTJtKNG4/9Z8PSpKE6XgSyEb8iwaqDcy+uKrd/DGYHTWkUdnQDyzm727V7p21WUMhsqz5oy65kPcQ== + +"@redis/search@1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@redis/search/-/search-1.2.0.tgz" + integrity sha512-tYoDBbtqOVigEDMAcTGsRlMycIIjwMCgD8eR2t0NANeQmgK/lvxNAvYyb6bZDD4frHRhIHkJu2TBRvB0ERkOmw== + +"@redis/time-series@1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@redis/time-series/-/time-series-1.1.0.tgz" + integrity sha512-c1Q99M5ljsIuc4YdaCwfUEXsofakb9c8+Zse2qxTadu8TalLXuAESzLvFAvNVbkmSlvlzIQOLpBCmWI9wTOt+g== + "@rushstack/eslint-patch@^1.3.3": version "1.10.3" resolved "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.3.tgz" @@ -2900,6 +2939,18 @@ resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/lodash.debounce@^4.0.9": + version "4.0.9" + resolved "https://registry.npmjs.org/@types/lodash.debounce/-/lodash.debounce-4.0.9.tgz" + integrity sha512-Ma5JcgTREwpLRwMM+XwBR7DaWe96nC38uCBDFKZWbNKD+osjVzdpnUSwBcqCptrp16sSOLBAUb50Car5I0TCsQ== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.17.7" + resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz" + integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== + "@types/mime@^1": version "1.3.5" resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz" @@ -4353,6 +4404,11 @@ clsx@^2.0.0, clsx@^2.1.0, clsx@^2.1.1: resolved "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== +cluster-key-slot@^1.1.0, cluster-key-slot@1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz" + integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== + co@^4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" @@ -4977,6 +5033,11 @@ delegates@^1.0.0: resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== +denque@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz" + integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== + depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" @@ -6285,6 +6346,11 @@ gauge@^3.0.0: strip-ansi "^6.0.1" wide-align "^1.1.2" +generic-pool@3.9.0: + version "3.9.0" + resolved "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz" + integrity sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g== + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" @@ -6844,6 +6910,21 @@ intl-messageformat@^10.1.0: "@formatjs/icu-messageformat-parser" "2.7.8" tslib "^2.4.0" +ioredis@^5.4.1: + version "5.4.1" + resolved "https://registry.npmjs.org/ioredis/-/ioredis-5.4.1.tgz" + integrity sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA== + dependencies: + "@ioredis/commands" "^1.1.1" + cluster-key-slot "^1.1.0" + debug "^4.3.4" + denque "^2.1.0" + lodash.defaults "^4.2.0" + lodash.isarguments "^3.1.0" + redis-errors "^1.2.0" + redis-parser "^3.0.0" + standard-as-callback "^2.1.0" + ip-address@^9.0.5: version "9.0.5" resolved "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz" @@ -7880,6 +7961,11 @@ lodash.debounce@^4.0.8: resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== +lodash.defaults@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz" + integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== + lodash.foreach@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz" @@ -7890,6 +7976,11 @@ lodash.get@^4.4.2: resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== +lodash.isarguments@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" + integrity sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg== + lodash.kebabcase@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz" @@ -9559,6 +9650,30 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" +redis-errors@^1.0.0, redis-errors@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz" + integrity sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w== + +redis-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz" + integrity sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A== + dependencies: + redis-errors "^1.0.0" + +redis@^4.7.0: + version "4.7.0" + resolved "https://registry.npmjs.org/redis/-/redis-4.7.0.tgz" + integrity sha512-zvmkHEAdGMn+hMRXuMBtu4Vo5P6rHQjLoHftu+lBqq8ZTA3RCVC/WzD790bkKKiNFp7d5/9PcSD19fJyyRvOdQ== + dependencies: + "@redis/bloom" "1.2.0" + "@redis/client" "1.6.0" + "@redis/graph" "1.1.1" + "@redis/json" "1.0.7" + "@redis/search" "1.2.0" + "@redis/time-series" "1.1.0" + reflect.getprototypeof@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz" @@ -10204,6 +10319,11 @@ stackframe@^1.3.4: resolved "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz" integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== +standard-as-callback@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz" + integrity sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A== + start-server-and-test@^2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.4.tgz" @@ -11476,7 +11596,7 @@ yallist@^3.0.2: resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: +yallist@^4.0.0, yallist@4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== From 6a26ee3e0419ce1f35a58b3e2fe2b1cecb07b429 Mon Sep 17 00:00:00 2001 From: Ismail MOUYAHADA Date: Wed, 28 Aug 2024 01:17:10 +0200 Subject: [PATCH 2/2] fixed wallet --- satsquare/configuration.ts.ts | 5 + satsquare/package-lock.json | 1435 ++++++++++++++++- satsquare/package.json | 2 + satsquare/socket/index.js | 210 ++- satsquare/socket/index.ts | 150 +- .../src/app/api/get-wallet-details/route.ts | 3 +- .../ProfileDetail/ProfileDetail.tsx | 153 +- satsquare/src/components/game/SelectQuiz.tsx | 68 +- satsquare/src/components/game/join/Room.tsx | 199 ++- satsquare/src/hook/useApiHook.ts | 69 + satsquare/src/middleware.ts | 12 +- satsquare/src/utils/ioredis.ts | 2 - satsquare/src/utils/refis.ts | 58 + satsquare/yarn.lock | 926 ++++++++++- 14 files changed, 2882 insertions(+), 410 deletions(-) create mode 100644 satsquare/configuration.ts.ts create mode 100644 satsquare/src/hook/useApiHook.ts delete mode 100644 satsquare/src/utils/ioredis.ts create mode 100644 satsquare/src/utils/refis.ts diff --git a/satsquare/configuration.ts.ts b/satsquare/configuration.ts.ts new file mode 100644 index 0000000..8e1b55a --- /dev/null +++ b/satsquare/configuration.ts.ts @@ -0,0 +1,5 @@ +export const redis = { + host: process.env.REDIS_HOST, + password: process.env.REDIS_PASSWORD, + port: process.env.REDIS_PORT, +} \ No newline at end of file diff --git a/satsquare/package-lock.json b/satsquare/package-lock.json index b0f964e..5eecd19 100644 --- a/satsquare/package-lock.json +++ b/satsquare/package-lock.json @@ -17,6 +17,7 @@ "@prisma/client": "^5.14.0", "bcrypt": "^5.1.1", "clsx": "^2.1.1", + "dns": "^0.2.2", "dotenv": "^16.4.5", "flowbite-react": "^0.9.0", "framer-motion": "^11.2.12", @@ -34,6 +35,7 @@ "react-dom": "^18.3.1", "react-hot-toast": "^2.4.1", "react-icons": "^5.2.1", + "react-qr-scanner": "^1.0.0-alpha.11", "react-select": "^5.8.0", "redis": "^4.7.0", "sharp": "^0.33.4", @@ -6430,28 +6432,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "0.0.51", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", @@ -7175,6 +7155,28 @@ "dev": true, "license": "0BSD" }, + "node_modules/@zxing/library": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.19.3.tgz", + "integrity": "sha512-RUv5svewpDoD0ymXleOP8yVTO5BLkR0zn5coGC/Vs1671u0OBJ4xdtR8WVWf08OcvrieEMHdSfQY3ZKtqII/hg==", + "license": "MIT", + "dependencies": { + "ts-custom-error": "^3.2.1" + }, + "engines": { + "node": ">= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "license": "(Unlicense OR Apache-2.0)", + "optional": true + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -7220,10 +7222,10 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -7264,6 +7266,11 @@ "node": ">=8.9" } }, + "node_modules/after": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.1.tgz", + "integrity": "sha512-SuI3vWhCFeSmkmmJ3efyuOkrhGyp/AuHthh3F5DinGYh2kR9t/0xUlm3/Vn2qMScfgg+cKho5fW7TUEYUhYeiA==" + }, "node_modules/agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", @@ -7637,6 +7644,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arraybuffer.slice": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", + "integrity": "sha512-6ZjfQaBSy6CuIH0+B0NrxMfDE5VIOCP/5gOqSpEIsaAZx9/giszzrXg6PZ7G51U/n88UmlAgYLNQ9wAnII7PJA==" + }, "node_modules/asn1.js": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", @@ -7663,6 +7675,15 @@ "util": "^0.12.5" } }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -7693,6 +7714,11 @@ "dev": true, "license": "MIT" }, + "node_modules/async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -7754,6 +7780,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/aws-sign": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/aws-sign/-/aws-sign-0.2.0.tgz", + "integrity": "sha512-6P7/Ls5F6++DsKu7iacris7qq/AZSWaX+gT4dtSyUxM82ePxWxaP7Slo82ZO3ZTx6GSKxQHAQlmFvM8e+Dd8ZA==", + "engines": { + "node": "*" + } + }, "node_modules/axe-core": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz", @@ -8303,6 +8337,12 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/basic-auth": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.0.tgz", + "integrity": "sha512-qzxS7/bW/LSiKZzdZw3isPjiVmzXbJLM3ImZZ62WMR3oJQAyqy094Nnb0TA2ZZm65xB7nu0acfTQ99z7wwCDCw==", + "license": "MIT" + }, "node_modules/basic-ftp": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", @@ -8327,6 +8367,17 @@ "node": ">= 10.0.0" } }, + "node_modules/better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha512-bYeph2DFlpK1XmGs6fvlLRUN29QISM3GBuUwSFsMY2XRx4AvC0WNCS57j4c/xGrK2RS24C1w3YoBOsw9fT46tQ==", + "dependencies": { + "callsite": "1.0.0" + }, + "engines": { + "node": "*" + } + }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -8349,6 +8400,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/binaryheap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.3.tgz", + "integrity": "sha512-9JFb4Yt5R9FZwbJaxOayF+T5sxn5eiU2NA9/LOeI1g2FUFRTdxpdmWppikO4O5AbNze8s0sL6ZuFxB1y4Ay8GA==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -8361,6 +8420,11 @@ "readable-stream": "^3.4.0" } }, + "node_modules/blob": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.2.tgz", + "integrity": "sha512-BoCcDt8zBGShn6DawAGQw37s9SSs+fEjiZWDzyB+841PbOogcR2X7LGlM4sR3Zsiq/zoyl8MFWDfN6oDSlveBQ==" + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -8440,6 +8504,27 @@ "dev": true, "license": "ISC" }, + "node_modules/boom": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-0.3.1.tgz", + "integrity": "sha512-xWrlXnkK46TjEW7HU5G39AXWuG5aiHz3++zk3bBzF4mfnVCkpcYbwsnLUqMmfZNgPEYS/AI8MH+vmJxH5Kz0PA==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "hoek": "0.4.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/boom/node_modules/hoek": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.4.2.tgz", + "integrity": "sha512-Yj/N2TCrS0d8jvZgUpq9sDNt8/ABwTxPJW4+8QT0KXCMxOtRfUCUTEZEYyvMSgfDT3MGvwgO+NHfWPobagAIug==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -8723,6 +8808,17 @@ "dev": true, "license": "MIT" }, + "node_modules/buffercursor": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/buffercursor/-/buffercursor-0.0.12.tgz", + "integrity": "sha512-Z+6Jm/eW6ITeqcFQKVXX7LYIGk7rENqCKHJ4CbWfJMeLpQZJj1v70WehkLmp+1kFN/QyCgpQ3Z0dKUHAwSbf9w==", + "dependencies": { + "verror": "^1.4.0" + }, + "engines": { + "node": ">= 0.5.0" + } + }, "node_modules/builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -8771,6 +8867,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==", + "engines": { + "node": "*" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -9232,6 +9336,14 @@ "dev": true, "license": "MIT" }, + "node_modules/colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw==", + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -9268,6 +9380,21 @@ "dev": true, "license": "MIT" }, + "node_modules/component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" + }, + "node_modules/component-emitter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", + "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" + }, + "node_modules/component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -9342,6 +9469,74 @@ "dev": true, "license": "MIT" }, + "node_modules/connect": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.0.2.tgz", + "integrity": "sha512-k3kqw6T2Fc5ihvh5VVjwuJHA++qvh0/rPfe2GkJ5QNSQ9tRigQXMjtX2CYf73KZFe4+IV3HfQ3VR3W+nkt0eWQ==", + "license": "MIT", + "dependencies": { + "debug": "1.0.3", + "finalhandler": "0.0.2", + "parseurl": "~1.1.3", + "utils-merge": "1.0.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.3.tgz", + "integrity": "sha512-MltK7Ykj/udtD728gD/RrONStwVnDpBNIP1h+CBcnwnJdHqHxfWHI1E8XLootUl7NOPAYTCCXlb8/Qmy7WyB1w==", + "dependencies": { + "ms": "0.6.2" + } + }, + "node_modules/connect/node_modules/escape-html": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz", + "integrity": "sha512-z6kAnok8fqVTra7Yu77dZF2Y6ETJlxH58wN38wNyuNQLm8xXdKnfNrlSmfXsTePWP03rRVUKHubtUwanwUi7+g==" + }, + "node_modules/connect/node_modules/finalhandler": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.2.tgz", + "integrity": "sha512-SbpQfvWVwWEBlPTQyaM9gs0D5404ENTC0x2jzbb7t+P+EOD/cBlWjAAvfozIQYtOepUuNkxoLNLCK9/kS29f4w==", + "license": "MIT", + "dependencies": { + "debug": "1.0.2", + "escape-html": "1.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/connect/node_modules/finalhandler/node_modules/debug": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.2.tgz", + "integrity": "sha512-T9bufXIzQvCa4VrTIpLvvwdLhH+wuBtvIJJA3xgzVcaVETGmTIWMfEXQEd1K4p8BaRmQJPn6MPut38H7YQ+iIA==", + "dependencies": { + "ms": "0.6.2" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + }, + "node_modules/connect/node_modules/parseurl": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.1.3.tgz", + "integrity": "sha512-7y9IL/9x2suvr1uIvoAc3yv3f28hZ55g2OM+ybEtnZqV6Ykeg36sy1PCsTN9rQUZYzb9lTKLzzmJM11jaXSloA==", + "license": "MIT" + }, + "node_modules/connect/node_modules/utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/consola": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", @@ -9410,6 +9605,14 @@ "node": ">= 0.6" } }, + "node_modules/cookie-jar": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cookie-jar/-/cookie-jar-0.2.0.tgz", + "integrity": "sha512-yImk9AY90xjoUsN2fWHoIhVgveXqiZv7LDqUTZEzVBHyzfay8AjcJITUZpz2fTYLh6rnP+7GogiuRCo/5j2epg==", + "engines": { + "node": "*" + } + }, "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", @@ -9562,6 +9765,18 @@ "node": ">= 8" } }, + "node_modules/cryptiles": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.1.0.tgz", + "integrity": "sha512-WiOGszxSaVHd8T4hlu5Xcqs2uUYxbvotBP171ag2pLPKSwSKeTJYnzd98/YWV3jQYk/rpMHa3r01cQfN8SZrHQ==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "boom": "0.3.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/crypto-browserify": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", @@ -9729,6 +9944,14 @@ "node": ">=0.8" } }, + "node_modules/cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha512-TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -9917,6 +10140,14 @@ "node": ">=0.10.0" } }, + "node_modules/defaultable": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/defaultable/-/defaultable-0.7.2.tgz", + "integrity": "sha512-UEaHGfefWfbnANtSlCtuAelo7HZhCbdLAQAttRDVJpQplbA1G21t/J70VGznRA4z9py2k70tTW+3ogGs5VgrcQ==", + "engines": [ + "node" + ] + }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -10211,6 +10442,25 @@ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", "license": "MIT" }, + "node_modules/dns": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dns/-/dns-0.2.2.tgz", + "integrity": "sha512-dhCgBk0QglzySl2BVlIkRuk7aTqxlCe+5KhHEX5ULuco7RcB6d1zDnP5iGSs2rLdJaTc+82MxegtJtjFuueWiQ==", + "dependencies": { + "hbo-dnsd": "0.9.8", + "native-dns": "0.6.1", + "node-options": "0.0.6", + "tomahawk": "0.1.6", + "tomahawk-plugin-kv-memory-store": "0.0.3", + "winston": "0.7.3" + }, + "bin": { + "dns": "bin/dns" + }, + "engines": { + "node": ">= 0.10.0 < 0.11.0" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -10399,6 +10649,14 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/emitter": { + "version": "1.0.1", + "resolved": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "integrity": "sha512-r/UcFj7JS3lRjv9cgYjgpDNbAsGUdqU64n6ZUOgSF7s1UFBbGu7pUDwKEjHu9NBCy6j2AmmjNW4rijR4De65eA==", + "dependencies": { + "indexof": "0.0.1" + } + }, "node_modules/emittery": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", @@ -10519,9 +10777,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", - "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "license": "MIT", "dependencies": { @@ -10584,6 +10842,55 @@ "stackframe": "^1.3.4" } }, + "node_modules/errorhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.1.1.tgz", + "integrity": "sha512-nqVAii3wDkiowAVKDmcuwKOQ/5vsg9GfCcJxSMHgy8yiZUA3mMDpBcHnCVolDYgQ7wsC2yZQVOavR5fGHhFMkg==", + "license": "MIT", + "dependencies": { + "accepts": "~1.0.4", + "escape-html": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/errorhandler/node_modules/accepts": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz", + "integrity": "sha512-iq8ew2zitUlNcUca0wye3fYwQ6sSPItDo38oC0R+XA5KTzeXRN+GF7NjOXs3dVItj4J+gQVdpq4/qbnMb1hMHw==", + "license": "MIT", + "dependencies": { + "mime-types": "~1.0.0", + "negotiator": "0.4.7" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/errorhandler/node_modules/escape-html": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz", + "integrity": "sha512-z6kAnok8fqVTra7Yu77dZF2Y6ETJlxH58wN38wNyuNQLm8xXdKnfNrlSmfXsTePWP03rRVUKHubtUwanwUi7+g==" + }, + "node_modules/errorhandler/node_modules/mime-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", + "integrity": "sha512-echfutj/t5SoTL4WZpqjA1DCud1XO0WQF3/GJ48YBmc4ZMhCK77QA6Z/w6VTQERLKuJ4drze3kw2TUT8xZXVNw==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/errorhandler/node_modules/negotiator": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.4.7.tgz", + "integrity": "sha512-ujxWwyRfZ6udAgHGECQC3JDO9e6UAsuItfUMcqA0Xf2OLNQTveFVFx+fHGIJ5p0MJaJrZyGQqPwzuN0NxJzEKA==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/es-abstract": { "version": "1.23.3", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", @@ -11685,6 +11992,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -11991,6 +12315,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/finished": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/finished/-/finished-1.2.2.tgz", + "integrity": "sha512-HPJ8x7Gn1pmTS1zWyMoXmQ1yxHkYHRoFsBI66ONq4PS9iWBJy1iHYXOSqMWNp3ksMXfrBpenkSwBhl9WG4zr4Q==", + "license": "MIT", + "dependencies": { + "ee-first": "1.0.3" + } + }, + "node_modules/finished/node_modules/ee-first": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.0.3.tgz", + "integrity": "sha512-1q/3kz+ZwmrrWpJcCCrBZ3JnBzB1BMA5EVW9nxnIP1LxDZ16Cqs9VdolqLWlExet1vU+bar3WSkAa4/YrA9bIw==", + "license": "MIT" + }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", @@ -12167,6 +12506,14 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/forever-agent": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.2.0.tgz", + "integrity": "sha512-IasWSRIlfPnBZY1K9jEUK3PwsScR4mrcK+aNBJzGoPnW+S9b6f8I8ScyH4cehEOFNqnjGpP2gCaA22gqSV1xQA==", + "engines": { + "node": "*" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-8.0.0.tgz", @@ -12613,6 +12960,12 @@ "dev": true, "license": "BSD-2-Clause" }, + "node_modules/global": { + "version": "2.0.1", + "resolved": "https://github.com/component/global/archive/v2.0.1.tar.gz", + "integrity": "sha512-O91OcV/NbdmQJPHaRu2ekSP7bqFRLWgqSwaJvqHPZHUwmHBagQYTOra29+LnzzG3lZkXH1ANzHzfCxtAPM9HMA==", + "license": "MIT" + }, "node_modules/global-modules": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", @@ -12797,6 +13150,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-binary-data": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-binary-data/-/has-binary-data-0.1.1.tgz", + "integrity": "sha512-XqIrqIgPlA2gxvHKudDsLJt8Xu8B4DvkHyUWGmLWYOAO0rFOL94Ds4NSveSZ1fCjWX22tQgIiRpDKAETex8GCQ==", + "license": "ISC", + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/has-binary-data/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, + "node_modules/has-cors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz", + "integrity": "sha512-Mxk1ba23PNtB3zPigreijApS3uuH9bhgZkqQtLQj7ydWHsGeb9uOtk4gsK6mZj4rYG6VNS/CT9G1XkYfgItpKg==", + "license": "MIT", + "dependencies": { + "global": "https://github.com/component/global/archive/v2.0.1.tar.gz" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -12905,6 +13282,33 @@ "node": ">= 0.4" } }, + "node_modules/hawk": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-0.10.2.tgz", + "integrity": "sha512-BjpmnZ95odv7KOIsydfNTAxfGOGaVc6xbYL4fozWl45PWjDqskix0LHAekmGkpnrCAI6+AZRvJIXNTAllj+e6w==", + "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "boom": "0.3.x", + "cryptiles": "0.1.x", + "hoek": "0.7.x", + "sntp": "0.1.x" + }, + "engines": { + "node": "0.8.x" + } + }, + "node_modules/hbo-dnsd": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/hbo-dnsd/-/hbo-dnsd-0.9.8.tgz", + "integrity": "sha512-mIj4V7OicuAlnSfvTXopd401Ba7eFFSL2L3EmM1NqlIWe1pJ/x9dyHqfnKXnJr5qSbNFLnadXvwNd3kURNy+ug==", + "dependencies": { + "defaultable": "~0.7.2", + "optimist": "~0.3.4" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -12927,6 +13331,15 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hoek": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.7.6.tgz", + "integrity": "sha512-z75muWk69yyjWn6nNzJP0pnfgcewtSTs7uBolGUA7kWNdCYZukzHn3sYqUirhXul7qp9WBUwNT/7ieJZNveJqg==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": "0.8.x" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -13290,6 +13703,11 @@ "node": ">=8" } }, + "node_modules/indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -13382,7 +13800,6 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.10" @@ -14870,6 +15287,18 @@ "dev": true, "license": "MIT" }, + "node_modules/json-stringify-safe": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-3.0.0.tgz", + "integrity": "sha512-VSSuxEAawKLYlCabQOR7YDijQ69zPqQBOriUuCgNhlAqtU7RPr41gPpaSs6WkEu+ZOtUequpXWbI51CS+Z/gMQ==", + "license": "BSD" + }, + "node_modules/json3": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.2.6.tgz", + "integrity": "sha512-KA+GHhYTLTo7Ri4DyjwUgW8kn98AYtVZtBC94qL5yD0ZSYct8/eF8qBmTNyk+gPE578bKeIL4WBq+MUyd1I26g==", + "deprecated": "Please use the native JSON object instead of JSON 3" + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -15567,22 +15996,57 @@ "ufo": "^1.5.3" } }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "node_modules/morgan": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.2.0.tgz", + "integrity": "sha512-VrasIzA69dsxJm1+MVWTLTiij3kiG33XPfGiexqstHpcSvSu/Z51W+FGQyIlbc3jZZuF2PFujsjw+YQvpXz3UA==", "license": "MIT", "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } + "basic-auth": "1.0.0", + "bytes": "1.0.0", + "depd": "0.4.2", + "finished": "~1.2.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==" + }, + "node_modules/morgan/node_modules/depd": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.4.2.tgz", + "integrity": "sha512-tG4S/hTtpA6stvb9Li65vWHrCblQ/oSN/UI90RKIA3wMk3N9lR1k/dCs8NKKNAy7UXD0+1/dUqhiaBuMatVNAQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nan": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz", + "integrity": "sha512-V9/Pyy5Oelv6vVJP9X+dAzU3IO19j6YXrJnODHxP2h54hTvfFQGahdsQV6Ule/UukiEJk1SkQ/aUyWUm61RBQw==", + "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.7", @@ -15602,6 +16066,44 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/native-dns": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/native-dns/-/native-dns-0.6.1.tgz", + "integrity": "sha512-svX0dstdoFeEO1sD1Kkrrj/Ad7QfHuczp2YpRnBpjJHqh0dpYLZhLERbf76S6LMkLAT5eZ8tJrPwZciIX5pj6Q==", + "dependencies": { + "ipaddr.js": ">= 0.1.1", + "native-dns-cache": ">= 0.0.1", + "native-dns-packet": ">= 0.0.4" + }, + "engines": { + "node": ">= 0.5.0" + } + }, + "node_modules/native-dns-cache": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/native-dns-cache/-/native-dns-cache-0.0.2.tgz", + "integrity": "sha512-09HXHdb/updxfigaFbR53F8nCKqxM8WuHfTWBsusVlwSSZZ3qwWRdD6Kx2x8HBI1Q5IaycwcJOvBoXZWJNfVEg==", + "dependencies": { + "binaryheap": ">= 0.0.3", + "native-dns-packet": ">= 0.0.1" + }, + "engines": { + "node": ">= 0.5.0" + } + }, + "node_modules/native-dns-packet": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/native-dns-packet/-/native-dns-packet-0.1.1.tgz", + "integrity": "sha512-j1XxnFFTUB7mujma468WyAOmyVtkuuLTelxJF13tSTIPO56X7bHALrG0G4jFQnvyTPCt4VnFiZezWpfKbaHc+g==", + "license": "MIT", + "dependencies": { + "buffercursor": ">= 0.0.12", + "ipaddr.js": ">= 0.1.1" + }, + "engines": { + "node": ">= 0.5.0" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -15838,6 +16340,14 @@ "dev": true, "license": "MIT" }, + "node_modules/node-options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/node-options/-/node-options-0.0.6.tgz", + "integrity": "sha512-OrfY9+LgcLjoo2oyqxjP3gZLBuNDV1IblF69HGLdbE8JUJxSnl2kB561r41KOMc1GWLspjMSfa9L6+iW4fvYrw==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/node-polyfill-webpack-plugin": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-2.0.1.tgz", @@ -15927,6 +16437,15 @@ "dev": true, "license": "MIT" }, + "node_modules/node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==", + "deprecated": "Use uuid module instead", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/nopt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", @@ -16170,6 +16689,14 @@ "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==", "license": "MIT" }, + "node_modules/oauth-sign": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.2.0.tgz", + "integrity": "sha512-4DtiD64CwPJ5vZ636j/KtM7DxWbX1KlkqwbqbEAxI3BCpBrQdrKOv8vC/36U6gfm1CVapy6QmcVxPnXPPQApTA==", + "engines": { + "node": "*" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -16179,6 +16706,11 @@ "node": ">=0.10.0" } }, + "node_modules/object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha512-S0sN3agnVh2SZNEIGc0N1X4Z5K0JeFbGBrnuZpsxuUh5XLF0BnvWkMjRXo/zGKLd/eghvNIKcx1pQkmUjXIyrA==" + }, "node_modules/object-hash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", @@ -16414,6 +16946,24 @@ "node": ">= 6" } }, + "node_modules/optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + "license": "MIT/X11", + "dependencies": { + "wordwrap": "~0.0.2" + } + }, + "node_modules/optimist/node_modules/wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -16432,6 +16982,14 @@ "node": ">= 0.8.0" } }, + "node_modules/options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -16640,6 +17198,33 @@ "node": ">=0.10.0" } }, + "node_modules/parsejson": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz", + "integrity": "sha512-W9CRvTfYQY/kbRc5Q6YTWarb/QDxdEGbd6RCP8CLUQDJV89RVHoS2A0dZYNtAcq31fulGNN4ZhAhiQQazwlKJg==", + "license": "MIT", + "dependencies": { + "better-assert": "~1.0.0" + } + }, + "node_modules/parseqs": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz", + "integrity": "sha512-vyyyfQGUFZnDhgrrdn+hh1JuOfvbXU5oRr6dijfkSIbaFuxGgTSCA/RNVcsADmo0k2NX6wERVTMKkXokjuObJA==", + "license": "MIT", + "dependencies": { + "better-assert": "~1.0.0" + } + }, + "node_modules/parseuri": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz", + "integrity": "sha512-m0H+R0u5LXOx8sbxufnvgKrRLpkVpvtMf0AyWXYSqLwo2MWrVEgCIbgpaSVa398xl6wTLe0A7CGhiC4hBdEzHQ==", + "license": "MIT", + "dependencies": { + "better-assert": "~1.0.0" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -16914,6 +17499,15 @@ "pathe": "^1.1.2" } }, + "node_modules/pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha512-yO5feByMzAp96LtP58wvPKSbaKAi/1C4kV9XpTctr6EepnP6F33RBNOiVrdz9BrPA98U2BMFsTNHo44TWcbQ2A==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/pngjs": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", @@ -18077,6 +18671,20 @@ "react-dom": "^15.5.x || ^16.x || ^17.x || ^18.x" } }, + "node_modules/react-qr-scanner": { + "version": "1.0.0-alpha.11", + "resolved": "https://registry.npmjs.org/react-qr-scanner/-/react-qr-scanner-1.0.0-alpha.11.tgz", + "integrity": "sha512-TdaygL+4U9iapskJgK5Ilb1Cw4wwzQ3bVpIfzzbrEsxPaEJzmjQ7VuMz8E9hBQGCU4Ee+YtgglE3byEtgtRpkA==", + "license": "ISC", + "dependencies": { + "@zxing/library": "^0.19.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + } + }, "node_modules/react-refresh": { "version": "0.14.2", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", @@ -18385,6 +18993,73 @@ "strip-ansi": "^6.0.1" } }, + "node_modules/request": { + "version": "2.16.6", + "resolved": "https://registry.npmjs.org/request/-/request-2.16.6.tgz", + "integrity": "sha512-TfD4kMo40kwuOpO7GYfAZpb2wYdw7yvTIglPNgPPSmp2Fz6MKNvPLla40FQ/ypdhy6B2jRNz3VlCjPD6mnzsmA==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "engines": [ + "node >= 0.8.0" + ], + "dependencies": { + "aws-sign": "~0.2.0", + "cookie-jar": "~0.2.0", + "forever-agent": "~0.2.0", + "form-data": "~0.0.3", + "hawk": "~0.10.2", + "json-stringify-safe": "~3.0.0", + "mime": "~1.2.7", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.2.0", + "qs": "~0.5.4", + "tunnel-agent": "~0.2.0" + } + }, + "node_modules/request/node_modules/combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "dependencies": { + "delayed-stream": "0.0.5" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/request/node_modules/delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/request/node_modules/form-data": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.0.10.tgz", + "integrity": "sha512-Z9/PpT/agxXi80nMpOH6GFD7XOr6mwk5aWMxDt/KMY+Nm7e4FnRMjddM4/mLPJhpmp6alY1F/1JQpRE6z07xng==", + "dependencies": { + "async": "~0.2.7", + "combined-stream": "~0.0.4", + "mime": "~1.2.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/request/node_modules/mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" + }, + "node_modules/request/node_modules/qs": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.5.6.tgz", + "integrity": "sha512-KbOrQrP5Ye+0gmq+hwxoJwAFRwExACWqwxj1IDFFgqOw9Poxy3wwSbafd9ZqP6T6ykMfnxM573kt/a4i9ybatQ==", + "engines": { + "node": "*" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -19035,6 +19710,27 @@ "npm": ">= 3.0.0" } }, + "node_modules/sntp": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.1.2.tgz", + "integrity": "sha512-6fsOpJYQAQcO/UeW7T9mJwEenJymdU77o+gNiompGAammlSa+C49Oyt79ta/kgVbT13l4JAuKlo8FNvUnVjvEQ==", + "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "hoek": "0.4.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sntp/node_modules/hoek": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.4.2.tgz", + "integrity": "sha512-Yj/N2TCrS0d8jvZgUpq9sDNt8/ABwTxPJW4+8QT0KXCMxOtRfUCUTEZEYyvMSgfDT3MGvwgO+NHfWPobagAIug==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/socket.io": { "version": "4.7.5", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", @@ -19203,6 +19899,15 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -20300,6 +21005,14 @@ "dev": true, "license": "MIT" }, + "node_modules/tinycolor": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz", + "integrity": "sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tinyspy": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", @@ -20317,6 +21030,11 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/to-array": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz", + "integrity": "sha512-JQk/QMS4oHyU2VufVeyjN25dcnZnr1PV1pa1oKSj7l5tVO9WrU62og3fYzB3mrgJZZgBxdrrA/v6iZzMDuyFYw==" + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -20348,6 +21066,557 @@ "node": ">=0.6" } }, + "node_modules/tomahawk": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/tomahawk/-/tomahawk-0.1.6.tgz", + "integrity": "sha512-HFLoewTx2gHD0o2t0tR+EIcDXhqdtakfZCDiYsGjOO93nYQ1i7nbhj3UL7iQdtoBbPAcEbrxeJ0KlfPOvhxFyg==", + "dependencies": { + "body-parser": "1.5.0", + "connect": "3.0.2", + "errorhandler": "1.1.1", + "express": "4.6.1", + "morgan": "1.2.0", + "node-options": "0.0.6", + "socket.io": "1.0.6", + "winston": "0.7.3" + }, + "bin": { + "tomahawk": "bin/tomahawk" + }, + "engines": { + "node": ">= 0.8.0 < 0.11.0" + } + }, + "node_modules/tomahawk-plugin-kv-memory-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tomahawk-plugin-kv-memory-store/-/tomahawk-plugin-kv-memory-store-0.0.3.tgz", + "integrity": "sha512-opt82r6s+775jmrREiWruMVTQaGQYgPd6/zYTDRwwHhDGSqpFaZZgCSnI/BAIs8nC88puTK4PyodkSRpUDp/2Q==" + }, + "node_modules/tomahawk/node_modules/accepts": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz", + "integrity": "sha512-iq8ew2zitUlNcUca0wye3fYwQ6sSPItDo38oC0R+XA5KTzeXRN+GF7NjOXs3dVItj4J+gQVdpq4/qbnMb1hMHw==", + "license": "MIT", + "dependencies": { + "mime-types": "~1.0.0", + "negotiator": "0.4.7" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/base64-arraybuffer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz", + "integrity": "sha512-ewBKKVVPIl78B26mYQHYlaxR7NydMiD/GxwLNIwTAfLIE4xhN2Gxcy30//azq5UrejXjzGpWjcBu3NUJxzMMzg==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/tomahawk/node_modules/base64id": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz", + "integrity": "sha512-DSjtfjhAsHl9J4OJj7e4+toV2zqxJrGwVd3CLlsCp8QmicvOn7irG0Mb8brOc/nur3SdO8lIbNlY1s1ZDJdUKQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/tomahawk/node_modules/body-parser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.5.0.tgz", + "integrity": "sha512-UJfZike68QN1mdo0mA+Z0y+0qi10oxOrCPw2CZpP73O/LIfEWHDy9SHhwsME1mdk1WmnltBLddUkfBpuKPH4Ng==", + "license": "MIT", + "dependencies": { + "bytes": "1.0.0", + "depd": "0.4.2", + "iconv-lite": "0.4.4", + "media-typer": "0.2.0", + "qs": "0.6.6", + "raw-body": "1.3.0", + "type-is": "~1.3.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/tomahawk/node_modules/buffer-crc32": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.3.tgz", + "integrity": "sha512-HLvoSqq1z8fJEcT1lUlJZ4OJaXJZ1wsWm0+fBxkz9Bdf/WphA4Da7FtGUguNNyEXL4WB0hNMTaWmdFRFPy8YOQ==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==" + }, + "node_modules/tomahawk/node_modules/commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha512-0fLycpl1UMTGX257hRsu/arL/cUbcvQM4zMKwvLvzXtfdezIV4yotPS2dYtknF+NmEfWSoCEF6+hj9XLm/6hEw==", + "engines": { + "node": ">= 0.4.x" + } + }, + "node_modules/tomahawk/node_modules/cookie": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz", + "integrity": "sha512-+mHmWbhevLwkiBf7QcbZXHr0v4ZQQ/OgHk3fsQHrsMMiGzuvAmU/YMUR+ZfrO/BLAGIWFfx2Z7Oyso0tZR/wiA==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/cookie-signature": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.4.tgz", + "integrity": "sha512-k+lrG38ZC/S7zN6l1/HcF6xF4jMwkIUjnr5afDU7tzFxIfDmKzdqJdXo8HNYaXOuBJ3tPKxSiwCOTA0b3qQfaA==" + }, + "node_modules/tomahawk/node_modules/debug": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.3.tgz", + "integrity": "sha512-MltK7Ykj/udtD728gD/RrONStwVnDpBNIP1h+CBcnwnJdHqHxfWHI1E8XLootUl7NOPAYTCCXlb8/Qmy7WyB1w==", + "dependencies": { + "ms": "0.6.2" + } + }, + "node_modules/tomahawk/node_modules/depd": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.4.2.tgz", + "integrity": "sha512-tG4S/hTtpA6stvb9Li65vWHrCblQ/oSN/UI90RKIA3wMk3N9lR1k/dCs8NKKNAy7UXD0+1/dUqhiaBuMatVNAQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/engine.io": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.3.1.tgz", + "integrity": "sha512-fjnHWC9SLPoygMp6pqwoxmNkDDdYme4eCRTBTZLmEtGZETCpUEgSwoQjSgyj7IyIjqninKRF+2VeEV2kOniUFQ==", + "dependencies": { + "base64id": "0.1.0", + "debug": "0.6.0", + "engine.io-parser": "1.0.6", + "ws": "0.4.31" + } + }, + "node_modules/tomahawk/node_modules/engine.io-client": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.3.1.tgz", + "integrity": "sha512-bTOZMqAe7HXhyA/2T7Fve04b/ZZruTHSOqa+yn8U4RFSyRAVPePjopOgJOUNciEfuXo1gx850P5LzaQU28/p3w==", + "dependencies": { + "component-emitter": "1.1.2", + "component-inherit": "0.0.3", + "debug": "0.7.4", + "engine.io-parser": "1.0.6", + "has-cors": "1.0.3", + "indexof": "0.0.1", + "parsejson": "0.0.1", + "parseqs": "0.0.2", + "parseuri": "0.0.2", + "ws": "0.4.31", + "xmlhttprequest": "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz" + } + }, + "node_modules/tomahawk/node_modules/engine.io-client/node_modules/debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/engine.io-parser": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz", + "integrity": "sha512-ipbmiNj4OfAL9csof0FlI9L2jkU/lgcUphHjnTDo1KABsA21WtsVy/1OjhCj8xxhNIHtxEZ3/t7uB45gEMhD4g==", + "dependencies": { + "after": "0.8.1", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.2", + "blob": "0.0.2", + "utf8": "2.0.0" + } + }, + "node_modules/tomahawk/node_modules/engine.io/node_modules/debug": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.6.0.tgz", + "integrity": "sha512-2vIZf67+gMicLu8McscD1NNhMWbiTSJkhlByoTA1Gw54zOb/9IlxylYG+Kr9z1X2wZTHh1AMSp+YiMjYtLkVUA==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/escape-html": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz", + "integrity": "sha512-z6kAnok8fqVTra7Yu77dZF2Y6ETJlxH58wN38wNyuNQLm8xXdKnfNrlSmfXsTePWP03rRVUKHubtUwanwUi7+g==" + }, + "node_modules/tomahawk/node_modules/express": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.6.1.tgz", + "integrity": "sha512-nG9Y8xfzgrW/9XCr5sv+KDbtY8mZPN9HO3GziltaubpvleI+1RyHxAKvYjmFih3HkQIaPXW9ozxMHBDNf3UXng==", + "license": "MIT", + "dependencies": { + "accepts": "~1.0.7", + "buffer-crc32": "0.2.3", + "cookie": "0.1.2", + "cookie-signature": "1.0.4", + "debug": "1.0.3", + "depd": "0.3.0", + "escape-html": "1.0.1", + "finalhandler": "0.0.3", + "fresh": "0.2.2", + "media-typer": "0.2.0", + "merge-descriptors": "0.0.2", + "methods": "1.1.0", + "parseurl": "~1.1.3", + "path-to-regexp": "0.1.3", + "proxy-addr": "1.0.1", + "qs": "0.6.6", + "range-parser": "1.0.0", + "send": "0.6.0", + "serve-static": "~1.3.2", + "type-is": "~1.3.2", + "utils-merge": "1.0.0", + "vary": "0.1.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/tomahawk/node_modules/express/node_modules/depd": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz", + "integrity": "sha512-Uyx3FgdvEYlpA3W4lf37Ide++2qOsjLlJ7dap0tbM63j/BxTCcxmyIOO6PXbKbOuNSko+fsDHzzx1DUeo1+3fA==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/finalhandler": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.3.tgz", + "integrity": "sha512-/fqgssseNfnD8Y77HWyJKQ+1xbKu7bZl2LXfhFjkgeGg91WRMMO9GN1KKL53NnIG9g1H2Xq3iKrZkuIcAmjd0A==", + "license": "MIT", + "dependencies": { + "debug": "1.0.3", + "escape-html": "1.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/fresh": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz", + "integrity": "sha512-ZGGi8GROK//ijm2gB33sUuN9TjN1tC/dvG4Bt4j6IWrVGpMmudUBCxx+Ir7qePsdREfkpQC4FL8W0jeSOsgv1w==" + }, + "node_modules/tomahawk/node_modules/iconv-lite": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.4.tgz", + "integrity": "sha512-BnjNp13aZpK4WBGbmjaNHN2MCp3P850n8zd/JLinQJ8Lsnq2Br4o2467C2waMsY5kr7Z41SL1gEqh8Vbfzg15A==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tomahawk/node_modules/ipaddr.js": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.2.tgz", + "integrity": "sha512-MGrEjHz4Hk5UVpJXZQ2tHB+bp6xgdRKCAEWdrgFsoAmXCgKAPtj8LqMxgvlWEAj9aN+PpTcvE051uZU3K3kLSQ==", + "engines": { + "node": ">= 0.2.5" + } + }, + "node_modules/tomahawk/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, + "node_modules/tomahawk/node_modules/media-typer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.2.0.tgz", + "integrity": "sha512-TSggxYk75oP4tae7JkT8InpcFGUP4340zg1dOWjcu9qcphaDKtXEuNUv3OD4vJ+gVTvIDK797W0uYeNm8qqsDg==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/merge-descriptors": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz", + "integrity": "sha512-dYBT4Ep+t/qnPeJcnMymmhTdd4g8/hn48ciaDqLAkfRf8abzLPS6Rb6EBdz5CZCL8tzZuI5ps9MhGQGxk+EuKg==", + "license": "MIT" + }, + "node_modules/tomahawk/node_modules/methods": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.0.tgz", + "integrity": "sha512-Th88HxNePtsAmz0WjEhVVyRGv9AQFLv4z6zOj4Dt15PjsKLWB8JXSmxzP+Q27139+AXao0AlCWvonFuJhu4GuA==", + "license": "MIT" + }, + "node_modules/tomahawk/node_modules/mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" + }, + "node_modules/tomahawk/node_modules/mime-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", + "integrity": "sha512-echfutj/t5SoTL4WZpqjA1DCud1XO0WQF3/GJ48YBmc4ZMhCK77QA6Z/w6VTQERLKuJ4drze3kw2TUT8xZXVNw==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + }, + "node_modules/tomahawk/node_modules/negotiator": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.4.7.tgz", + "integrity": "sha512-ujxWwyRfZ6udAgHGECQC3JDO9e6UAsuItfUMcqA0Xf2OLNQTveFVFx+fHGIJ5p0MJaJrZyGQqPwzuN0NxJzEKA==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/parseurl": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.1.3.tgz", + "integrity": "sha512-7y9IL/9x2suvr1uIvoAc3yv3f28hZ55g2OM+ybEtnZqV6Ykeg36sy1PCsTN9rQUZYzb9lTKLzzmJM11jaXSloA==", + "license": "MIT" + }, + "node_modules/tomahawk/node_modules/path-to-regexp": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz", + "integrity": "sha512-sd4vSOW+DCM6A5aRICI1CWaC7nufnzVpZfuh5T0VXshxxzFWuaFcvqKovAFLNGReOc+uZRptpcpPmn7CDvzLuA==" + }, + "node_modules/tomahawk/node_modules/proxy-addr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.1.tgz", + "integrity": "sha512-rIUGzBlSfkJMWWCgsd4N5wvVSNAcJZg//UwPZumDIbScHRUzuSOjBmIdyICiKkB9yArv+er9qC6RA/NL3AWc6A==", + "license": "MIT", + "dependencies": { + "ipaddr.js": "0.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/qs": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz", + "integrity": "sha512-kN+yNdAf29Jgp+AYHUmC7X4QdJPR8czuMWLNLc0aRxkQ7tB3vJQEONKKT9ou/rW7EbqVec11srC9q9BiVbcnHA==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/range-parser": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.0.tgz", + "integrity": "sha512-wOH5LIH2ZHo0P7/bwkR+aNbJ+kv3CHVX4B8qs9GqbtY29fi1bGPV5xczrutN20G+Z4XhRqRMTW3q0S4iyJJPfw==" + }, + "node_modules/tomahawk/node_modules/raw-body": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.3.0.tgz", + "integrity": "sha512-iuI1bOSi9tEmVCrXq02ZysXatTrhAu+fSo7XOQHhMo4g87dSy9YB2W/9Udwhz0bPpFk4UcoLhjrHgpPbRD3ktA==", + "license": "MIT", + "dependencies": { + "bytes": "1", + "iconv-lite": "0.4.4" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/send": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.6.0.tgz", + "integrity": "sha512-A3EwHmDwcPcmLxIRNjr2YbXiYWq6M9JyUq4303pLKVFs4m5oeME0a9Cpcu9N22fED5XVepldjPYGo9eJifb7Yg==", + "license": "MIT", + "dependencies": { + "debug": "1.0.3", + "depd": "0.3.0", + "escape-html": "1.0.1", + "finished": "1.2.2", + "fresh": "0.2.2", + "mime": "1.2.11", + "ms": "0.6.2", + "range-parser": "~1.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/send/node_modules/depd": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz", + "integrity": "sha512-Uyx3FgdvEYlpA3W4lf37Ide++2qOsjLlJ7dap0tbM63j/BxTCcxmyIOO6PXbKbOuNSko+fsDHzzx1DUeo1+3fA==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/serve-static": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.3.2.tgz", + "integrity": "sha512-KwjCeYUx7IM1neg8/P0+O1DZsl76XcOSuV0ZxrI0r60vwGlcjMjKOYCK/OFLJy/a2CFuIyAa/x0PuQ0yuG+IgQ==", + "license": "MIT", + "dependencies": { + "escape-html": "1.0.1", + "parseurl": "~1.1.3", + "send": "0.6.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/socket.io": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.0.6.tgz", + "integrity": "sha512-1x7TkMh8aKfLoXuXe5rXnDnv3xfcOFrDM6hR9z15dpZ83tTxt2NUxnpuGL2zMIAJQ4DitKiadEBvBVju5cxcHw==", + "dependencies": { + "debug": "0.7.4", + "engine.io": "1.3.1", + "has-binary-data": "0.1.1", + "socket.io-adapter": "0.2.0", + "socket.io-client": "1.0.6", + "socket.io-parser": "2.2.0" + } + }, + "node_modules/tomahawk/node_modules/socket.io-adapter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.2.0.tgz", + "integrity": "sha512-3PlX+MOlpHiY+ZTbKhpE4i+M4u8hFUlVyqFP4K/mH+t+D9bMKATFqUUY3zWQMEo2g/1ckosURXviQw6M8R/y8A==", + "dependencies": { + "debug": "0.7.4", + "socket.io-parser": "2.1.2" + } + }, + "node_modules/tomahawk/node_modules/socket.io-adapter/node_modules/debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/socket.io-adapter/node_modules/socket.io-parser": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.1.2.tgz", + "integrity": "sha512-eVkt8prgw20H+4P8Iw6tis/w7leiN5EW/93Vq+KL8w+yNJu+QNgaej2Cgt8FhVCVuN3AHyLU50vXvM8cpUR1JQ==", + "dependencies": { + "debug": "0.7.4", + "emitter": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "isarray": "0.0.1", + "json3": "3.2.6" + } + }, + "node_modules/tomahawk/node_modules/socket.io-client": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.0.6.tgz", + "integrity": "sha512-itdtz6fQBTFIDBP4+hJox0OlT+SbCVdENjPgjMup3ehu7OsiG6t0FYBXCx+k/upt9lbeyp9BmUNNi5EfnGa5Vw==", + "license": "MIT", + "dependencies": { + "component-bind": "1.0.0", + "component-emitter": "1.1.2", + "debug": "0.7.4", + "engine.io-client": "1.3.1", + "has-binary-data": "0.1.1", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseuri": "0.0.2", + "socket.io-parser": "2.2.0", + "to-array": "0.1.3" + } + }, + "node_modules/tomahawk/node_modules/socket.io-client/node_modules/debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/socket.io-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.0.tgz", + "integrity": "sha512-uW3UiLVibAyleKq8r/yZe1oPO51olhY18T6HtnN0iI6RLqJfYC0YiyAFlsPw1+8I0Z1qFd8jFLTRZo2vr6ISxA==", + "dependencies": { + "debug": "0.7.4", + "emitter": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "isarray": "0.0.1", + "json3": "3.2.6" + } + }, + "node_modules/tomahawk/node_modules/socket.io-parser/node_modules/debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/socket.io/node_modules/debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/type-is": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.3.2.tgz", + "integrity": "sha512-sdIhnvhWEyIP2DKjj1o9tL31m8vFxDfLPD56KXz2absqY5AF2QYkJC7Wrw2fkzsZA9mv+PCtgyB7EqYOgR+r3Q==", + "license": "MIT", + "dependencies": { + "media-typer": "0.2.0", + "mime-types": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/tomahawk/node_modules/utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/tomahawk/node_modules/vary": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/vary/-/vary-0.1.0.tgz", + "integrity": "sha512-tyyeG46NQdwyVP/RsWLSrT78ouwEuvwk9gK8vQK4jdXmqoXtTXW+vsCfNcnqRhigF8olV34QVZarmAi6wBV2Mw==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/ws": { + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz", + "integrity": "sha512-mWiVQ9qZGPXvLxQ4xGy58Ix5Bw0L99SB+hDT8L59bty4fbnQczaGl4YEWR7AzLQGbvPn/30r9/o41dPiSuUmYw==", + "hasInstallScript": true, + "dependencies": { + "commander": "~0.6.1", + "nan": "~0.3.0", + "options": ">=0.0.5", + "tinycolor": "0.x" + }, + "bin": { + "wscat": "bin/wscat" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/toposort": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", @@ -20383,6 +21652,15 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -20566,6 +21844,14 @@ "dev": true, "license": "MIT" }, + "node_modules/tunnel-agent": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.2.0.tgz", + "integrity": "sha512-PXy4q1PH88BK0pcGOEMXFAslyBuRWz1wxLfPXTlYFd41eyUgjOALaVGbWJN1ymjbnBzjWunVSKmrrMMh8oLaZA==", + "engines": { + "node": "*" + } + }, "node_modules/tween-functions": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz", @@ -20948,6 +22234,11 @@ "react": ">=16.8" } }, + "node_modules/utf8": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz", + "integrity": "sha512-jWXHr+bQ8RsWazLzVY3V7XACPTbBHYSg/VoDVok+DBQk5ULm0AuBCNb9tGmjq2H+znnkBFwjhzzCbn9G3xlYcA==" + }, "node_modules/util": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", @@ -21034,6 +22325,26 @@ "node": ">= 0.8" } }, + "node_modules/verror": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz", + "integrity": "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "license": "MIT" + }, "node_modules/vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", @@ -21109,22 +22420,21 @@ "license": "BSD-2-Clause" }, "node_modules/webpack": { - "version": "5.91.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, "license": "MIT", "dependencies": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -21450,6 +22760,23 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/winston": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-0.7.3.tgz", + "integrity": "sha512-iVTT8tf9YnTyfZX+aEUj2fl6WBRet7za6vdjMeyF8SA80Vii2rreM5XH+5qmpBV9uJGj8jz8BozvTDcroVq/eA==", + "dependencies": { + "async": "0.2.x", + "colors": "0.6.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "pkginfo": "0.3.x", + "request": "2.16.x", + "stack-trace": "0.0.x" + }, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -21542,6 +22869,14 @@ } } }, + "node_modules/xmlhttprequest": { + "version": "1.5.0", + "resolved": "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz", + "integrity": "sha512-TVSZwoeUQ7OKhb8jnQdSxGFz+lm4MGWmhG0deeYg85VQT74x5LcSrKeXHE0ZIzEycgqQ5mF8r8e1AykA7TpNAQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/xmlhttprequest-ssl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", diff --git a/satsquare/package.json b/satsquare/package.json index 6e773db..799ec35 100644 --- a/satsquare/package.json +++ b/satsquare/package.json @@ -29,6 +29,7 @@ "@prisma/client": "^5.14.0", "bcrypt": "^5.1.1", "clsx": "^2.1.1", + "dns": "^0.2.2", "dotenv": "^16.4.5", "flowbite-react": "^0.9.0", "framer-motion": "^11.2.12", @@ -46,6 +47,7 @@ "react-dom": "^18.3.1", "react-hot-toast": "^2.4.1", "react-icons": "^5.2.1", + "react-qr-scanner": "^1.0.0-alpha.11", "react-select": "^5.8.0", "redis": "^4.7.0", "sharp": "^0.33.4", diff --git a/satsquare/socket/index.js b/satsquare/socket/index.js index 25543b5..7fc9656 100644 --- a/satsquare/socket/index.js +++ b/satsquare/socket/index.js @@ -39,8 +39,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); var socket_io_1 = require("socket.io"); var manager_1 = require("./roles/manager"); var player_1 = require("./roles/player"); +var cooldown_1 = require("./utils/cooldown"); var quiz_config_1 = require("./quiz.config"); var client_1 = require("@prisma/client"); +var wallet_1 = require("./wallet"); var gameState; var prisma = new client_1.PrismaClient(); var io = new socket_io_1.Server({ @@ -52,8 +54,55 @@ var io = new socket_io_1.Server({ io.listen(5157); io.on('connection', function (socket) { console.log("User connected ".concat(socket.id)); + // Handle wallet connection + socket.on('wallet:connect', function (walletId) { return __awaiter(void 0, void 0, void 0, function () { + var walletDetails, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, (0, wallet_1.fetchWalletDetails)(walletId)]; + case 1: + walletDetails = _a.sent(); + socket.emit('wallet:balance', walletDetails); + // Subscribe to wallet balance updates (pseudo-code, replace with actual implementation) + // subscribeToBalanceUpdates(walletId, (newBalance) => { + // io.to(socket.id).emit('wallet:balanceUpdate', { balance: newBalance }); + // }); + console.log('Wallet connected', walletDetails); + return [3 /*break*/, 3]; + case 2: + error_1 = _a.sent(); + console.error('Error fetching wallet details:', error_1); + socket.emit('wallet:errorMessage', 'Failed to connect to wallet.'); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + // Handle receiving payments + // socket.on('wallet:receivePayment', async (invoice: string) => { + // try { + // const paymentResult = await processPayment(invoice); // Replace with your payment processing logic + // if (paymentResult.success) { + // const walletDetails = await fetchWalletDetails(paymentResult.walletId); + // io.to(socket.id).emit('wallet:paymentReceived', { + // success: true, + // walletDetails, + // }); + // } else { + // socket.emit('wallet:paymentFailed', { + // success: false, + // message: paymentResult.message, + // }); + // } + // } catch (error) { + // console.error('Error processing payment:', error); + // socket.emit('wallet:errorMessage', 'Payment processing failed.'); + // } + // }); socket.on('game:selectQuiz', function (quizId) { return __awaiter(void 0, void 0, void 0, function () { - var error_1; + var error_2; return __generator(this, function (_a) { switch (_a.label) { case 0: @@ -64,69 +113,65 @@ io.on('connection', function (socket) { socket.emit('game:quizSelected', { success: true, gameState: gameState }); return [3 /*break*/, 3]; case 2: - error_1 = _a.sent(); - socket.emit('game:errorMessage', error_1.message); + error_2 = _a.sent(); + socket.emit('game:errorMessage', error_2.message); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + socket.on('requestQuizzes', function () { return __awaiter(void 0, void 0, void 0, function () { + var quizzes, error_3; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, prisma.quiz.findMany({ + select: { + id: true, + subject: true, + }, + })]; + case 1: + quizzes = _a.sent(); + socket.emit('quizzesList', quizzes); + return [3 /*break*/, 3]; + case 2: + error_3 = _a.sent(); + console.error('Error fetching quizzes:', error_3); + socket.emit('game:errorMessage', 'Failed to load quizzes.'); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + socket.on('requestAssociations', function () { return __awaiter(void 0, void 0, void 0, function () { + var quizzes, error_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + return [4 /*yield*/, prisma.association.findMany({ + select: { + id: true, + valide: true, + logoUrl: true, + adresseEclairage: true, + }, + })]; + case 1: + quizzes = _a.sent(); + socket.emit('associationsList', quizzes); + return [3 /*break*/, 3]; + case 2: + error_4 = _a.sent(); + console.error('Error fetching Associations:', error_4); + socket.emit('game:errorMessage', 'Failed to load Associations.'); return [3 /*break*/, 3]; case 3: return [2 /*return*/]; } }); }); }); - io.on('connection', function (socket) { - console.log("User connected: ".concat(socket.id)); - socket.on('requestQuizzes', function () { return __awaiter(void 0, void 0, void 0, function () { - var quizzes, error_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, prisma.quiz.findMany({ - select: { - id: true, - subject: true, - }, - })]; - case 1: - quizzes = _a.sent(); - socket.emit('quizzesList', quizzes); - return [3 /*break*/, 3]; - case 2: - error_2 = _a.sent(); - console.error('Error fetching quizzes:', error_2); - socket.emit('game:errorMessage', 'Failed to load quizzes.'); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - socket.on('requestAssociations', function () { return __awaiter(void 0, void 0, void 0, function () { - var quizzes, error_3; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4 /*yield*/, prisma.association.findMany({ - select: { - id: true, - valide: true, - logoUrl: true, - adresseEclairage: true, - }, - })]; - case 1: - quizzes = _a.sent(); - socket.emit('associationsList', quizzes); - return [3 /*break*/, 3]; - case 2: - error_3 = _a.sent(); - console.error('Error fetching Associations:', error_3); - socket.emit('game:errorMessage', 'Failed to load Associations.'); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - // Other socket event handlers... - }); socket.on('player:checkRoom', function (roomId) { return player_1.default.checkRoom(gameState, io, socket, roomId); }); @@ -154,19 +199,36 @@ io.on('connection', function (socket) { socket.on('manager:showLeaderboard', function () { return manager_1.default.showLeaderboard(gameState, io, socket); }); - // socket.on('disconnect', () => { - // console.log(`User disconnected ${socket.id}`); - // if (gameState.manager === socket.id) { - // console.log('Resetting game'); - // io.to(gameState.room).emit('game:reset'); - // gameState = null; - // abortCooldown(); - // return; - // } - // const playerIndex = gameState.players.findIndex((p: { id: any }) => p.id === socket.id); - // if (playerIndex !== -1) { - // const player = gameState.players.splice(playerIndex, 1)[0]; - // io.to(gameState.manager).emit('manager:removePlayer', player.id); - // } - // }); + socket.on('wallet:connect', function (wallet) { return __awaiter(void 0, void 0, void 0, function () { + var walletdetails; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log('Wallet connected'); + return [4 /*yield*/, (0, wallet_1.fetchWalletDetails)(wallet)]; + case 1: + walletdetails = _a.sent(); + socket.emit('wallet:balance', walletdetails); + console.log(walletdetails); + return [2 /*return*/]; + } + }); + }); }); + socket.on('disconnect', function () { + console.log("User disconnected ".concat(socket.id)); + if (gameState && gameState.manager === socket.id) { + console.log('Resetting game'); + io.to(gameState.room).emit('game:reset'); + gameState = null; + (0, cooldown_1.abortCooldown)(); + return; + } + if (gameState) { + var playerIndex = gameState.players.findIndex(function (p) { return p.id === socket.id; }); + if (playerIndex !== -1) { + var player = gameState.players.splice(playerIndex, 1)[0]; + io.to(gameState.manager).emit('manager:removePlayer', player.id); + } + } + }); }); diff --git a/satsquare/socket/index.ts b/satsquare/socket/index.ts index aec4d72..a8b06ba 100644 --- a/satsquare/socket/index.ts +++ b/satsquare/socket/index.ts @@ -4,9 +4,10 @@ import Player from './roles/player'; import { abortCooldown } from './utils/cooldown'; import { getGameState } from './quiz.config'; import { PrismaClient } from '@prisma/client'; +import { fetchWalletDetails } from './wallet'; let gameState: any; -const prisma = new PrismaClient(); +const prisma = new PrismaClient(); const io = new Server({ cors: { @@ -20,6 +21,49 @@ io.listen(5157); io.on('connection', (socket: Socket) => { console.log(`User connected ${socket.id}`); + + // Handle wallet connection + socket.on('wallet:connect', async (walletId: string) => { + try { + const walletDetails = await fetchWalletDetails(walletId); + socket.emit('wallet:balance', walletDetails); + + // Subscribe to wallet balance updates (pseudo-code, replace with actual implementation) + // subscribeToBalanceUpdates(walletId, (newBalance) => { + // io.to(socket.id).emit('wallet:balanceUpdate', { balance: newBalance }); + // }); + + console.log('Wallet connected', walletDetails); + } catch (error) { + console.error('Error fetching wallet details:', error); + socket.emit('wallet:errorMessage', 'Failed to connect to wallet.'); + } + }); + + // Handle receiving payments + // socket.on('wallet:receivePayment', async (invoice: string) => { + // try { + // const paymentResult = await processPayment(invoice); // Replace with your payment processing logic + + // if (paymentResult.success) { + // const walletDetails = await fetchWalletDetails(paymentResult.walletId); + // io.to(socket.id).emit('wallet:paymentReceived', { + // success: true, + // walletDetails, + // }); + // } else { + // socket.emit('wallet:paymentFailed', { + // success: false, + // message: paymentResult.message, + // }); + // } + // } catch (error) { + // console.error('Error processing payment:', error); + // socket.emit('wallet:errorMessage', 'Payment processing failed.'); + // } + // }); + + socket.on('game:selectQuiz', async (quizId: number) => { try { gameState = await getGameState(quizId); @@ -29,44 +73,37 @@ io.on('connection', (socket: Socket) => { } }); - io.on('connection', (socket: Socket) => { - console.log(`User connected: ${socket.id}`); - - socket.on('requestQuizzes', async () => { - try { - const quizzes = await prisma.quiz.findMany({ - select: { - id: true, - subject: true, - }, - }); - socket.emit('quizzesList', quizzes); - } catch (error) { - console.error('Error fetching quizzes:', error); - socket.emit('game:errorMessage', 'Failed to load quizzes.'); - } - }); + socket.on('requestQuizzes', async () => { + try { + const quizzes = await prisma.quiz.findMany({ + select: { + id: true, + subject: true, + }, + }); + socket.emit('quizzesList', quizzes); + } catch (error) { + console.error('Error fetching quizzes:', error); + socket.emit('game:errorMessage', 'Failed to load quizzes.'); + } + }); - socket.on('requestAssociations', async () => { - try { - const quizzes = await prisma.association.findMany({ - select: { - id: true, - valide: true, - logoUrl: true, - adresseEclairage: true, - }, - }); - socket.emit('associationsList', quizzes); - } catch (error) { - console.error('Error fetching Associations:', error); - socket.emit('game:errorMessage', 'Failed to load Associations.'); - } - }); - - // Other socket event handlers... + socket.on('requestAssociations', async () => { + try { + const quizzes = await prisma.association.findMany({ + select: { + id: true, + valide: true, + logoUrl: true, + adresseEclairage: true, + }, + }); + socket.emit('associationsList', quizzes); + } catch (error) { + console.error('Error fetching Associations:', error); + socket.emit('game:errorMessage', 'Failed to load Associations.'); + } }); - socket.on('player:checkRoom', (roomId: string) => Player.checkRoom(gameState, io, socket, roomId) @@ -104,23 +141,32 @@ io.on('connection', (socket: Socket) => { Manager.showLeaderboard(gameState, io, socket) ); - // socket.on('disconnect', () => { - // console.log(`User disconnected ${socket.id}`); + socket.on('wallet:connect', async (wallet: string) =>{ + console.log('Wallet connected'); + const walletdetails = await fetchWalletDetails(wallet); + + socket.emit('wallet:balance', walletdetails); + console.log(walletdetails); + }); - // if (gameState.manager === socket.id) { - // console.log('Resetting game'); - // io.to(gameState.room).emit('game:reset'); - // gameState = null; + socket.on('disconnect', () => { + console.log(`User disconnected ${socket.id}`); - // abortCooldown(); - // return; - // } + if (gameState && gameState.manager === socket.id) { + console.log('Resetting game'); + io.to(gameState.room).emit('game:reset'); + gameState = null; - // const playerIndex = gameState.players.findIndex((p: { id: any }) => p.id === socket.id); + abortCooldown(); + return; + } - // if (playerIndex !== -1) { - // const player = gameState.players.splice(playerIndex, 1)[0]; - // io.to(gameState.manager).emit('manager:removePlayer', player.id); - // } - // }); + if (gameState) { + const playerIndex = gameState.players.findIndex((p: { id: any }) => p.id === socket.id); + if (playerIndex !== -1) { + const player = gameState.players.splice(playerIndex, 1)[0]; + io.to(gameState.manager).emit('manager:removePlayer', player.id); + } + } + }); }); diff --git a/satsquare/src/app/api/get-wallet-details/route.ts b/satsquare/src/app/api/get-wallet-details/route.ts index f6bfb7d..9a5c90f 100644 --- a/satsquare/src/app/api/get-wallet-details/route.ts +++ b/satsquare/src/app/api/get-wallet-details/route.ts @@ -34,10 +34,11 @@ export async function GET(req: NextRequest) { ); } - const response = await fetch(`https://lightning.ismail-mouyahada.com/api/v1/auth?usr=${wallet.walletId}`, { + const response = await fetch(`https://lightning.ismail-mouyahada.com/api/v1/wallet`, { method: 'GET', headers: { 'Content-Type': 'application/json', + 'X-API-Key': wallet.walletId, }, }); diff --git a/satsquare/src/components/ProfileDetail/ProfileDetail.tsx b/satsquare/src/components/ProfileDetail/ProfileDetail.tsx index e1a0ee1..2ab5be9 100644 --- a/satsquare/src/components/ProfileDetail/ProfileDetail.tsx +++ b/satsquare/src/components/ProfileDetail/ProfileDetail.tsx @@ -18,11 +18,11 @@ import { useRouter } from "next/navigation"; import toast, { Toaster } from "react-hot-toast"; import { UserDTO } from "@/types/userDto"; import QRCode from "qrcode.react"; // Import QRCode from the library -import { useSocketContext } from "@/context/socket"; +import { useApiHook } from "@/hook/useApiHook"; const ProfileDetail: React.FC = () => { + const { data, error, loading, fetchData, postData } = useApiHook(); const { data: session } = useSession(); - const { socket } = useSocketContext(); const [userData, setUserData] = useState(null); const [oldPassword, setOldPassword] = useState(""); const [newPassword, setNewPassword] = useState(""); @@ -47,32 +47,6 @@ const ProfileDetail: React.FC = () => { const router = useRouter(); - - useEffect(() => { - if (socket && userData?.walletId) { - socket.emit("wallet:connect", userData?.walletId); - - socket.on("wallet:balance", (data) => { - const balance = BigInt(data.balance) / BigInt(1000); - setWalletDetails({ - id: data.id, - name: data.name, - balance: Number(balance), - }); - toast.success("Wallet details updated."); - }); - - socket.on("game:errorMessage", (message) => { - toast.error(message); - }); - - return () => { - socket.off("wallet:balance"); - socket.off("game:errorMessage"); - }; - } - }, [socket, userData?.walletId]); - useEffect(() => { const fetchUserData = async () => { if (session?.user?.email) { @@ -100,47 +74,50 @@ const ProfileDetail: React.FC = () => { fetchUserData(); }, [session]); - // useEffect(() => { - // const fetchWalletDetails = async () => { - // if (userData?.walletId) { - // try { - // const response = await fetch( - // `/api/get-wallet-details?walletId=${userData.walletId}`, - // { - // method: "GET", - // headers: { - // "Content-Type": "application/json", - // }, - // } - // ); - - // if (!response.ok) { - // throw new Error("Failed to fetch wallet details"); - // } - - // const data = await response.json(); - // const balance = BigInt(data.balance) / BigInt(1000); - - // setWalletDetails({ - // id: data.id, - // name: data.name, - // balance: Number(balance), - // }); - // } catch (error) { - // console.error("Error fetching wallet details:", error); - // toast.error("Erreur lors de la récupération des détails du portefeuille."); - // } - // } else { - // setWalletDetails(null); - // } - // }; - - // fetchWalletDetails(); - - // const intervalId = setInterval(fetchWalletDetails, 10000); // Poll every 10 seconds - - // return () => clearInterval(intervalId); // Cleanup on component unmount - // }, [userData]); + useEffect( () => { + const fetchWalletDetails = async () => { + if (userData!=null) { + try { + + fetchData + const response = await fetch( + `/api/get-wallet-details`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + } + ); + + if (!response.ok) { + throw new Error("Failed to fetch wallet details"); + } + + const data = await response.json(); + const balance = BigInt(data.balance) / BigInt(1000); + + setWalletDetails({ + id: data.id, + name: data.name, + balance: Number(balance), + }); + } catch (error) { + console.error("Error fetching wallet details:", error); + toast.error( + "Erreur lors de la récupération des détails du portefeuille." + ); + } + } else { + setWalletDetails(null); + } + }; + + fetchWalletDetails(); + + + + }, [userData]); const handlePasswordReset = async () => { if (newPassword !== confirmPassword) { @@ -193,7 +170,9 @@ const ProfileDetail: React.FC = () => { }); if (!disassociateResponse.ok) { - throw new Error("Échec de la dissociation du portefeuille dans la base de données."); + throw new Error( + "Échec de la dissociation du portefeuille dans la base de données." + ); } setUserData((prevData) => @@ -231,7 +210,8 @@ const ProfileDetail: React.FC = () => { if (!updateResponse.ok) { const data = await updateResponse.json(); throw new Error( - data.message || "Échec de la mise à jour de l'ID du portefeuille dans la base de données." + data.message || + "Échec de la mise à jour de l'ID du portefeuille dans la base de données." ); } @@ -244,7 +224,7 @@ const ProfileDetail: React.FC = () => { if (walletIdInput) { try { const response = await fetch( - `/api/get-wallet-details?walletId=${walletIdInput}`, + `/api/get-wallet-details`, { method: "GET", headers: { @@ -254,7 +234,9 @@ const ProfileDetail: React.FC = () => { ); if (!response.ok) { - throw new Error("Échec de la récupération des détails du portefeuille"); + throw new Error( + "Échec de la récupération des détails du portefeuille" + ); } const data = await response.json(); @@ -316,9 +298,7 @@ const ProfileDetail: React.FC = () => { toast.success("Facture créée avec succès."); setOpenInvoiceModal(false); } catch (error: any) { - toast.error( - error.message || "Erreur lors de la création de la facture." - ); + toast.error(error.message || "Erreur lors de la création de la facture."); } }; @@ -385,9 +365,7 @@ const ProfileDetail: React.FC = () => { router.push("/"); setOpenDeleteModal(false); } catch (error: any) { - toast.error( - error.message || "Erreur lors de la suppression du compte." - ); + toast.error(error.message || "Erreur lors de la suppression du compte."); } }; @@ -468,9 +446,7 @@ const ProfileDetail: React.FC = () => { }, ].map((item, index) => (
- - {item.icon} - + {item.icon} {item.label} @@ -572,12 +548,9 @@ const ProfileDetail: React.FC = () => {
-
+
- @@ -762,7 +735,9 @@ const ProfileDetail: React.FC = () => { try { const text = await navigator.clipboard.readText(); setInvoice(text); - toast.success("Invoice collée depuis le presse-papiers !"); + toast.success( + "Invoice collée depuis le presse-papiers !" + ); } catch (err) { toast.error("Erreur lors du collage du presse-papiers."); } @@ -787,4 +762,4 @@ const ProfileDetail: React.FC = () => { ); }; -export default ProfileDetail; +export default ProfileDetail; \ No newline at end of file diff --git a/satsquare/src/components/game/SelectQuiz.tsx b/satsquare/src/components/game/SelectQuiz.tsx index 9b80838..210614d 100644 --- a/satsquare/src/components/game/SelectQuiz.tsx +++ b/satsquare/src/components/game/SelectQuiz.tsx @@ -3,7 +3,6 @@ import { useSocketContext } from "@/context/socket"; import toast from "react-hot-toast"; import { FaSpinner } from "react-icons/fa"; import debounce from "lodash.debounce"; -import { Association } from "@/types/main-types/main"; interface Quiz { id: number; @@ -13,9 +12,7 @@ interface Quiz { export default function SelectQuiz() { const { socket } = useSocketContext(); const [quizzes, setQuizzes] = useState([]); - const [associations, setAssociations] = useState([]); const [selectedQuiz, setSelectedQuiz] = useState(null); - const [selectedAssociation, setSelectedAssociation] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [isSelecting, setIsSelecting] = useState(false); // Track if a quiz is being selected @@ -41,26 +38,7 @@ export default function SelectQuiz() { }; }, [socket]); - useEffect(() => { - socket.emit('requestAssociations'); - - socket.on('associationsList', (data: Association[]) => { - setAssociations(data); - setLoading(false); - }); - - socket.on('game:errorMessage', (message: string) => { - toast.dismiss(); // Dismiss any existing toasts - toast.error(message.split(' ')[0] === 'Failed' ? 'Failed to load associations.' : message); - setError(message); - setLoading(false); - }); - - return () => { - socket.off('associationsList'); - socket.off('game:errorMessage'); - }; - }, [socket]); + const handleQuizSelect = useCallback((quizId: number) => { if (!isSelecting) { @@ -77,30 +55,13 @@ export default function SelectQuiz() { } }, [isSelecting, socket]); - const handleAssociationSelect = useCallback((associationIds: number[]) => { - if (!isSelecting) { - setIsSelecting(true); - setSelectedAssociation(associationIds); - socket.emit('game:selectAssociation', associationIds); - - // Prevent further selections for a short period to avoid spamming - setTimeout(() => { - setIsSelecting(false); - }, 2000); // 2 seconds delay before allowing another selection - } else { - toast("Please wait before selecting another association", { icon: "⏳" }); - } - }, [isSelecting, socket]); - + const debouncedHandleQuizSelect = useCallback( debounce(handleQuizSelect, 300), // 300ms debounce delay [isSelecting] ); - const debouncedHandleAssociationSelect = useCallback( - debounce(handleAssociationSelect, 300), // 300ms debounce delay - [isSelecting] - ); + if (loading) { return
; @@ -131,28 +92,7 @@ export default function SelectQuiz() { ))} - - + ); } diff --git a/satsquare/src/components/game/join/Room.tsx b/satsquare/src/components/game/join/Room.tsx index c7437cd..3487c40 100644 --- a/satsquare/src/components/game/join/Room.tsx +++ b/satsquare/src/components/game/join/Room.tsx @@ -1,55 +1,186 @@ -import { usePlayerContext } from "@/context/player" -import Form from "@/components/Form" -import Button from "@/components/Button" -import Input from "@/components/Input" -import { SetStateAction, useEffect, useState } from "react" -import { socket } from "@/context/socket" -import { Card, FloatingLabel } from "flowbite-react" -import { FaGamepad } from "react-icons/fa" -import Link from "next/link" +import { usePlayerContext } from "@/context/player"; +import Form from "@/components/Form"; +import Button from "@/components/Button"; +import Input from "@/components/Input"; +import { SetStateAction, useEffect, useState, useCallback } from "react"; +import { socket } from "@/context/socket"; +import { FaGamepad } from "react-icons/fa"; +import Link from "next/link"; +import QRCode from "qrcode.react"; +import { Association } from "@/types/main-types/main"; +import toast from "react-hot-toast"; export default function Room() { - const { player, dispatch } = usePlayerContext() - const [roomId, setRoomId] = useState("") + const { player, dispatch } = usePlayerContext(); + const [roomId, setRoomId] = useState(""); + const [associations, setAssociations] = useState([]); + const [selectedAssociation, setSelectedAssociation] = useState(null); + const [isAuthenticated, setIsAuthenticated] = useState(false); + const [loading, setLoading] = useState(true); + const [searchTerm, setSearchTerm] = useState(""); + const [error, setError] = useState(null); + + // Replace this with the actual LNbits login URL + const lnbitsLoginUrl = "https://lnbits.com/login?lnurl=your-lnurl-here"; + + useEffect(() => { + if (isAuthenticated) { + console.log("Authenticated with LNbits"); + } + }, [isAuthenticated]); const handleLogin = () => { - socket.emit("player:checkRoom", roomId) - } + if (selectedAssociation && isAuthenticated) { + socket.emit("player:joinAssociation", { roomId, associationId: selectedAssociation.id }); + } else { + alert("Please select an association and authenticate with LNbits first."); + } + }; const handleKeyDown = (event: { key: string }) => { if (event.key === "Enter") { - handleLogin() + handleLogin(); } - } + }; + + useEffect(() => { + socket.emit('requestAssociations'); + + socket.on('associationsList', (data: Association[]) => { + setAssociations(data); + setLoading(false); + }); + + socket.on('game:errorMessage', (message: string) => { + toast.dismiss(); + toast.error(message.split(' ')[0] === 'Failed' ? 'Failed to load associations.' : message); + setError(message); + setLoading(false); + }); + + return () => { + socket.off('associationsList'); + socket.off('game:errorMessage'); + }; + }, [socket]); + + const handleAssociationSelect = useCallback((association: Association) => { + setSelectedAssociation(association); + }, []); useEffect(() => { socket.on("game:successRoom", (roomId) => { - dispatch({ type: "JOIN", payload: roomId }) - }) + dispatch({ type: "JOIN", payload: roomId }); + }); return () => { - socket.off("game:successRoom") - } - }, [dispatch]) + socket.off("game:successRoom"); + }; + }, [dispatch]); + + const handleQrScanSuccess = () => { + setIsAuthenticated(true); + }; + + const filteredAssociations = associations.filter((association) => + association.nom + ); return (
- -
-
- +
+
+ +
+
+ + {loading ? ( +
Loading associations...
+ ) : ( +
+ + {JSON.stringify(associations)} +
+ )} + +
+
+ {/* LNbits QR code */} + +
+
+ + } }) => setRoomId(e.target.value)} + onKeyDown={handleKeyDown} + placeholder="Code de la session" + variant="outlined" + label="Code de la session" + // Disable input until authenticated and association is selected + /> + - } }) => setRoomId(e.target.value)} - onKeyDown={handleKeyDown} - placeholder="Code de la session" variant="outlined" label="Code de la session" /> - - - Retour à l'accueil + + Retour à l'accueil + - ) + ); } diff --git a/satsquare/src/hook/useApiHook.ts b/satsquare/src/hook/useApiHook.ts new file mode 100644 index 0000000..c0ba096 --- /dev/null +++ b/satsquare/src/hook/useApiHook.ts @@ -0,0 +1,69 @@ +import { useState, useEffect } from 'react'; + +type UseApiHookResponse = { + data: T | null; + error: string | null; + loading: boolean; + fetchData: (url: string, headers?: HeadersInit) => Promise; + postData: (url: string, body: any, headers?: HeadersInit) => Promise; +}; + +export const useApiHook = (initialUrl?: string): UseApiHookResponse => { + const [data, setData] = useState(null); + const [error, setError] = useState(null); + const [loading, setLoading] = useState(false); + + const fetchData = async (url: string, headers: HeadersInit = {}) => { + setLoading(true); + setError(null); + + try { + const response = await fetch(url, { headers }); + if (!response.ok) { + throw new Error(`Error: ${response.statusText}`); + } + + const result: T = await response.json(); + setData(result); + } catch (err) { + setError((err as Error).message); + } finally { + setLoading(false); + } + }; + + const postData = async (url: string, body: any, headers: HeadersInit = {}) => { + setLoading(true); + setError(null); + + try { + const response = await fetch(url, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + ...headers, + }, + body: JSON.stringify(body), + }); + + if (!response.ok) { + throw new Error(`Error: ${response.statusText}`); + } + + const result: T = await response.json(); + setData(result); + } catch (err) { + setError((err as Error).message); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + if (initialUrl) { + fetchData(initialUrl); + } + }, [initialUrl]); + + return { data, error, loading, fetchData, postData }; +}; diff --git a/satsquare/src/middleware.ts b/satsquare/src/middleware.ts index 6ebc75b..1846784 100644 --- a/satsquare/src/middleware.ts +++ b/satsquare/src/middleware.ts @@ -3,17 +3,10 @@ export { default } from "next-auth/middleware"; export const config = { matcher: [ - '/associations/:path*', - '/check-invoice-status/:path*', - '/create-invoice/:path*', - '/decode-invoice/:path*', - '/disassociate-wallet/:path*', + '/event/:path*', '/associations/:path*', '/events/:path*', - '/get-wallet-details/:path*', - '/link-wallet/:path*', - '/pay-invoice/:path*', '/questions/:path*', '/quizform/:path*', '/quizzes/:path*', @@ -21,11 +14,8 @@ export const config = { '/rewards/:path*', '/roles/:path*', '/profile/:path*', - // '/home/:path*', - // '/manager/:path*', '/scores/:path*', '/sponsors/:path*', - '/update-wallet/:path*', '/users/:path*', '/utilisateurs/:path*', // '/wallet-balance/:path*', diff --git a/satsquare/src/utils/ioredis.ts b/satsquare/src/utils/ioredis.ts deleted file mode 100644 index 586ff8a..0000000 --- a/satsquare/src/utils/ioredis.ts +++ /dev/null @@ -1,2 +0,0 @@ -import Redis from 'ioredis'; -export const redis = new Redis(); diff --git a/satsquare/src/utils/refis.ts b/satsquare/src/utils/refis.ts new file mode 100644 index 0000000..3a5d72b --- /dev/null +++ b/satsquare/src/utils/refis.ts @@ -0,0 +1,58 @@ +import Redis, { RedisOptions } from 'ioredis'; +import { redis } from '../../configuration.ts'; + +interface Maybe { + value?: T; + isPresent: boolean; +} + +function getRedisConfiguration(): { + port: Maybe; + host: Maybe; + password: Maybe; +} { + return { + port: { value: redis.port ? parseInt(redis.port) : undefined, isPresent: redis.port !== undefined }, + host: { value: redis.host, isPresent: redis.host !== undefined }, + password: { value: redis.password, isPresent: redis.password !== undefined }, + }; +} + +export function createRedisInstance( + config = getRedisConfiguration() +) { + try { + const options: RedisOptions = { + host: config.host.value, // Use the value directly from Maybe + lazyConnect: true, + showFriendlyErrorStack: true, + enableAutoPipelining: true, + maxRetriesPerRequest: 0, + retryStrategy: (times: number) => { + if (times > 3) { + throw new Error(`[Redis] Could not connect after ${times} attempts`); + } + + return Math.min(times * 200, 1000); + }, + }; + + if (config.port.isPresent) { + options.port = config.port.value; + } + + if (config.password.isPresent) { + options.password = config.password.value; + } + + const redis = new Redis(options); + + redis.on('error', (error: unknown) => { + console.warn('[Redis] Error connecting', error); + }); + + return redis; + } catch (e) { + throw new Error(`[Redis] Could not create a Redis instance`); + } +} \ No newline at end of file diff --git a/satsquare/yarn.lock b/satsquare/yarn.lock index e7d4f74..e8ce735 100644 --- a/satsquare/yarn.lock +++ b/satsquare/yarn.lock @@ -2834,23 +2834,7 @@ resolved "https://registry.npmjs.org/@types/escodegen/-/escodegen-0.0.6.tgz" integrity sha512-AjwI4MvWx3HAOaZqYsjKWyEObT9lcVV0Y0V8nXo6cXzN8ZiMxVhf6F3d/UNvXVGKrEzL/Dluc5p+y9GkzlTWig== -"@types/eslint-scope@^3.7.3": - version "3.7.7" - resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz" - integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.56.10" - resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz" - integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^0.0.51": +"@types/estree@^0.0.51": version "0.0.51" resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz" integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== @@ -2929,7 +2913,7 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3325,6 +3309,20 @@ "@types/emscripten" "^1.39.6" tslib "^1.13.0" +"@zxing/library@^0.19.1": + version "0.19.3" + resolved "https://registry.npmjs.org/@zxing/library/-/library-0.19.3.tgz" + integrity sha512-RUv5svewpDoD0ymXleOP8yVTO5BLkR0zn5coGC/Vs1671u0OBJ4xdtR8WVWf08OcvrieEMHdSfQY3ZKtqII/hg== + dependencies: + ts-custom-error "^3.2.1" + optionalDependencies: + "@zxing/text-encoding" "~0.9.0" + +"@zxing/text-encoding@~0.9.0": + version "0.9.0" + resolved "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz" + integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA== + abbrev@1: version "1.1.1" resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" @@ -3337,6 +3335,22 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" +accepts@~1.0.4: + version "1.0.7" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz" + integrity sha512-iq8ew2zitUlNcUca0wye3fYwQ6sSPItDo38oC0R+XA5KTzeXRN+GF7NjOXs3dVItj4J+gQVdpq4/qbnMb1hMHw== + dependencies: + mime-types "~1.0.0" + negotiator "0.4.7" + +accepts@~1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz" + integrity sha512-iq8ew2zitUlNcUca0wye3fYwQ6sSPItDo38oC0R+XA5KTzeXRN+GF7NjOXs3dVItj4J+gQVdpq4/qbnMb1hMHw== + dependencies: + mime-types "~1.0.0" + negotiator "0.4.7" + accepts@~1.3.4, accepts@~1.3.8: version "1.3.8" resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" @@ -3345,10 +3359,10 @@ accepts@~1.3.4, accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== +acorn-import-attributes@^1.9.5: + version "1.9.5" + resolved "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz" + integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== acorn-jsx@^5.3.1, acorn-jsx@^5.3.2: version "5.3.2" @@ -3383,6 +3397,11 @@ adjust-sourcemap-loader@^4.0.0: loader-utils "^2.0.0" regex-parser "^2.2.11" +after@0.8.1: + version "0.8.1" + resolved "https://registry.npmjs.org/after/-/after-0.8.1.tgz" + integrity sha512-SuI3vWhCFeSmkmmJ3efyuOkrhGyp/AuHthh3F5DinGYh2kR9t/0xUlm3/Vn2qMScfgg+cKho5fW7TUEYUhYeiA== + agent-base@^7.0.2, agent-base@^7.1.0, agent-base@^7.1.1: version "7.1.1" resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz" @@ -3666,6 +3685,11 @@ arraybuffer.prototype.slice@^1.0.3: is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" +arraybuffer.slice@0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz" + integrity sha512-6ZjfQaBSy6CuIH0+B0NrxMfDE5VIOCP/5gOqSpEIsaAZx9/giszzrXg6PZ7G51U/n88UmlAgYLNQ9wAnII7PJA== + asn1.js@^4.10.1: version "4.10.1" resolved "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz" @@ -3675,6 +3699,11 @@ asn1.js@^4.10.1: inherits "^2.0.1" minimalistic-assert "^1.0.0" +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== + assert@^2.0.0, assert@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz" @@ -3710,6 +3739,11 @@ ast-types@^0.16.1: dependencies: tslib "^2.0.1" +async@~0.2.7, async@0.2.x: + version "0.2.10" + resolved "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + integrity sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" @@ -3734,6 +3768,11 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" +aws-sign@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/aws-sign/-/aws-sign-0.2.0.tgz" + integrity sha512-6P7/Ls5F6++DsKu7iacris7qq/AZSWaX+gT4dtSyUxM82ePxWxaP7Slo82ZO3ZTx6GSKxQHAQlmFvM8e+Dd8ZA== + axe-core@=4.7.0: version "4.7.0" resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz" @@ -3909,6 +3948,11 @@ base64-arraybuffer@^1.0.2: resolved "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz" integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ== +base64-arraybuffer@0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz" + integrity sha512-ewBKKVVPIl78B26mYQHYlaxR7NydMiD/GxwLNIwTAfLIE4xhN2Gxcy30//azq5UrejXjzGpWjcBu3NUJxzMMzg== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" @@ -3919,6 +3963,16 @@ base64id@~2.0.0, base64id@2.0.0: resolved "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz" integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== +base64id@0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz" + integrity sha512-DSjtfjhAsHl9J4OJj7e4+toV2zqxJrGwVd3CLlsCp8QmicvOn7irG0Mb8brOc/nur3SdO8lIbNlY1s1ZDJdUKQ== + +basic-auth@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.0.tgz" + integrity sha512-qzxS7/bW/LSiKZzdZw3isPjiVmzXbJLM3ImZZ62WMR3oJQAyqy094Nnb0TA2ZZm65xB7nu0acfTQ99z7wwCDCw== + basic-ftp@^5.0.2: version "5.0.5" resolved "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz" @@ -3932,6 +3986,13 @@ bcrypt@^5.1.1: "@mapbox/node-pre-gyp" "^1.0.11" node-addon-api "^5.0.0" +better-assert@~1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz" + integrity sha512-bYeph2DFlpK1XmGs6fvlLRUN29QISM3GBuUwSFsMY2XRx4AvC0WNCS57j4c/xGrK2RS24C1w3YoBOsw9fT46tQ== + dependencies: + callsite "1.0.0" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz" @@ -3942,6 +4003,11 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== +"binaryheap@>= 0.0.3": + version "0.0.3" + resolved "https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.3.tgz" + integrity sha512-9JFb4Yt5R9FZwbJaxOayF+T5sxn5eiU2NA9/LOeI1g2FUFRTdxpdmWppikO4O5AbNze8s0sL6ZuFxB1y4Ay8GA== + bl@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" @@ -3951,6 +4017,11 @@ bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" +blob@0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/blob/-/blob-0.0.2.tgz" + integrity sha512-BoCcDt8zBGShn6DawAGQw37s9SSs+fEjiZWDzyB+841PbOogcR2X7LGlM4sR3Zsiq/zoyl8MFWDfN6oDSlveBQ== + bluebird@3.7.2: version "3.7.2" resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" @@ -3989,11 +4060,31 @@ body-parser@1.20.2: type-is "~1.6.18" unpipe "1.0.0" +body-parser@1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.5.0.tgz" + integrity sha512-UJfZike68QN1mdo0mA+Z0y+0qi10oxOrCPw2CZpP73O/LIfEWHDy9SHhwsME1mdk1WmnltBLddUkfBpuKPH4Ng== + dependencies: + bytes "1.0.0" + depd "0.4.2" + iconv-lite "0.4.4" + media-typer "0.2.0" + qs "0.6.6" + raw-body "1.3.0" + type-is "~1.3.2" + boolbase@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== +boom@0.3.x: + version "0.3.1" + resolved "https://registry.npmjs.org/boom/-/boom-0.3.1.tgz" + integrity sha512-xWrlXnkK46TjEW7HU5G39AXWuG5aiHz3++zk3bBzF4mfnVCkpcYbwsnLUqMmfZNgPEYS/AI8MH+vmJxH5Kz0PA== + dependencies: + hoek "0.4.x" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" @@ -4117,6 +4208,11 @@ buffer-crc32@~0.2.3: resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz" integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== +buffer-crc32@0.2.3: + version "0.2.3" + resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.3.tgz" + integrity sha512-HLvoSqq1z8fJEcT1lUlJZ4OJaXJZ1wsWm0+fBxkz9Bdf/WphA4Da7FtGUguNNyEXL4WB0hNMTaWmdFRFPy8YOQ== + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" @@ -4143,6 +4239,13 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +"buffercursor@>= 0.0.12": + version "0.0.12" + resolved "https://registry.npmjs.org/buffercursor/-/buffercursor-0.0.12.tgz" + integrity sha512-Z+6Jm/eW6ITeqcFQKVXX7LYIGk7rENqCKHJ4CbWfJMeLpQZJj1v70WehkLmp+1kFN/QyCgpQ3Z0dKUHAwSbf9w== + dependencies: + verror "^1.4.0" + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz" @@ -4155,6 +4258,11 @@ busboy@1.6.0: dependencies: streamsearch "^1.1.0" +bytes@1, bytes@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz" + integrity sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ== + bytes@3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" @@ -4171,6 +4279,11 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bin get-intrinsic "^1.2.4" set-function-length "^1.2.1" +callsite@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz" + integrity sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ== + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -4474,6 +4587,11 @@ colorette@^2.0.10: resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== +colors@0.6.x: + version "0.6.2" + resolved "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + integrity sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" @@ -4481,6 +4599,13 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +combined-stream@~0.0.4: + version "0.0.7" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz" + integrity sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig== + dependencies: + delayed-stream "0.0.5" + commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" @@ -4506,6 +4631,11 @@ commander@^8.3.0: resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +commander@~0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz" + integrity sha512-0fLycpl1UMTGX257hRsu/arL/cUbcvQM4zMKwvLvzXtfdezIV4yotPS2dYtknF+NmEfWSoCEF6+hj9XLm/6hEw== + common-path-prefix@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz" @@ -4516,6 +4646,21 @@ commondir@^1.0.1: resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== +component-bind@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz" + integrity sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw== + +component-emitter@1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz" + integrity sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA== + +component-inherit@0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz" + integrity sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -4541,6 +4686,16 @@ confbox@^0.1.7: resolved "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz" integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== +connect@3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/connect/-/connect-3.0.2.tgz" + integrity sha512-k3kqw6T2Fc5ihvh5VVjwuJHA++qvh0/rPfe2GkJ5QNSQ9tRigQXMjtX2CYf73KZFe4+IV3HfQ3VR3W+nkt0eWQ== + dependencies: + debug "1.0.3" + finalhandler "0.0.2" + parseurl "~1.1.3" + utils-merge "1.0.0" + consola@^3.2.3: version "3.2.3" resolved "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz" @@ -4588,6 +4743,16 @@ convert-source-map@^2.0.0: resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +cookie-jar@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/cookie-jar/-/cookie-jar-0.2.0.tgz" + integrity sha512-yImk9AY90xjoUsN2fWHoIhVgveXqiZv7LDqUTZEzVBHyzfay8AjcJITUZpz2fTYLh6rnP+7GogiuRCo/5j2epg== + +cookie-signature@1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.4.tgz" + integrity sha512-k+lrG38ZC/S7zN6l1/HcF6xF4jMwkIUjnr5afDU7tzFxIfDmKzdqJdXo8HNYaXOuBJ3tPKxSiwCOTA0b3qQfaA== + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" @@ -4603,6 +4768,11 @@ cookie@~0.4.1: resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +cookie@0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz" + integrity sha512-+mHmWbhevLwkiBf7QcbZXHr0v4ZQQ/OgHk3fsQHrsMMiGzuvAmU/YMUR+ZfrO/BLAGIWFfx2Z7Oyso0tZR/wiA== + cookie@0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz" @@ -4625,6 +4795,11 @@ core-util-is@~1.0.0: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== + cors@~2.8.5: version "2.8.5" resolved "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz" @@ -4722,6 +4897,13 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +cryptiles@0.1.x: + version "0.1.0" + resolved "https://registry.npmjs.org/cryptiles/-/cryptiles-0.1.0.tgz" + integrity sha512-WiOGszxSaVHd8T4hlu5Xcqs2uUYxbvotBP171ag2pLPKSwSKeTJYnzd98/YWV3jQYk/rpMHa3r01cQfN8SZrHQ== + dependencies: + boom "0.3.x" + crypto-browserify@^3.12.0: version "3.12.0" resolved "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz" @@ -4825,6 +5007,11 @@ cwd@^0.10.0: find-pkg "^0.1.2" fs-exists-sync "^0.1.0" +cycle@1.0.x: + version "1.0.3" + resolved "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" + integrity sha512-TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA== + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz" @@ -4900,6 +5087,30 @@ debug@^4.3.5: dependencies: ms "2.1.2" +debug@0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/debug/-/debug-0.6.0.tgz" + integrity sha512-2vIZf67+gMicLu8McscD1NNhMWbiTSJkhlByoTA1Gw54zOb/9IlxylYG+Kr9z1X2wZTHh1AMSp+YiMjYtLkVUA== + +debug@0.7.4: + version "0.7.4" + resolved "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz" + integrity sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q== + +debug@1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/debug/-/debug-1.0.2.tgz" + integrity sha512-T9bufXIzQvCa4VrTIpLvvwdLhH+wuBtvIJJA3xgzVcaVETGmTIWMfEXQEd1K4p8BaRmQJPn6MPut38H7YQ+iIA== + dependencies: + ms "0.6.2" + +debug@1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/debug/-/debug-1.0.3.tgz" + integrity sha512-MltK7Ykj/udtD728gD/RrONStwVnDpBNIP1h+CBcnwnJdHqHxfWHI1E8XLootUl7NOPAYTCCXlb8/Qmy7WyB1w== + dependencies: + ms "0.6.2" + debug@2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" @@ -4970,6 +5181,11 @@ deepmerge@^4.2.2, deepmerge@^4.3.1, deepmerge@4.3.1: resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== +defaultable@~0.7.2: + version "0.7.2" + resolved "https://registry.npmjs.org/defaultable/-/defaultable-0.7.2.tgz" + integrity sha512-UEaHGfefWfbnANtSlCtuAelo7HZhCbdLAQAttRDVJpQplbA1G21t/J70VGznRA4z9py2k70tTW+3ogGs5VgrcQ== + defaults@^1.0.3: version "1.0.4" resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz" @@ -5028,6 +5244,11 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +delayed-stream@0.0.5: + version "0.0.5" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" + integrity sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA== + delegates@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" @@ -5038,6 +5259,16 @@ denque@^2.1.0: resolved "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== +depd@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz" + integrity sha512-Uyx3FgdvEYlpA3W4lf37Ide++2qOsjLlJ7dap0tbM63j/BxTCcxmyIOO6PXbKbOuNSko+fsDHzzx1DUeo1+3fA== + +depd@0.4.2: + version "0.4.2" + resolved "https://registry.npmjs.org/depd/-/depd-0.4.2.tgz" + integrity sha512-tG4S/hTtpA6stvb9Li65vWHrCblQ/oSN/UI90RKIA3wMk3N9lR1k/dCs8NKKNAy7UXD0+1/dUqhiaBuMatVNAQ== + depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" @@ -5122,6 +5353,18 @@ dlv@^1.1.3: resolved "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz" integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== +dns@^0.2.2: + version "0.2.2" + resolved "https://registry.npmjs.org/dns/-/dns-0.2.2.tgz" + integrity sha512-dhCgBk0QglzySl2BVlIkRuk7aTqxlCe+5KhHEX5ULuco7RcB6d1zDnP5iGSs2rLdJaTc+82MxegtJtjFuueWiQ== + dependencies: + hbo-dnsd "0.9.8" + native-dns "0.6.1" + node-options "0.0.6" + tomahawk "0.1.6" + tomahawk-plugin-kv-memory-store "0.0.3" + winston "0.7.3" + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" @@ -5224,6 +5467,11 @@ eastasianwidth@^0.2.0: resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +ee-first@1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.0.3.tgz" + integrity sha512-1q/3kz+ZwmrrWpJcCCrBZ3JnBzB1BMA5EVW9nxnIP1LxDZ16Cqs9VdolqLWlExet1vU+bar3WSkAa4/YrA9bIw== + ee-first@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" @@ -5247,6 +5495,13 @@ elliptic@^6.5.3, elliptic@^6.5.5: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +"emitter@http://github.com/component/emitter/archive/1.0.1.tar.gz": + version "1.0.1" + resolved "http://github.com/component/emitter/archive/1.0.1.tar.gz" + integrity sha512-r/UcFj7JS3lRjv9cgYjgpDNbAsGUdqU64n6ZUOgSF7s1UFBbGu7pUDwKEjHu9NBCy6j2AmmjNW4rijR4De65eA== + dependencies: + indexof "0.0.1" + emittery@^0.13.1: version "0.13.1" resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" @@ -5304,11 +5559,39 @@ engine.io-client@~6.5.2: ws "~8.17.1" xmlhttprequest-ssl "~2.0.0" +engine.io-client@1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.3.1.tgz" + integrity sha512-bTOZMqAe7HXhyA/2T7Fve04b/ZZruTHSOqa+yn8U4RFSyRAVPePjopOgJOUNciEfuXo1gx850P5LzaQU28/p3w== + dependencies: + component-emitter "1.1.2" + component-inherit "0.0.3" + debug "0.7.4" + engine.io-parser "1.0.6" + has-cors "1.0.3" + indexof "0.0.1" + parsejson "0.0.1" + parseqs "0.0.2" + parseuri "0.0.2" + ws "0.4.31" + xmlhttprequest "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz" + engine.io-parser@~5.2.1: version "5.2.2" resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz" integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== +engine.io-parser@1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz" + integrity sha512-ipbmiNj4OfAL9csof0FlI9L2jkU/lgcUphHjnTDo1KABsA21WtsVy/1OjhCj8xxhNIHtxEZ3/t7uB45gEMhD4g== + dependencies: + after "0.8.1" + arraybuffer.slice "0.0.6" + base64-arraybuffer "0.1.2" + blob "0.0.2" + utf8 "2.0.0" + engine.io@~6.5.2: version "6.5.5" resolved "https://registry.npmjs.org/engine.io/-/engine.io-6.5.5.tgz" @@ -5325,10 +5608,20 @@ engine.io@~6.5.2: engine.io-parser "~5.2.1" ws "~8.17.1" -enhanced-resolve@^5.12.0, enhanced-resolve@^5.16.0, enhanced-resolve@^5.7.0: - version "5.16.1" - resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz" - integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== +engine.io@1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/engine.io/-/engine.io-1.3.1.tgz" + integrity sha512-fjnHWC9SLPoygMp6pqwoxmNkDDdYme4eCRTBTZLmEtGZETCpUEgSwoQjSgyj7IyIjqninKRF+2VeEV2kOniUFQ== + dependencies: + base64id "0.1.0" + debug "0.6.0" + engine.io-parser "1.0.6" + ws "0.4.31" + +enhanced-resolve@^5.12.0, enhanced-resolve@^5.17.1, enhanced-resolve@^5.7.0: + version "5.17.1" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -5362,6 +5655,14 @@ error-stack-parser@^2.0.6: dependencies: stackframe "^1.3.4" +errorhandler@1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/errorhandler/-/errorhandler-1.1.1.tgz" + integrity sha512-nqVAii3wDkiowAVKDmcuwKOQ/5vsg9GfCcJxSMHgy8yiZUA3mMDpBcHnCVolDYgQ7wsC2yZQVOavR5fGHhFMkg== + dependencies: + accepts "~1.0.4" + escape-html "1.0.1" + es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: version "1.23.3" resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz" @@ -5544,6 +5845,11 @@ escape-html@~1.0.3: resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== +escape-html@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz" + integrity sha512-z6kAnok8fqVTra7Yu77dZF2Y6ETJlxH58wN38wNyuNQLm8xXdKnfNrlSmfXsTePWP03rRVUKHubtUwanwUi7+g== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" @@ -5934,6 +6240,34 @@ express@^4.17.3, express@^4.19.2: utils-merge "1.0.1" vary "~1.1.2" +express@4.6.1: + version "4.6.1" + resolved "https://registry.npmjs.org/express/-/express-4.6.1.tgz" + integrity sha512-nG9Y8xfzgrW/9XCr5sv+KDbtY8mZPN9HO3GziltaubpvleI+1RyHxAKvYjmFih3HkQIaPXW9ozxMHBDNf3UXng== + dependencies: + accepts "~1.0.7" + buffer-crc32 "0.2.3" + cookie "0.1.2" + cookie-signature "1.0.4" + debug "1.0.3" + depd "0.3.0" + escape-html "1.0.1" + finalhandler "0.0.3" + fresh "0.2.2" + media-typer "0.2.0" + merge-descriptors "0.0.2" + methods "1.1.0" + parseurl "~1.1.3" + path-to-regexp "0.1.3" + proxy-addr "1.0.1" + qs "0.6.6" + range-parser "1.0.0" + send "0.6.0" + serve-static "~1.3.2" + type-is "~1.3.2" + utils-merge "1.0.0" + vary "0.1.0" + extract-zip@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz" @@ -5945,6 +6279,16 @@ extract-zip@2.0.1: optionalDependencies: "@types/yauzl" "^2.9.1" +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + +eyes@0.1.x: + version "0.1.8" + resolved "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -6036,6 +6380,22 @@ filter-obj@^2.0.2: resolved "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz" integrity sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg== +finalhandler@0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.2.tgz" + integrity sha512-SbpQfvWVwWEBlPTQyaM9gs0D5404ENTC0x2jzbb7t+P+EOD/cBlWjAAvfozIQYtOepUuNkxoLNLCK9/kS29f4w== + dependencies: + debug "1.0.2" + escape-html "1.0.1" + +finalhandler@0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.3.tgz" + integrity sha512-/fqgssseNfnD8Y77HWyJKQ+1xbKu7bZl2LXfhFjkgeGg91WRMMO9GN1KKL53NnIG9g1H2Xq3iKrZkuIcAmjd0A== + dependencies: + debug "1.0.3" + escape-html "1.0.1" + finalhandler@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" @@ -6143,6 +6503,13 @@ find-up@^6.3.0: locate-path "^7.1.0" path-exists "^5.0.0" +finished@~1.2.2, finished@1.2.2: + version "1.2.2" + resolved "https://registry.npmjs.org/finished/-/finished-1.2.2.tgz" + integrity sha512-HPJ8x7Gn1pmTS1zWyMoXmQ1yxHkYHRoFsBI66ONq4PS9iWBJy1iHYXOSqMWNp3ksMXfrBpenkSwBhl9WG4zr4Q== + dependencies: + ee-first "1.0.3" + flat-cache@^3.0.4: version "3.2.0" resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" @@ -6208,6 +6575,11 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" +forever-agent@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.2.0.tgz" + integrity sha512-IasWSRIlfPnBZY1K9jEUK3PwsScR4mrcK+aNBJzGoPnW+S9b6f8I8ScyH4cehEOFNqnjGpP2gCaA22gqSV1xQA== + fork-ts-checker-webpack-plugin@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-8.0.0.tgz" @@ -6235,6 +6607,15 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@~0.0.3: + version "0.0.10" + resolved "https://registry.npmjs.org/form-data/-/form-data-0.0.10.tgz" + integrity sha512-Z9/PpT/agxXi80nMpOH6GFD7XOr6mwk5aWMxDt/KMY+Nm7e4FnRMjddM4/mLPJhpmp6alY1F/1JQpRE6z07xng== + dependencies: + async "~0.2.7" + combined-stream "~0.0.4" + mime "~1.2.2" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" @@ -6252,6 +6633,11 @@ framer-motion@^11.2.12, framer-motion@>=10.17.0: dependencies: tslib "^2.4.0" +fresh@0.2.2: + version "0.2.2" + resolved "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz" + integrity sha512-ZGGi8GROK//ijm2gB33sUuN9TjN1tC/dvG4Bt4j6IWrVGpMmudUBCxx+Ir7qePsdREfkpQC4FL8W0jeSOsgv1w== + fresh@0.5.2: version "0.5.2" resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" @@ -6521,6 +6907,11 @@ global-prefix@^0.1.4: is-windows "^0.2.0" which "^1.2.12" +"global@https://github.com/component/global/archive/v2.0.1.tar.gz": + version "2.0.1" + resolved "https://github.com/component/global/archive/v2.0.1.tar.gz" + integrity sha512-O91OcV/NbdmQJPHaRu2ekSP7bqFRLWgqSwaJvqHPZHUwmHBagQYTOra29+LnzzG3lZkXH1ANzHzfCxtAPM9HMA== + globals@^11.1.0: version "11.12.0" resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" @@ -6616,6 +7007,20 @@ has-bigints@^1.0.1, has-bigints@^1.0.2: resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== +has-binary-data@0.1.1: + version "0.1.1" + resolved "https://registry.npmjs.org/has-binary-data/-/has-binary-data-0.1.1.tgz" + integrity sha512-XqIrqIgPlA2gxvHKudDsLJt8Xu8B4DvkHyUWGmLWYOAO0rFOL94Ds4NSveSZ1fCjWX22tQgIiRpDKAETex8GCQ== + dependencies: + isarray "0.0.1" + +has-cors@1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz" + integrity sha512-Mxk1ba23PNtB3zPigreijApS3uuH9bhgZkqQtLQj7ydWHsGeb9uOtk4gsK6mZj4rYG6VNS/CT9G1XkYfgItpKg== + dependencies: + global "https://github.com/component/global/archive/v2.0.1.tar.gz" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" @@ -6678,6 +7083,24 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: dependencies: function-bind "^1.1.2" +hawk@~0.10.2: + version "0.10.2" + resolved "https://registry.npmjs.org/hawk/-/hawk-0.10.2.tgz" + integrity sha512-BjpmnZ95odv7KOIsydfNTAxfGOGaVc6xbYL4fozWl45PWjDqskix0LHAekmGkpnrCAI6+AZRvJIXNTAllj+e6w== + dependencies: + boom "0.3.x" + cryptiles "0.1.x" + hoek "0.7.x" + sntp "0.1.x" + +hbo-dnsd@0.9.8: + version "0.9.8" + resolved "https://registry.npmjs.org/hbo-dnsd/-/hbo-dnsd-0.9.8.tgz" + integrity sha512-mIj4V7OicuAlnSfvTXopd401Ba7eFFSL2L3EmM1NqlIWe1pJ/x9dyHqfnKXnJr5qSbNFLnadXvwNd3kURNy+ug== + dependencies: + defaultable "~0.7.2" + optimist "~0.3.4" + he@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" @@ -6692,6 +7115,16 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hoek@0.4.x: + version "0.4.2" + resolved "https://registry.npmjs.org/hoek/-/hoek-0.4.2.tgz" + integrity sha512-Yj/N2TCrS0d8jvZgUpq9sDNt8/ABwTxPJW4+8QT0KXCMxOtRfUCUTEZEYyvMSgfDT3MGvwgO+NHfWPobagAIug== + +hoek@0.7.x: + version "0.7.6" + resolved "https://registry.npmjs.org/hoek/-/hoek-0.7.6.tgz" + integrity sha512-z75muWk69yyjWn6nNzJP0pnfgcewtSTs7uBolGUA7kWNdCYZukzHn3sYqUirhXul7qp9WBUwNT/7ieJZNveJqg== + hoist-non-react-statics@^3.3.1: version "3.3.2" resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" @@ -6825,6 +7258,11 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@0.4.4: + version "0.4.4" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.4.tgz" + integrity sha512-BnjNp13aZpK4WBGbmjaNHN2MCp3P850n8zd/JLinQJ8Lsnq2Br4o2467C2waMsY5kr7Z41SL1gEqh8Vbfzg15A== + icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz" @@ -6873,6 +7311,11 @@ indent-string@^4.0.0: resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" + integrity sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" @@ -6933,11 +7376,16 @@ ip-address@^9.0.5: jsbn "1.1.0" sprintf-js "^1.1.3" -ipaddr.js@1.9.1: +"ipaddr.js@>= 0.1.1", ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== +ipaddr.js@0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.2.tgz" + integrity sha512-MGrEjHz4Hk5UVpJXZQ2tHB+bp6xgdRKCAEWdrgFsoAmXCgKAPtj8LqMxgvlWEAj9aN+PpTcvE051uZU3K3kLSQ== + is-arguments@^1.0.4, is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz" @@ -7203,6 +7651,11 @@ isarray@~1.0.0: resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -7801,6 +8254,16 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stringify-safe@~3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-3.0.0.tgz" + integrity sha512-VSSuxEAawKLYlCabQOR7YDijQ69zPqQBOriUuCgNhlAqtU7RPr41gPpaSs6WkEu+ZOtUequpXWbI51CS+Z/gMQ== + +json3@3.2.6: + version "3.2.6" + resolved "https://registry.npmjs.org/json3/-/json3-3.2.6.tgz" + integrity sha512-KA+GHhYTLTo7Ri4DyjwUgW8kn98AYtVZtBC94qL5yD0ZSYct8/eF8qBmTNyk+gPE578bKeIL4WBq+MUyd1I26g== + json5@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" @@ -8136,6 +8599,11 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +media-typer@0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.2.0.tgz" + integrity sha512-TSggxYk75oP4tae7JkT8InpcFGUP4340zg1dOWjcu9qcphaDKtXEuNUv3OD4vJ+gVTvIDK797W0uYeNm8qqsDg== + media-typer@0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" @@ -8160,6 +8628,11 @@ memoizerific@^1.11.3: dependencies: map-or-similar "^1.5.0" +merge-descriptors@0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz" + integrity sha512-dYBT4Ep+t/qnPeJcnMymmhTdd4g8/hn48ciaDqLAkfRf8abzLPS6Rb6EBdz5CZCL8tzZuI5ps9MhGQGxk+EuKg== + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" @@ -8180,6 +8653,11 @@ methods@~1.1.2: resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== +methods@1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/methods/-/methods-1.1.0.tgz" + integrity sha512-Th88HxNePtsAmz0WjEhVVyRGv9AQFLv4z6zOj4Dt15PjsKLWB8JXSmxzP+Q27139+AXao0AlCWvonFuJhu4GuA== + micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.8" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" @@ -8208,6 +8686,21 @@ mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.24, dependencies: mime-db "1.52.0" +mime-types@~1.0.0, mime-types@~1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz" + integrity sha512-echfutj/t5SoTL4WZpqjA1DCud1XO0WQF3/GJ48YBmc4ZMhCK77QA6Z/w6VTQERLKuJ4drze3kw2TUT8xZXVNw== + +mime@~1.2.2, mime@~1.2.7: + version "1.2.11" + resolved "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz" + integrity sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw== + +mime@1.2.11: + version "1.2.11" + resolved "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz" + integrity sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw== + mime@1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" @@ -8321,11 +8814,26 @@ mlly@^1.7.1: pkg-types "^1.1.1" ufo "^1.5.3" +morgan@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/morgan/-/morgan-1.2.0.tgz" + integrity sha512-VrasIzA69dsxJm1+MVWTLTiij3kiG33XPfGiexqstHpcSvSu/Z51W+FGQyIlbc3jZZuF2PFujsjw+YQvpXz3UA== + dependencies: + basic-auth "1.0.0" + bytes "1.0.0" + depd "0.4.2" + finished "~1.2.2" + ms@^2.1.1, ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@0.6.2: + version "0.6.2" + resolved "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz" + integrity sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A== + ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" @@ -8345,16 +8853,51 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" +nan@~0.3.0: + version "0.3.2" + resolved "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz" + integrity sha512-V9/Pyy5Oelv6vVJP9X+dAzU3IO19j6YXrJnODHxP2h54hTvfFQGahdsQV6Ule/UukiEJk1SkQ/aUyWUm61RBQw== + nanoid@^3.3.6, nanoid@^3.3.7: version "3.3.7" resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +"native-dns-cache@>= 0.0.1": + version "0.0.2" + resolved "https://registry.npmjs.org/native-dns-cache/-/native-dns-cache-0.0.2.tgz" + integrity sha512-09HXHdb/updxfigaFbR53F8nCKqxM8WuHfTWBsusVlwSSZZ3qwWRdD6Kx2x8HBI1Q5IaycwcJOvBoXZWJNfVEg== + dependencies: + binaryheap ">= 0.0.3" + native-dns-packet ">= 0.0.1" + +"native-dns-packet@>= 0.0.1", "native-dns-packet@>= 0.0.4": + version "0.1.1" + resolved "https://registry.npmjs.org/native-dns-packet/-/native-dns-packet-0.1.1.tgz" + integrity sha512-j1XxnFFTUB7mujma468WyAOmyVtkuuLTelxJF13tSTIPO56X7bHALrG0G4jFQnvyTPCt4VnFiZezWpfKbaHc+g== + dependencies: + buffercursor ">= 0.0.12" + ipaddr.js ">= 0.1.1" + +native-dns@0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/native-dns/-/native-dns-0.6.1.tgz" + integrity sha512-svX0dstdoFeEO1sD1Kkrrj/Ad7QfHuczp2YpRnBpjJHqh0dpYLZhLERbf76S6LMkLAT5eZ8tJrPwZciIX5pj6Q== + dependencies: + ipaddr.js ">= 0.1.1" + native-dns-cache ">= 0.0.1" + native-dns-packet ">= 0.0.4" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +negotiator@0.4.7: + version "0.4.7" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.4.7.tgz" + integrity sha512-ujxWwyRfZ6udAgHGECQC3JDO9e6UAsuItfUMcqA0Xf2OLNQTveFVFx+fHGIJ5p0MJaJrZyGQqPwzuN0NxJzEKA== + negotiator@0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" @@ -8457,6 +9000,11 @@ node-int64@^0.4.0: resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== +node-options@0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/node-options/-/node-options-0.0.6.tgz" + integrity sha512-OrfY9+LgcLjoo2oyqxjP3gZLBuNDV1IblF69HGLdbE8JUJxSnl2kB561r41KOMc1GWLspjMSfa9L6+iW4fvYrw== + node-polyfill-webpack-plugin@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/node-polyfill-webpack-plugin/-/node-polyfill-webpack-plugin-2.0.1.tgz" @@ -8493,6 +9041,11 @@ node-releases@^2.0.14: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-uuid@~1.4.0: + version "1.4.8" + resolved "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz" + integrity sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA== + nopt@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" @@ -8553,6 +9106,11 @@ nypm@^0.3.8: pkg-types "^1.1.1" ufo "^1.5.3" +oauth-sign@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.2.0.tgz" + integrity sha512-4DtiD64CwPJ5vZ636j/KtM7DxWbX1KlkqwbqbEAxI3BCpBrQdrKOv8vC/36U6gfm1CVapy6QmcVxPnXPPQApTA== + oauth@^0.9.15: version "0.9.15" resolved "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz" @@ -8563,6 +9121,11 @@ object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.1: resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== +object-component@0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz" + integrity sha512-S0sN3agnVh2SZNEIGc0N1X4Z5K0JeFbGBrnuZpsxuUh5XLF0BnvWkMjRXo/zGKLd/eghvNIKcx1pQkmUjXIyrA== + object-hash@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz" @@ -8700,6 +9263,13 @@ openid-client@^5.4.0: object-hash "^2.2.0" oidc-token-hash "^5.0.3" +optimist@~0.3.4: + version "0.3.7" + resolved "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz" + integrity sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ== + dependencies: + wordwrap "~0.0.2" + optionator@^0.9.3: version "0.9.4" resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" @@ -8712,6 +9282,11 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.npmjs.org/options/-/options-0.0.6.tgz" + integrity sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg== + ora@^5.4.1: version "5.4.1" resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz" @@ -8874,6 +9449,32 @@ parse-passwd@^1.0.0: resolved "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== +parsejson@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz" + integrity sha512-W9CRvTfYQY/kbRc5Q6YTWarb/QDxdEGbd6RCP8CLUQDJV89RVHoS2A0dZYNtAcq31fulGNN4ZhAhiQQazwlKJg== + dependencies: + better-assert "~1.0.0" + +parseqs@0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz" + integrity sha512-vyyyfQGUFZnDhgrrdn+hh1JuOfvbXU5oRr6dijfkSIbaFuxGgTSCA/RNVcsADmo0k2NX6wERVTMKkXokjuObJA== + dependencies: + better-assert "~1.0.0" + +parseuri@0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz" + integrity sha512-m0H+R0u5LXOx8sbxufnvgKrRLpkVpvtMf0AyWXYSqLwo2MWrVEgCIbgpaSVa398xl6wTLe0A7CGhiC4hBdEzHQ== + dependencies: + better-assert "~1.0.0" + +parseurl@~1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.1.3.tgz" + integrity sha512-7y9IL/9x2suvr1uIvoAc3yv3f28hZ55g2OM+ybEtnZqV6Ykeg36sy1PCsTN9rQUZYzb9lTKLzzmJM11jaXSloA== + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" @@ -8935,6 +9536,11 @@ path-scurry@^1.10.1, path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-to-regexp@0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz" + integrity sha512-sd4vSOW+DCM6A5aRICI1CWaC7nufnzVpZfuh5T0VXshxxzFWuaFcvqKovAFLNGReOc+uZRptpcpPmn7CDvzLuA== + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" @@ -9045,6 +9651,11 @@ pkg-types@^1.1.1: mlly "^1.7.1" pathe "^1.1.2" +pkginfo@0.3.x: + version "0.3.1" + resolved "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz" + integrity sha512-yO5feByMzAp96LtP58wvPKSbaKAi/1C4kV9XpTctr6EepnP6F33RBNOiVrdz9BrPA98U2BMFsTNHo44TWcbQ2A== + pngjs@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz" @@ -9276,6 +9887,13 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-addr@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.1.tgz" + integrity sha512-rIUGzBlSfkJMWWCgsd4N5wvVSNAcJZg//UwPZumDIbScHRUzuSOjBmIdyICiKkB9yArv+er9qC6RA/NL3AWc6A== + dependencies: + ipaddr.js "0.1.2" + proxy-agent@6.4.0: version "6.4.0" resolved "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz" @@ -9380,6 +9998,16 @@ qs@^6.10.0, qs@^6.11.2: dependencies: side-channel "^1.0.6" +qs@~0.5.4: + version "0.5.6" + resolved "https://registry.npmjs.org/qs/-/qs-0.5.6.tgz" + integrity sha512-KbOrQrP5Ye+0gmq+hwxoJwAFRwExACWqwxj1IDFFgqOw9Poxy3wwSbafd9ZqP6T6ykMfnxM573kt/a4i9ybatQ== + +qs@0.6.6: + version "0.6.6" + resolved "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz" + integrity sha512-kN+yNdAf29Jgp+AYHUmC7X4QdJPR8czuMWLNLc0aRxkQ7tB3vJQEONKKT9ou/rW7EbqVec11srC9q9BiVbcnHA== + qs@6.11.0: version "6.11.0" resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz" @@ -9434,6 +10062,19 @@ range-parser@^1.2.1, range-parser@~1.2.1: resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== +range-parser@~1.0.0, range-parser@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.0.0.tgz" + integrity sha512-wOH5LIH2ZHo0P7/bwkR+aNbJ+kv3CHVX4B8qs9GqbtY29fi1bGPV5xczrutN20G+Z4XhRqRMTW3q0S4iyJJPfw== + +raw-body@1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-1.3.0.tgz" + integrity sha512-iuI1bOSi9tEmVCrXq02ZysXatTrhAu+fSo7XOQHhMo4g87dSy9YB2W/9Udwhz0bPpFk4UcoLhjrHgpPbRD3ktA== + dependencies: + bytes "1" + iconv-lite "0.4.4" + raw-body@2.5.2: version "2.5.2" resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz" @@ -9547,6 +10188,14 @@ react-onclickoutside@^6.13.0: resolved "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.13.1.tgz" integrity sha512-LdrrxK/Yh9zbBQdFbMTXPp3dTSN9B+9YJQucdDu3JNKRrbdU+H+/TVONJoWtOwy4II8Sqf1y/DTI6w/vGPYW0w== +react-qr-scanner@^1.0.0-alpha.11: + version "1.0.0-alpha.11" + resolved "https://registry.npmjs.org/react-qr-scanner/-/react-qr-scanner-1.0.0-alpha.11.tgz" + integrity sha512-TdaygL+4U9iapskJgK5Ilb1Cw4wwzQ3bVpIfzzbrEsxPaEJzmjQ7VuMz8E9hBQGCU4Ee+YtgglE3byEtgtRpkA== + dependencies: + "@zxing/library" "^0.19.1" + prop-types "^15.8.1" + react-refresh@^0.14.0, "react-refresh@>=0.10.0 <1.0.0": version "0.14.2" resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz" @@ -9761,6 +10410,23 @@ renderkid@^3.0.0: lodash "^4.17.21" strip-ansi "^6.0.1" +request@2.16.x: + version "2.16.6" + resolved "https://registry.npmjs.org/request/-/request-2.16.6.tgz" + integrity sha512-TfD4kMo40kwuOpO7GYfAZpb2wYdw7yvTIglPNgPPSmp2Fz6MKNvPLla40FQ/ypdhy6B2jRNz3VlCjPD6mnzsmA== + dependencies: + aws-sign "~0.2.0" + cookie-jar "~0.2.0" + forever-agent "~0.2.0" + form-data "~0.0.3" + hawk "~0.10.2" + json-stringify-safe "~3.0.0" + mime "~1.2.7" + node-uuid "~1.4.0" + oauth-sign "~0.2.0" + qs "~0.5.4" + tunnel-agent "~0.2.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" @@ -10013,6 +10679,20 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" +send@0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/send/-/send-0.6.0.tgz" + integrity sha512-A3EwHmDwcPcmLxIRNjr2YbXiYWq6M9JyUq4303pLKVFs4m5oeME0a9Cpcu9N22fED5XVepldjPYGo9eJifb7Yg== + dependencies: + debug "1.0.3" + depd "0.3.0" + escape-html "1.0.1" + finished "1.2.2" + fresh "0.2.2" + mime "1.2.11" + ms "0.6.2" + range-parser "~1.0.0" + serialize-javascript@^6.0.1: version "6.0.2" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" @@ -10020,6 +10700,15 @@ serialize-javascript@^6.0.1: dependencies: randombytes "^2.1.0" +serve-static@~1.3.2: + version "1.3.2" + resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.3.2.tgz" + integrity sha512-KwjCeYUx7IM1neg8/P0+O1DZsl76XcOSuV0ZxrI0r60vwGlcjMjKOYCK/OFLJy/a2CFuIyAa/x0PuQ0yuG+IgQ== + dependencies: + escape-html "1.0.1" + parseurl "~1.1.3" + send "0.6.0" + serve-static@1.15.0: version "1.15.0" resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" @@ -10185,6 +10874,13 @@ smart-buffer@^4.2.0: resolved "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== +sntp@0.1.x: + version "0.1.2" + resolved "https://registry.npmjs.org/sntp/-/sntp-0.1.2.tgz" + integrity sha512-6fsOpJYQAQcO/UeW7T9mJwEenJymdU77o+gNiompGAammlSa+C49Oyt79ta/kgVbT13l4JAuKlo8FNvUnVjvEQ== + dependencies: + hoek "0.4.x" + socket.io-adapter@~2.5.2: version "2.5.5" resolved "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz" @@ -10193,6 +10889,14 @@ socket.io-adapter@~2.5.2: debug "~4.3.4" ws "~8.17.1" +socket.io-adapter@0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.2.0.tgz" + integrity sha512-3PlX+MOlpHiY+ZTbKhpE4i+M4u8hFUlVyqFP4K/mH+t+D9bMKATFqUUY3zWQMEo2g/1ckosURXviQw6M8R/y8A== + dependencies: + debug "0.7.4" + socket.io-parser "2.1.2" + socket.io-client@*, socket.io-client@^4.7.5: version "4.7.5" resolved "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.5.tgz" @@ -10203,6 +10907,22 @@ socket.io-client@*, socket.io-client@^4.7.5: engine.io-client "~6.5.2" socket.io-parser "~4.2.4" +socket.io-client@1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.0.6.tgz" + integrity sha512-itdtz6fQBTFIDBP4+hJox0OlT+SbCVdENjPgjMup3ehu7OsiG6t0FYBXCx+k/upt9lbeyp9BmUNNi5EfnGa5Vw== + dependencies: + component-bind "1.0.0" + component-emitter "1.1.2" + debug "0.7.4" + engine.io-client "1.3.1" + has-binary-data "0.1.1" + indexof "0.0.1" + object-component "0.0.3" + parseuri "0.0.2" + socket.io-parser "2.2.0" + to-array "0.1.3" + socket.io-parser@~4.2.4: version "4.2.4" resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz" @@ -10211,6 +10931,26 @@ socket.io-parser@~4.2.4: "@socket.io/component-emitter" "~3.1.0" debug "~4.3.1" +socket.io-parser@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.1.2.tgz" + integrity sha512-eVkt8prgw20H+4P8Iw6tis/w7leiN5EW/93Vq+KL8w+yNJu+QNgaej2Cgt8FhVCVuN3AHyLU50vXvM8cpUR1JQ== + dependencies: + debug "0.7.4" + emitter "http://github.com/component/emitter/archive/1.0.1.tar.gz" + isarray "0.0.1" + json3 "3.2.6" + +socket.io-parser@2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.0.tgz" + integrity sha512-uW3UiLVibAyleKq8r/yZe1oPO51olhY18T6HtnN0iI6RLqJfYC0YiyAFlsPw1+8I0Z1qFd8jFLTRZo2vr6ISxA== + dependencies: + debug "0.7.4" + emitter "http://github.com/component/emitter/archive/1.0.1.tar.gz" + isarray "0.0.1" + json3 "3.2.6" + socket.io@*, socket.io@^4.7.5: version "4.7.5" resolved "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz" @@ -10224,6 +10964,18 @@ socket.io@*, socket.io@^4.7.5: socket.io-adapter "~2.5.2" socket.io-parser "~4.2.4" +socket.io@1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/socket.io/-/socket.io-1.0.6.tgz" + integrity sha512-1x7TkMh8aKfLoXuXe5rXnDnv3xfcOFrDM6hR9z15dpZ83tTxt2NUxnpuGL2zMIAJQ4DitKiadEBvBVju5cxcHw== + dependencies: + debug "0.7.4" + engine.io "1.3.1" + has-binary-data "0.1.1" + socket.io-adapter "0.2.0" + socket.io-client "1.0.6" + socket.io-parser "2.2.0" + socks-proxy-agent@^8.0.2: version "8.0.3" resolved "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz" @@ -10307,6 +11059,11 @@ sprintf-js@~1.0.2: resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz" + integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== + stack-utils@^2.0.3: version "2.0.6" resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" @@ -10882,6 +11639,11 @@ tiny-invariant@^1.3.1, tiny-invariant@^1.3.3: resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz" integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== +tinycolor@0.x: + version "0.0.1" + resolved "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz" + integrity sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg== + tinyspy@^2.2.0: version "2.2.1" resolved "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz" @@ -10892,6 +11654,11 @@ tmpl@1.0.5: resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== +to-array@0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz" + integrity sha512-JQk/QMS4oHyU2VufVeyjN25dcnZnr1PV1pa1oKSj7l5tVO9WrU62og3fYzB3mrgJZZgBxdrrA/v6iZzMDuyFYw== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" @@ -10909,6 +11676,25 @@ toidentifier@1.0.1: resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +tomahawk-plugin-kv-memory-store@0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tomahawk-plugin-kv-memory-store/-/tomahawk-plugin-kv-memory-store-0.0.3.tgz" + integrity sha512-opt82r6s+775jmrREiWruMVTQaGQYgPd6/zYTDRwwHhDGSqpFaZZgCSnI/BAIs8nC88puTK4PyodkSRpUDp/2Q== + +tomahawk@0.1.6: + version "0.1.6" + resolved "https://registry.npmjs.org/tomahawk/-/tomahawk-0.1.6.tgz" + integrity sha512-HFLoewTx2gHD0o2t0tR+EIcDXhqdtakfZCDiYsGjOO93nYQ1i7nbhj3UL7iQdtoBbPAcEbrxeJ0KlfPOvhxFyg== + dependencies: + body-parser "1.5.0" + connect "3.0.2" + errorhandler "1.1.1" + express "4.6.1" + morgan "1.2.0" + node-options "0.0.6" + socket.io "1.0.6" + winston "0.7.3" + toposort@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz" @@ -10929,6 +11715,11 @@ ts-api-utils@^1.0.1: resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== +ts-custom-error@^3.2.1: + version "3.3.1" + resolved "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz" + integrity sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A== + ts-dedent@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz" @@ -11020,6 +11811,11 @@ tty-browserify@^0.0.1: resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz" integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== +tunnel-agent@~0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.2.0.tgz" + integrity sha512-PXy4q1PH88BK0pcGOEMXFAslyBuRWz1wxLfPXTlYFd41eyUgjOALaVGbWJN1ymjbnBzjWunVSKmrrMMh8oLaZA== + tween-functions@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz" @@ -11062,6 +11858,14 @@ type-fest@^2.12.2, type-fest@^2.14.0, type-fest@^2.19.0, "type-fest@>=0.17.0 <5. resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== +type-is@~1.3.2: + version "1.3.2" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.3.2.tgz" + integrity sha512-sdIhnvhWEyIP2DKjj1o9tL31m8vFxDfLPD56KXz2absqY5AF2QYkJC7Wrw2fkzsZA9mv+PCtgyB7EqYOgR+r3Q== + dependencies: + media-typer "0.2.0" + mime-types "~1.0.1" + type-is@~1.6.18: version "1.6.18" resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" @@ -11244,6 +12048,11 @@ use-sound@^4.0.1: dependencies: howler "^2.1.3" +utf8@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz" + integrity sha512-jWXHr+bQ8RsWazLzVY3V7XACPTbBHYSg/VoDVok+DBQk5ULm0AuBCNb9tGmjq2H+znnkBFwjhzzCbn9G3xlYcA== + util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" @@ -11265,6 +12074,11 @@ utila@~0.4: resolved "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz" integrity sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA== +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" + integrity sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ== + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" @@ -11301,6 +12115,20 @@ vary@^1, vary@~1.1.2: resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== +vary@0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/vary/-/vary-0.1.0.tgz" + integrity sha512-tyyeG46NQdwyVP/RsWLSrT78ouwEuvwk9gK8vQK4jdXmqoXtTXW+vsCfNcnqRhigF8olV34QVZarmAi6wBV2Mw== + +verror@^1.4.0: + version "1.10.1" + resolved "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz" + integrity sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg== + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + vm-browserify@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz" @@ -11380,20 +12208,19 @@ webpack-virtual-modules@^0.5.0: integrity sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw== webpack@^5.0.0, webpack@^5.1.0, webpack@^5.11.0, webpack@^5.20.0, "webpack@>= 4", "webpack@>=4.43.0 <6.0.0", webpack@>=5, webpack@5: - version "5.91.0" - resolved "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz" - integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== + version "5.94.0" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz" + integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== dependencies: - "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.5" "@webassemblyjs/ast" "^1.12.1" "@webassemblyjs/wasm-edit" "^1.12.1" "@webassemblyjs/wasm-parser" "^1.12.1" acorn "^8.7.1" - acorn-import-assertions "^1.9.0" + acorn-import-attributes "^1.9.5" browserslist "^4.21.10" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.16.0" + enhanced-resolve "^5.17.1" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" @@ -11498,6 +12325,19 @@ wide-align@^1.1.2: dependencies: string-width "^1.0.2 || 2 || 3 || 4" +winston@0.7.3: + version "0.7.3" + resolved "https://registry.npmjs.org/winston/-/winston-0.7.3.tgz" + integrity sha512-iVTT8tf9YnTyfZX+aEUj2fl6WBRet7za6vdjMeyF8SA80Vii2rreM5XH+5qmpBV9uJGj8jz8BozvTDcroVq/eA== + dependencies: + async "0.2.x" + colors "0.6.x" + cycle "1.0.x" + eyes "0.1.x" + pkginfo "0.3.x" + request "2.16.x" + stack-trace "0.0.x" + word-wrap@^1.2.5: version "1.2.5" resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" @@ -11508,6 +12348,11 @@ wordwrap@^1.0.0: resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + integrity sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw== + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" @@ -11571,11 +12416,26 @@ ws@^8.17.1, ws@^8.2.3, ws@~8.17.1: resolved "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== +ws@0.4.31: + version "0.4.31" + resolved "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz" + integrity sha512-mWiVQ9qZGPXvLxQ4xGy58Ix5Bw0L99SB+hDT8L59bty4fbnQczaGl4YEWR7AzLQGbvPn/30r9/o41dPiSuUmYw== + dependencies: + commander "~0.6.1" + nan "~0.3.0" + options ">=0.0.5" + tinycolor "0.x" + xmlhttprequest-ssl@~2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== +"xmlhttprequest@https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz": + version "1.5.0" + resolved "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz" + integrity sha512-TVSZwoeUQ7OKhb8jnQdSxGFz+lm4MGWmhG0deeYg85VQT74x5LcSrKeXHE0ZIzEycgqQ5mF8r8e1AykA7TpNAQ== + xtend@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz"