diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..f9fed007 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,5 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`. + +Add a changeset with `npm run changeset` before opening a PR that should trigger a release. diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..eefd635b --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "baseBranch": "master", + "access": "public", + "privatePackages": { + "version": false + }, + "updateInternalDependencies": "patch", + "fixed": [], + "linked": [], + "ignore": [] +} diff --git a/.changeset/embed-590-stack-upgrade.md b/.changeset/embed-590-stack-upgrade.md new file mode 100644 index 00000000..55aab218 --- /dev/null +++ b/.changeset/embed-590-stack-upgrade.md @@ -0,0 +1,7 @@ +--- +"@toruslabs/customauth": major +--- + +Stack upgrade to torus-scripts 9 / Vite+: Node >=24.22.0, npm >=12, Oxlint/Oxfmt, Changesets. Package `types` now point at `dist/lib.cjs/index.d.ts`. Dropped unused `@babel/runtime` peer. Toruslabs runtime majors: torus.js 18, broadcast-channel 14, fetch-node-details 17, session-manager 6, eccrypto 8, constants 17, http-helpers 10, metadata-helpers 9. + +Breaking type changes: `triggerLogin` now returns `Promise` (it always resolved to `null` in redirect mode; the type now says so). `ILoginHandler.handleLoginWindow` now returns `Promise`. Callers must null-check the result before reading fields like `userInfo`. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ec3487fc..05222f48 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -21,6 +21,7 @@ # Product code src/ @torusresearch/Web3Auth-Product test/ @torusresearch/Web3Auth-Product +examples/ @torusresearch/Web3Auth-Product # Most restrictive — last match wins .github/CODEOWNERS @torusresearch/Web3Auth-Admins diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3d508225..a0e6a046 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,7 @@ +## Motivation and Context + + + ## Jira Link diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..aa99ac5f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 + +updates: + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + cooldown: + default-days: 3 + open-pull-requests-limit: 10 + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + cooldown: + default-days: 3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 1894e3a2..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Build & Release - -on: [push] - -jobs: - build: - strategy: - matrix: - node: ["24.x"] - os: [ubuntu-latest] - - runs-on: ${{ matrix.os }} - - steps: - - name: Check out Git repository - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - - - name: Set up node - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: ${{ matrix.node }} - cache: "npm" - - - name: Install dependencies - run: npm install - - - name: Run Build - run: npm run build - - - name: Pack and build example - if: github.ref == 'refs/heads/master' - run: | - npm pack - cd examples/vue-app - npm run install:local - npm run build - - # Set the credentials from repository settings/secrets - - name: Configure AWS credentials - if: github.ref == 'refs/heads/master' - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.AWS_REGION_US }} - - # Copy the files from build folder to the S3 bucket - # Upload to S3 - - name: sync s3 - if: github.ref == 'refs/heads/master' - uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311 # master - env: - SOURCE_DIR: "./examples/vue-app/dist" - AWS_REGION: "us-east-1" - AWS_S3_BUCKET: "demo-customauth.web3auth.io" - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - - name: Update AWS Cloudfront Config - uses: chaitanyapotti/cloudfront-update-distribution@c5d4a6b318664766f944d11c32544f492fb3027d # v4 - if: github.ref == 'refs/heads/master' - with: - cloudfront-distribution-id: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} - cloudfront-invalidation-required: true - cloudfront-invalidation-path: "/*" - cloudfront-wait-for-service-update: false diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml new file mode 100644 index 00000000..1ee46aca --- /dev/null +++ b/.github/workflows/release-pr.yml @@ -0,0 +1,39 @@ +name: Create release pull request + +on: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: release-pr + cancel-in-progress: false + +jobs: + release-pr: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version-file: .nvmrc + - name: Install npm 12 + run: npm install --global npm@12.2.0 + - name: Install dependencies + run: npm ci + # The GitHub API commit mode signs the release commit, which `master` requires. + - name: Create or update the release pull request + uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2 + with: + version-script: npm run version-packages + commit-message: "chore: release packages" + pr-title: "chore: release packages" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/security-code-scanner.yml b/.github/workflows/security-code-scanner.yml new file mode 100644 index 00000000..660cf09d --- /dev/null +++ b/.github/workflows/security-code-scanner.yml @@ -0,0 +1,27 @@ +name: Security code scanner + +on: + pull_request: + push: + branches: [master] + schedule: + - cron: "17 4 * * 1" + workflow_dispatch: + +permissions: + contents: read + +jobs: + security-scan: + uses: MetaMask/action-security-code-scanner/.github/workflows/security-scan.yml@becb242930b3cc271c26da0280050db9c157e291 # v2.1.1 + permissions: + actions: read + contents: read + security-events: write + with: + scanner-ref: becb242930b3cc271c26da0280050db9c157e291 # v2.1.1 + paths-ignored: | + **/node_modules/** + **/dist/** + **/build/** + **/coverage/** diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 00000000..8e97cd7b --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,94 @@ +name: Validate pull request + +on: + pull_request: + push: + branches: [master] + +permissions: + contents: read + +jobs: + validate: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node: ["24.22.0", "26"] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: ${{ matrix.node }} + - name: Install npm 12 + run: npm install --global npm@12.2.0 + - name: Install dependencies + run: npm ci + - name: Check dependency hardening + run: npm exec --no -- harden check --package-manager npm + - name: Check source + run: npm run check + - name: Build packages + run: npm run build + - name: Check TypeScript projects + run: npm run typecheck + - name: Run tests + run: npm test + - name: Check release notes + if: | + github.event_name == 'pull_request' && + !startsWith(github.head_ref, 'changeset-release/') && + !startsWith(github.head_ref, 'dependabot/') + env: + BASE_REF: ${{ github.base_ref }} + run: | + git fetch --no-tags origin "${BASE_REF}:refs/remotes/origin/${BASE_REF}" + npm exec -- changeset status --since="origin/${BASE_REF}" + - name: Preview package archive + run: npm pack --dry-run --json + + deploy-demo: + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + needs: validate + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version-file: .nvmrc + - name: Install npm 12 + run: npm install --global npm@12.2.0 + - name: Install dependencies + run: npm ci + - name: Build package + run: npm run build + - name: Start Wiz sensor + uses: wiz-sec-public/wiz-sensor-github-action@2fd38e4d101f185b1deb0c313c0adb0a7efdfe62 # v0.9.6 + continue-on-error: true + with: + api-token: ${{ secrets.WIZ_SENSOR_TOKEN }} + - name: Pack and build example + run: | + npm pack + cd examples/vue-app + npm run install:local + npm run build + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0 + with: + role-to-assume: ${{ vars.AWS_ROLE_ARN }} + aws-region: ${{ secrets.AWS_REGION_US }} + - name: sync s3 + run: aws s3 sync ./examples/vue-app/dist s3://demo-customauth.web3auth.io --region us-east-1 --no-progress + - name: Update AWS Cloudfront Config + uses: chaitanyapotti/cloudfront-update-distribution@c5d4a6b318664766f944d11c32544f492fb3027d # v4 + with: + cloudfront-distribution-id: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} + cloudfront-invalidation-required: true + cloudfront-invalidation-path: "/*" + cloudfront-wait-for-service-update: false diff --git a/.gitignore b/.gitignore index 992c3ff2..ea0adcfd 100644 --- a/.gitignore +++ b/.gitignore @@ -108,4 +108,4 @@ bundle.min.js types2/ .DS_Store -.npmrc \ No newline at end of file +.vitest/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..e5b77622 --- /dev/null +++ b/.npmrc @@ -0,0 +1,11 @@ +## Avoid installing packages published in last 3 days. +min-release-age=3 + +## Don't install packages from git urls. +allow-git=none + +## Disable installing dependencies from remote URLs. +allow-remote=none + +## Pin allowed scripts to exact versions of dependencies to prevent unexpected script execution. +allow-scripts-pin=true diff --git a/.nvmrc b/.nvmrc index 218de16f..6f4247a6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ ->=24.x \ No newline at end of file +26 diff --git a/.prettierignore b/.prettierignore index de243c73..cb17fa97 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,23 +1,7 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -#production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* -types/ -.github/CODEOWNERS \ No newline at end of file +dist +node_modules +coverage +examples +*.tgz +.changeset +package-lock.json diff --git a/.prettierrc.yaml b/.prettierrc.yaml deleted file mode 100644 index 3a122545..00000000 --- a/.prettierrc.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# .prettierrc or .prettierrc.yaml -printWidth: 150 -singleQuote: false -semi: true -trailingComma: es5 \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 993f6a48..00000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import toruslabsTypescript from "@toruslabs/eslint-config-typescript"; - -export default [...toruslabsTypescript]; diff --git a/examples/angular-app/package-lock.json b/examples/angular-app/package-lock.json index 889bbd4f..28b6b649 100644 --- a/examples/angular-app/package-lock.json +++ b/examples/angular-app/package-lock.json @@ -14,9 +14,9 @@ "@angular/forms": "^21.1.0", "@angular/platform-browser": "^21.1.0", "@angular/router": "^21.1.0", - "@toruslabs/constants": "^16.0.0", + "@toruslabs/constants": "^17.0.0", "@toruslabs/customauth": "file:../..", - "@toruslabs/fnd-base": "^16.0.0", + "@toruslabs/fnd-base": "^17.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0" }, @@ -31,44 +31,44 @@ }, "../..": { "name": "@toruslabs/customauth", - "version": "22.0.0", + "version": "22.3.3", "license": "MIT", "dependencies": { "@chaitanyapotti/register-service-worker": "^1.7.4", - "@toruslabs/broadcast-channel": "^13.1.0", - "@toruslabs/constants": "^16.0.0", - "@toruslabs/eccrypto": "^7.0.0", - "@toruslabs/fetch-node-details": "^16.0.0", - "@toruslabs/http-helpers": "^9.0.0", - "@toruslabs/metadata-helpers": "^8.1.0", - "@toruslabs/session-manager": "^5.3.0", - "@toruslabs/torus.js": "^17.0.0", - "bowser": "^2.14.1", + "@toruslabs/broadcast-channel": "^14.0.0", + "@toruslabs/constants": "^17.0.0", + "@toruslabs/eccrypto": "^8.0.0", + "@toruslabs/fetch-node-details": "^17.0.0", + "@toruslabs/http-helpers": "^10.0.0", + "@toruslabs/metadata-helpers": "^9.0.0", + "@toruslabs/session-manager": "^6.0.0", + "@toruslabs/torus.js": "^18.0.0", + "bowser": "^2.15.0", "deepmerge": "^4.3.1", "events": "^3.3.0", "loglevel": "^1.9.2" }, "devDependencies": { - "@sentry/core": "^10.39.0", - "@toruslabs/config": "^4.0.0", - "@toruslabs/eslint-config-typescript": "^5.0.0", - "@toruslabs/torus-scripts": "^8.0.0", - "@types/node": "^25", - "eslint": "^9.39.2", + "@changesets/cli": "^3.0.3", + "@lavamoat/harden": "^0.8.1", + "@sentry/core": "^10.78.0", + "@toruslabs/config": "^5.0.0", + "@toruslabs/oxlint-config-typescript": "^1.1.0", + "@toruslabs/torus-scripts": "9.0.1", + "@types/events": "^3.0.3", + "@types/node": "^26.6.6", "husky": "^9.1.7", - "lint-staged": "^16.2.7", - "prettier": "^3.8.1", - "rimraf": "^6.1.3", + "lint-staged": "^16.4.0", "typed-emitter": "^2.1.0", - "typescript": "^5.9.3" + "typescript": "^7.0.2", + "vite-plus": "1.5.0" }, "engines": { - "node": ">=22.x", - "npm": ">=10.x" + "node": ">=24.22.0", + "npm": ">=12" }, "peerDependencies": { - "@babel/runtime": "^7.x", - "@sentry/core": "^9.x" + "@sentry/core": "^10.x" }, "peerDependenciesMeta": { "@sentry/core": { @@ -513,7 +513,6 @@ "resolved": "https://registry.npmjs.org/@angular/common/-/common-21.1.5.tgz", "integrity": "sha512-olO2F0b+H8YBfsuQFEwo9Hjf+B714xGcttDW37+4jnY2IRS2uYeMu2RGIpY7ps+0uZ017c4iK3CCgSPBgmbTcA==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -530,7 +529,6 @@ "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-21.1.5.tgz", "integrity": "sha512-yRUdWlL+AWcTL4d7zD0jkNqsjvxXpWEihvOfD2gc65DO0+E80DsWIpHq9A8yWeLukbfLcmBGI2QbfW9+SXAlvg==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -544,7 +542,6 @@ "integrity": "sha512-i2r2bQuWdjjFGTd2TA7FtCWNx5yJ3BMoyTGUC9lzSfmxWAfcH/NWR+6OdaEVwv6Zap3IXYYxs8S+REkx954EwA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/core": "7.28.5", "@jridgewell/sourcemap-codec": "^1.4.14", @@ -577,7 +574,6 @@ "resolved": "https://registry.npmjs.org/@angular/core/-/core-21.1.5.tgz", "integrity": "sha512-m61YHiyE+SIvS8UXcFLjYCucv6ShJJCwz9xxEk7ysYW9wOtHdfIf9tgyOsucZDAvrvpSyQLRj5jGBCGm1VIvXA==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -622,7 +618,6 @@ "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-21.1.5.tgz", "integrity": "sha512-rAN0cu05Pg7HHe9JMRd3g5JyyVCeFW8QiB/jG6klUrOTF4QzyCbmwlm7MX0uTx3CWAZraWCGbdahUkLyYtuqFA==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.3.0" }, @@ -744,7 +739,6 @@ "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -959,16 +953,6 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/runtime": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", - "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/template": { "version": "7.28.6", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", @@ -1105,7 +1089,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=20.19.0" }, @@ -1146,7 +1129,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=20.19.0" } @@ -1894,7 +1876,6 @@ "integrity": "sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@inquirer/checkbox": "^4.3.2", "@inquirer/confirm": "^5.1.21", @@ -3907,16 +3888,13 @@ "license": "MIT" }, "node_modules/@toruslabs/constants": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/constants/-/constants-16.0.0.tgz", - "integrity": "sha512-Ugl21gfoJ3taV1J2HWo0njDw9Ld06EpQKuZajAcaSJC21DSS5Ah9lEGDcvlOUrUdCZMcp0zLNZPpKzpt44gQQg==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/constants/-/constants-17.0.0.tgz", + "integrity": "sha512-hIQszFEgtcymm17LQyWDh1EWr8/qHpRrQ+ABGToui8usoYPAtbNnAvskZlJU8NnMEYEGcu/kotNtiDX7nql+Bg==", "license": "MIT", "engines": { - "node": ">=22.x", - "npm": ">=10.x" - }, - "peerDependencies": { - "@babel/runtime": "7.x" + "node": ">=24.22.0", + "npm": ">=12" } }, "node_modules/@toruslabs/customauth": { @@ -3924,19 +3902,16 @@ "link": true }, "node_modules/@toruslabs/fnd-base": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/fnd-base/-/fnd-base-16.0.0.tgz", - "integrity": "sha512-PKuPqoTBCyKdOoq0S9v9a0XtPqC33bFVIKJMygzXqE+QBuiKSpPSn7RozRQpCinyB0EUPlio5H2v3ClkYz3CFA==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/fnd-base/-/fnd-base-17.0.0.tgz", + "integrity": "sha512-K2KyYunBbz0N6Es0Or3UMw+lWMXkMP8XNli1IHYgEqkHaZ52irCyDCa0pp7YHR2s8HTL+gLmcIzkJKV7xiTlmA==", "license": "MIT", "dependencies": { - "@toruslabs/constants": "^16.0.0" + "@toruslabs/constants": "^17.0.0" }, "engines": { - "node": ">=22.x", - "npm": ">=10.x" - }, - "peerDependencies": { - "@babel/runtime": "7.x" + "node": ">=24.22.0", + "npm": ">=12" } }, "node_modules/@tufjs/canonical-json": { @@ -4395,7 +4370,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -4548,7 +4522,6 @@ "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "readdirp": "^5.0.0" }, @@ -5272,7 +5245,6 @@ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", @@ -5601,7 +5573,6 @@ "integrity": "sha512-gJnaDHXKDayjt8ue0n8Gs0A007yKXj4Xzb8+cNjZeYsSzzwKc0Lr+OZgYwVfB0pHfUs17EPoLvrOsEaJ9mj+Tg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=16.9.0" } @@ -5969,7 +5940,6 @@ "integrity": "sha512-mjzqwWRD9Y1J1KUi7W97Gja1bwOOM5Ug0EZ6UDK3xS7j7mndrkwozHtSblfomlzyB4NepioNt+B2sOSzczVgtQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@acemir/cssom": "^0.9.28", "@asamuzakjp/dom-selector": "^6.7.6", @@ -6077,7 +6047,6 @@ "integrity": "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "cli-truncate": "^5.0.0", "colorette": "^2.0.20", @@ -7445,7 +7414,6 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", - "peer": true, "dependencies": { "tslib": "^2.1.0" } @@ -8083,8 +8051,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "peer": true + "license": "0BSD" }, "node_modules/tuf-js": { "version": "4.1.0", @@ -8122,7 +8089,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8234,7 +8200,6 @@ "integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -8310,7 +8275,6 @@ "integrity": "sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/expect": "4.0.18", "@vitest/mocker": "4.0.18", @@ -8712,7 +8676,6 @@ "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", "dev": true, "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/examples/angular-app/package.json b/examples/angular-app/package.json index daefc785..4abdea10 100644 --- a/examples/angular-app/package.json +++ b/examples/angular-app/package.json @@ -29,9 +29,9 @@ "@angular/forms": "^21.1.0", "@angular/platform-browser": "^21.1.0", "@angular/router": "^21.1.0", - "@toruslabs/constants": "^16.0.0", + "@toruslabs/constants": "^17.0.0", "@toruslabs/customauth": "file:../..", - "@toruslabs/fnd-base": "^16.0.0", + "@toruslabs/fnd-base": "^17.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0" }, diff --git a/examples/angular-app/src/app/custom-auth.ts b/examples/angular-app/src/app/custom-auth.ts index 7ac60adc..8ab0176e 100644 --- a/examples/angular-app/src/app/custom-auth.ts +++ b/examples/angular-app/src/app/custom-auth.ts @@ -82,7 +82,7 @@ export class CustomAuthService { }; } - async triggerLogin(formData: FormData): Promise { + async triggerLogin(formData: FormData): Promise { const { network, loginProvider, loginHint, uxMode } = formData; await this.init(network, uxMode); if (!this.sdk) throw new Error("CustomAuth SDK is not initialized"); diff --git a/examples/angular-app/src/serviceworker/redirect.html b/examples/angular-app/src/serviceworker/redirect.html index 1a32f25f..573f3bf6 100644 --- a/examples/angular-app/src/serviceworker/redirect.html +++ b/examples/angular-app/src/serviceworker/redirect.html @@ -102,8 +102,8 @@