From 15ac981b63c49bcc83341350dc85b6a037dfbca7 Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 13:22:29 +0200 Subject: [PATCH 01/10] Run e2e test against integration api endpoint --- .github/workflows/e2e.yml | 27 -------------- .github/workflows/test.yml | 43 +++++++++++++++++++---- examples/starknet-react-next/package.json | 3 +- package.json | 13 +++++-- packages/keychain/package.json | 1 + pnpm-lock.yaml | 42 +++++++++++----------- turbo.json | 5 +++ 7 files changed, 75 insertions(+), 59 deletions(-) delete mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 10d2ec42c..000000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,27 +0,0 @@ -# name: End-to-End tests -# on: -# push: -# branches: [main] -# pull_request: -# branches: [main] -# jobs: -# test: -# timeout-minutes: 60 -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-node@v4 -# with: -# node-version: lts/* -# - name: Install dependencies -# run: npm install -g pnpm && pnpm install -# - name: Install Playwright Browsers -# run: pnpm exec playwright install --with-deps -# - name: Run Playwright tests -# run: pnpm exec playwright test -# - uses: actions/upload-artifact@v4 -# if: always() -# with: -# name: playwright-report -# path: playwright-report/ -# retention-days: 30 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd68067a4..2e4cea9b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,8 +28,33 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} files: lcov.info - - ts: + # ts: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v4 + # with: + # node-version: 20.x + # - uses: actions/cache@v4 + # with: + # path: ~/.pnpm-store + # key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + # restore-keys: | + # ${{ runner.os }}-pnpm- + # - run: corepack enable pnpm + # - uses: pnpm/action-setup@v4 + # id: pnpm-install + # with: + # version: 9.7.0 + # run_install: false + # - run: pnpm install --frozen-lockfile + # - run: pnpm test:ci --coverage + # - uses: codecov/codecov-action@v3 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} + # files: coverage/lcov.info + e2e: + timeout-minutes: 60 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -42,15 +67,19 @@ jobs: key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm- - - run: corepack enable pnpm - uses: pnpm/action-setup@v4 id: pnpm-install with: version: 9.7.0 run_install: false - run: pnpm install --frozen-lockfile - - run: pnpm test:ci --coverage - - uses: codecov/codecov-action@v3 + - name: Install Playwright Browsers + run: pnpm example:next playwright install --with-deps + - name: Run Playwright tests + run: pnpm e2e:ci + - uses: actions/upload-artifact@v4 + if: always() with: - token: ${{ secrets.CODECOV_TOKEN }} - files: coverage/lcov.info + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/examples/starknet-react-next/package.json b/examples/starknet-react-next/package.json index c447ad95a..75a83744c 100644 --- a/examples/starknet-react-next/package.json +++ b/examples/starknet-react-next/package.json @@ -4,9 +4,10 @@ "version": "0.3.41", "scripts": { "dev": "next dev -p 3002", + "dev:ci": "pnpm dev", "build": "next build", "e2e": "playwright test", - "e2e:ui": "playwright test --ui", + "e2e:ui": "pnpm e2e --ui", "start": "next start -p 3002", "lint": "next lint", "format": "prettier --write ./src", diff --git a/package.json b/package.json index 85b2beabe..ffd2ec4b6 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,20 @@ "private": true, "scripts": { "preinstall": "npx only-allow pnpm", +<<<<<<< HEAD "build": "turbo build:deps build", "dev": "turbo build:deps dev", "e2e": "turbo build:deps dev e2e", "e2e:ui": "turbo build:deps dev e2e:ui", "lint": "turbo lint format:check", +======= + "build": "turbo build", + "dev": "turbo dev", + "e2e": "turbo dev e2e", + "e2e:ui": "turbo dev e2e:ui", + "e2e:ci": "turbo dev:ci e2e", + "lint": "turbo lint", +>>>>>>> 7a42470e (Run e2e test against integration api endpoint) "format": "turbo format", "clean": "git clean -xdf && pnpm store prune", "release": "pnpm build && pnpm changeset publish", @@ -19,9 +28,7 @@ "book": "pnpm --filter @cartridge/docs", "ui": "pnpm --filter @cartridge/ui", "ui:next": "pnpm --filter @cartridge/ui-next", - "example:next": "pnpm --filter starknet-react-next", - "test": "pnpm keychain test", - "test:ci": "pnpm keychain test:ci" + "example:next": "pnpm --filter starknet-react-next" }, "devDependencies": { "@changesets/changelog-github": "^0.4.2", diff --git a/packages/keychain/package.json b/packages/keychain/package.json index 714fd717e..ca0b0e9d7 100644 --- a/packages/keychain/package.json +++ b/packages/keychain/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "TARGET_ORIGIN=\"*\" next dev -p 3001", + "dev:ci": "TARGET_ORIGIN=\"*\" NEXT_PUBLIC_API_URL=\"https://integration.cartridge.gg/\" next dev -p 3001", "build": "TARGET_ORIGIN=\"https://x.cartridge.gg/\" next build", "start": "next start", "lint": "next lint", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b07e4bc6..aad200b45 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16250,7 +16250,7 @@ snapshots: '@graphql-tools/optimize@1.4.0(graphql@16.8.1)': dependencies: graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 '@graphql-tools/prisma-loader@7.2.72(@types/node@20.12.7)(bufferutil@4.0.8)(graphql@16.8.1)(utf-8-validate@5.0.10)': dependencies: @@ -16285,7 +16285,7 @@ snapshots: '@ardatan/relay-compiler': 12.0.0(graphql@16.8.1) '@graphql-tools/utils': 9.2.1(graphql@16.8.1) graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 transitivePeerDependencies: - encoding - supports-color @@ -16323,7 +16323,7 @@ snapshots: '@graphql-tools/utils@8.13.1(graphql@16.8.1)': dependencies: graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 '@graphql-tools/utils@9.2.1(graphql@16.8.1)': dependencies: @@ -21671,7 +21671,7 @@ snapshots: capital-case@1.0.4: dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 upper-case-first: 2.0.2 cardinal@2.1.1: @@ -21768,7 +21768,7 @@ snapshots: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 char-regex@1.0.2: {} @@ -22028,7 +22028,7 @@ snapshots: constant-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 upper-case: 2.0.2 constants-browserify@1.0.0: {} @@ -23961,7 +23961,7 @@ snapshots: graphql-tag@2.12.6(graphql@16.8.1): dependencies: graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 graphql-ws@5.12.1(graphql@16.8.1): dependencies: @@ -24124,7 +24124,7 @@ snapshots: header-case@2.0.4: dependencies: capital-case: 1.0.4 - tslib: 2.4.1 + tslib: 2.6.2 hey-listen@1.0.8: {} @@ -24520,7 +24520,7 @@ snapshots: is-lower-case@2.0.2: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 is-map@2.0.3: {} @@ -24610,7 +24610,7 @@ snapshots: is-upper-case@2.0.2: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 is-weakmap@2.0.2: {} @@ -25446,11 +25446,11 @@ snapshots: lower-case-first@2.0.2: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 lower-case@2.0.2: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 lowercase-keys@1.0.1: {} @@ -25815,7 +25815,7 @@ snapshots: no-case@3.0.4: dependencies: lower-case: 2.0.2 - tslib: 2.4.1 + tslib: 2.6.2 node-abi@3.62.0: dependencies: @@ -26177,7 +26177,7 @@ snapshots: path-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 path-exists@3.0.0: {} @@ -27564,7 +27564,7 @@ snapshots: sentence-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 upper-case-first: 2.0.2 serialize-javascript@6.0.2: @@ -27739,7 +27739,7 @@ snapshots: snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 sockjs@0.3.24: dependencies: @@ -27830,7 +27830,7 @@ snapshots: sponge-case@1.0.1: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 sprintf-js@1.0.3: {} @@ -28111,7 +28111,7 @@ snapshots: swap-case@2.0.2: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 swc-loader@0.2.6(@swc/core@1.4.17(@swc/helpers@0.5.5))(webpack@5.91.0(@swc/core@1.4.17(@swc/helpers@0.5.5))(esbuild@0.18.20)): dependencies: @@ -28293,7 +28293,7 @@ snapshots: title-case@3.0.3: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 tmp@0.0.33: dependencies: @@ -28755,11 +28755,11 @@ snapshots: upper-case-first@2.0.2: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 upper-case@2.0.2: dependencies: - tslib: 2.4.1 + tslib: 2.6.2 uqr@0.1.2: {} diff --git a/turbo.json b/turbo.json index fd13afa25..12ed99086 100644 --- a/turbo.json +++ b/turbo.json @@ -15,6 +15,11 @@ "dependsOn": ["^build:deps"], "outputs": [".next/**", "!.next/cache/**"] }, + "dev:ci": { + "persistent": true, + "dependsOn": ["^build:deps", "^dev:ci"], + "outputs": [".next/**", "!.next/cache/**"] + }, "lint": {}, "format": {}, "format:check": {}, From 68237310e2bbb38917d7cf4c28a26e397fed8aec Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 13:30:55 +0200 Subject: [PATCH 02/10] Add format check to quality ci workflow --- .github/workflows/quality.yml | 22 ++++++++++++++++++++++ package.json | 1 + 2 files changed, 23 insertions(+) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index b3cfb65c8..940dc9db1 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -65,3 +65,25 @@ jobs: run_install: false - run: pnpm install --frozen-lockfile - run: pnpm lint + + ts-format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20.x + - uses: actions/cache@v4 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + - run: corepack enable pnpm + - uses: pnpm/action-setup@v4 + id: pnpm-install + with: + version: 9.7.0 + run_install: false + - run: pnpm install --frozen-lockfile + - run: pnpm lint diff --git a/package.json b/package.json index ffd2ec4b6..b57285357 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "lint": "turbo lint", >>>>>>> 7a42470e (Run e2e test against integration api endpoint) "format": "turbo format", + "format:check": "turbo format:check", "clean": "git clean -xdf && pnpm store prune", "release": "pnpm build && pnpm changeset publish", "keychain": "pnpm --filter @cartridge/keychain", From 1773901ebef03d385ebd0b023ca28f8eeb5ae341 Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 13:59:13 +0200 Subject: [PATCH 03/10] Install playwright deps on CI --- .github/workflows/test.yml | 2 +- examples/starknet-react-next/package.json | 2 ++ examples/starknet-react-next/tests/connect.spec.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e4cea9b0..d5cc5fa9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: run_install: false - run: pnpm install --frozen-lockfile - name: Install Playwright Browsers - run: pnpm example:next playwright install --with-deps + run: pnpm example:next e2e:deps - name: Run Playwright tests run: pnpm e2e:ci - uses: actions/upload-artifact@v4 diff --git a/examples/starknet-react-next/package.json b/examples/starknet-react-next/package.json index 75a83744c..4240b45c8 100644 --- a/examples/starknet-react-next/package.json +++ b/examples/starknet-react-next/package.json @@ -6,8 +6,10 @@ "dev": "next dev -p 3002", "dev:ci": "pnpm dev", "build": "next build", + "e2e:deps": "npx playwright install --with-deps", "e2e": "playwright test", "e2e:ui": "pnpm e2e --ui", + "e2e:ci": "pnpm e2e", "start": "next start -p 3002", "lint": "next lint", "format": "prettier --write ./src", diff --git a/examples/starknet-react-next/tests/connect.spec.ts b/examples/starknet-react-next/tests/connect.spec.ts index 5d076d204..7cbb5fb71 100644 --- a/examples/starknet-react-next/tests/connect.spec.ts +++ b/examples/starknet-react-next/tests/connect.spec.ts @@ -12,7 +12,7 @@ test.beforeEach(async ({ page }) => { await webauthn.addVirtualAuthenticator(); }); -test("Sign up -> Disconnect -> Log in", async ({ page }) => { +test("Sign up -> Create session -> Disconnect -> Log in", async ({ page }) => { const keychain = new Keychain({ page }); await keychain.signup(); From 91bf940da9e29a1eb08690d43620d2ce7c6255e8 Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 14:14:38 +0200 Subject: [PATCH 04/10] Use playwright's webserver on ci --- .../starknet-react-next/playwright.config.ts | 19 +++++++++++-------- package.json | 3 ++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/examples/starknet-react-next/playwright.config.ts b/examples/starknet-react-next/playwright.config.ts index 463b7ce24..15cde6b26 100644 --- a/examples/starknet-react-next/playwright.config.ts +++ b/examples/starknet-react-next/playwright.config.ts @@ -24,12 +24,15 @@ export default defineConfig({ // use: { ...devices["Desktop Safari"] }, // }, ], - // webServer: { - // command: "pnpm dev", - // cwd: "../..", - // port: 3002, - // reuseExistingServer: !process.env.CI, - // stdout: "pipe", - // stderr: "pipe", - // }, + webServer: process.env.CI + ? { + command: "pnpm dev:ci", + cwd: "../..", + port: 3002, + reuseExistingServer: !process.env.CI, + stdout: "pipe", + stderr: "pipe", + timeout: 1000 * 60, + } + : undefined, }); diff --git a/package.json b/package.json index b57285357..88cc3f8ab 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,10 @@ ======= "build": "turbo build", "dev": "turbo dev", + "dev:ci": "turbo dev:ci", "e2e": "turbo dev e2e", "e2e:ui": "turbo dev e2e:ui", - "e2e:ci": "turbo dev:ci e2e", + "e2e:ci": "turbo e2e", "lint": "turbo lint", >>>>>>> 7a42470e (Run e2e test against integration api endpoint) "format": "turbo format", From cea6ddccf28ef7687940cab1590435193c9ec899 Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 14:37:19 +0200 Subject: [PATCH 05/10] Remove jest from keychain --- examples/starknet-react-next/package.json | 2 - .../starknet-react-next/playwright.config.ts | 2 +- package.json | 1 - packages/keychain/jest.config.js | 21 - packages/keychain/jest.polyfills.js | 6 - packages/keychain/package.json | 4 - pnpm-lock.yaml | 359 ++++-------------- turbo.json | 5 - 8 files changed, 66 insertions(+), 334 deletions(-) delete mode 100644 packages/keychain/jest.config.js delete mode 100644 packages/keychain/jest.polyfills.js diff --git a/examples/starknet-react-next/package.json b/examples/starknet-react-next/package.json index 4240b45c8..7eaebe27d 100644 --- a/examples/starknet-react-next/package.json +++ b/examples/starknet-react-next/package.json @@ -4,12 +4,10 @@ "version": "0.3.41", "scripts": { "dev": "next dev -p 3002", - "dev:ci": "pnpm dev", "build": "next build", "e2e:deps": "npx playwright install --with-deps", "e2e": "playwright test", "e2e:ui": "pnpm e2e --ui", - "e2e:ci": "pnpm e2e", "start": "next start -p 3002", "lint": "next lint", "format": "prettier --write ./src", diff --git a/examples/starknet-react-next/playwright.config.ts b/examples/starknet-react-next/playwright.config.ts index 15cde6b26..be8c7a1c9 100644 --- a/examples/starknet-react-next/playwright.config.ts +++ b/examples/starknet-react-next/playwright.config.ts @@ -7,7 +7,7 @@ export default defineConfig({ retries: process.env.CI ? 2 : 0, reporter: process.env.CI ? "dot" : "list", use: { - baseURL: "http://localhost:3002", + baseURL: process.env.CI ? "" : "http://localhost:3002", trace: "on-first-retry", }, projects: [ diff --git a/package.json b/package.json index 88cc3f8ab..3787ba675 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ ======= "build": "turbo build", "dev": "turbo dev", - "dev:ci": "turbo dev:ci", "e2e": "turbo dev e2e", "e2e:ui": "turbo dev e2e:ui", "e2e:ci": "turbo e2e", diff --git a/packages/keychain/jest.config.js b/packages/keychain/jest.config.js deleted file mode 100644 index ebd8d7081..000000000 --- a/packages/keychain/jest.config.js +++ /dev/null @@ -1,21 +0,0 @@ -// jest.config.js -const nextJest = require("next/jest"); - -const createJestConfig = nextJest({ - // Provide the path to your Next.js app to load next.config.js and .env files in your test environment - dir: "./", -}); - -// Add any custom config to be passed to Jest -/** @type {import('jest').Config} */ -const customJestConfig = { - // Add more setup options before each test is run - // setupFilesAfterEnv: ['/jest.setup.js'], - // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work - moduleDirectories: ["node_modules", "/src"], - testEnvironment: "jest-environment-jsdom", - setupFiles: ["./jest.polyfills.js"], -}; - -// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async -module.exports = createJestConfig(customJestConfig); diff --git a/packages/keychain/jest.polyfills.js b/packages/keychain/jest.polyfills.js deleted file mode 100644 index 7658fe509..000000000 --- a/packages/keychain/jest.polyfills.js +++ /dev/null @@ -1,6 +0,0 @@ -const { TextDecoder, TextEncoder } = require("node:util"); - -Object.defineProperties(globalThis, { - TextDecoder: { value: TextDecoder }, - TextEncoder: { value: TextEncoder }, -}); diff --git a/packages/keychain/package.json b/packages/keychain/package.json index ca0b0e9d7..956256e5a 100644 --- a/packages/keychain/package.json +++ b/packages/keychain/package.json @@ -10,8 +10,6 @@ "lint": "next lint", "format": "prettier --write ./src", "format:check": "prettier --check ./src", - "test": "jest --watch", - "test:ci": "jest --ci", "gen": "graphql-codegen --config codegen.yaml" }, "dependencies": { @@ -63,8 +61,6 @@ "@types/react-dom": "^18.2.7", "eslint": "^8.23.0", "eslint-config-next": "^12.2.5", - "jest": "^29.3.1", - "jest-environment-jsdom": "^29.3.1", "prettier": "^2.7.1", "typescript": "^5.4.5" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aad200b45..df1ac6e18 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -254,7 +254,7 @@ importers: version: 3.0.5 next: specifier: ^13.4.19 - version: 13.5.6(@babel/core@7.24.5)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 13.5.6(@babel/core@7.24.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.2.0 version: 18.3.1 @@ -331,12 +331,6 @@ importers: eslint-config-next: specifier: ^12.2.5 version: 12.3.4(eslint@8.57.0)(typescript@5.4.5) - jest: - specifier: ^29.3.1 - version: 29.7.0(@types/node@20.12.7)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.17(@swc/helpers@0.5.5))(@types/node@20.12.7)(typescript@5.4.5)) - jest-environment-jsdom: - specifier: ^29.3.1 - version: 29.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) prettier: specifier: ^2.7.1 version: 2.8.8 @@ -4943,10 +4937,6 @@ packages: peerDependencies: '@testing-library/dom': '>=7.21.4' - '@tootallnate/once@2.0.0': - resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} - engines: {node: '>= 10'} - '@trysound/sax@0.2.0': resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} @@ -5083,9 +5073,6 @@ packages: '@types/js-yaml@4.0.9': resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} - '@types/jsdom@20.0.1': - resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} - '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -5212,9 +5199,6 @@ packages: '@types/testing-library__jest-dom@5.14.9': resolution: {integrity: sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw==} - '@types/tough-cookie@4.0.5': - resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} @@ -5616,10 +5600,6 @@ packages: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true - abab@2.0.6: - resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} - deprecated: Use your platform's native atob() and btoa() methods instead - abi-wan-kanabi@2.2.2: resolution: {integrity: sha512-sTCv2HyNIj1x2WFUoc9oL8ZT9liosrL+GoqEGZJK1kDND096CfA7lwx06vLxLWMocQ41FQXO3oliwoh/UZHYdQ==} hasBin: true @@ -5652,9 +5632,6 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} - acorn-globals@7.0.1: - resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} - acorn-import-assertions@1.9.0: resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} peerDependencies: @@ -5698,10 +5675,6 @@ packages: resolution: {integrity: sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==} engines: {node: '>= 6.0.0'} - agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} @@ -6813,16 +6786,6 @@ packages: resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==} engines: {node: '>=8.0.0'} - cssom@0.3.8: - resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} - - cssom@0.5.0: - resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - - cssstyle@2.3.0: - resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} - engines: {node: '>=8'} - csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -6846,10 +6809,6 @@ packages: resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} - data-urls@3.0.2: - resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} - engines: {node: '>=12'} - data-view-buffer@1.0.1: resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} engines: {node: '>= 0.4'} @@ -6907,9 +6866,6 @@ packages: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} - decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} @@ -7119,11 +7075,6 @@ packages: domelementtype@2.3.0: resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - domexception@4.0.0: - resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} - engines: {node: '>=12'} - deprecated: Use your platform's native DOMException instead - domhandler@4.3.1: resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} engines: {node: '>= 4'} @@ -8213,10 +8164,6 @@ packages: hpack.js@2.1.6: resolution: {integrity: sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==} - html-encoding-sniffer@3.0.0: - resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} - engines: {node: '>=12'} - html-entities@2.5.2: resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==} @@ -8270,10 +8217,6 @@ packages: http-parser-js@0.5.8: resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} - http-proxy-agent@5.0.0: - resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} - engines: {node: '>= 6'} - http-proxy-agent@6.1.1: resolution: {integrity: sha512-JRCz+4Whs6yrrIoIlrH+ZTmhrRwtMnmOHsHn8GFEn9O2sVfSE+DAZ3oyyGIKF8tjJEeSJmP89j7aTjVsSqsU0g==} engines: {node: '>= 14'} @@ -8302,10 +8245,6 @@ packages: resolution: {integrity: sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==} engines: {node: '>= 6.0.0'} - https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - https-proxy-agent@6.2.1: resolution: {integrity: sha512-ONsE3+yfZF2caH5+bJlcddtWqNI3Gvs5A38+ngvljxaBiRXRswym2c7yf8UAeFpRFKjFNHIFEHqR/OLAWJzyiA==} engines: {node: '>= 14'} @@ -8328,10 +8267,6 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} - iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - icss-utils@5.1.0: resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} @@ -8641,9 +8576,6 @@ packages: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} - is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -8862,15 +8794,6 @@ packages: resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jest-environment-jsdom@29.7.0: - resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - jest-environment-node@29.7.0: resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -9010,15 +8933,6 @@ packages: '@babel/preset-env': optional: true - jsdom@20.0.3: - resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} - engines: {node: '>=14'} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -9769,9 +9683,6 @@ packages: nullthrows@1.1.1: resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==} - nwsapi@2.2.9: - resolution: {integrity: sha512-2f3F0SEEer8bBu0dsNCFF50N0cTThV1nWFYcEYFZttdW0lDAoybv9cQoK7X7/68Z89S7FoRrVjP1LPX4XRf9vg==} - nypm@0.3.8: resolution: {integrity: sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og==} engines: {node: ^14.16.0 || >=16.10.0} @@ -11151,10 +11062,6 @@ packages: sax@1.3.0: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} - saxes@6.0.0: - resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} - engines: {node: '>=v12.22.7'} - scheduler@0.23.2: resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} @@ -11683,9 +11590,6 @@ packages: '@swc/core': ^1.2.147 webpack: '>=2' - symbol-tree@3.2.4: - resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synchronous-promise@2.0.17: resolution: {integrity: sha512-AsS729u2RHUfEra9xJrE39peJcc2stq2+poBXX8bcM08Y6g9j/i/PUzwNQqkaJde7Ntg1TO7bSREbR5sdosQ+g==} @@ -11860,10 +11764,6 @@ packages: tr46@1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} - tr46@3.0.0: - resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} - engines: {node: '>=12'} - tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -12566,10 +12466,6 @@ packages: peerDependencies: typescript: '*' - w3c-xmlserializer@4.0.0: - resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} - engines: {node: '>=14'} - wagmi@1.4.13: resolution: {integrity: sha512-AScVYFjqNt1wMgL99Bob7MLdhoTZ3XKiOZL5HVBdy4W1sh7QodA3gQ8IsmTuUrQ7oQaTxjiXEhwg7sWNrPBvJA==} peerDependencies: @@ -12622,10 +12518,6 @@ packages: webidl-conversions@4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - webpack-bundle-analyzer@4.10.2: resolution: {integrity: sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==} engines: {node: '>= 10.13.0'} @@ -12700,21 +12592,9 @@ packages: resolution: {integrity: sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==} engines: {node: '>=0.8.0'} - whatwg-encoding@2.0.0: - resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} - engines: {node: '>=12'} - whatwg-fetch@3.6.20: resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} - whatwg-mimetype@3.0.0: - resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} - engines: {node: '>=12'} - - whatwg-url@11.0.0: - resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} - engines: {node: '>=12'} - whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -12850,13 +12730,6 @@ packages: resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} hasBin: true - xml-name-validator@4.0.0: - resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} - engines: {node: '>=12'} - - xmlchars@2.2.0: - resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -14005,7 +13878,8 @@ snapshots: '@base2/pretty-print-object@1.0.1': {} - '@bcoe/v8-coverage@0.2.3': {} + '@bcoe/v8-coverage@0.2.3': + optional: true '@cartridge/penpal@6.2.3': {} @@ -16399,6 +16273,7 @@ snapshots: jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 + optional: true '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.17(@swc/helpers@0.5.5))(@types/node@20.12.7)(typescript@5.4.5))': dependencies: @@ -16434,6 +16309,7 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true '@jest/environment@29.7.0': dependencies: @@ -16499,6 +16375,7 @@ snapshots: v8-to-istanbul: 9.2.0 transitivePeerDependencies: - supports-color + optional: true '@jest/schemas@29.6.3': dependencies: @@ -16509,6 +16386,7 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 callsites: 3.1.0 graceful-fs: 4.2.11 + optional: true '@jest/test-result@29.7.0': dependencies: @@ -16516,6 +16394,7 @@ snapshots: '@jest/types': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 collect-v8-coverage: 1.0.2 + optional: true '@jest/test-sequencer@29.7.0': dependencies: @@ -16523,6 +16402,7 @@ snapshots: graceful-fs: 4.2.11 jest-haste-map: 29.7.0 slash: 3.0.0 + optional: true '@jest/transform@29.7.0': dependencies: @@ -19043,7 +18923,7 @@ snapshots: semver: 7.6.0 sharp: 0.32.6 style-loader: 3.3.4(webpack@5.91.0(@swc/core@1.4.17(@swc/helpers@0.5.5))(esbuild@0.18.20)) - styled-jsx: 5.1.1(@babel/core@7.24.5)(babel-plugin-macros@3.1.0)(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.24.5)(react@18.3.1) ts-dedent: 2.2.0 tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.1.0 @@ -19665,8 +19545,6 @@ snapshots: dependencies: '@testing-library/dom': 9.3.4 - '@tootallnate/once@2.0.0': {} - '@trysound/sax@0.2.0': {} '@tsconfig/docusaurus@1.0.7': {} @@ -19818,12 +19696,6 @@ snapshots: '@types/js-yaml@4.0.9': {} - '@types/jsdom@20.0.1': - dependencies: - '@types/node': 20.12.7 - '@types/tough-cookie': 4.0.5 - parse5: 7.1.2 - '@types/json-schema@7.0.15': {} '@types/json-stable-stringify@1.0.36': {} @@ -19956,8 +19828,6 @@ snapshots: dependencies: '@types/jest': 29.5.12 - '@types/tough-cookie@4.0.5': {} - '@types/trusted-types@2.0.7': {} '@types/unist@2.0.10': {} @@ -20842,8 +20712,6 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abab@2.0.6: {} - abi-wan-kanabi@2.2.2: dependencies: ansicolors: 0.3.2 @@ -20871,11 +20739,6 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-globals@7.0.1: - dependencies: - acorn: 8.11.3 - acorn-walk: 8.3.2 - acorn-import-assertions@1.9.0(acorn@8.11.3): dependencies: acorn: 8.11.3 @@ -20907,12 +20770,6 @@ snapshots: agent-base@5.1.1: {} - agent-base@6.0.2: - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - agent-base@7.1.1: dependencies: debug: 4.3.4 @@ -21215,6 +21072,7 @@ snapshots: slash: 3.0.0 transitivePeerDependencies: - supports-color + optional: true babel-loader@8.3.0(@babel/core@7.24.5)(webpack@5.91.0): dependencies: @@ -21264,6 +21122,7 @@ snapshots: '@babel/types': 7.24.5 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.5 + optional: true babel-plugin-macros@3.1.0: dependencies: @@ -21349,6 +21208,7 @@ snapshots: '@babel/core': 7.24.5 babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.5) + optional: true bail@1.0.5: {} @@ -21770,7 +21630,8 @@ snapshots: snake-case: 3.0.4 tslib: 2.6.2 - char-regex@1.0.2: {} + char-regex@1.0.2: + optional: true character-entities-legacy@1.1.4: {} @@ -21915,11 +21776,13 @@ snapshots: - '@types/react' - '@types/react-dom' - co@4.6.0: {} + co@4.6.0: + optional: true collapse-white-space@1.0.6: {} - collect-v8-coverage@1.0.2: {} + collect-v8-coverage@1.0.2: + optional: true color-convert@1.9.3: dependencies: @@ -22152,6 +22015,7 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true create-require@1.1.1: {} @@ -22322,14 +22186,6 @@ snapshots: dependencies: css-tree: 1.1.3 - cssom@0.3.8: {} - - cssom@0.5.0: {} - - cssstyle@2.3.0: - dependencies: - cssom: 0.3.8 - csstype@3.1.3: {} csv-generate@3.4.3: {} @@ -22349,12 +22205,6 @@ snapshots: data-uri-to-buffer@4.0.1: {} - data-urls@3.0.2: - dependencies: - abab: 2.0.6 - whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - data-view-buffer@1.0.1: dependencies: call-bind: 1.0.7 @@ -22400,8 +22250,6 @@ snapshots: decamelize@1.2.0: {} - decimal.js@10.4.3: {} - decode-uri-component@0.2.2: {} decompress-response@3.3.0: @@ -22417,6 +22265,7 @@ snapshots: dedent@1.5.3(babel-plugin-macros@3.1.0): optionalDependencies: babel-plugin-macros: 3.1.0 + optional: true deep-eql@4.1.3: dependencies: @@ -22524,7 +22373,8 @@ snapshots: detect-libc@2.0.3: {} - detect-newline@3.1.0: {} + detect-newline@3.1.0: + optional: true detect-node-es@1.1.0: {} @@ -22604,10 +22454,6 @@ snapshots: domelementtype@2.3.0: {} - domexception@4.0.0: - dependencies: - webidl-conversions: 7.0.0 - domhandler@4.3.1: dependencies: domelementtype: 2.3.0 @@ -22690,7 +22536,8 @@ snapshots: embla-carousel@7.1.0: {} - emittery@0.13.1: {} + emittery@0.13.1: + optional: true emoji-regex@8.0.0: {} @@ -23315,7 +23162,8 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - exit@0.1.2: {} + exit@0.1.2: + optional: true expand-template@2.0.3: {} @@ -24158,10 +24006,6 @@ snapshots: readable-stream: 2.3.8 wbuf: 1.7.3 - html-encoding-sniffer@3.0.0: - dependencies: - whatwg-encoding: 2.0.0 - html-entities@2.5.2: {} html-escaper@2.0.2: {} @@ -24235,14 +24079,6 @@ snapshots: http-parser-js@0.5.8: {} - http-proxy-agent@5.0.0: - dependencies: - '@tootallnate/once': 2.0.0 - agent-base: 6.0.2 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - http-proxy-agent@6.1.1: dependencies: agent-base: 7.1.1 @@ -24281,13 +24117,6 @@ snapshots: transitivePeerDependencies: - supports-color - https-proxy-agent@5.0.1: - dependencies: - agent-base: 6.0.2 - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - https-proxy-agent@6.2.1: dependencies: agent-base: 7.1.1 @@ -24309,10 +24138,6 @@ snapshots: dependencies: safer-buffer: 2.1.2 - iconv-lite@0.6.3: - dependencies: - safer-buffer: 2.1.2 - icss-utils@5.1.0(postcss@8.4.38): dependencies: postcss: 8.4.38 @@ -24348,6 +24173,7 @@ snapshots: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 + optional: true imurmurhash@0.1.4: {} @@ -24493,7 +24319,8 @@ snapshots: is-fullwidth-code-point@3.0.0: {} - is-generator-fn@2.1.0: {} + is-generator-fn@2.1.0: + optional: true is-generator-function@1.0.10: dependencies: @@ -24559,8 +24386,6 @@ snapshots: is-plain-object@5.0.0: {} - is-potential-custom-element-name@1.0.1: {} - is-regex@1.1.4: dependencies: call-bind: 1.0.7 @@ -24704,12 +24529,14 @@ snapshots: semver: 7.6.0 transitivePeerDependencies: - supports-color + optional: true istanbul-lib-report@3.0.1: dependencies: istanbul-lib-coverage: 3.2.2 make-dir: 4.0.0 supports-color: 7.2.0 + optional: true istanbul-lib-source-maps@4.0.1: dependencies: @@ -24718,11 +24545,13 @@ snapshots: source-map: 0.6.1 transitivePeerDependencies: - supports-color + optional: true istanbul-reports@3.1.7: dependencies: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 + optional: true iterator.prototype@1.1.2: dependencies: @@ -24768,6 +24597,7 @@ snapshots: execa: 5.1.1 jest-util: 29.7.0 p-limit: 3.1.0 + optional: true jest-circus@29.7.0(babel-plugin-macros@3.1.0): dependencies: @@ -24794,6 +24624,7 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - supports-color + optional: true jest-cli@29.7.0(@types/node@20.12.7)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.17(@swc/helpers@0.5.5))(@types/node@20.12.7)(typescript@5.4.5)): dependencies: @@ -24813,6 +24644,7 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true jest-config@29.7.0(@types/node@20.12.7)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.17(@swc/helpers@0.5.5))(@types/node@20.12.7)(typescript@5.4.5)): dependencies: @@ -24844,6 +24676,7 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - supports-color + optional: true jest-diff@29.7.0: dependencies: @@ -24855,6 +24688,7 @@ snapshots: jest-docblock@29.7.0: dependencies: detect-newline: 3.1.0 + optional: true jest-each@29.7.0: dependencies: @@ -24863,21 +24697,7 @@ snapshots: jest-get-type: 29.6.3 jest-util: 29.7.0 pretty-format: 29.7.0 - - jest-environment-jsdom@29.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/jsdom': 20.0.1 - '@types/node': 20.12.7 - jest-mock: 29.7.0 - jest-util: 29.7.0 - jsdom: 20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + optional: true jest-environment-node@29.7.0: dependencies: @@ -24887,6 +24707,7 @@ snapshots: '@types/node': 20.12.7 jest-mock: 29.7.0 jest-util: 29.7.0 + optional: true jest-get-type@29.6.3: {} @@ -24910,6 +24731,7 @@ snapshots: dependencies: jest-get-type: 29.6.3 pretty-format: 29.7.0 + optional: true jest-matcher-utils@29.7.0: dependencies: @@ -24939,6 +24761,7 @@ snapshots: jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): optionalDependencies: jest-resolve: 29.7.0 + optional: true jest-regex-util@29.6.3: {} @@ -24948,6 +24771,7 @@ snapshots: jest-snapshot: 29.7.0 transitivePeerDependencies: - supports-color + optional: true jest-resolve@29.7.0: dependencies: @@ -24960,6 +24784,7 @@ snapshots: resolve: 1.22.8 resolve.exports: 2.0.2 slash: 3.0.0 + optional: true jest-runner@29.7.0: dependencies: @@ -24986,6 +24811,7 @@ snapshots: source-map-support: 0.5.13 transitivePeerDependencies: - supports-color + optional: true jest-runtime@29.7.0: dependencies: @@ -25013,6 +24839,7 @@ snapshots: strip-bom: 4.0.0 transitivePeerDependencies: - supports-color + optional: true jest-snapshot@29.7.0: dependencies: @@ -25056,6 +24883,7 @@ snapshots: jest-get-type: 29.6.3 leven: 3.1.0 pretty-format: 29.7.0 + optional: true jest-watcher@29.7.0: dependencies: @@ -25067,6 +24895,7 @@ snapshots: emittery: 0.13.1 jest-util: 29.7.0 string-length: 4.0.2 + optional: true jest-worker@27.5.1: dependencies: @@ -25092,6 +24921,7 @@ snapshots: - babel-plugin-macros - supports-color - ts-node + optional: true jiti@1.17.1: {} @@ -25153,39 +24983,6 @@ snapshots: transitivePeerDependencies: - supports-color - jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - abab: 2.0.6 - acorn: 8.11.3 - acorn-globals: 7.0.1 - cssom: 0.5.0 - cssstyle: 2.3.0 - data-urls: 3.0.2 - decimal.js: 10.4.3 - domexception: 4.0.0 - escodegen: 2.1.0 - form-data: 4.0.0 - html-encoding-sniffer: 3.0.0 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.9 - parse5: 7.1.2 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.4 - w3c-xmlserializer: 4.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 2.0.0 - whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - xml-name-validator: 4.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - jsesc@0.5.0: {} jsesc@2.5.2: {} @@ -25497,6 +25294,7 @@ snapshots: make-dir@4.0.0: dependencies: semver: 7.6.0 + optional: true make-error@1.3.6: {} @@ -25761,7 +25559,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - next@13.5.6(@babel/core@7.24.5)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@13.5.6(@babel/core@7.24.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 13.5.6 '@swc/helpers': 0.5.2 @@ -25770,7 +25568,7 @@ snapshots: postcss: 8.4.31 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(@babel/core@7.24.5)(babel-plugin-macros@3.1.0)(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.24.5)(react@18.3.1) watchpack: 2.4.0 optionalDependencies: '@next/swc-darwin-arm64': 13.5.6 @@ -25796,7 +25594,7 @@ snapshots: postcss: 8.4.31 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(@babel/core@7.24.5)(babel-plugin-macros@3.1.0)(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.24.5)(react@18.3.1) optionalDependencies: '@next/swc-darwin-arm64': 14.2.5 '@next/swc-darwin-x64': 14.2.5 @@ -25922,8 +25720,6 @@ snapshots: nullthrows@1.1.1: {} - nwsapi@2.2.9: {} - nypm@0.3.8: dependencies: citty: 0.1.6 @@ -26746,7 +26542,8 @@ snapshots: pure-color@1.3.0: {} - pure-rand@6.1.0: {} + pure-rand@6.1.0: + optional: true pvtsutils@1.3.5: dependencies: @@ -27324,6 +27121,7 @@ snapshots: resolve-cwd@3.0.0: dependencies: resolve-from: 5.0.0 + optional: true resolve-from@4.0.0: {} @@ -27339,7 +27137,8 @@ snapshots: postcss: 8.4.38 source-map: 0.6.1 - resolve.exports@2.0.2: {} + resolve.exports@2.0.2: + optional: true resolve@1.19.0: dependencies: @@ -27478,10 +27277,6 @@ snapshots: sax@1.3.0: {} - saxes@6.0.0: - dependencies: - xmlchars: 2.2.0 - scheduler@0.23.2: dependencies: loose-envify: 1.4.0 @@ -27764,6 +27559,7 @@ snapshots: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 + optional: true source-map-support@0.5.21: dependencies: @@ -27949,6 +27745,7 @@ snapshots: dependencies: char-regex: 1.0.2 strip-ansi: 6.0.1 + optional: true string-width@4.2.3: dependencies: @@ -28022,7 +27819,8 @@ snapshots: strip-bom@3.0.0: {} - strip-bom@4.0.0: {} + strip-bom@4.0.0: + optional: true strip-final-newline@2.0.0: {} @@ -28053,13 +27851,12 @@ snapshots: hey-listen: 1.0.8 tslib: 2.6.2 - styled-jsx@5.1.1(@babel/core@7.24.5)(babel-plugin-macros@3.1.0)(react@18.3.1): + styled-jsx@5.1.1(@babel/core@7.24.5)(react@18.3.1): dependencies: client-only: 0.0.1 react: 18.3.1 optionalDependencies: '@babel/core': 7.24.5 - babel-plugin-macros: 3.1.0 stylehacks@5.1.1(postcss@8.4.38): dependencies: @@ -28119,8 +27916,6 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.91.0(@swc/core@1.4.17(@swc/helpers@0.5.5))(esbuild@0.18.20) - symbol-tree@3.2.4: {} - synchronous-promise@2.0.17: {} system-architecture@0.1.0: {} @@ -28330,10 +28125,6 @@ snapshots: dependencies: punycode: 2.3.1 - tr46@3.0.0: - dependencies: - punycode: 2.3.1 - tree-kill@1.2.2: {} trim-newlines@3.0.1: {} @@ -28888,6 +28679,7 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 + optional: true validate-npm-package-license@3.0.4: dependencies: @@ -29001,10 +28793,6 @@ snapshots: semver: 7.6.0 typescript: 5.4.5 - w3c-xmlserializer@4.0.0: - dependencies: - xml-name-validator: 4.0.0 - wagmi@1.4.13(@types/react@18.3.1)(bufferutil@4.0.8)(immer@9.0.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.4.5)(utf-8-validate@5.0.10)(viem@1.21.4(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.5))(zod@3.23.5): dependencies: '@tanstack/query-sync-storage-persister': 4.36.1 @@ -29096,8 +28884,6 @@ snapshots: webidl-conversions@4.0.2: {} - webidl-conversions@7.0.0: {} - webpack-bundle-analyzer@4.10.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@discoveryjs/json-ext': 0.5.7 @@ -29322,19 +29108,8 @@ snapshots: websocket-extensions@0.1.4: {} - whatwg-encoding@2.0.0: - dependencies: - iconv-lite: 0.6.3 - whatwg-fetch@3.6.20: {} - whatwg-mimetype@3.0.0: {} - - whatwg-url@11.0.0: - dependencies: - tr46: 3.0.0 - webidl-conversions: 7.0.0 - whatwg-url@5.0.0: dependencies: tr46: 0.0.3 @@ -29479,10 +29254,6 @@ snapshots: dependencies: sax: 1.3.0 - xml-name-validator@4.0.0: {} - - xmlchars@2.2.0: {} - xtend@4.0.2: {} y18n@4.0.3: {} diff --git a/turbo.json b/turbo.json index 12ed99086..fd13afa25 100644 --- a/turbo.json +++ b/turbo.json @@ -15,11 +15,6 @@ "dependsOn": ["^build:deps"], "outputs": [".next/**", "!.next/cache/**"] }, - "dev:ci": { - "persistent": true, - "dependsOn": ["^build:deps", "^dev:ci"], - "outputs": [".next/**", "!.next/cache/**"] - }, "lint": {}, "format": {}, "format:check": {}, From 9d54e505cf6693bdffc841319c2d400fab60f04e Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 15:22:20 +0200 Subject: [PATCH 06/10] Show keychain url in example for debugging --- examples/starknet-react-next/src/app/page.tsx | 19 +++++++++++++++++ .../components/providers/StarknetProvider.tsx | 21 ++++++++++--------- package.json | 10 +-------- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/examples/starknet-react-next/src/app/page.tsx b/examples/starknet-react-next/src/app/page.tsx index f3eaae727..d6791dec8 100644 --- a/examples/starknet-react-next/src/app/page.tsx +++ b/examples/starknet-react-next/src/app/page.tsx @@ -1,3 +1,5 @@ +'use client' + import { TransferEth } from "components/TransferEth"; import { ConnectWallet } from "components/ConnectWallet"; import { InvalidTxn } from "components/InvalidTxn"; @@ -5,8 +7,15 @@ import { SignMessage } from "components/SignMessage"; import { DelegateAccount } from "components/DelegateAccount"; import { ColorModeToggle } from "components/ColorModeToggle"; import { Menu } from "components/Menu"; +import { KEYCHAIN_URL } from "components/providers/StarknetProvider"; +import { useEffect, useState } from "react"; export default function Home() { + const [debug, setDebug] = useState(false); + useEffect(() => { + setDebug(!!new URLSearchParams(window.location.search).get("debug")) + }, []) + return (
@@ -15,6 +24,16 @@ export default function Home() {
+ + {debug && ( +
+

Keychain URL: {KEYCHAIN_URL}

+

NEXT_PUBLIC_VERCEL_ENV: {String(process.env.NEXT_PUBLIC_VERCEL_ENV)}

+

NEXT_PUBLIC_VERCEL_BRANCH_URL: {String(process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL)}

+

NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL: {String(process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL)}

+
+ )} + diff --git a/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx b/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx index 913f10ec1..49c194880 100644 --- a/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx +++ b/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx @@ -25,6 +25,16 @@ const ETH_TOKEN_ADDRESS = // const PAPER_TOKEN_ADDRESS = // "0x0410466536b5ae074f7fea81e5533b8134a9fa08b3dd077dd9db08f64997d113"; +export const KEYCHAIN_URL = !process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL || + process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.split(".")[0] === + "cartridge-starknet-react-next" + ? process.env.XFRAME_URL + : "https://" + + (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace( + "cartridge-starknet-react-next", + "keychain", + ); + const cartridge = new CartridgeConnector({ policies: [ { @@ -50,16 +60,7 @@ const cartridge = new CartridgeConnector({ method: "allowance", }, ], - url: - !process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL || - process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.split(".")[0] === - "cartridge-starknet-react-next" - ? process.env.XFRAME_URL - : "https://" + - (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace( - "cartridge-starknet-react-next", - "keychain", - ), + url: KEYCHAIN_URL, rpc: process.env.NEXT_PUBLIC_RPC_SEPOLIA, paymaster: { caller: shortString.encodeShortString("ANY_CALLER"), diff --git a/package.json b/package.json index 3787ba675..b7decaed8 100644 --- a/package.json +++ b/package.json @@ -4,20 +4,12 @@ "private": true, "scripts": { "preinstall": "npx only-allow pnpm", -<<<<<<< HEAD "build": "turbo build:deps build", "dev": "turbo build:deps dev", "e2e": "turbo build:deps dev e2e", "e2e:ui": "turbo build:deps dev e2e:ui", + "e2e:ci": "turbo build:deps e2e", "lint": "turbo lint format:check", -======= - "build": "turbo build", - "dev": "turbo dev", - "e2e": "turbo dev e2e", - "e2e:ui": "turbo dev e2e:ui", - "e2e:ci": "turbo e2e", - "lint": "turbo lint", ->>>>>>> 7a42470e (Run e2e test against integration api endpoint) "format": "turbo format", "format:check": "turbo format:check", "clean": "git clean -xdf && pnpm store prune", From 127112802438f7e0370931a0df0117fe4a7e85bc Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 15:47:15 +0200 Subject: [PATCH 07/10] Disable webserver --- .../starknet-react-next/playwright.config.ts | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/examples/starknet-react-next/playwright.config.ts b/examples/starknet-react-next/playwright.config.ts index be8c7a1c9..52b6a68d3 100644 --- a/examples/starknet-react-next/playwright.config.ts +++ b/examples/starknet-react-next/playwright.config.ts @@ -24,15 +24,13 @@ export default defineConfig({ // use: { ...devices["Desktop Safari"] }, // }, ], - webServer: process.env.CI - ? { - command: "pnpm dev:ci", - cwd: "../..", - port: 3002, - reuseExistingServer: !process.env.CI, - stdout: "pipe", - stderr: "pipe", - timeout: 1000 * 60, - } - : undefined, + // webServer: { + // command: "pnpm dev", + // cwd: "../..", + // port: 3002, + // reuseExistingServer: !process.env.CI, + // stdout: "pipe", + // stderr: "pipe", + // timeout: 1000 * 60, + // }, }); From 150f5569dca0b20038ffb189a3251240b92dec93 Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Tue, 13 Aug 2024 17:19:15 +0200 Subject: [PATCH 08/10] Use preview keychain for e2e test on ci --- examples/starknet-react-next/playwright.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/starknet-react-next/playwright.config.ts b/examples/starknet-react-next/playwright.config.ts index 52b6a68d3..3a31323cb 100644 --- a/examples/starknet-react-next/playwright.config.ts +++ b/examples/starknet-react-next/playwright.config.ts @@ -1,4 +1,5 @@ import { defineConfig, devices } from "@playwright/test"; +import { KEYCHAIN_URL } from "components/providers/StarknetProvider"; export default defineConfig({ testDir: "./tests", @@ -7,7 +8,7 @@ export default defineConfig({ retries: process.env.CI ? 2 : 0, reporter: process.env.CI ? "dot" : "list", use: { - baseURL: process.env.CI ? "" : "http://localhost:3002", + baseURL: process.env.CI ? KEYCHAIN_URL : "http://localhost:3002", trace: "on-first-retry", }, projects: [ From 38182faf34abfd00e5ba3022a3f3965d66d95a90 Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Wed, 14 Aug 2024 15:13:56 +0200 Subject: [PATCH 09/10] Target preview keychain when running playwright on ci --- .github/workflows/test.yml | 6 +++++- examples/starknet-react-next/package.json | 3 ++- .../starknet-react-next/playwright.config.ts | 11 ++++++++-- examples/starknet-react-next/src/app/page.tsx | 20 +++++++++++++------ pnpm-lock.yaml | 3 +++ turbo.json | 4 ++-- 6 files changed, 35 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5cc5fa9c..5c74043c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,7 +76,11 @@ jobs: - name: Install Playwright Browsers run: pnpm example:next e2e:deps - name: Run Playwright tests - run: pnpm e2e:ci + run: | + cat <examples/starknet-react-next/.env + BRANCH_NAME=${{ github.head_ref }} + EOF + pnpm e2e:ci - uses: actions/upload-artifact@v4 if: always() with: diff --git a/examples/starknet-react-next/package.json b/examples/starknet-react-next/package.json index 7eaebe27d..70c558e78 100644 --- a/examples/starknet-react-next/package.json +++ b/examples/starknet-react-next/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "next dev -p 3002", "build": "next build", - "e2e:deps": "npx playwright install --with-deps", + "e2e:deps": "pnpm playwright install --with-deps", "e2e": "playwright test", "e2e:ui": "pnpm e2e --ui", "start": "next start -p 3002", @@ -32,6 +32,7 @@ "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", "autoprefixer": "^10.4.18", + "dotenv": "^16.4.5", "eslint": "^8.23.0", "eslint-config-next": "^12.2.5", "postcss": "^8.4.35", diff --git a/examples/starknet-react-next/playwright.config.ts b/examples/starknet-react-next/playwright.config.ts index 3a31323cb..3da5e227c 100644 --- a/examples/starknet-react-next/playwright.config.ts +++ b/examples/starknet-react-next/playwright.config.ts @@ -1,5 +1,12 @@ import { defineConfig, devices } from "@playwright/test"; -import { KEYCHAIN_URL } from "components/providers/StarknetProvider"; +import dotenv from "dotenv"; +import path from "path"; + +dotenv.config({ path: path.resolve(__dirname, ".env") }); + +const CI_BASE_URL = process.env.BRANCH_NAME + ? `https://cartridge-starknet-react-next-git-${process.env.BRANCH_NAME}.preview.cartridge.gg` + : "https://cartridge-starknet-react-next.preview.cartridge.gg"; export default defineConfig({ testDir: "./tests", @@ -8,7 +15,7 @@ export default defineConfig({ retries: process.env.CI ? 2 : 0, reporter: process.env.CI ? "dot" : "list", use: { - baseURL: process.env.CI ? KEYCHAIN_URL : "http://localhost:3002", + baseURL: process.env.CI ? CI_BASE_URL : "http://localhost:3002", trace: "on-first-retry", }, projects: [ diff --git a/examples/starknet-react-next/src/app/page.tsx b/examples/starknet-react-next/src/app/page.tsx index d6791dec8..0f241a3bd 100644 --- a/examples/starknet-react-next/src/app/page.tsx +++ b/examples/starknet-react-next/src/app/page.tsx @@ -1,4 +1,4 @@ -'use client' +"use client"; import { TransferEth } from "components/TransferEth"; import { ConnectWallet } from "components/ConnectWallet"; @@ -13,8 +13,8 @@ import { useEffect, useState } from "react"; export default function Home() { const [debug, setDebug] = useState(false); useEffect(() => { - setDebug(!!new URLSearchParams(window.location.search).get("debug")) - }, []) + setDebug(!!new URLSearchParams(window.location.search).get("debug")); + }, []); return (
@@ -28,9 +28,17 @@ export default function Home() { {debug && (

Keychain URL: {KEYCHAIN_URL}

-

NEXT_PUBLIC_VERCEL_ENV: {String(process.env.NEXT_PUBLIC_VERCEL_ENV)}

-

NEXT_PUBLIC_VERCEL_BRANCH_URL: {String(process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL)}

-

NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL: {String(process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL)}

+

+ NEXT_PUBLIC_VERCEL_ENV: {String(process.env.NEXT_PUBLIC_VERCEL_ENV)} +

+

+ NEXT_PUBLIC_VERCEL_BRANCH_URL:{" "} + {String(process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL)} +

+

+ NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL:{" "} + {String(process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL)} +

)} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index df1ac6e18..a3cb8374d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,6 +103,9 @@ importers: autoprefixer: specifier: ^10.4.18 version: 10.4.19(postcss@8.4.38) + dotenv: + specifier: ^16.4.5 + version: 16.4.5 eslint: specifier: ^8.23.0 version: 8.57.0 diff --git a/turbo.json b/turbo.json index fd13afa25..81f1cda17 100644 --- a/turbo.json +++ b/turbo.json @@ -22,8 +22,8 @@ "dependsOn": ["^build:deps"] }, "e2e:ui": { - "dependsOn": ["^build:deps"], - "persistent": true + "persistent": true, + "dependsOn": ["^build:deps"] } } } From 15a0247478599662b4391f0bddfd3776fcd74043 Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Wed, 14 Aug 2024 17:10:08 +0200 Subject: [PATCH 10/10] Remove duplicated ci task --- .github/workflows/quality.yml | 22 ------------------- .../components/providers/StarknetProvider.tsx | 17 +++++++------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 940dc9db1..b3cfb65c8 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -65,25 +65,3 @@ jobs: run_install: false - run: pnpm install --frozen-lockfile - run: pnpm lint - - ts-format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20.x - - uses: actions/cache@v4 - with: - path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- - - run: corepack enable pnpm - - uses: pnpm/action-setup@v4 - id: pnpm-install - with: - version: 9.7.0 - run_install: false - - run: pnpm install --frozen-lockfile - - run: pnpm lint diff --git a/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx b/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx index 49c194880..41fc4c760 100644 --- a/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx +++ b/examples/starknet-react-next/src/components/providers/StarknetProvider.tsx @@ -25,15 +25,16 @@ const ETH_TOKEN_ADDRESS = // const PAPER_TOKEN_ADDRESS = // "0x0410466536b5ae074f7fea81e5533b8134a9fa08b3dd077dd9db08f64997d113"; -export const KEYCHAIN_URL = !process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL || +export const KEYCHAIN_URL = + !process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL || process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.split(".")[0] === - "cartridge-starknet-react-next" - ? process.env.XFRAME_URL - : "https://" + - (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace( - "cartridge-starknet-react-next", - "keychain", - ); + "cartridge-starknet-react-next" + ? process.env.XFRAME_URL + : "https://" + + (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace( + "cartridge-starknet-react-next", + "keychain", + ); const cartridge = new CartridgeConnector({ policies: [