diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000000000..cb584b9b1a3b5 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,234 @@ +{ + "env": { + "node": true, + "browser": true, + "es2021": true + }, + "extends": [ + // "eslint:recommended", + "prettier" + ], + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 2022 + }, + "rules": { + // Possible Errors (overrides from recommended set) + + // "no-extra-parens": "error", + "no-unexpected-multiline": "error", + + // All JSDoc comments must be valid + + "valid-jsdoc": [ "error", { + "requireReturn": true, + "requireReturnDescription": true, + "requireParamDescription": true, + "prefer": { + "return": "returns" + } + }], + + // Best Practices + + // Allowed a getter without setter, but all setters require getters + + "accessor-pairs": [ "error", { + "getWithoutSet": false, + "setWithoutGet": true + }], + "block-scoped-var": "warn", + "consistent-return": "error", + "curly": "error", + // "default-case": "warn", + + // the dot goes with the property when doing multiline + + // "dot-location": [ "warn", "property" ], + // "dot-notation": "warn", + // "eqeqeq": [ "error", "smart" ], + // "guard-for-in": "warn", + "no-alert": "error", + "no-caller": "error", + // "no-case-declarations": "warn", + // "no-div-regex": "warn", + // "no-else-return": "warn", + // "no-empty-label": "warn", + // "no-empty-pattern": "warn", + // "no-eq-null": "warn", + // "no-eval": "error", + // "no-extend-native": "error", + // "no-extra-bind": "warn", + // "no-floating-decimal": "warn", + // "no-implicit-coercion": [ "warn", { + // "boolean": true, + // "number": true, + // "string": true + // }], + // "no-implied-eval": "error", + // "no-invalid-this": "error", + // "no-iterator": "error", + // "no-labels": "warn", + // "no-lone-blocks": "warn", + // "no-loop-func": "error", + // "no-magic-numbers": "warn", + // "no-multi-spaces": "error", + // "no-multi-str": "warn", + // "no-native-reassign": "error", + // "no-new-func": "error", + // "no-new-wrappers": "error", + // "no-new": "error", + // "no-octal-escape": "error", + // "no-param-reassign": "error", + // "no-process-env": "warn", + // "no-proto": "error", + // "no-redeclare": "error", + // "no-return-assign": "error", + // "no-script-url": "error", + // "no-self-compare": "error", + // "no-throw-literal": "error", + // "no-unused-expressions": "error", + // "no-useless-call": "error", + // "no-useless-concat": "error", + // "no-void": "warn", + + // Produce warnings when something is commented as TODO or FIXME + + "no-warning-comments": [ "warn", { + "terms": [ "TODO", "FIXME" ], + "location": "start" + }], + "no-with": "warn", + "radix": "warn", + // "vars-on-top": "error", + + // Enforces the style of wrapped functions + // "wrap-iife": [ "error", "outside" ], + // "yoda": "error", + + // Strict Mode - for ES6, never use strict. + // "strict": [ "error", "never" ], + + // Variables + + // "init-declarations": [ "error", "always" ], + // "no-catch-shadow": "warn", + "no-delete-var": "error", + // "no-label-var": "error", + // "no-shadow-restricted-names": "error", + // "no-shadow": "warn", + + // We require all vars to be initialized (see init-declarations) + // If we NEED a var to be initialized to undefined, it needs to be explicit + + "no-undef-init": "off", + "no-undef": "error", + "no-undefined": "off", + "no-unused-vars": "warn", + + // Disallow hoisting - let & const don't allow hoisting anyhow + + "no-use-before-define": "error", + + // Node.js and CommonJS + + // "callback-return": [ "warn", [ "callback", "next" ]], + // "global-require": "error", + // "handle-callback-err": "warn", + // "no-mixed-requires": "warn", + // "no-new-require": "error", + + // Use path.concat instead + + // "no-path-concat": "error", + // "no-process-exit": "error", + // "no-restricted-modules": "off", + // "no-sync": "warn", + + // ECMAScript 6 support + + // "arrow-body-style": [ "error", "always" ], + // "arrow-parens": [ "error", "always" ], + // "arrow-spacing": [ "error", { "before": true, "after": true }], + "constructor-super": "error", + // "generator-star-spacing": [ "error", "before" ], + // "no-arrow-condition": "error", + "no-class-assign": "error", + "no-const-assign": "error", + "no-dupe-class-members": "error", + "no-this-before-super": "error", + // "no-var": "warn", + "object-shorthand": [ "warn" ], + // "prefer-arrow-callback": "warn", + // "prefer-spread": "warn", + // "prefer-template": "warn", + // "require-yield": "error", + + // Stylistic - everything here is a warning because of style. + + // "array-bracket-spacing": [ "warn", "always" ], + // "block-spacing": [ "warn", "always" ], + // "brace-style": [ "warn", "1tbs", { "allowSingleLine": false } ], + // "camelcase": "warn", + // "comma-spacing": [ "warn", { "before": false, "after": true } ], + // "comma-style": [ "warn", "last" ], + // "computed-property-spacing": [ "warn", "never" ], + // "consistent-this": [ "warn", "self" ], + // "eol-last": "warn", + // "func-names": "warn", + // "func-style": [ "warn", "declaration" ], + // "id-length": [ "warn", { "min": 2, "max": 32 } ], + // "indent": [ "warn", 4 ], + // "jsx-quotes": [ "warn", "prefer-double" ], + // "linebreak-style": [ "warn", "unix" ], + // "lines-around-comment": [ "warn", { "beforeBlockComment": true } ], + // "max-depth": [ "warn", 8 ], + // "max-len": [ "warn", 132 ], + // "max-nested-callbacks": [ "warn", 8 ], + // "max-params": [ "warn", 8 ], + // "new-cap": "warn", + // "new-parens": "warn", + // "no-array-constructor": "warn", + // "no-bitwise": "off", + // "no-continue": "off", + // "no-inline-comments": "off", + // "no-lonely-if": "warn", + "no-mixed-spaces-and-tabs": "warn", + "no-multiple-empty-lines": "warn", + "no-negated-condition": "warn", + // "no-nested-ternary": "warn", + // "no-new-object": "warn", + // "no-plusplus": "off", + // "no-spaced-func": "warn", + // "no-ternary": "off", + // "no-trailing-spaces": "warn", + // "no-underscore-dangle": "warn", + "no-unneeded-ternary": "warn", + // "object-curly-spacing": [ "warn", "always" ], + // "one-var": "off", + // "operator-assignment": [ "warn", "never" ], + // "operator-linebreak": [ "warn", "after" ], + // "padded-blocks": [ "warn", "never" ], + // "quote-props": [ "warn", "consistent-as-needed" ], + // "quotes": [ "warn", "single" ], + "require-jsdoc": [ "warn", { + "require": { + "FunctionDeclaration": true, + "MethodDefinition": true, + "ClassDeclaration": false + } + }], + // "semi-spacing": [ "warn", { "before": false, "after": true }], + // "semi": [ "error", "always" ], + // "sort-vars": "off", + "keyword-spacing": ["error", { "before": true, "after": true }] + // "space-before-blocks": [ "warn", "always" ], + // "space-before-function-paren": [ "warn", "never" ], + // "space-in-parens": [ "warn", "never" ], + // "space-infix-ops": [ "warn", { "int32Hint": true } ], + // "space-return-throw-case": "error", + // "space-unary-ops": "error", + // "spaced-comment": [ "warn", "always" ], + // "wrap-regex": "warn" + } +} diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 198bc80ef0fe4..367ae4f302d8b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -15,7 +15,7 @@ body: required: true - type: textarea attributes: - label: Expected behaviour + label: Expected behavior description: A clear and concise description of what you expected to happen. - type: textarea diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000000..d762530895ca6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,25 @@ +version: 2 +updates: + # Maintain dependencies for NPM + - package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + commit-message: + prefix: "build(deps)" + prefix-development: "build(deps-dev)" + reviewers: + - "qwerty541" + + # Maintain dependencies for GitHub Actions + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + commit-message: + prefix: "ci(deps)" + prefix-development: "ci(deps-dev)" + reviewers: + - "qwerty541" diff --git a/.github/labeler.yml b/.github/labeler.yml index be97765f07e42..46d637d7b5b2e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,95 @@ -themes: themes/index.js -doc-translation: docs/* -card-i18n: src/translations.js +themes: + - changed-files: + - any-glob-to-any-file: + - themes/index.js + +doc-translation: + - changed-files: + - any-glob-to-any-file: + - docs/* + +card-i18n: + - changed-files: + - any-glob-to-any-file: + - src/translations.js + - src/common/I18n.js + +documentation: + - changed-files: + - any-glob-to-any-file: + - readme.md + - CONTRIBUTING.md + - CODE_OF_CONDUCT.md + - SECURITY.md + +dependencies: + - changed-files: + - any-glob-to-any-file: + - package.json + - package-lock.json + +lang-card: + - changed-files: + - any-glob-to-any-file: + - api/top-langs.js + - src/cards/top-languages-card.js + - src/fetchers/top-languages-fetcher.js + - tests/fetchTopLanguages.test.js + - tests/renderTopLanguagesCard.test.js + - tests/top-langs.test.js + +repo-card: + - changed-files: + - any-glob-to-any-file: + - api/pin.js + - src/cards/repo-card.js + - src/fetchers/repo-fetcher.js + - tests/fetchRepo.test.js + - tests/renderRepoCard.test.js + - tests/pin.test.js + +stats-card: + - changed-files: + - any-glob-to-any-file: + - api/index.js + - src/cards/stats-card.js + - src/fetchers/stats-fetcher.js + - tests/fetchStats.test.js + - tests/renderStatsCard.test.js + - tests/api.test.js + +wakatime-card: + - changed-files: + - any-glob-to-any-file: + - api/wakatime.js + - src/cards/wakatime-card.js + - src/fetchers/wakatime-fetcher.js + - tests/fetchWakatime.test.js + - tests/renderWakatimeCard.test.js + - tests/wakatime.test.js + +gist-card: + - changed-files: + - any-glob-to-any-file: + - api/gist.js + - src/cards/gist-card.js + - src/fetchers/gist-fetcher.js + - tests/fetchGist.test.js + - tests/renderGistCard.test.js + - tests/gist.test.js + +ranks: + - changed-files: + - any-glob-to-any-file: + - src/calculateRank.js + +ci: + - changed-files: + - any-glob-to-any-file: + - .github/workflows/* + - scripts/* + +infrastructure: + - changed-files: + - any-glob-to-any-file: + - .eslintrc.json diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000000000..f6897b2a830e7 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,41 @@ +name: "Static code analysis workflow (CodeQL)" + +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: write + statuses: read + +jobs: + CodeQL-Build: + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5 + with: + languages: javascript + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5 diff --git a/.github/workflows/deploy-prep.py b/.github/workflows/deploy-prep.py new file mode 100644 index 0000000000000..794c19a296122 --- /dev/null +++ b/.github/workflows/deploy-prep.py @@ -0,0 +1,10 @@ +import os + +file = open('./vercel.json', 'r') +str = file.read() +file = open('./vercel.json', 'w') + +str = str.replace('"maxDuration": 10', '"maxDuration": 30') + +file.write(str) +file.close() diff --git a/.github/workflows/deploy-prep.yml b/.github/workflows/deploy-prep.yml new file mode 100644 index 0000000000000..4f836bc9d8860 --- /dev/null +++ b/.github/workflows/deploy-prep.yml @@ -0,0 +1,20 @@ +name: Deployment Prep +on: + workflow_dispatch: + push: + branches: + - master + +jobs: + config: + if: github.repository == 'anuraghazra/github-readme-stats' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Deployment Prep + run: python ./.github/workflows/deploy-prep.py + - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1 + with: + branch: vercel + create_branch: true + push_options: "--force" diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index b9d275f5d5828..58ffab788e5b9 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -2,22 +2,25 @@ name: Test Deployment on: deployment_status: +permissions: read-all + jobs: e2eTests: if: + github.repository == 'anuraghazra/github-readme-stats' && github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' name: Perform 2e2 tests runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: node-version: ${{ matrix.node-version }} cache: npm diff --git a/.github/workflows/empty-issues-closer.yaml b/.github/workflows/empty-issues-closer.yml similarity index 63% rename from .github/workflows/empty-issues-closer.yaml rename to .github/workflows/empty-issues-closer.yml index b20eef32fefb8..b1324f746a70d 100644 --- a/.github/workflows/empty-issues-closer.yaml +++ b/.github/workflows/empty-issues-closer.yml @@ -6,15 +6,31 @@ on: - opened - edited +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: write + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read + jobs: closeEmptyIssuesAndTemplates: + if: github.repository == 'anuraghazra/github-readme-stats' name: Close empty issues runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # NOTE: Retrieve issue templates. + # NOTE: Retrieve issue templates. + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Run empty issues closer action - uses: rickstaa/empty-issues-closer-action@v1 + uses: rickstaa/empty-issues-closer-action@e96914613221511279ca25f50fd4acc85e331d99 # v1.1.74 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/generate-theme-doc.yml b/.github/workflows/generate-theme-doc.yml index d5fac06381943..61a004cc24d22 100644 --- a/.github/workflows/generate-theme-doc.yml +++ b/.github/workflows/generate-theme-doc.yml @@ -6,23 +6,41 @@ on: paths: - "themes/index.js" +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read + jobs: generateThemeDoc: runs-on: ubuntu-latest name: Generate theme doc strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: node-version: ${{ matrix.node-version }} cache: npm + # Fix the unsafe repo error which was introduced by the CVE-2022-24765 git patches. + - name: Fix unsafe repo error + run: git config --global --add safe.directory ${{ github.workspace }} + - name: npm install, generate readme run: | npm ci @@ -31,7 +49,7 @@ jobs: CI: true - name: Run Script - uses: skx/github-action-tester@master + uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0 with: script: ./scripts/push-theme-readme.sh env: diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index c401d32ee4b9c..5318b304d3a36 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -2,10 +2,26 @@ name: "Pull Request Labeler" on: - pull_request_target +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: write + repository-projects: read + security-events: read + statuses: read + jobs: triage: + if: github.repository == 'anuraghazra/github-readme-stats' runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true diff --git a/.github/workflows/ossf-analysis.yml b/.github/workflows/ossf-analysis.yml new file mode 100644 index 0000000000000..307005504f0d6 --- /dev/null +++ b/.github/workflows/ossf-analysis.yml @@ -0,0 +1,49 @@ +name: OSSF Scorecard analysis workflow +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: read-all + +jobs: + analysis: + if: github.repository == 'anuraghazra/github-readme-stats' + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed if using Code scanning alerts + security-events: write + # Needed for GitHub OIDC token if publish_results is true + id-token: write + + steps: + - name: "Checkout code" + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 + with: + results_file: results.sarif + results_format: sarif + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # required for Code scanning alerts + - name: "Upload SARIF results to code scanning" + uses: github/codeql-action/upload-sarif@fdcae64e1484d349b3366718cdfef3d404390e85 # v2.22.1 + with: + sarif_file: results.sarif diff --git a/.github/workflows/preview-theme.yml b/.github/workflows/preview-theme.yml index 132d4eb741e14..24b3a554fb770 100644 --- a/.github/workflows/preview-theme.yml +++ b/.github/workflows/preview-theme.yml @@ -7,24 +7,38 @@ on: paths: - "themes/index.js" +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: write + repository-projects: read + security-events: read + statuses: read + jobs: previewTheme: name: Install & Preview runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: node-version: ${{ matrix.node-version }} cache: npm - - uses: bahmutov/npm-install@v1 + - uses: bahmutov/npm-install@e5c7e14408aa6089501de32bd16123b41738047e # v1.10.2 with: useLockFile: false diff --git a/.github/workflows/prs-cache-clean.yml b/.github/workflows/prs-cache-clean.yml new file mode 100644 index 0000000000000..9c6351149f254 --- /dev/null +++ b/.github/workflows/prs-cache-clean.yml @@ -0,0 +1,47 @@ +name: prs cache clean +on: + pull_request: + types: + - closed + +permissions: + actions: write + checks: read + contents: read + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read + +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Cleanup + run: | + gh extension install actions/gh-actions-cache + + REPO=${{ github.repository }} + BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" + + echo "Fetching list of cache key" + cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) + + ## Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting caches..." + for cacheKey in $cacheKeysForPR + do + gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm + done + echo "Done" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale-theme-pr-closer.yaml b/.github/workflows/stale-theme-pr-closer.yaml deleted file mode 100644 index 9a6249825263e..0000000000000 --- a/.github/workflows/stale-theme-pr-closer.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Close stale theme pull requests that have the 'invalid' label. -on: - schedule: - - cron: "0 0 */7 * *" - -jobs: - closeOldThemePrs: - name: Close stale 'invalid' theme PRs - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - - steps: - - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: npm - - - uses: bahmutov/npm-install@v1 - with: - useLockFile: false - - - run: npm run close-stale-theme-prs - env: - STALE_DAYS: 20 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale-theme-pr-closer.yml b/.github/workflows/stale-theme-pr-closer.yml new file mode 100644 index 0000000000000..4abd79aa9bde0 --- /dev/null +++ b/.github/workflows/stale-theme-pr-closer.yml @@ -0,0 +1,54 @@ +name: Close stale theme pull requests that have the 'invalid' label. +on: + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: "0 0 */7 * *" + +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: write + repository-projects: read + security-events: read + statuses: read + +jobs: + closeOldThemePrs: + if: github.repository == 'anuraghazra/github-readme-stats' + name: Close stale 'invalid' theme PRs + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Setup Node + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + - uses: bahmutov/npm-install@e5c7e14408aa6089501de32bd16123b41738047e # v1.10.2 + with: + useLockFile: false + + - run: npm run close-stale-theme-prs + env: + STALE_DAYS: 20 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe34668d3e8d2..625635054e8e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,24 +2,26 @@ name: Test on: push: branches: - - "*" + - master pull_request: branches: - master +permissions: read-all + jobs: build: name: Perform tests runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: node-version: ${{ matrix.node-version }} cache: npm @@ -29,9 +31,17 @@ jobs: npm ci npm run test + - name: Run ESLint + run: | + npm run lint + + - name: Run bench tests + run: | + npm run bench + - name: Run Prettier run: | npm run format:check - name: Code Coverage - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5 diff --git a/.github/workflows/top-issues-dashboard.yml b/.github/workflows/top-issues-dashboard.yml index 2b36e529de454..e4ebadb923960 100644 --- a/.github/workflows/top-issues-dashboard.yml +++ b/.github/workflows/top-issues-dashboard.yml @@ -1,20 +1,46 @@ name: Update top issues dashboard on: schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * - cron: "0 0 */3 * *" + workflow_dispatch: + +permissions: + actions: read + checks: read + contents: read + deployments: read + issues: write + discussions: read + packages: read + pages: read + pull-requests: write + repository-projects: read + security-events: read + statuses: read jobs: showAndLabelTopIssues: + if: github.repository == 'anuraghazra/github-readme-stats' name: Update top issues Dashboard. runs-on: ubuntu-latest steps: - name: Run top issues action - uses: rickstaa/top-issues-action@v1 + uses: rickstaa/top-issues-action@7e8dda5d5ae3087670f9094b9724a9a091fc3ba1 # v1.3.101 env: github_token: ${{ secrets.GITHUB_TOKEN }} with: + top_list_size: 10 filter: "1772" - label: false + label: true dashboard: true dashboard_show_total_reactions: true top_issues: true diff --git a/.github/workflows/update-langs.yml b/.github/workflows/update-langs.yml new file mode 100644 index 0000000000000..55f89656ab769 --- /dev/null +++ b/.github/workflows/update-langs.yml @@ -0,0 +1,67 @@ +name: Update supported languages +on: + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: "0 0 */30 * *" + +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: write + repository-projects: read + security-events: read + statuses: read + +jobs: + updateLanguages: + if: github.repository == 'anuraghazra/github-readme-stats' + name: Update supported languages + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Setup Node + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + - name: Install dependencies + run: npm ci + env: + CI: true + + - name: Run update-languages-json.js script + run: npm run generate-langs-json + + - name: Create Pull Request if upstream language file is changed + uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 + with: + commit-message: "refactor: update languages JSON" + branch: "update_langs/patch" + delete-branch: true + title: Update languages JSON + body: + "The + [update-langs](https://github.com/anuraghazra/github-readme-stats/actions/workflows/update-langs.yaml) + action found new/updated languages in the [upstream languages JSON + file](https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml)." + labels: "ci, lang-card" diff --git a/.gitignore b/.gitignore index 2cdfa3d334808..b1d9a017c5b80 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,15 @@ .env node_modules *.lock -.vscode/ .idea/ coverage +benchmarks vercel_token # IDE -.vscode +.vscode/* +!.vscode/extensions.json +!.vscode/settings.json *.code-workspace + +.vercel diff --git a/.husky/pre-commit b/.husky/pre-commit index e1c12eb032030..5e59395d1070d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,3 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npm test +npm run lint npx lint-staged diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000000..25bf17fc5aaab --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000000..48d1f95eda4be --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "yzhang.markdown-all-in-one", + "esbenp.prettier-vscode", + "dbaeumer.vscode-eslint" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000..761ce7a6b370d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "markdown.extension.toc.levels": "1..3", + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d4b558abe6f1..f607da7b512c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,11 +2,11 @@ We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: -- Reporting an issue -- Discussing the current state of the code -- Submitting a fix -- Proposing new features -- Becoming a maintainer +- Reporting [an issue](https://github.com/anuraghazra/github-readme-stats/issues/new?assignees=&labels=bug&template=bug_report.yml). +- [Discussing](https://github.com/anuraghazra/github-readme-stats/discussions) the current state of the code. +- Submitting [a fix](https://github.com/anuraghazra/github-readme-stats/compare). +- Proposing [new features](https://github.com/anuraghazra/github-readme-stats/issues/new?assignees=&labels=enhancement&template=feature_request.yml). +- Becoming a maintainer. ## All Changes Happen Through Pull Requests @@ -33,25 +33,29 @@ _(make sure you already have a [Vercel](https://vercel.com/) account)_ 1. Install [Vercel CLI](https://vercel.com/download). 2. Fork the repository and clone the code to your local machine. 3. Run `npm install` in the repository root. -4. Run the command "vercel" in the root and follow the steps there. -5. Open `vercel.json` and set the maxDuration to 10. -6. Create a `.env` file in the root of the directory. -7. In the .env file add a new variable named "PAT_1" with your [GitHub Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). -8. Run the command "vercel dev" to start a development server at . +4. Run the command `vercel` in the root and follow the steps there. +5. Run the command `vercel dev` to start a development server at . +6. The cards will then be available from this local endpoint (i.e. `http://localhost:3000/api?username=anuraghazra`). + +> [!NOTE]\ +> You can debug the package code in [Vscode](https://code.visualstudio.com/) by using the [Node.js: Attach to process](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_setting-up-an-attach-configuration) debug option. You can also debug any tests using the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest). For more information, see https://github.com/jest-community/vscode-jest/issues/912. ## Themes Contribution -GitHub Readme Stats supports custom theming, and you can also contribute new themes! +We're currently paused addition of new themes to decrease maintenance efforts. All pull requests related to new themes will be closed. + +> [!NOTE]\ +> If you are considering contributing your theme just because you are using it personally, then instead of adding it to our theme collection, you can use card [customization options](./readme.md#customization). -All you need to do is edit the [themes/index.js](./themes/index.js) file and add your theme at the end of the file. +## Translations Contribution -While creating the Pull request to add a new theme **don't forget to add a screenshot of how your theme looks**, you can also test how it looks using custom URL parameters like `title_color`, `icon_color`, `bg_color`, `text_color`, `border_color` +GitHub Readme Stats supports multiple languages, if we are missing your language, you can contribute it! You can check the currently supported languages [here](./readme.md#available-locales). -> NOTE: If you are contributing your theme just because you are using it personally, then you can [customize the looks](./readme.md#customization) of your card with URL params instead. +To contribute your language you need to edit the [src/translations.js](./src/translations.js) file and add new property to each object where the key is the language code in [ISO 639-1 standard](https://www.andiamo.co.uk/resources/iso-language-codes/) and the value is the translated string. ## Any contributions you make will be under the MIT Software License -In short, when you submit changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. +In short, when you submit changes, your submissions are understood to be under the same [MIT License](https://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. ## Report issues/bugs using GitHub's [issues](https://github.com/anuraghazra/github-readme-stats/issues) @@ -104,7 +108,3 @@ People _love_ thorough bug reports. I'm not even kidding. - A quick idea summary - What & why do you want to add the specific feature - Additional context like images, links to resources to implement the feature, etc. - -## License - -By contributing, you agree that your contributions will be licensed under its [MIT License](./LICENSE). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000000..9fb7339a63ce1 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,39 @@ +# GitHub Readme Stats Security Policies and Procedures + +This document outlines security procedures and general policies for the +GitHub Readme Stats project. + +- [Reporting a Vulnerability](#reporting-a-vulnerability) +- [Disclosure Policy](#disclosure-policy) + +## Reporting a Vulnerability + +The GitHub Readme Stats team and community take all security vulnerabilities +seriously. Thank you for improving the security of our open source +software. We appreciate your efforts and responsible disclosure and will +make every effort to acknowledge your contributions. + +Report security vulnerabilities by emailing the GitHub Readme Stats team at: + +``` +hazru.anurag@gmail.com +``` + +The lead maintainer will acknowledge your email within 24 hours, and will +send a more detailed response within 48 hours indicating the next steps in +handling your report. After the initial reply to your report, the security +team will endeavor to keep you informed of the progress towards a fix and +full announcement, and may ask for additional information or guidance. + +Report security vulnerabilities in third-party modules to the person or +team maintaining the module. + +## Disclosure Policy + +When the security team receives a security bug report, they will assign it +to a primary handler. This person will coordinate the fix and release +process, involving the following steps: + + * Confirm the problem. + * Audit code to find any potential similar problems. + * Prepare fixes and release them as fast as possible. diff --git a/api/gist.js b/api/gist.js new file mode 100644 index 0000000000000..8821c7b094b9e --- /dev/null +++ b/api/gist.js @@ -0,0 +1,104 @@ +import { + clampValue, + CONSTANTS, + renderError, + parseBoolean, +} from "../src/common/utils.js"; +import { isLocaleAvailable } from "../src/translations.js"; +import { renderGistCard } from "../src/cards/gist-card.js"; +import { fetchGist } from "../src/fetchers/gist-fetcher.js"; + +export default async (req, res) => { + const { + id, + title_color, + icon_color, + text_color, + bg_color, + theme, + cache_seconds, + locale, + border_radius, + border_color, + show_owner, + hide_border, + } = req.query; + + res.setHeader("Content-Type", "image/svg+xml"); + + if (locale && !isLocaleAvailable(locale)) { + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); + } + + try { + const gistData = await fetchGist(id); + + let cacheSeconds = clampValue( + parseInt(cache_seconds || CONSTANTS.SIX_HOURS, 10), + CONSTANTS.SIX_HOURS, + CONSTANTS.ONE_DAY, + ); + cacheSeconds = process.env.CACHE_SECONDS + ? parseInt(process.env.CACHE_SECONDS, 10) || cacheSeconds + : cacheSeconds; + + /* + if star count & fork count is over 1k then we are kFormating the text + and if both are zero we are not showing the stats + so we can just make the cache longer, since there is no need to frequent updates + */ + const stars = gistData.starsCount; + const forks = gistData.forksCount; + const isBothOver1K = stars > 1000 && forks > 1000; + const isBothUnder1 = stars < 1 && forks < 1; + if (!cache_seconds && (isBothOver1K || isBothUnder1)) { + cacheSeconds = CONSTANTS.SIX_HOURS; + } + + res.setHeader( + "Cache-Control", + `max-age=${ + cacheSeconds / 2 + }, s-maxage=${cacheSeconds}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); + + return res.send( + renderGistCard(gistData, { + title_color, + icon_color, + text_color, + bg_color, + theme, + border_radius, + border_color, + locale: locale ? locale.toLowerCase() : null, + show_owner: parseBoolean(show_owner), + hide_border: parseBoolean(hide_border), + }), + ); + } catch (err) { + res.setHeader( + "Cache-Control", + `max-age=${CONSTANTS.ERROR_CACHE_SECONDS / 2}, s-maxage=${ + CONSTANTS.ERROR_CACHE_SECONDS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); // Use lower cache period for errors. + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); + } +}; diff --git a/api/index.js b/api/index.js index b449d43b49080..2029367ca3eb9 100644 --- a/api/index.js +++ b/api/index.js @@ -19,7 +19,6 @@ export default async (req, res) => { card_width, hide_rank, show_icons, - count_private, include_all_commits, line_height, title_color, @@ -35,31 +34,57 @@ export default async (req, res) => { locale, disable_animations, border_radius, + number_format, border_color, + rank_icon, + show, } = req.query; res.setHeader("Content-Type", "image/svg+xml"); if (blacklist.includes(username)) { - return res.send(renderError("Something went wrong")); + return res.send( + renderError("Something went wrong", "This username is blacklisted", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } if (locale && !isLocaleAvailable(locale)) { - return res.send(renderError("Something went wrong", "Language not found")); + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } try { + const showStats = parseArray(show); const stats = await fetchStats( username, - parseBoolean(count_private), parseBoolean(include_all_commits), parseArray(exclude_repo), + showStats.includes("prs_merged") || + showStats.includes("prs_merged_percentage"), + showStats.includes("discussions_started"), + showStats.includes("discussions_answered"), ); - const cacheSeconds = clampValue( - parseInt(cache_seconds || CONSTANTS.FOUR_HOURS, 10), - CONSTANTS.FOUR_HOURS, + let cacheSeconds = clampValue( + parseInt(cache_seconds || CONSTANTS.CARD_CACHE_SECONDS, 10), + CONSTANTS.SIX_HOURS, CONSTANTS.ONE_DAY, ); + cacheSeconds = process.env.CACHE_SECONDS + ? parseInt(process.env.CACHE_SECONDS, 10) || cacheSeconds + : cacheSeconds; res.setHeader( "Cache-Control", @@ -88,12 +113,28 @@ export default async (req, res) => { custom_title, border_radius, border_color, + number_format, locale: locale ? locale.toLowerCase() : null, disable_animations: parseBoolean(disable_animations), + rank_icon, + show: showStats, }), ); } catch (err) { - res.setHeader("Cache-Control", `no-cache, no-store, must-revalidate`); // Don't cache error responses. - return res.send(renderError(err.message, err.secondaryMessage)); + res.setHeader( + "Cache-Control", + `max-age=${CONSTANTS.ERROR_CACHE_SECONDS / 2}, s-maxage=${ + CONSTANTS.ERROR_CACHE_SECONDS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); // Use lower cache period for errors. + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/api/pin.js b/api/pin.js index 4838b0f02fece..0bc029d7ffda3 100644 --- a/api/pin.js +++ b/api/pin.js @@ -24,26 +24,46 @@ export default async (req, res) => { locale, border_radius, border_color, + description_lines_count, } = req.query; res.setHeader("Content-Type", "image/svg+xml"); if (blacklist.includes(username)) { - return res.send(renderError("Something went wrong")); + return res.send( + renderError("Something went wrong", "This username is blacklisted", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } if (locale && !isLocaleAvailable(locale)) { - return res.send(renderError("Something went wrong", "Language not found")); + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } try { const repoData = await fetchRepo(username, repo); let cacheSeconds = clampValue( - parseInt(cache_seconds || CONSTANTS.FOUR_HOURS, 10), - CONSTANTS.FOUR_HOURS, + parseInt(cache_seconds || CONSTANTS.CARD_CACHE_SECONDS, 10), + CONSTANTS.SIX_HOURS, CONSTANTS.ONE_DAY, ); + cacheSeconds = process.env.CACHE_SECONDS + ? parseInt(process.env.CACHE_SECONDS, 10) || cacheSeconds + : cacheSeconds; /* if star count & fork count is over 1k then we are kFormating the text @@ -55,7 +75,7 @@ export default async (req, res) => { const isBothOver1K = stars > 1000 && forks > 1000; const isBothUnder1 = stars < 1 && forks < 1; if (!cache_seconds && (isBothOver1K || isBothUnder1)) { - cacheSeconds = CONSTANTS.FOUR_HOURS; + cacheSeconds = CONSTANTS.SIX_HOURS; } res.setHeader( @@ -77,10 +97,24 @@ export default async (req, res) => { border_color, show_owner: parseBoolean(show_owner), locale: locale ? locale.toLowerCase() : null, + description_lines_count, }), ); } catch (err) { - res.setHeader("Cache-Control", `no-cache, no-store, must-revalidate`); // Don't cache error responses. - return res.send(renderError(err.message, err.secondaryMessage)); + res.setHeader( + "Cache-Control", + `max-age=${CONSTANTS.ERROR_CACHE_SECONDS / 2}, s-maxage=${ + CONSTANTS.ERROR_CACHE_SECONDS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); // Use lower cache period for errors. + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/api/status/pat-info.js b/api/status/pat-info.js new file mode 100644 index 0000000000000..1f17bf65aadb9 --- /dev/null +++ b/api/status/pat-info.js @@ -0,0 +1,158 @@ +/** + * @file Contains a simple cloud function that can be used to check which PATs are no + * longer working. It returns a list of valid PATs, expired PATs and PATs with errors. + * + * @description This function is currently rate limited to 1 request per 5 minutes. + */ + +import { logger, request, dateDiff } from "../../src/common/utils.js"; +export const RATE_LIMIT_SECONDS = 60 * 5; // 1 request per 5 minutes + +/** + * @typedef {import('axios').AxiosRequestHeaders} AxiosRequestHeaders Axios request headers. + * @typedef {import('axios').AxiosResponse} AxiosResponse Axios response. + */ + +/** + * Simple uptime check fetcher for the PATs. + * + * @param {AxiosRequestHeaders} variables Fetcher variables. + * @param {string} token GitHub token. + * @returns {Promise} The response. + */ +const uptimeFetcher = (variables, token) => { + return request( + { + query: ` + query { + rateLimit { + remaining + resetAt + }, + }`, + variables, + }, + { + Authorization: `bearer ${token}`, + }, + ); +}; + +const getAllPATs = () => { + return Object.keys(process.env).filter((key) => /PAT_\d*$/.exec(key)); +}; + +/** + * @typedef {(variables: AxiosRequestHeaders, token: string) => Promise} Fetcher The fetcher function. + * @typedef {{validPATs: string[], expiredPATs: string[], exhaustedPATs: string[], suspendedPATs: string[], errorPATs: string[], details: any}} PATInfo The PAT info. + */ + +/** + * Check whether any of the PATs is expired. + * + * @param {Fetcher} fetcher The fetcher function. + * @param {AxiosRequestHeaders} variables Fetcher variables. + * @returns {Promise} The response. + */ +const getPATInfo = async (fetcher, variables) => { + const details = {}; + const PATs = getAllPATs(); + + for (const pat of PATs) { + try { + const response = await fetcher(variables, process.env[pat]); + const errors = response.data.errors; + const hasErrors = Boolean(errors); + const errorType = errors?.[0]?.type; + const isRateLimited = + (hasErrors && errorType === "RATE_LIMITED") || + response.data.data?.rateLimit?.remaining === 0; + + // Store PATs with errors. + if (hasErrors && errorType !== "RATE_LIMITED") { + details[pat] = { + status: "error", + error: { + type: errors[0].type, + message: errors[0].message, + }, + }; + continue; + } else if (isRateLimited) { + const date1 = new Date(); + const date2 = new Date(response.data?.data?.rateLimit?.resetAt); + details[pat] = { + status: "exhausted", + remaining: 0, + resetIn: dateDiff(date2, date1) + " minutes", + }; + } else { + details[pat] = { + status: "valid", + remaining: response.data.data.rateLimit.remaining, + }; + } + } catch (err) { + // Store the PAT if it is expired. + const errorMessage = err.response?.data?.message?.toLowerCase(); + if (errorMessage === "bad credentials") { + details[pat] = { + status: "expired", + }; + } else if (errorMessage === "sorry. your account was suspended.") { + details[pat] = { + status: "suspended", + }; + } else { + throw err; + } + } + } + + const filterPATsByStatus = (status) => { + return Object.keys(details).filter((pat) => details[pat].status === status); + }; + + const sortedDetails = Object.keys(details) + .sort() + .reduce((obj, key) => { + obj[key] = details[key]; + return obj; + }, {}); + + return { + validPATs: filterPATsByStatus("valid"), + expiredPATs: filterPATsByStatus("expired"), + exhaustedPATs: filterPATsByStatus("exhausted"), + suspendedPATs: filterPATsByStatus("suspended"), + errorPATs: filterPATsByStatus("error"), + details: sortedDetails, + }; +}; + +/** + * Cloud function that returns information about the used PATs. + * + * @param {any} _ The request. + * @param {any} res The response. + * @returns {Promise} The response. + */ +export default async (_, res) => { + res.setHeader("Content-Type", "application/json"); + try { + // Add header to prevent abuse. + const PATsInfo = await getPATInfo(uptimeFetcher, {}); + if (PATsInfo) { + res.setHeader( + "Cache-Control", + `max-age=0, s-maxage=${RATE_LIMIT_SECONDS}`, + ); + } + res.send(JSON.stringify(PATsInfo, null, 2)); + } catch (err) { + // Throw error if something went wrong. + logger.error(err); + res.setHeader("Cache-Control", "no-store"); + res.send("Something went wrong: " + err.message); + } +}; diff --git a/api/status/up.js b/api/status/up.js new file mode 100644 index 0000000000000..786ac0b335a79 --- /dev/null +++ b/api/status/up.js @@ -0,0 +1,123 @@ +/** + * @file Contains a simple cloud function that can be used to check if the PATs are still + * functional. + * + * @description This function is currently rate limited to 1 request per 5 minutes. + */ + +import retryer from "../../src/common/retryer.js"; +import { logger, request } from "../../src/common/utils.js"; + +export const RATE_LIMIT_SECONDS = 60 * 5; // 1 request per 5 minutes + +/** + * @typedef {import('axios').AxiosRequestHeaders} AxiosRequestHeaders Axios request headers. + * @typedef {import('axios').AxiosResponse} AxiosResponse Axios response. + */ + +/** + * Simple uptime check fetcher for the PATs. + * + * @param {AxiosRequestHeaders} variables Fetcher variables. + * @param {string} token GitHub token. + * @returns {Promise} The response. + */ +const uptimeFetcher = (variables, token) => { + return request( + { + query: ` + query { + rateLimit { + remaining + } + } + `, + variables, + }, + { + Authorization: `bearer ${token}`, + }, + ); +}; + +/** + * @typedef {{ + * schemaVersion: number; + * label: string; + * message: "up" | "down"; + * color: "brightgreen" | "red"; + * isError: boolean + * }} ShieldsResponse Shields.io response object. + */ + +/** + * Creates Json response that can be used for shields.io dynamic card generation. + * + * @param {boolean} up Whether the PATs are up or not. + * @returns {ShieldsResponse} Dynamic shields.io JSON response object. + * + * @see https://shields.io/endpoint. + */ +const shieldsUptimeBadge = (up) => { + const schemaVersion = 1; + const isError = true; + const label = "Public Instance"; + const message = up ? "up" : "down"; + const color = up ? "brightgreen" : "red"; + return { + schemaVersion, + label, + message, + color, + isError, + }; +}; + +/** + * Cloud function that returns whether the PATs are still functional. + * + * @param {any} req The request. + * @param {any} res The response. + * @returns {Promise} Nothing. + */ +export default async (req, res) => { + let { type } = req.query; + type = type ? type.toLowerCase() : "boolean"; + + res.setHeader("Content-Type", "application/json"); + + try { + let PATsValid = true; + try { + await retryer(uptimeFetcher, {}); + } catch (err) { + PATsValid = false; + } + + if (PATsValid) { + res.setHeader( + "Cache-Control", + `max-age=0, s-maxage=${RATE_LIMIT_SECONDS}`, + ); + } else { + res.setHeader("Cache-Control", "no-store"); + } + + switch (type) { + case "shields": + res.send(shieldsUptimeBadge(PATsValid)); + break; + case "json": + res.send({ up: PATsValid }); + break; + default: + res.send(PATsValid); + break; + } + } catch (err) { + // Return fail boolean if something went wrong. + logger.error(err); + res.setHeader("Cache-Control", "no-store"); + res.send("Something went wrong: " + err.message); + } +}; diff --git a/api/top-langs.js b/api/top-langs.js index d183d3b455ca0..382ee4205a87e 100644 --- a/api/top-langs.js +++ b/api/top-langs.js @@ -25,32 +25,59 @@ export default async (req, res) => { layout, langs_count, exclude_repo, + size_weight, + count_weight, custom_title, locale, border_radius, border_color, + disable_animations, + hide_progress, } = req.query; res.setHeader("Content-Type", "image/svg+xml"); if (blacklist.includes(username)) { - return res.send(renderError("Something went wrong")); + return res.send( + renderError("Something went wrong", "This username is blacklisted", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } if (locale && !isLocaleAvailable(locale)) { return res.send(renderError("Something went wrong", "Locale not found")); } + if ( + layout !== undefined && + (typeof layout !== "string" || + !["compact", "normal", "donut", "donut-vertical", "pie"].includes(layout)) + ) { + return res.send( + renderError("Something went wrong", "Incorrect layout input"), + ); + } + try { const topLangs = await fetchTopLanguages( username, parseArray(exclude_repo), + size_weight, + count_weight, ); - const cacheSeconds = clampValue( - parseInt(cache_seconds || CONSTANTS.FOUR_HOURS, 10), - CONSTANTS.FOUR_HOURS, + let cacheSeconds = clampValue( + parseInt(cache_seconds || CONSTANTS.CARD_CACHE_SECONDS, 10), + CONSTANTS.SIX_HOURS, CONSTANTS.ONE_DAY, ); + cacheSeconds = process.env.CACHE_SECONDS + ? parseInt(process.env.CACHE_SECONDS, 10) || cacheSeconds + : cacheSeconds; res.setHeader( "Cache-Control", @@ -75,10 +102,25 @@ export default async (req, res) => { border_radius, border_color, locale: locale ? locale.toLowerCase() : null, + disable_animations: parseBoolean(disable_animations), + hide_progress: parseBoolean(hide_progress), }), ); } catch (err) { - res.setHeader("Cache-Control", `no-cache, no-store, must-revalidate`); // Don't cache error responses. - return res.send(renderError(err.message, err.secondaryMessage)); + res.setHeader( + "Cache-Control", + `max-age=${CONSTANTS.ERROR_CACHE_SECONDS / 2}, s-maxage=${ + CONSTANTS.ERROR_CACHE_SECONDS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); // Use lower cache period for errors. + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/api/wakatime.js b/api/wakatime.js index d439c5b7ac8c6..de263e0644c43 100644 --- a/api/wakatime.js +++ b/api/wakatime.js @@ -28,29 +28,37 @@ export default async (req, res) => { langs_count, hide, api_domain, - range, border_radius, border_color, + display_format, + disable_animations, } = req.query; res.setHeader("Content-Type", "image/svg+xml"); if (locale && !isLocaleAvailable(locale)) { - return res.send(renderError("Something went wrong", "Language not found")); + return res.send( + renderError("Something went wrong", "Language not found", { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } try { - const stats = await fetchWakatimeStats({ username, api_domain, range }); + const stats = await fetchWakatimeStats({ username, api_domain }); let cacheSeconds = clampValue( - parseInt(cache_seconds || CONSTANTS.FOUR_HOURS, 10), - CONSTANTS.FOUR_HOURS, + parseInt(cache_seconds || CONSTANTS.CARD_CACHE_SECONDS, 10), + CONSTANTS.SIX_HOURS, CONSTANTS.ONE_DAY, ); - - if (!cache_seconds) { - cacheSeconds = CONSTANTS.FOUR_HOURS; - } + cacheSeconds = process.env.CACHE_SECONDS + ? parseInt(process.env.CACHE_SECONDS, 10) || cacheSeconds + : cacheSeconds; res.setHeader( "Cache-Control", @@ -77,10 +85,25 @@ export default async (req, res) => { locale: locale ? locale.toLowerCase() : null, layout, langs_count, + display_format, + disable_animations: parseBoolean(disable_animations), }), ); } catch (err) { - res.setHeader("Cache-Control", `no-cache, no-store, must-revalidate`); // Don't cache error responses. - return res.send(renderError(err.message, err.secondaryMessage)); + res.setHeader( + "Cache-Control", + `max-age=${CONSTANTS.ERROR_CACHE_SECONDS / 2}, s-maxage=${ + CONSTANTS.ERROR_CACHE_SECONDS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); // Use lower cache period for errors. + return res.send( + renderError(err.message, err.secondaryMessage, { + title_color, + text_color, + bg_color, + border_color, + theme, + }), + ); } }; diff --git a/docs/readme_cn.md b/docs/readme_cn.md index 17fd2b710f220..0773656fc7e7c 100644 --- a/docs/readme_cn.md +++ b/docs/readme_cn.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

- 查看 Demo + 查看 Demo · - 报告 Bug + 报告 Bug · - 请求增加功能 + 请求增加功能

Français @@ -53,18 +53,32 @@ Nederlands . नेपाली + . + Türkçe

喜欢这个项目?请考虑捐赠来帮助它完善! -# 特性 - -- [GitHub 统计卡片](#GitHub-统计卡片) -- [GitHub 更多置顶](#GitHub-更多置顶) +# 特性 + +- [GitHub 统计卡片](#github-统计卡片) + - [隐藏指定统计](#隐藏指定统计) + - [将私人项目贡献添加到总提交计数中](#将私人项目贡献添加到总提交计数中) + - [显示图标](#显示图标) + - [主题](#主题) + - [自定义](#自定义) +- [GitHub 更多置顶](#github-更多置顶) + - [使用细则](#使用细则) + - [Demo](#demo) - [热门语言卡片](#热门语言卡片) -- [主题](#主题) -- [自定义](#自定义) -- [自己部署](#自己部署) + - [使用细则](#使用细则-1) + - [隐藏指定语言](#隐藏指定语言) + - [紧凑的语言卡片布局](#紧凑的语言卡片布局) + - [Demo](#demo-1) + - [全部 Demos](#全部-demos) + - [快速提示 (对齐 Repo 卡片)](#快速提示-对齐-repo-卡片) + - [自己部署](#自己部署) + - [:sparkling\_heart: 支持这个项目](#sparkling_heart-支持这个项目) # GitHub 统计卡片 @@ -138,7 +152,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr - `bg_color` - 卡片背景颜色 _(十六进制色码)_ **或者** 以 _angle,start,end_ 的形式渐变 - `hide_border` - 隐藏卡的边框 _(布尔值)_ - `theme` - 主题名称,从[所有可用主题](../themes/README.md)中选择 -- `cache_seconds` - 手动设置缓存头 _(最小值: 1800,最大值: 86400)_ +- `cache_seconds` - 手动设置缓存头 _(最小值: 14400,最大值: 86400)_ - `locale` - 在卡片中设置语言 _(例如 cn, de, es, 等等)_ ##### bg_color 渐变 @@ -169,7 +183,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr - `hide` - 从卡片中隐藏指定语言 _(Comma seperated values)_ - `hide_title` - _(boolean)_ -- `layout` - 在两个可用布局 `default` & `compact` 间切换 +- `layout` - 提供五种布局 `normal` & `compact` & `donut` & `donut-vertical` & `pie` 间切换 - `card_width` - 手动设置卡片的宽度 _(number)_ > :warning: **重要:** @@ -301,7 +315,7 @@ _注意:热门语言并不表示我的技能水平或类似的水平,它是 ## 自己部署 -#### [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107) +#### [查看分步视频教程 作者:@codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107) 因为 GitHub 的 API 每个小时只允许 5 千次请求,我的 `https://github-readme-stats.vercel.app/api` 很有可能会触发限制。如果你将其托管在自己的 Vercel 服务器上,那么你就不必为此担心。点击 deploy 按钮来开始你的部署! diff --git a/docs/readme_de.md b/docs/readme_de.md index 55523fe342ef0..edc5f8b24c695 100644 --- a/docs/readme_de.md +++ b/docs/readme_de.md @@ -8,8 +8,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -17,22 +20,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

- Beispiele ansehen + Beispiele ansehen · - Fehler melden + Fehler melden · - Funktion wünschen + Funktion wünschen

Français @@ -54,19 +54,33 @@ Nederlands . नेपाली + . + Türkçe

Du magst das Projekt? Wie wäre es mit einer kleinen Spende um es weiterhin am Leben zu erhalten? -# Funktionen +# Funktionen - [GitHub Statistiken-Karte](#github-statistiken-karte) -- [GitHub Extra Pins](#github-extra-pins) + - [Verbergen individueller Statistiken](#verbergen-individueller-statistiken) + - [Symbole anzeigen](#symbole-anzeigen) + - [Erscheinungsbild/Themes](#erscheinungsbildthemes) + - [Anpassungen/Personalisierung](#anpassungenpersonalisierung) +- [GitHub Extra-Pins](#github-extra-pins) + - [Benutzung](#benutzung) + - [Beispiele](#beispiele) - [Top Programmiersprachen-Karte](#top-programmiersprachen-karte) -- [Wakatime Wochen-Statistik](#wakatime-wochen-statistik) -- [Erscheinungsbild/Themes](#erscheinungsbildthemes) -- [Anpassungen/Personalisierung](#anpassungenpersonalisierung) -- [Selber betreiben](#betreibe-es-auf-deiner-eigenen-vercel-instanz) + - [Benutzung](#benutzung-1) + - [Verbirg einzelne Sprachen](#verbirg-einzelne-sprachen) + - [Kompaktes Sprachen-Karte Layout](#kompaktes-sprachen-karte-layout) + - [Beispiel](#beispiel) +- [WakaTime Wochen-Statistik](#wakatime-wochen-statistik) + - [Beispiel](#beispiel-1) + - [Alle Beispiele](#alle-beispiele) + - [Kleiner Tipp (Ausrichten der Repo-Karte)](#kleiner-tipp-ausrichten-der-repo-karte) + - [Betreibe es auf deiner eigenen Vercel-Instanz](#betreibe-es-auf-deiner-eigenen-vercel-instanz) + - [:sparkling\_heart: Unterstütze das Projekt](#sparkling_heart-unterstütze-das-projekt) # GitHub Statistiken-Karte @@ -128,7 +142,7 @@ Du kannst das Erscheinungsbild deiner `Stats Card` oder `Repo Card`, mithilfe vo - `bg_color` - Hintergrundfarbe _(hex color)_ **oder** ein Farbverlauf in der Form von _winkel,start,ende_ - `hide_border` - Blendet den Rand der Karte aus _(Boolean)_ - `theme` - Name des Erscheinungsbildes/Themes [alle verfügbaren Themes](../themes/README.md) -- `cache_seconds` - manuelles festlegen der Cachezeiten _(min: 1800, max: 86400)_ +- `cache_seconds` - manuelles festlegen der Cachezeiten _(min: 14400, max: 86400)_ - `locale` - Stellen Sie die Sprache auf der Karte ein _(z.B. cn, de, es, etc.)_ ##### Farbverlauf in bg_color @@ -159,7 +173,7 @@ Du kannst mehrere, mit Kommas separierte, Werte in der bg_color Option angeben, - `hide` - Verbirgt die angegebenen Sprachen von der Karte _(Komma separierte Werte)_ - `hide_title` - _(Boolean)_ -- `layout` - Wechsel zwischen den zwei verfügbaren Layouts `default` & `compact` +- `layout` - Wechseln Sie zwischen den fünf verfügbaren Layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie` - `card_width` - Lege die Breite der Karte manuell fest _(Zahl)_ > :warning: **Wichtig:** @@ -175,7 +189,7 @@ Du kannst mehrere, mit Kommas separierte, Werte in der bg_color Option angeben, - `layout` - Wechselt zwischen zwei verschiedenen Layouts: `default` & `compact` - `langs_count` - Begrenzt die Anzahl der angezeigten Sprachen auf der Karte - `api_domain` - Legt eine benutzerdefinierte API Domain fest, z.B. für [Hakatime](https://github.com/mujx/hakatime) oder [Wakapi](https://github.com/muety/wakapi) -- `range` – Fragt eine andere Zeitspanne an, als jene, welche standardmäßig in Wakatime hinterlegt ist. Zum Beispiel `last_7_days`. Siehe [WakaTime API Dokumentation](https://wakatime.com/developers#stats). +- `range` – Fragt eine andere Zeitspanne an, als jene, welche standardmäßig in WakaTime hinterlegt ist. Zum Beispiel `last_7_days`. Siehe [WakaTime API Dokumentation](https://wakatime.com/developers#stats). --- @@ -246,23 +260,23 @@ Du kannst die `&layout=compact` Option nutzen, um das Kartendesign zu ändern. [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wakatime Wochen-Statistik +# WakaTime Wochen-Statistik -Ändere `?username=` in den eigenen [Wakatime](https://wakatime.com)-Benutzernamen. +Ändere `?username=` in den eigenen [WakaTime](https://wakatime.com)-Benutzernamen. ```md -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Beispiel -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) - Kompaktes Layout -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_es.md b/docs/readme_es.md index 5ddceec7b5e99..89f647f7e08c7 100644 --- a/docs/readme_es.md +++ b/docs/readme_es.md @@ -8,8 +8,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -17,22 +20,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

- Ver un ejemplo + Ver un ejemplo · - Reportar un bug + Reportar un bug · - Solicitar una mejora + Solicitar una mejora

Français @@ -60,15 +60,30 @@

¿Te gusta este proyecto? ¡Por favor, considera donar para ayudar a mejorarlo! -# Características +# Características - [Tarjeta de estadísticas de GitHub](#tarjeta-de-estadísticas-de-github) -- [Pins adicionales de GitHub](#pines-adicionales-de-github) + - [Ocultar estadísticas individualmente](#ocultar-estadísticas-individualmente) + - [Agregar contribuciones privadas al total de commits contados](#agregar-contribuciones-privadas-al-total-de-commits-contados) + - [Mostrar íconos](#mostrar-íconos) + - [Temas](#temas) + - [Personalización](#personalización) +- [Pines adicionales de GitHub](#pines-adicionales-de-github) + - [Utilización](#utilización) + - [Ejemplo](#ejemplo) - [Tarjeta de Lenguajes Principales](#tarjeta-de-lenguajes-principales) -- [Wakatime Week Stats](#estadísticas-de-la-semana-de-wakatime) -- [Temas](#temas) -- [Personalización](#personalización) -- [Despliega por tu cuenta](#despliega-tu-propia-instancia-de-vercel) + - [Utilización](#utilización-1) + - [Excluir repositorios individualmente](#excluir-repositorios-individualmente) + - [Ocultar lenguajes individualmente](#ocultar-lenguajes-individualmente) + - [Mostrar más lenguajes](#mostrar-más-lenguajes) + - [Diseño Compacto de Tarjeta de Lenguaje](#diseño-compacto-de-tarjeta-de-lenguaje) + - [Ejemplo](#ejemplo-1) +- [Estadísticas de la semana de WakaTime](#estadísticas-de-la-semana-de-wakatime) + - [Ejemplo](#ejemplo-2) + - [Todos los ejemplos](#todos-los-ejemplos) + - [Consejo rápido (para alinear las tarjetas de repositorio)](#consejo-rápido-para-alinear-las-tarjetas-de-repositorio) + - [Despliega tu propia instancia de Vercel](#despliega-tu-propia-instancia-de-vercel) + - [:sparkling\_heart: Apoya al proyecto](#sparkling_heart-apoya-al-proyecto) # Tarjeta de estadísticas de GitHub @@ -142,7 +157,7 @@ Puedes personalizar el aspecto de tu `Tarjeta de Estadísticas` o `Tarjeta de Re - `bg_color` - Color de fondo _(hex color)_ - `hide_border` - Oculta el borde de la tarjeta _(booleano)_ - `theme` - Nombre del tema, elige uno de [todos los temas disponible ](../themes/README.md) -- `cache_seconds` - Cache _(min: 1800, max: 86400)_ +- `cache_seconds` - Cache _(min: 14400, max: 86400)_ - `locale` - configurar el idioma en la tarjeta _(p.ej. cn, de, es, etc.)_ ##### Gradiente en `bg_color` @@ -175,7 +190,7 @@ Puedes pasar mútliples valores separados por coma en la opción `bg_color` para - `hide` - Oculta de la tarjeta los lenguajes especificados _(valores separados por comas)_ - `hide_title` - _(booleano)_ -- `layout` - Cambia entre los dos diseños disponibles `default` & `compact` +- `layout` - Cambiar entre los cinco diseños disponibles `normal` & `compact` & `donut` & `donut-vertical` & `pie` - `card_width` - Establece el ancho de la tarjeta manualmente _(número)_ - `langs_count` - Muestra más lenguajes en la tarjeta, entre 1-10, por defecto 5 _(número)_ - `exclude_repo` - Excluye los repositorios especificados _(valores separados por comas)_ @@ -185,7 +200,7 @@ Puedes pasar mútliples valores separados por coma en la opción `bg_color` para > Los nombres de los lenguajes deben estar codificados para URLs, como se especifica en [Código porciento](https://es.wikipedia.org/wiki/C%C3%B3digo_porciento) > (es decir: `c++` debería convertirse en `c%2B%2B`,`jupyter notebook` debería convertirse en `jupyter%20notebook`, etc.) -#### Opciones exclusivas de la Tarjeta de Wakatime: +#### Opciones exclusivas de la Tarjeta de WakaTime: - `hide_title` - _(booleano)_ - `line_height` - Establece el alto de línea entre texto _(número)_ @@ -277,23 +292,23 @@ Puedes usar la opción `& layout = compact` para cambiar el diseño de la tarjet [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Estadísticas de la semana de Wakatime +# Estadísticas de la semana de WakaTime -cambia el valor del parámetro `?username=` a tu username en [Wakatime](https://wakatime.com). +cambia el valor del parámetro `?username=` a tu username en [WakaTime](https://wakatime.com). ```md -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Ejemplo -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) - Diseño compacto -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) --- @@ -341,9 +356,9 @@ Escoja cualquiera de los [temas por defecto](#themes) [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Tarjeta de Wakatime +- Tarjeta de WakaTime -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_fr.md b/docs/readme_fr.md index 20996bd66dda8..0f035f96e76d7 100644 --- a/docs/readme_fr.md +++ b/docs/readme_fr.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

- Voir la démo + Voir la démo · - Soumettre un bug + Soumettre un bug · - Demander une nouveauté + Demander une nouveauté

Français @@ -53,18 +53,31 @@ Nederlands . नेपाली + . + Türkçe

Vous aimez ce projet? Pensez à faire un don pour l'améliorer! -# Features +# Features -- [Carte des stats GitHub](#carte-des-stats-github) +- [Carte des Stats GitHub](#carte-des-stats-github) + - [Cacher les statistiques individuelles](#cacher-les-statistiques-individuelles) + - [Afficher les icônes](#afficher-les-icônes) + - [Thèmes](#thèmes) + - [Personnalisation](#personnalisation) - [GitHub Extra Pins](#github-extra-pins) -- [Carte des meilleurs langages](#carte-des-langages-les--utilisés) -- [Themes](#thèmes) -- [Personnalisation](#personnalisation) -- [Deployer toi-même](#déployer-sur-votre-propre-instance-vercel) + - [Usage](#usage) + - [Démo](#démo) +- [Carte des langages les + utilisés](#carte-des-langages-les--utilisés) + - [Usage](#usage-1) + - [Cacher certaines langages](#cacher-certaines-langages) + - [Carte compacte des langages](#carte-compacte-des-langages) + - [Démo](#démo-1) + - [Toutes les démos](#toutes-les-démos) + - [Conseil rapide (aligner les cartes des dépôts)](#conseil-rapide-aligner-les-cartes-des-dépôts) + - [Déployer sur votre propre instance Vercel](#déployer-sur-votre-propre-instance-vercel) + - [:sparkling\_heart: Supporter le project](#sparkling_heart-supporter-le-project) # Carte des Stats GitHub @@ -88,18 +101,6 @@ Pour masquer des statistiques spécifiques, vous pouvez passer un paramètre de ![Les Stats GitHub de Anurag](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=contribs,prs) ``` -### Ajouter le compte des contributions privées au compte des commits totaux - -Vous pouvez ajouter le compte de toutes vos contributions privées au compte total des engagements en utilisant le paramètre de requête `?count_private=true`. - -_Note: Si vous déployez vous-même ce projet, les contributions privées seront comptées par défaut ; sinon, vous devez choisir de partager les comptes de vos contributions privées._ - -> Options: `&count_private=true` - -```md -![Les Stats GitHub de Anurag](https://github-readme-stats.vercel.app/api?username=anuraghazra&count_private=true) -``` - ### Afficher les icônes Pour activer les icônes, vous pouvez passer `show_icons=true` dans le paramètre de requête, comme ceci : @@ -138,7 +139,7 @@ Vous pouvez personnaliser l'apparence de votre `Carte des stats` ou `Carte de d - `bg_color` - Couleur du fond de la carte _(hex color)_ **ou** un gradiant de la forme _angle,start,end_ - `hide_border` - Cache la bordure de la carte _(booléen)_ - `theme` - Nom du thème, parmis [tous les thèmes disponibles](../themes/README.md) -- `cache_seconds` - Paramétrer le cache manuellement _(min: 1800, max: 86400)_ +- `cache_seconds` - Paramétrer le cache manuellement _(min: 14400, max: 86400)_ - `locale` - définir la langue de la carte _(par exemple. cn, de, es, etc.)_ ##### Gradient in bg_color @@ -158,7 +159,7 @@ Vous pouvez fournir plusieurs valeurs (suivie d'une virgule) dans l'option bg_co - `hide_rank` - Masquer le rang _(boolean)_ - `show_icons` - Afficher les icônes _(boolean)_ - `include_all_commits` - Compter le total de commits au lieu de ne compter que les commits de l'année en cours _(boolean)_ -- `count_private` - Compter les commits privés _(boolean)_ +- `count_private` - Compter les contributions privées _(boolean)_ - `line_height` - Fixer la hauteur de la ligne entre les textes _(number)_ #### Repo Card Exclusive Options: @@ -169,7 +170,7 @@ Vous pouvez fournir plusieurs valeurs (suivie d'une virgule) dans l'option bg_co - `hide` - Masquer les langages spécifiés sur la carte _(Comma seperated values)_ - `hide_title` - Masquer le titre _(boolean)_ -- `layout` - Alterner entre 2 mise en page `default` & `compact` +- `layout` - Alterner entre 5 mise en page `normal` & `compact` & `donut` & `donut-vertical` & `pie` - `card_width` - Fixer la largeur de la carte manuellement _(number)_ > :warning: **Important:** diff --git a/docs/readme_it.md b/docs/readme_it.md index 1b2df96a5044d..8f16f4e6bd080 100644 --- a/docs/readme_it.md +++ b/docs/readme_it.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

Anteprima · - Segnala un errore + Segnala un errore · - Richiedi una nuova funzionalità + Richiedi una nuova funzionalità

Français @@ -53,18 +53,33 @@ Nederlands . नेपाली + . + Türkçe

Se ti piace questo progetto, considera la possibilità di donare per aiutare a renderlo migliore! -# Caratteristiche +# Caratteristiche + +- [GitHub Stats Card](#github-stats-card) + - [Nascondere statistiche individuali](#nascondere-statistiche-individuali) + - [Includere i contributi privati nel computo totale](#includere-i-contributi-privati-nel-computo-totale) + - [Mostrare le icone](#mostrare-le-icone) + - [Temi](#temi) + - [Personalizzazione](#personalizzazione) +- [GitHub Extra Pins](#github-extra-pins) + - [Utilizzo](#utilizzo) + - [Demo](#demo) +- [Top Languages Card](#top-languages-card) + - [Utilizzo](#utilizzo-1) + - [Nascondi linguaggi specifici](#nascondi-linguaggi-specifici) + - [Layout compatto](#layout-compatto) + - [Demo](#demo-1) + - [Galleria di esempi](#galleria-di-esempi) + - [Consiglio veloce (Allineare le Card)](#consiglio-veloce-allineare-le-card) + - [Deploy su Vercel](#deploy-su-vercel) + - [:sparkling\_heart: Supporta il progetto](#sparkling_heart-supporta-il-progetto) -- [Statistiche GitHub (GitHub Stats Card)](#github-stats-card) -- [GitHub Extra Pin](#github-extra-pins) -- [Linguaggi più usati (Top Languages Card)](#top-languages-card) -- [Temi](#temi) -- [Personalizzazione](#personalizzazione) -- [Effettua il Deploy](#deploy-su-vercel) # GitHub Stats Card @@ -138,7 +153,7 @@ Puoi personalizzare l'aspetto delle tue `Stats Card` o delle `Repo Card` in qual - `bg_color` - Colore dello sfondo _(in esadecimale)_ **oppure** un gradiente nella forma _angolo,inizio,fine_ - `hide_border` - Nasconde il bordo della carta _(booleano)_ - `theme` - Nome del tema, dai un'occhiata a [tutti i temi disponibili](../themes/README.md) -- `cache_seconds` - Specifica manualmente il valore di cache, in secondi _(min: 1800, max: 86400)_ +- `cache_seconds` - Specifica manualmente il valore di cache, in secondi _(min: 14400, max: 86400)_ - `locale` - Impostare la lingua nella scheda _(per esempio. cn, de, es, eccetera.)_ ##### Gradiente nello sfondo @@ -169,7 +184,7 @@ Puoi fornire valori separati da virgola nel parametro bg_color per creare un gra - `hide` - Nasconde un linguaggio specifico _(valori separati da virgola)_ - `hide_title` - Nasconde il titolo _(booleano)_ -- `layout` - Specifica il tipo di layout, `default` (esteso) o `compact` (compatto) +- `layout` - Specificare il tipo di layout, `normal` (esteso), `compact` (compatto), `donut` (ciambella), `donut-vertical` (ciambella verticale) e `pie` (torta) - `card_width` - Specifica il valore della larghezza _(numero)_ > :warning: **Importante:** diff --git a/docs/readme_ja.md b/docs/readme_ja.md index b00c77a7712a1..d338785f909d8 100644 --- a/docs/readme_ja.md +++ b/docs/readme_ja.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

View Demo · - Report Bug + Report Bug · - Request Feature + Request Feature

Français @@ -53,18 +53,32 @@ Nederlands . नेपाली + . + Türkçe

このプロジェクトを気に入っていただけましたか?
もしよろしければ、プロジェクトのさらなる改善のために寄付を検討して頂けると嬉しいです!

-# 主な機能 +# 主な機能 - [GitHub Stats Card](#github-stats-card) + - [特定の統計情報を隠す](#特定の統計情報を隠す) + - [プライベートリポジトリへのコミットをカウントする](#プライベートリポジトリへのコミットをカウントする) + - [アイコンを表示する](#アイコンを表示する) + - [テーマの変更](#テーマの変更) + - [テーマを自分でカスタマイズする](#テーマを自分でカスタマイズする) - [GitHub Extra Pins](#github-extra-pins) + - [使い方](#使い方) + - [デモ](#デモ) - [Top Languages Card](#top-languages-card) -- [Themes](#テーマの変更) -- [Customization](#テーマを自分でカスタマイズする) -- [Deploy Yourself](#自分の-Vercel-インスタンスにデプロイする) + - [使い方](#使い方-1) + - [特定の言語を隠す](#特定の言語を隠す) + - [レイアウトをコンパクトにする](#レイアウトをコンパクトにする) + - [デモ](#デモ-1) + - [全てのデモ](#全てのデモ) + - [クイックヒント (カードを並べる)](#クイックヒント-カードを並べる) + - [自分の Vercel インスタンスにデプロイする](#自分の-vercel-インスタンスにデプロイする) + - [:sparkling\_heart: このプロジェクトを支援する](#sparkling_heart-このプロジェクトを支援する) # GitHub Stats Card @@ -139,7 +153,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr - `bg_color` - 背景の色 _(16 進数カラーコード)_ **または** _angle,start,end_ の形式でグラデーションを指定することも可 - `hide_border` - カードの境界線を非表示にします _(ブール値)_ - `theme` - [使用可能なテーマ一覧](../themes/README.md) から選んだテーマ名 -- `cache_seconds` - キャッシュ時間の秒数 _(最小値: 1800, 最大値: 86400)_ +- `cache_seconds` - キャッシュ時間の秒数 _(最小値: 14400, 最大値: 86400)_ - `locale` - カードに言語を設定する _(例えば cn, de, es, 等)_ ##### bg_color の グラデーション指定 @@ -172,7 +186,7 @@ bg_color オプションで複数のカンマ区切りの値を指定してグ - `hide` - 特定の言語を隠す _(カンマ区切りで指定)_ - `hide_title` - _(boolean)_ -- `layout` - `default` か `compact` のいずれかのレイアウトに切り替える +- `layout` - `normal` & `compact` & `donut` & `donut-vertical` & `pie` のいずれかのレイアウトに切り替える - `card_width` - カードの横幅 _(number)_ - `langs_count` - 表示される言語の数 _(1 ~ 10, 初期値 5)_ - `exclude_repo` - 指定されたリポジトリを除外する _(カンマ区切りで指定)_ diff --git a/docs/readme_kr.md b/docs/readme_kr.md index ce0b4ad0379ee..178d0342506f2 100644 --- a/docs/readme_kr.md +++ b/docs/readme_kr.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

미리보기 확인 · - 버그 제보하기 + 버그 제보하기 · - 기능 추가 요청하기 + 기능 추가 요청하기

Français @@ -53,19 +53,36 @@ Nederlands . नेपाली + . + Türkçe

기능들이 마음에 드시나요? 괜찮으시다면, 서비스 개선을 위해 기부를 고려해주세요! -# 기능들 +# 기능들 - [GitHub 통계](#github-통계) + - [개별 통계 숨기기](#개별-통계-숨기기) + - [총 커밋 수에 비공개 기여도 (private contribs) 수 추가하기](#총-커밋-수에-비공개-기여도-private-contribs-수-추가하기) + - [아이콘 표시하기](#아이콘-표시하기) + - [테마 설정하기](#테마-설정하기) + - [커스터마이징](#커스터마이징) - [GitHub 저장소 핀](#github-저장소-핀) + - [사용법](#사용법) + - [미리보기](#미리보기) - [언어 사용량 통계](#언어-사용량-통계) -- [Wakatime 주간 통계](#wakatime-주간-통계) -- [테마](#테마) -- [커스터마이징](#커스터마이징) -- [직접 배포하기](#나만의-Vercel-인스턴스에-직접-배포하기) + - [사용법](#사용법-1) + - [통계에서 제외할 저장소 지정하기](#통계에서-제외할-저장소-지정하기) + - [통계에서 특정 언어 제외하기](#통계에서-특정-언어-제외하기) + - [표시할 언어 수 지정하기](#표시할-언어-수-지정하기) + - [컴택트한 카드 레이아웃 설정하기](#컴택트한-카드-레이아웃-설정하기) + - [미리보기](#미리보기-1) +- [WakaTime 주간 통계](#wakatime-주간-통계) + - [미리보기](#미리보기-2) + - [전체 미리보기](#전체-미리보기) + - [꿀팁 (저장소 핀 정렬하기)](#꿀팁-저장소-핀-정렬하기) + - [나만의 Vercel 인스턴스에 직접 배포하기](#나만의-vercel-인스턴스에-직접-배포하기) + - [:sparkling\_heart: 프로젝트 지원하기!](#sparkling_heart-프로젝트-지원하기) # GitHub 통계 @@ -149,7 +166,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr - `bg_color` - 카드의 배경 색상 _(hex color)_ **혹은** 다음 양식으로 그라데이션 주기 _angle,start,end_ - `hide_border` - 카드의 테두리 표시 여부 _(boolean)_ - `theme` - 테마의 이름, [사용 가능한 모든 테마](../themes/README.md) 에서 선택 -- `cache_seconds` - 수동으로 캐시 헤더 설정 _(min: 1800, max: 86400)_ +- `cache_seconds` - 수동으로 캐시 헤더 설정 _(min: 14400, max: 86400)_ - `locale` - 카드에 표시할 언어 _(e.g. kr, cn, de, es, etc.)_ ##### 배경에 그라데이션 주기 @@ -187,7 +204,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr - `hide` - 카드에서 특정 언어 제외 _(Comma-separated values)_ - `hide_title` - 타이틀 제외 _(boolean)_ -- `layout` - 사용 가능한 두 가지 값, `default` & `compact` 중 표시 형태 선택 +- `layout` - 5가지 값 사용 가능, `normal` & `compact` & `donut` & `donut-vertical` & `pie` 중 표시 형태 선택 - `card_width` - 카드 너비 직접 설정 _(number)_ - `langs_count` - 카드에 표시할 언어의 수 (1-10 사이, 기본 값 : 5) _(number)_ - `exclude_repo` - 통계에 제외할 저장소 지정 _(Comma-separated values)_ @@ -199,7 +216,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr > ( 예를 들면, `c++` 는 `c%2B%2B`, `jupyter notebook` 는 `jupyter%20notebook`, 등등. ) > [urlencoder.org](https://www.urlencoder.org/) < 서비스를 이용하면 자동으로 생성할 수 있습니다. -#### Wakatime 카드의 표시 제한 옵션: +#### WakaTime 카드의 표시 제한 옵션: - `hide_title` - 타이틀 제외 _(boolean)_ - `line_height` - 텍스트 간 줄 높이 설정(자간) _(number)_ @@ -291,23 +308,23 @@ _참고: [![언어 사용량 통계](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wakatime 주간 통계 +# WakaTime 주간 통계 -`?username=` 속성의 값을 [Wakatime](https://wakatime.com) 계정의 사용자 명(닉네임)으로 바꿔주세요. +`?username=` 속성의 값을 [WakaTime](https://wakatime.com) 계정의 사용자 명(닉네임)으로 바꿔주세요. ```md -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### 미리보기 -[![willianrod 님의 wakatime 통계](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok 님의 wakatime 통계](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![willianrod 님의 wakatime 통계](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok 님의 wakatime 통계](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) - 컴팩트한 레이아웃 -[![willianrod 님의 wakatime 통계](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok 님의 wakatime 통계](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) --- @@ -355,9 +372,9 @@ _참고: [![언어 사용량 통계](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Wakatime 카드 +- WakaTime 카드 -[![willianrod 님의 Wakatime 카드](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok 님의 WakaTime 카드](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_nl.md b/docs/readme_nl.md index 597f0c86445e3..7fbec69971517 100644 --- a/docs/readme_nl.md +++ b/docs/readme_nl.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

Bekijk Demo · - Rapporteer een Bug + Rapporteer een Bug · - Vraag een nieuwe toepassing aan + Vraag een nieuwe toepassing aan

Français @@ -53,19 +53,36 @@ Nederlands . नेपाली + . + Türkçe

Bevalt het project? Doneer om het te verbeteren! -# Functionaliteiten +# Functionaliteiten - [GitHub Statistieken Kaart](#github-statistieken-kaart) + - [Verberg individueele statistieken](#verberg-individueele-statistieken) + - [Voeg privé contributies toe aan totale commits.](#voeg-privé-contributies-toe-aan-totale-commits) + - [Laat icoontjes zien](#laat-icoontjes-zien) + - [Thema's](#themas) + - [Opmaak](#opmaak) - [GitHub Extra Pins](#github-extra-pins) -- [Top Programmeertalen Kaart](#top-Programmeertalen-kaart) -- [Wekelijkse Wakatime Statistieken](#wekelijkse-wakatime-statistieken) -- [Thema\'s](#themas) -- [Opmaak](#opmaak) -- [Zelf deployen](#deploy-je-eigen-vercel-instatie) + - [Gebruik](#gebruik) + - [Demo](#demo) +- [Top Programmeertalen Kaart](#top-programmeertalen-kaart) + - [Gebruik](#gebruik-1) + - [Verberg individueele repositories](#verberg-individueele-repositories) + - [Verberg individueele talen](#verberg-individueele-talen) + - [Laat meer programmeertalen zien](#laat-meer-programmeertalen-zien) + - [Compacte Talen Kaart opmaak](#compacte-talen-kaart-opmaak) + - [Demo](#demo-1) +- [Wekelijkse WakaTime Statistieken](#wekelijkse-wakatime-statistieken) + - [Demo](#demo-2) + - [Alle demos](#alle-demos) + - [Kleine tip (Verstel de repo kaart z'n positie)](#kleine-tip-verstel-de-repo-kaart-zn-positie) + - [Deploy je eigen Vercel instatie](#deploy-je-eigen-vercel-instatie) + - [:sparkling\_heart: Ondersteun het project](#sparkling_heart-ondersteun-het-project) # GitHub Statistieken Kaart @@ -142,7 +159,7 @@ Je kan het uiterlijk van je `Statistieken kaart` of `Repo kaart` aanpassen hoe j - `bg_color` - Achtergrond kleur van de kaart _(hex kleur)_ **of** een verloop van kleuren in het formaat van _graden,start,einde_ - `hide_border` - Verbergt de rand van de kaart _(boolean)_ - `theme` - Naam van het thema, kies uit [alle beschikbare thema\'s](../themes/README.md) -- `cache_seconds` - Stel de cache header handmatig in _(min: 1800, max: 86400)_ +- `cache_seconds` - Stel de cache header handmatig in _(min: 14400, max: 86400)_ - `locale` - Stel taal van de kaart in _(e.g. cn, de, es, etc.)_ ##### Kleurenverloop in bg_color (achtergrond kleur): @@ -174,7 +191,7 @@ Je kan meerdere komma verdeelde waarden in de bg_color optie geven om een kleure - `hide` - Verbergt specifieke talen van de kaart _(komma gescheiden waardes)_ - `hide_title` - _(boolean)_ -- `layout` - Keuze voor de twee beschikbare layouts `default` & `compact` +- `layout` - Kies uit de vijf beschikbare lay-outs `normal` & `compact` & `donut` & `donut-vertical` & `pie` - `card_width` - Stelt de breedte van de kaart handmatig in. _(nummer)_ - `langs_count` - Laat meer talen op de kaart zien, waarde tussen 1-10, staat standaard op to 5 _(nummer)_ - `exclude_repo` - Verbergt specifieke repositories _(komma gescheiden waardes)_ @@ -185,7 +202,7 @@ Je kan meerdere komma verdeelde waarden in de bg_color optie geven om een kleure > (Oftewel: `c++` moet `c%2B%2B` worden, `jupyter notebook` moet `jupyter%20notebook` worden, enzovoort...) > Zie [urlencoder.org](https://www.urlencoder.org/) om dit automatisch te doen. -#### Exclusieve opties voor Wakatime Kaart: +#### Exclusieve opties voor WakaTime Kaart: - `hide_title` - _(boolean)_ - `line_height` - Verandert de lijn hoogte tussen tekst _(nummer)_ @@ -276,19 +293,19 @@ Je kan de `&layout=compact` optie gebruiken om het kaart ontwerp aan te passen. [![Top programmeertalen](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wekelijkse Wakatime Statistieken +# Wekelijkse WakaTime Statistieken -Verander de `?username=` waarde naar je [Wakatime](https://wakatime.com) gebruikersnaam. +Verander de `?username=` waarde naar je [WakaTime](https://wakatime.com) gebruikersnaam. ```md -[![willianrod's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Demo -[![willianrod's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![willianrod's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) --- @@ -336,9 +353,9 @@ Kies uit de [standaard thema\'s](#themes) [![Top Programmeertalen](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Wakatime kaart +- WakaTime kaart -[![willianrod's Wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_np.md b/docs/readme_np.md index 654427fbda654..f5909ae718219 100644 --- a/docs/readme_np.md +++ b/docs/readme_np.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

डेमो हेर्नुहोस् · - रिपोर्ट बग + रिपोर्ट बग · - अनुरोध सुविधा + अनुरोध सुविधा

Français @@ -49,21 +49,40 @@ Italiano · 한국어 + . + Nederlands · नेपाली + . + Türkçe

परियोजना मनपर्‍यो? तपाईं मद्दत गर्न सक्नुहुन्छ यो परियोजना बढ्न -# विशेषताहरु +# विशेषताहरु - [गितहब स्टेट कार्ड](#गितहब-स्टेट-कार्ड) + - [लुकाउनु होस् व्यक्तिगत स्टेट](#लुकाउनु-होस्-व्यक्तिगत-स्टेट) + - [जोड्नु होस् निजी टोटल योगदान](#जोड्नु-होस्-निजी-टोटल--योगदान) + - [देखाउनु होस् इकोन](#देखाउनु-होस्-इकोन) + - [विषयवस्तुहरू](#विषयवस्तुहरू) + - [अनुकूलन](#अनुकूलन) - [गितहब अतिरिक्त पिन्स](#गितहब-अतिरिक्त-पिन्स) + - [प्रयोग](#प्रयोग) + - [डेमो](#डेमो) - [टोप भाषा कार्ड](#टोप-भाषा-कार्ड) -- [वाका समय वीक स्तट्स ](#वाका-समय-वीक-स्तट्स ) -- [विषयवस्तुहरू](#विषयवस्तुहरू) -- [अनुकूलन](#अनुकूलन) -- [आफैलाई तैनाथ गर्नुहोस्](#देप्लोय-आफ्नै-वेर्चेल-इन्स्तंस ) + - [प्रयोग](#प्रयोग-1) + - [Exclude individual repositories](#exclude-individual-repositories) + - [कुनै भाषा चुपौनॆ तरिका](#कुनै-भाषा-चुपौनॆ-तरिका) + - [धेरॆ भाषाहरु हेर्नको लागि](#धेरॆ-भाषाहरु-हेर्नको-लागि) + - [कम्प्याक्ट भाषा कार्ड ळयोउत](#कम्प्याक्ट-भाषा-कार्ड-ळयोउत) + - [डेमो](#डेमो-1) +- [वाका समय वीक स्तट्स](#वाका-समय-वीक-स्तट्स) + - [डेमो](#डेमो-2) + - [सबै डेमोहरु](#सबै-डेमोहरु) + - [टिप् (रेपो कार्डलाए अलिग्न गर्ने )](#टिप्--रेपो-कार्डलाए-अलिग्न-गर्ने-) + - [देप्लोय आफ्नै वेर्चेल इन्स्तंस](#देप्लोय--आफ्नै--वेर्चेल--इन्स्तंस) + - [:sparkling\_heart: सहपोर्ट द प्रोजेक्ट](#sparkling_heart-सहपोर्ट-द-प्रोजेक्ट) # गितहब स्टेट कार्ड @@ -138,7 +157,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr - `bg_color` - Card's background color _(hex color)_ **or** a gradient in the form of _angle,start,end_ - `hide_border` - Hides the card's border _(boolean)_ - `theme` - name of the theme, choose from [all available themes](./themes/README.md) -- `cache_seconds` - set the cache header manually _(min: 1800, max: 86400)_ +- `cache_seconds` - set the cache header manually _(min: 14400, max: 86400)_ - `locale` - set the language in the card _(e.g. cn, de, es, etc.)_ ##### Gradient in bg_color @@ -170,7 +189,7 @@ You can provide multiple comma-separated values in bg_color option to render a g - `hide` - Hide the languages specified from the card _(Comma-separated values)_ - `hide_title` - _(boolean)_ -- `layout` - Switch between two available layouts `default` & `compact` +- `layout` - Switch between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`. - `card_width` - Set the card's width manually _(number)_ - `langs_count` - Show more languages on the card, between 1-10, defaults to 5 _(number)_ - `exclude_repo` - Exclude specified repositories _(Comma-separated values)_ @@ -272,17 +291,17 @@ You can use the `&langs_count=` option to increase or decrease the number of lan # वाका समय वीक स्तट्स -Change the `?username=` value to your [Wakatime](https://wakatime.com) username. +Change the `?username=` value to your [WakaTime](https://wakatime.com) username. ```md -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### डेमो -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) --- @@ -332,7 +351,7 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username. - वक समय कार्ड -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_pt-BR.md b/docs/readme_pt-BR.md index 62c23dc55c7e2..35c334131ee93 100644 --- a/docs/readme_pt-BR.md +++ b/docs/readme_pt-BR.md @@ -7,8 +7,11 @@ Testes aprovados + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

Ver demonstração · - Reportar erros + Reportar erros · - Solicitar recursos + Solicitar recursos

Français @@ -59,15 +59,28 @@

Gostou do projeto? Por favor considere fazer uma doação para ajudar a melhorá-lo! -# Características +# Características - [Cartão de estatísticas do GitHub](#cartão-de-estatísticas-do-github) + - [Ocultando estatísticas específicas](#ocultando-estatísticas-específicas) + - [Adicionando contagem de contribuições privadas à contagem total de commits](#adicionando-contagem-de-contribuições-privadas-à-contagem-total-de-commits) + - [Exibindo ícones](#exibindo-ícones) + - [Temas](#temas) + - [Personalização](#personalização) - [Pins extras do GitHub](#pins-extras-do-github) + - [Utilização](#utilização) + - [Demonstração](#demonstração) - [Cartão de principais linguagens de programação](#cartão-de-principais-linguagens-de-programação) -- [Estatística semanal Wakatime](#estatística-semanal-wakatime) -- [Temas](#temas) -- [Personalização](#personalização) -- [Faça suas próprias implantações](#implante-em-sua-própria-instância-do-vercel) + - [Utilização](#utilização-1) + - [Ocultar linguagens individualmente](#ocultar-linguagens-individualmente) + - [Layout de cartão de linguagens compacto](#layout-de-cartão-de-linguagens-compacto) + - [Demonstração](#demonstração-1) +- [Estatística semanal WakaTime](#estatística-semanal-wakatime) + - [Demonstração](#demonstração-2) + - [Todas as demonstrações](#todas-as-demonstrações) + - [Dica (Alinhandos os cartões de repositório)](#dica-alinhandos-os-cartões-de-repositório) + - [Implante em sua própria instância do Vercel](#implante-em-sua-própria-instância-do-vercel) + - [:sparkling\_heart: Apoie o projeto](#sparkling_heart-apoie-o-projeto) # Cartão de estatísticas do GitHub @@ -141,7 +154,7 @@ Personalize a aparência do seu `Stats Card` ou `Repo Card` da maneira que desej - `bg_color` - Cor de fundo do cartão _(hex color)_ - `hide_border` - Esconde a borda do cartão _(boleano)_ - `theme` - Nome do tema, escolha em [todos os temas disponíveis](../themes/README.md) -- `cache_seconds` - Defina o cabeçalho do cache manualmente _(min: 1800, max: 86400)_ +- `cache_seconds` - Defina o cabeçalho do cache manualmente _(min: 14400, max: 86400)_ - `locale` - defina o idioma no cartão _(por exemplo. cn, de, es, etc.)_ > Nota sobre o cache: Cartões de repositório tem um cache padrão de 30 minutos (1800 segundos), se o número a contagem de forks e contagem de estrelas é menor que 1 mil o padrão é 2 horas (7200 segundos). Note também que o cache é limitado a um mínimo de 30 minutos e um máximo de 24 horas. @@ -164,7 +177,7 @@ Personalize a aparência do seu `Stats Card` ou `Repo Card` da maneira que desej - `hide` - Oculta linguagens específicas _(Valores separados por vírgulas)_ - `hide_title` - Oculta o título _(boolean)_ -- `layout` - Alterna entre os dois layouts disponíveis `default` & `compact` +- `layout` - Alternar entre os cinco layouts disponíveis `normal` & `compact` & `donut` & `donut-vertical` & `pie` - `card_width` - Define a largura do cartão manualmente _(number)_ > :warning: **Importante:** @@ -237,19 +250,19 @@ Utilize a opção `&layout=compact` para mudar o layout do cartão. [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Estatística semanal Wakatime +# Estatística semanal WakaTime -Altere o valor de `?username=` para o seu username do Wakatime. +Altere o valor de `?username=` para o seu username do WakaTime. ```md -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Demonstração -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) --- diff --git a/docs/readme_tr.md b/docs/readme_tr.md index 7b11cf3706f1e..f654cd95cf252 100644 --- a/docs/readme_tr.md +++ b/docs/readme_tr.md @@ -7,8 +7,11 @@ Tests Passing + + GitHub Contributors + - + Tests Coverage Issues @@ -16,22 +19,19 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - -

Demo · - Hata İlet + Hata İlet · - Özellik Talep Et + Özellik Talep Et

Français @@ -59,15 +59,30 @@

Projeyi sevdiniz mi? Daha da gelişmesi için lütfen bağış yapın! -# Features +# Features -- [GitHub İstatistikler Kartı](#github-istatistikler-kartı) +- [GitHub İstatistikler Kartı](#github-i̇statistikler-kartı) + - [Bazı İstatitistikleri Gizleme](#bazı-i̇statitistikleri-gizleme) + - [Özel Katkı Sayısını Toplam Commit Sayısına Ekleme](#özel-katkı-sayısını-toplam-commit-sayısına-ekleme) + - [İkonları Göstermek](#i̇konları-göstermek) + - [Temalar](#temalar) + - [Özelleştirmeler](#özelleştirmeler) - [GitHub Ekstra Pinler](#github-ekstra-pinler) + - [Kullanım](#kullanım) + - [Demo](#demo) - [En Çok Kullanılan Diller](#en-çok-kullanılan-diller) -- [Wakatime Haftalık İstatistikler](#wakatime-haftalık-istatistikler) -- [Temalar](#temalar) -- [Özelleştirmeler](#özelleştirmeler) -- [Yayınlayın](#yayınlayın) + - [Kullanım](#kullanım-1) + - [Belirli Repoları Çıkartın](#belirli-repoları-çıkartın) + - [Belirli Dilleri Çıkartın](#belirli-dilleri-çıkartın) + - [Daha Fazla Dil Gösterin](#daha-fazla-dil-gösterin) + - [Kompakt Dil Kartı Düzeni](#kompakt-dil-kartı-düzeni) + - [Demo](#demo-1) +- [WakaTime Haftalık İstatistikler](#wakatime-haftalık-i̇statistikler) + - [Demo](#demo-2) + - [Tüm Demolar](#tüm-demolar) + - [Hızlı İpucu (Repo Kartları Hizlayın)](#hızlı-i̇pucu-repo-kartları-hizlayın) + - [Kendi Vercel Örneğinizde Yayınlayın](#kendi-vercel-örneğinizde-yayınlayın) + - [:sparkling\_heart: Projeyi Destekleyin](#sparkling_heart-projeyi-destekleyin) # GitHub İstatistikler Kartı @@ -143,7 +158,7 @@ dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontr - `bg_color` - Kartın arkaplan rengi _(hex color / hex rengi)_ **ya da** gradient şeklinde _açı,başlangıç,bitiş_ - `hide_border` - Kartın çerçevelerini gizler _(boolean)_ - `theme` - Temanın rengi [tüm temalar](./themes/README.md) -- `cache_seconds` - Manuel olarak cache'i belirleyebilirsiniz _(en az: 1800, en fazla: 86400)_ +- `cache_seconds` - Manuel olarak cache'i belirleyebilirsiniz _(en az: 14400, en fazla: 86400)_ - `locale` - Karttaki dili seçebilirsiniz _(örneğin; tr, cn, de, es, vb.)_ ##### bg_color'da Gradient @@ -176,7 +191,7 @@ bg_color içerisinde birden fazla rengi gradient olarak göstermek için virgül - `hide` - Belirli bir dili listede gizler _(Virgül ile ayırılmış değerlerle)_ - `hide_title` - _(boolean)_ -- `layout` - Uygun olan iki tasarım / layout arasında değişiklik yapar `default` & `compact` +- `layout` - Beş uygun tasarım / düzen arasında geçiş yapın `normal` & `compact` & `donut` & `donut-vertical` & `pie` - `card_width` - Kartın genişliğini manuel olarak belirler _(number)_ - `langs_count` - 1-10 arasında istediğiniz kadar dil gösterebilirsiniz. Varsayılan: 5 _(number)_ - `exclude_repo` - Belirli repoları listeden çıkartır _(Virgül ile ayırılmış değerlerle)_ @@ -187,7 +202,7 @@ bg_color içerisinde birden fazla rengi gradient olarak göstermek için virgül > (ör: `c++` yerine `c%2B%2B`, `jupyter notebook` yerine `jupyter%20notebook`, vb.) > [urlencoder.org](https://www.urlencoder.org/) adresini kullanarak otomatik olarak değerleri bu şekle çevirebilirsiniz. -#### Wakatime Kart Exclusive Özellikler: +#### WakaTime Kart Exclusive Özellikler: - `hide_title` - _(boolean)_ - `line_height` - Satır aralığı yüksekliği _(number)_ @@ -277,23 +292,23 @@ Endpoint: `api/top-langs?username=mustafacagri` [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=mustafacagri&layout=compact)](https://github.com/anuraghazra/github-readme-stats) -# Wakatime Haftalık İstatistikler +# WakaTime Haftalık İstatistikler -`?username=` değerini [Wakatime](https://wakatime.com)'daki kullanıcı adınızla değiştirin. +`?username=` değerini [WakaTime](https://wakatime.com)'daki kullanıcı adınızla değiştirin. ```md -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) ``` ### Demo -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) - Kompakt Düzen -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs&layout=compact)](https://github.com/anuraghazra/github-readme-stats) --- @@ -341,9 +356,9 @@ Endpoint: `api/top-langs?username=mustafacagri` [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) -- Wakatime kart +- WakaTime kart -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) --- @@ -409,7 +424,7 @@ Teşekkürler! :heart: --- -[![https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss](./powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss) +[![https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss](../powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss) Katkılara açığız! <3 diff --git a/express.js b/express.js new file mode 100644 index 0000000000000..ddc69ba7cba8e --- /dev/null +++ b/express.js @@ -0,0 +1,16 @@ +import "dotenv/config"; +import statsCard from "./api/index.js"; +import repoCard from "./api/pin.js"; +import langCard from "./api/top-langs.js"; +import wakatimeCard from "./api/wakatime.js"; +import gistCard from "./api/gist.js"; +import express from "express"; + +const app = express(); +app.listen(process.env.port || 9000); + +app.get("/", statsCard); +app.get("/pin", repoCard); +app.get("/top-langs", langCard); +app.get("/wakatime", wakatimeCard); +app.get("/gist", gistCard); diff --git a/jest.bench.config.js b/jest.bench.config.js new file mode 100644 index 0000000000000..8a39b14d30743 --- /dev/null +++ b/jest.bench.config.js @@ -0,0 +1,16 @@ +export default { + // Jest-bench need its own test environment to function + testEnvironment: "jest-bench/environment", + testEnvironmentOptions: { + // still Jest-bench environment will run your environment if you specify it here + testEnvironment: "jest-environment-node", + testEnvironmentOptions: { + // specify any option for your environment + }, + }, + // always include "default" reporter along with Jest-bench reporter + // for error reporting + reporters: ["default", "jest-bench/reporter"], + // will pick up "*.bench.js" file. + testRegex: "(\\.bench)\\.(ts|tsx|js)$", +}; diff --git a/package-lock.json b/package-lock.json index 048c316bfde58..2f3678d671ecb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,36 +9,51 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "axios": "^0.24.0", - "dotenv": "^8.2.0", + "axios": "^1.7.2", + "dotenv": "^16.4.5", "emoji-name-map": "^1.2.8", "github-username-regex": "^1.0.0", "upgrade": "^1.1.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" }, "devDependencies": { - "@actions/core": "^1.9.1", - "@actions/github": "^4.0.0", - "@testing-library/dom": "^8.17.1", - "@testing-library/jest-dom": "^5.16.5", + "@actions/core": "^1.10.1", + "@actions/github": "^6.0.0", + "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.4.6", "@uppercod/css-to-object": "^1.1.1", - "axios-mock-adapter": "^1.18.1", + "axios-mock-adapter": "^1.22.0", "color-contrast-checker": "^2.1.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "hjson": "^3.2.2", - "husky": "^8.0.0", - "jest": "^29.0.3", - "jest-environment-jsdom": "^29.0.3", + "husky": "^9.1.1", + "jest": "^29.7.0", + "jest-bench": "^29.7.1", + "jest-environment-jsdom": "^29.7.0", "js-yaml": "^4.1.0", - "lint-staged": "^13.0.3", + "lint-staged": "^15.2.7", "lodash.snakecase": "^4.1.1", - "parse-diff": "^0.7.0", - "prettier": "^2.1.2" + "parse-diff": "^0.11.1", + "prettier": "^3.3.3" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, "node_modules/@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", "dev": true, "dependencies": { "@actions/http-client": "^2.0.1", @@ -46,48 +61,40 @@ } }, "node_modules/@actions/github": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", - "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", - "dev": true, - "dependencies": { - "@actions/http-client": "^1.0.8", - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.3", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0" - } - }, - "node_modules/@actions/github/node_modules/@actions/http-client": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", - "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", + "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", "dev": true, "dependencies": { - "tunnel": "0.0.6" + "@actions/http-client": "^2.2.0", + "@octokit/core": "^5.0.1", + "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-rest-endpoint-methods": "^10.0.0" } }, "node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", + "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", "dev": true, "dependencies": { - "tunnel": "^0.0.6" + "tunnel": "^0.0.6", + "undici": "^5.25.4" } }, "node_modules/@adobe/css-tools": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", - "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", + "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", "dev": true }, "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { @@ -95,47 +102,119 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", - "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", + "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", - "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-compilation-targets": "^7.19.1", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.1", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.1", - "@babel/types": "^7.19.0", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz", + "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.9", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.8", + "@babel/types": "^7.22.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.2", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -145,44 +224,38 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, "node_modules/@babel/generator": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", - "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.19.0", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", - "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz", + "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.19.1", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -192,152 +265,152 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", + "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", + "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.6", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -416,9 +489,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", - "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -488,12 +561,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -590,12 +663,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -617,33 +690,33 @@ } }, "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", - "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.1", - "@babel/types": "^7.19.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -652,13 +725,13 @@ } }, "node_modules/@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -671,6 +744,131 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -709,15 +907,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -728,16 +917,16 @@ } }, "node_modules/@jest/console": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.3.tgz", - "integrity": "sha512-cGg0r+klVHSYnfE977S9wmpuQ9L+iYuYgL+5bPXiUlUynLLYunRxswEmhBzvrSKGof5AKiHuTTmUKAqRcDY9dg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -745,37 +934,37 @@ } }, "node_modules/@jest/core": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.3.tgz", - "integrity": "sha512-1d0hLbOrM1qQE3eP3DtakeMbKTcXiXP3afWxqz103xPyddS2NhnNghS7MaXx1dcDt4/6p4nlhmeILo2ofgi8cQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "dependencies": { - "@jest/console": "^29.0.3", - "@jest/reporters": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-resolve-dependencies": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "jest-watcher": "^29.0.3", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -803,19 +992,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jest/core/node_modules/ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - }, "node_modules/@jest/core/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -830,89 +1013,89 @@ "dev": true }, "node_modules/@jest/environment": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz", - "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.0.3" + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-6W7K+fsI23FQ01H/BWccPyDZFrnU9QlzDcKOjrNVU5L8yUORFAJJIpmyxWPW70+X624KUNqzZwPThPMX28aXEQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "dependencies": { - "expect": "^29.0.3", - "jest-snapshot": "^29.0.3" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.3.tgz", - "integrity": "sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "dependencies": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.6.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz", - "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.3.tgz", - "integrity": "sha512-YqGHT65rFY2siPIHHFjuCGUsbzRjdqkwbat+Of6DmYRg5shIXXrLdZoVE/+TJ9O1dsKsFmYhU58JvIbZRU1Z9w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/types": "^29.0.3", - "jest-mock": "^29.0.3" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.3.tgz", - "integrity": "sha512-3+QU3d4aiyOWfmk1obDerie4XNCaD5Xo1IlKNde2yGEi02WQD+ZQD0i5Hgqm1e73sMV7kw6pMlCnprtEwEVwxw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -920,17 +1103,16 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" }, "engines": { @@ -945,25 +1127,74 @@ } } }, + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.0.tgz", + "integrity": "sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "dependencies": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" }, @@ -972,13 +1203,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.3.tgz", - "integrity": "sha512-vViVnQjCgTmbhDKEonKJPtcFe9G/CJO4/Np4XwYJah+lF2oI7KKeRp8t1dFvv44wN2NdbDb/qC6pi++Vpp0Dlg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "dependencies": { - "@jest/console": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -987,14 +1218,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.3.tgz", - "integrity": "sha512-Hf4+xYSWZdxTNnhDykr8JBs0yBN/nxOXyUQWfotBUqqy0LF9vzcFB0jm/EDNZCx587znLWTIgxcokW7WeZMobQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.3", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" }, "engines": { @@ -1002,38 +1233,38 @@ } }, "node_modules/@jest/transform": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.3.tgz", - "integrity": "sha512-C5ihFTRYaGDbi/xbRQRdbo5ddGtI4VSpmL6AIcZxdhwLbXMa7PcXxxqyI91vGOFHnn5aVM3WYnYKCHEqmLVGzg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz", - "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -1045,13 +1276,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" @@ -1076,195 +1308,278 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, - "node_modules/@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { - "@octokit/types": "^6.0.3" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "dependencies": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" + "engines": { + "node": ">= 8" } }, - "node_modules/@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "@octokit/types": "^6.0.3", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "node_modules/@octokit/auth-token": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "dev": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/core": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.1.tgz", + "integrity": "sha512-lyeeeZyESFo+ffI801SaBKmCfsvarO+dgV8/0gD8u1d87clbEdWsP5yC+dSj3zLhb2eIf5SJrn6vDz9AheETHw==", + "dev": true, + "dependencies": { + "@octokit/auth-token": "^4.0.0", + "@octokit/graphql": "^7.0.0", + "@octokit/request": "^8.0.2", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/endpoint": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.1.tgz", + "integrity": "sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==", "dev": true, "dependencies": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/graphql": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", + "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", + "dev": true, + "dependencies": { + "@octokit/request": "^8.0.1", + "@octokit/types": "^12.0.0", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz", + "integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==", "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.0.0.tgz", + "integrity": "sha512-oIJzCpttmBTlEhBmRvb+b9rlnGpmFgDtZ0bB6nq39qIod6A5DP+7RkVLMOixIgRCYSHDTeayWqmiJ2SZ6xgfdw==", "dev": true, "dependencies": { - "@octokit/types": "^6.40.0" + "@octokit/types": "^12.0.0" + }, + "engines": { + "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=2" + "@octokit/core": ">=5" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.1.tgz", - "integrity": "sha512-4gQg4ySoW7ktKB0Mf38fHzcSffVZd6mT5deJQtpqkuPuAqzlED5AJTeW8Uk7dPRn7KaOlWcXB0MedTFJU1j4qA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.0.1.tgz", + "integrity": "sha512-fgS6HPkPvJiz8CCliewLyym9qAx0RZ/LKh3sATaPfM41y/O2wQ4Z9MrdYeGPVh04wYmHFmWiGlKPC7jWVtZXQA==", "dev": true, "dependencies": { - "@octokit/types": "^6.13.0", - "deprecation": "^2.3.1" + "@octokit/types": "^12.0.0" + }, + "engines": { + "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=3" + "@octokit/core": ">=5" } }, "node_modules/@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.4.tgz", + "integrity": "sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==", "dev": true, "dependencies": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", + "@octokit/endpoint": "^9.0.0", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", + "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", "dev": true, "dependencies": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz", + "integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==", "dev": true, "dependencies": { - "@octokit/openapi-types": "^12.11.0" + "@octokit/openapi-types": "^19.0.0" } }, "node_modules/@sinclair/typebox": { - "version": "0.24.42", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.42.tgz", - "integrity": "sha512-d+2AtrHGyWek2u2ITF0lHRIv6Tt7X0dEHW+0rP+5aDCEjC3fiN2RBjrLD0yU0at52BcZbRGxLbAtXiR0hFCjYw==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", + "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@testing-library/dom": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.18.1.tgz", - "integrity": "sha512-oEvsm2B/WtcHKE+IcEeeCqNU/ltFGaVyGbpcm4g/2ytuT49jrlH9x5qRKL/H3A6yfM4YAbSbC0ceT5+9CEXnLg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^5.0.0", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", + "lz-string": "^1.5.0", "pretty-format": "^27.0.2" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@testing-library/jest-dom": { - "version": "5.16.5", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz", - "integrity": "sha512-N5ixQ2qKpi5OLYfwQmUb/5mSV9LneAcaUfp32pn4yCnpb8r/Yz0pXFPck21dIicKmi+ta5WRAknkZCfA8refMA==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.6.tgz", + "integrity": "sha512-8qpnGVincVDLEcQXWaHOf6zmlbwTKc6Us6PPu4CRnPXCzo2OGBS5cwgMMOWdxDpEz1mkbvXHpEy99M5Yvt682w==", "dev": true, "dependencies": { - "@adobe/css-tools": "^4.0.1", + "@adobe/css-tools": "^4.4.0", "@babel/runtime": "^7.9.2", - "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", - "lodash": "^4.17.15", + "dom-accessibility-api": "^0.6.3", + "lodash": "^4.17.21", "redent": "^3.0.0" }, "engines": { - "node": ">=8", + "node": ">=14", "npm": ">=6", "yarn": ">=1" + }, + "peerDependencies": { + "@jest/globals": ">= 28", + "@types/bun": "latest", + "@types/jest": ">= 28", + "jest": ">= 28", + "vitest": ">= 0.32" + }, + "peerDependenciesMeta": { + "@jest/globals": { + "optional": true + }, + "@types/bun": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "jest": { + "optional": true + }, + "vitest": { + "optional": true + } } }, "node_modules/@testing-library/jest-dom/node_modules/chalk": { @@ -1280,6 +1595,12 @@ "node": ">=8" } }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true + }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -1290,37 +1611,37 @@ } }, "node_modules/@types/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz", + "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==", "dev": true }, "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", + "integrity": "sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==", "dev": true, "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.5.tgz", + "integrity": "sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.2.tgz", + "integrity": "sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1328,18 +1649,18 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.2.tgz", + "integrity": "sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==", "dev": true, "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", "dev": true, "dependencies": { "@types/node": "*" @@ -1369,48 +1690,6 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.0.3.tgz", - "integrity": "sha512-F6ukyCTwbfsEX5F2YmVYmM5TcTHy1q9P5rWlRbrk56KyMh3v9xRGUO3aa8+SkvMi0SHXtASJv1283enXimC0Og==", - "dev": true, - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/jest/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@types/jest/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@types/jest/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/@types/jsdom": { "version": "20.0.0", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz", @@ -1428,27 +1707,12 @@ "integrity": "sha512-Sq1itGUKUX1ap7GgZlrzdBydjbsJL/NSQt/4wkAxUJ7/OS5c2WkoN6WSpWc2Yc5wtKMZOUA0VCs/j2XJadN3HA==", "dev": true }, - "node_modules/@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true - }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "node_modules/@types/testing-library__jest-dom": { - "version": "5.14.5", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz", - "integrity": "sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==", - "dev": true, - "dependencies": { - "@types/jest": "*" - } - }, "node_modules/@types/tough-cookie": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", @@ -1470,6 +1734,12 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@uppercod/css-to-object": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@uppercod/css-to-object/-/css-to-object-1.1.1.tgz", @@ -1483,9 +1753,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1495,31 +1765,28 @@ } }, "node_modules/acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", + "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", "dev": true, "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" + "acorn": "^8.1.0", + "acorn-walk": "^8.0.2" } }, - "node_modules/acorn-globals/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, "engines": { "node": ">=0.4.0" @@ -1537,17 +1804,20 @@ "node": ">= 6.0.0" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=8" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/ansi-escapes": { @@ -1590,9 +1860,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -1609,41 +1879,33 @@ "dev": true }, "node_modules/aria-query": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.2.tgz", - "integrity": "sha512-eigU3vhqSO+Z8BKDnVLN/ompjhf3pYzecKXz8+whRy+9gZu8n1TCGfwzQUUPnqdHl9ax1Hr9031orZ+UOEYr7Q==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "dequal": "^2.0.3" } }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", "dependencies": { - "follow-redirects": "^1.14.4" + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/axios-mock-adapter": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.21.2.tgz", - "integrity": "sha512-jzyNxU3JzB2XVhplZboUcF0YDs7xuExzoRSHXPHr+UQajaGmcTqvkkUADgkVI2WkGlpZ1zZlMVdcTMU0ejV8zQ==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", + "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -1654,15 +1916,15 @@ } }, "node_modules/babel-jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.3.tgz", - "integrity": "sha512-ApPyHSOhS/sVzwUOQIWJmdvDhBsMG01HX9z7ogtkp1TToHGGUWFlnXJUIzCgKPSfiYLn3ibipCYzsKSURHEwLg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "dependencies": { - "@jest/transform": "^29.0.3", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -1691,9 +1953,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -1729,12 +1991,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -1751,11 +2013,21 @@ "dev": true }, "node_modules/before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", "dev": true }, + "node_modules/benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.4", + "platform": "^1.3.3" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1767,27 +2039,21 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", "dev": true, "funding": [ { @@ -1797,13 +2063,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -1846,9 +2116,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001410", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", - "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==", + "version": "1.0.30001518", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001518.tgz", + "integrity": "sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA==", "dev": true, "funding": [ { @@ -1858,6 +2128,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -1886,44 +2160,53 @@ "node": ">=10" } }, - "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "engines": { - "node": ">=6" + "node": ">=8" } }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", "dev": true, "dependencies": { - "restore-cursor": "^3.1.0" + "restore-cursor": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "dependencies": { "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" + "string-width": "^7.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1942,32 +2225,32 @@ } }, "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { "ansi-regex": "^6.0.1" @@ -1980,14 +2263,17 @@ } }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/co": { @@ -2001,9 +2287,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "node_modules/color-contrast-checker": { @@ -2031,16 +2317,15 @@ "dev": true }, "node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -2049,12 +2334,12 @@ } }, "node_modules/commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, "engines": { - "node": "^12.20.0 || >=14" + "node": ">=18" } }, "node_modules/concat-map": { @@ -2064,12 +2349,30 @@ "dev": true }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.1" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/cross-spawn": { @@ -2154,10 +2457,18 @@ "dev": true }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-is": { "version": "0.1.4", @@ -2166,9 +2477,9 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2178,7 +2489,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -2189,6 +2499,15 @@ "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", "dev": true }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2199,14 +2518,26 @@ } }, "node_modules/diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dom-accessibility-api": { "version": "0.5.14", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.14.tgz", @@ -2226,29 +2557,26 @@ } }, "node_modules/dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, "node_modules/electron-to-chromium": { - "version": "1.4.260", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.260.tgz", - "integrity": "sha512-1GxPM2Bdz1AjuNjho9/TqJfxM7KZ7R8s4vA5cbbIoVacQXfvZlV+d7Y1lu4BhGzEBfjjhakr3NXKqN0PxPXIsg==", + "version": "1.4.478", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.478.tgz", + "integrity": "sha512-qjTA8djMXd+ruoODDFGnRCRBpID+AAfYWCyGtYTNhsuwxI19s8q19gbjKTwRS5z/LyVf5wICaIiPQGLekmbJbA==", "dev": true }, "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "engines": { "node": ">=12" @@ -2339,41 +2667,319 @@ "source-map": "~0.6.1" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "eslint": "bin/eslint.js" }, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, - "engines": { - "node": ">=4.0" + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", @@ -2403,16 +3009,16 @@ } }, "node_modules/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2436,6 +3042,15 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -2445,10 +3060,22 @@ "bser": "2.1.1" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -2470,10 +3097,29 @@ "node": ">=8" } }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -2493,7 +3139,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -2510,9 +3155,9 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -2547,6 +3192,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -2593,6 +3250,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -2608,6 +3277,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2693,15 +3368,15 @@ } }, "node_modules/husky": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", - "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.1.tgz", + "integrity": "sha512-fCqlqLXcBnXa/TJXmT93/A36tJsjdJkibQ1MuIiFyCCYUlpYpIaj2mv1w+3KR6Rzu1IC3slFTje5f6DUp2A2rg==", "dev": true, "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" @@ -2719,6 +3394,40 @@ "node": ">=0.10.0" } }, + "node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -2738,18 +3447,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-local/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2814,9 +3511,9 @@ } }, "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -2825,6 +3522,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -2843,6 +3549,18 @@ "node": ">=6" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2852,6 +3570,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -2895,9 +3622,9 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, "dependencies": { "@babel/core": "^7.12.3", @@ -2911,17 +3638,17 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { @@ -2939,9 +3666,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -2957,15 +3684,15 @@ "integrity": "sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw==" }, "node_modules/jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.3.tgz", - "integrity": "sha512-ElgUtJBLgXM1E8L6K1RW1T96R897YY/3lRYqq9uVcPWtP2AAl/nQ16IYDh/FzQOOQ12VEuLdcPU83mbhG2C3PQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "dependencies": { - "@jest/core": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.0.3" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" @@ -2982,13 +3709,31 @@ } } }, + "node_modules/jest-bench": { + "version": "29.7.1", + "resolved": "https://registry.npmjs.org/jest-bench/-/jest-bench-29.7.1.tgz", + "integrity": "sha512-eFjQa+KVThwqY+Ecs9jeD+CdTUlDrJUAAFLy+DlWW5H1crnG1F4ad5Dk8K+kV6nB2aGCdFcusKBdgtx1SXYiHQ==", + "dev": true, + "dependencies": { + "@jest/globals": "^29.7.0", + "@jest/reporters": "^29.7.0", + "benchmark": "^2.1.4", + "chalk": "^4.1.0", + "lodash": "^4.17.20", + "ndjson": "^2.0.0" + }, + "peerDependencies": { + "jest": "^29.7.0" + } + }, "node_modules/jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "dependencies": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" }, "engines": { @@ -2996,28 +3741,29 @@ } }, "node_modules/jest-circus": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.3.tgz", - "integrity": "sha512-QeGzagC6Hw5pP+df1+aoF8+FBSgkPmraC1UdkeunWh0jmrp7wC0Hr6umdUAOELBQmxtKAOMNC3KAdjmCds92Zg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -3038,12 +3784,12 @@ } }, "node_modules/jest-circus/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3058,22 +3804,21 @@ "dev": true }, "node_modules/jest-cli": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.3.tgz", - "integrity": "sha512-aUy9Gd/Kut1z80eBzG10jAn6BgS3BoBbXyv+uXEqBJ8wnnuZ5RpNfARoskSrTIy1GY4a8f32YGuCMwibtkl9CQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "dependencies": { - "@jest/core": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, "bin": { @@ -3092,31 +3837,31 @@ } }, "node_modules/jest-config": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.3.tgz", - "integrity": "sha512-U5qkc82HHVYe3fNu2CRXLN4g761Na26rWKf7CjM8LlZB3In1jadEkZdMwsE37rd9RSPV0NfYaCjHdk/gu3v+Ew==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.3", - "@jest/types": "^29.0.3", - "babel-jest": "^29.0.3", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.3", - "jest-environment-node": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -3148,19 +3893,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-config/node_modules/ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - }, "node_modules/jest-config/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3175,15 +3914,15 @@ "dev": true }, "node_modules/jest-diff": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.3.tgz", - "integrity": "sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3202,12 +3941,12 @@ } }, "node_modules/jest-diff/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3222,9 +3961,9 @@ "dev": true }, "node_modules/jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -3234,16 +3973,16 @@ } }, "node_modules/jest-each": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.3.tgz", - "integrity": "sha512-wILhZfESURHHBNvPMJ0lZlYZrvOQJxAo3wNHi+ycr90V7M+uGR9Gh4+4a/BmaZF0XTyZsk4OiYEf3GJN7Ltqzg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.0.3", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3262,12 +4001,12 @@ } }, "node_modules/jest-each/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3282,65 +4021,73 @@ "dev": true }, "node_modules/jest-environment-jsdom": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.3.tgz", - "integrity": "sha512-KIGvpm12c71hoYTjL4wC2c8K6KfhOHJqJtaHc1IApu5rG047YWZoEP13BlbucWfzGISBrmli8KFqdhdQEa8Wnw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", + "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0", "jsdom": "^20.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, "node_modules/jest-environment-node": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.3.tgz", - "integrity": "sha512-cdZqRCnmIlTXC+9vtvmfiY/40Cj6s2T0czXuq1whvQdmpzAnj4sbqVYuZ4zFHk766xTTJ+Ij3uUqkk8KCfXoyg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.3.tgz", - "integrity": "sha512-uMqR99+GuBHo0RjRhOE4iA6LmsxEwRdgiIAQgMU/wdT2XebsLDz5obIwLZm/Psj+GwSEQhw9AfAVKGYbh2G55A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -3352,13 +4099,13 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.3.tgz", - "integrity": "sha512-YfW/G63dAuiuQ3QmQlh8hnqLDe25WFY3eQhuc/Ev1AGmkw5zREblTh7TCSKLoheyggu6G9gxO2hY8p9o6xbaRQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "dependencies": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3377,12 +4124,12 @@ } }, "node_modules/jest-leak-detector/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3397,15 +4144,15 @@ "dev": true }, "node_modules/jest-matcher-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.3.tgz", - "integrity": "sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3424,12 +4171,12 @@ } }, "node_modules/jest-matcher-utils/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3444,18 +4191,18 @@ "dev": true }, "node_modules/jest-message-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz", - "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -3476,12 +4223,12 @@ } }, "node_modules/jest-message-util/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3496,22 +4243,23 @@ "dev": true }, "node_modules/jest-mock": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz", - "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", - "@types/node": "*" + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "engines": { "node": ">=6" @@ -3526,28 +4274,28 @@ } }, "node_modules/jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.3.tgz", - "integrity": "sha512-toVkia85Y/BPAjJasTC9zIPY6MmVXQPtrCk8SmiheC4MwVFE/CMFlOtMN6jrwPMC6TtNh8+sTMllasFeu1wMPg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { @@ -3555,43 +4303,43 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.3.tgz", - "integrity": "sha512-KzuBnXqNvbuCdoJpv8EanbIGObk7vUBNt/PwQPPx2aMhlv/jaXpUJsqWYRpP/0a50faMBY7WFFP8S3/CCzwfDw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "dependencies": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.3" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.3.tgz", - "integrity": "sha512-Usu6VlTOZlCZoNuh3b2Tv/yzDpKqtiNAetG9t3kJuHfUyVMNW7ipCCJOUojzKkjPoaN7Bl1f7Buu6PE0sGpQxw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "dependencies": { - "@jest/console": "^29.0.3", - "@jest/environment": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-leak-detector": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-resolve": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-util": "^29.0.3", - "jest-watcher": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -3600,31 +4348,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.3.tgz", - "integrity": "sha512-12gZXRQ7ozEeEHKTY45a+YLqzNDR/x4c//X6AqwKwKJPpWM8FY4vwn4VQJOcLRS3Nd1fWwgP7LU4SoynhuUMHQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/globals": "^29.0.3", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -3633,35 +4381,31 @@ } }, "node_modules/jest-snapshot": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.3.tgz", - "integrity": "sha512-52q6JChm04U3deq+mkQ7R/7uy7YyfVIrebMi6ZkBoDJ85yEjm/sJwdr1P0LOIEHmpyLlXrxy3QP0Zf5J2kj0ew==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.3", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.3", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3679,13 +4423,25 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3700,9 +4456,9 @@ "dev": true }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3714,13 +4470,19 @@ "node": ">=10" } }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/jest-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz", - "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -3731,24 +4493,18 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util/node_modules/ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - }, "node_modules/jest-validate": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.3.tgz", - "integrity": "sha512-OebiqqT6lK8cbMPtrSoS3aZP4juID762lZvpf1u+smZnwTEBCBInan0GAIIhv36MxGaJvmq5uJm7dl5gVt+Zrw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.0.3" + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3779,12 +4535,12 @@ } }, "node_modules/jest-validate/node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -3799,18 +4555,18 @@ "dev": true }, "node_modules/jest-watcher": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.3.tgz", - "integrity": "sha512-tQX9lU91A+9tyUQKUMp0Ns8xAcdhC9fo73eqA3LFxP2bSgiF49TNcc+vf3qgGYYK9qRjFpXW9+4RgF/mbxyOOw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.0.3", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { @@ -3818,12 +4574,13 @@ } }, "node_modules/jest-worker": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", - "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -3865,18 +4622,18 @@ } }, "node_modules/jsdom": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", - "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-pksjj7Rqoa+wdpkKcLzQRHhJCEE42qQhl/xLMUKHgoSejaKOdaXEAnqs6uDNwMl/fciHTzKeR8Wm8cw7N+g98A==", "dev": true, "dependencies": { "abab": "^2.0.6", - "acorn": "^8.7.1", - "acorn-globals": "^6.0.0", + "acorn": "^8.8.0", + "acorn-globals": "^7.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", "data-urls": "^3.0.2", - "decimal.js": "^10.3.1", + "decimal.js": "^10.4.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", @@ -3884,18 +4641,17 @@ "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "^7.0.0", + "nwsapi": "^2.2.2", + "parse5": "^7.1.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", + "tough-cookie": "^4.1.2", "w3c-xmlserializer": "^3.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", "whatwg-url": "^11.0.0", - "ws": "^8.8.0", + "ws": "^8.9.0", "xml-name-validator": "^4.0.0" }, "engines": { @@ -3928,10 +4684,28 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "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==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -3972,12 +4746,15 @@ } }, "node_modules/lilconfig": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -3987,65 +4764,86 @@ "dev": true }, "node_modules/lint-staged": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", - "dev": true, - "dependencies": { - "cli-truncate": "^3.1.0", - "colorette": "^2.0.17", - "commander": "^9.3.0", - "debug": "^4.3.4", - "execa": "^6.1.0", - "lilconfig": "2.0.5", - "listr2": "^4.0.5", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-inspect": "^1.12.2", - "pidtree": "^0.6.0", - "string-argv": "^0.3.1", - "yaml": "^2.1.1" + "version": "15.2.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.7.tgz", + "integrity": "sha512-+FdVbbCZ+yoh7E/RosSdqKJyUM2OEjTciH0TFNkawKgvFp1zbGlEC39RADg+xKBG1R4mhoH2j85myBQZ5wR+lw==", + "dev": true, + "dependencies": { + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.4", + "execa": "~8.0.1", + "lilconfig": "~3.1.1", + "listr2": "~8.2.1", + "micromatch": "~4.0.7", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.4.2" }, "bin": { "lint-staged": "bin/lint-staged.js" }, "engines": { - "node": "^14.13.1 || >=16.0.0" + "node": ">=18.12.0" }, "funding": { "url": "https://opencollective.com/lint-staged" } }, + "node_modules/lint-staged/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/lint-staged/node_modules/execa": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^3.0.1", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", - "signal-exit": "^3.0.7", + "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/lint-staged/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lint-staged/node_modules/human-signals": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "engines": { - "node": ">=12.20.0" + "node": ">=16.17.0" } }, "node_modules/lint-staged/node_modules/is-stream": { @@ -4114,6 +4912,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lint-staged/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/lint-staged/node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -4127,171 +4937,338 @@ } }, "node_modules/listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", - "dev": true, - "dependencies": { - "cli-truncate": "^2.1.0", - "colorette": "^2.0.16", - "log-update": "^4.0.0", - "p-map": "^4.0.0", - "rfdc": "^1.3.0", - "rxjs": "^7.5.5", - "through": "^2.3.8", - "wrap-ansi": "^7.0.0" + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.1.tgz", + "integrity": "sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g==", + "dev": true, + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.0.0", + "rfdc": "^1.3.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/listr2/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "dev": true + }, + "node_modules/log-update": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^6.2.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", + "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, "engines": { "node": ">=12" }, - "peerDependencies": { - "enquirer": ">= 2.3.0 < 3" - }, - "peerDependenciesMeta": { - "enquirer": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/listr2/node_modules/cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", "dev": true, "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "get-east-asian-width": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/listr2/node_modules/slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" + "node": ">=18" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", - "dev": true - }, - "node_modules/log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "node_modules/log-update/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, "dependencies": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "node_modules/log-update/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/log-update/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "yallist": "^3.0.2" } }, "node_modules/lz-string": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "bin": { "lz-string": "bin/bin.js" } }, "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -4316,12 +5293,12 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -4332,7 +5309,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -4341,7 +5317,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -4379,6 +5354,15 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4391,46 +5375,23 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/ndjson": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", + "integrity": "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==", "dev": true, "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.5", + "readable-stream": "^3.6.0", + "split2": "^3.0.0", + "through2": "^4.0.0" }, - "peerDependencies": { - "encoding": "^0.1.0" + "bin": { + "ndjson": "cli.js" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "engines": { + "node": ">=10" } }, "node_modules/node-int64": { @@ -4440,9 +5401,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node_modules/normalize-path": { @@ -4472,15 +5433,6 @@ "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", "dev": true }, - "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4564,21 +5516,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -4588,10 +5525,22 @@ "node": ">=6" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse-diff": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.7.1.tgz", - "integrity": "sha512-1j3l8IKcy4yRK2W4o9EYvJLSzpAVwz4DXqCewYyx2vEwk2gcf3DBPqc8Fj4XV3K33OYJ08A8fWwyu/ykD/HUSg==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.11.1.tgz", + "integrity": "sha512-Oq4j8LAOPOcssanQkIjxosjATBIEJhCxMCxPhMu+Ci4wdNmAEdx0O+a7gzbR2PyKXgKPvRLIN5g224+dJAsKHA==", "dev": true }, "node_modules/parse-json": { @@ -4688,14 +5637,32 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "engines": { "node": ">= 6" } }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/platform": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", + "dev": true + }, "node_modules/prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -4706,15 +5673,15 @@ } }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -4759,6 +5726,11 @@ "node": ">= 6" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -4774,18 +5746,68 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.3.tgz", + "integrity": "sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -4821,12 +5843,12 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", + "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -4849,7 +5871,7 @@ "node": ">=8" } }, - "node_modules/resolve-cwd/node_modules/resolve-from": { + "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", @@ -4859,47 +5881,103 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dev": true, "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", "dev": true }, - "node_modules/rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "tslib": "^2.1.0" + "queue-microtask": "^1.2.2" } }, "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -4920,9 +5998,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4987,9 +6065,9 @@ } }, "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.1.tgz", - "integrity": "sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "engines": { "node": ">=12" @@ -5029,6 +6107,15 @@ "source-map": "^0.6.0" } }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5047,10 +6134,19 @@ "node": ">=10" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", "dev": true, "engines": { "node": ">=0.6.19" @@ -5149,19 +6245,6 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -5180,22 +6263,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -5210,12 +6277,21 @@ "node": ">=8" } }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "dependencies": { + "readable-stream": "3" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -5244,9 +6320,9 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", - "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "dependencies": { "psl": "^1.1.33", @@ -5270,12 +6346,6 @@ "node": ">=12" } }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -5318,6 +6388,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "dev": true, + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, "node_modules/universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -5334,9 +6416,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", - "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "funding": [ { @@ -5346,6 +6428,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -5353,7 +6439,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -5364,6 +6450,15 @@ "resolved": "https://registry.npmjs.org/upgrade/-/upgrade-1.1.0.tgz", "integrity": "sha512-NtkVvqVCqsJo5U3mYRum2Tw6uCltOxfIJ/AfTZeTmw6U39IB5X23xF+kRZ9aiPaORqeiQQ7Q209/ibhOvxzwHA==" }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -5374,6 +6469,12 @@ "requires-port": "^1.0.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -5384,9 +6485,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -5397,14 +6498,11 @@ "node": ">=10.12.0" } }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true }, "node_modules/w3c-xmlserializer": { "version": "3.0.0", @@ -5486,9 +6584,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "engines": { "node": ">=0.10.0" } @@ -5530,16 +6628,16 @@ } }, "node_modules/ws": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", - "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -5575,33 +6673,36 @@ } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "node_modules/yaml": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", - "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz", + "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", "dev": true, + "bin": { + "yaml": "bin.mjs" + }, "engines": { "node": ">= 14" } }, "node_modules/yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" @@ -5630,10 +6731,16 @@ } }, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true + }, "@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", "dev": true, "requires": { "@actions/http-client": "^2.0.1", @@ -5641,238 +6748,281 @@ } }, "@actions/github": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", - "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", + "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", "dev": true, "requires": { - "@actions/http-client": "^1.0.8", - "@octokit/core": "^3.0.0", - "@octokit/plugin-paginate-rest": "^2.2.3", - "@octokit/plugin-rest-endpoint-methods": "^4.0.0" - }, - "dependencies": { - "@actions/http-client": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", - "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", - "dev": true, - "requires": { - "tunnel": "0.0.6" - } - } + "@actions/http-client": "^2.2.0", + "@octokit/core": "^5.0.1", + "@octokit/plugin-paginate-rest": "^9.0.0", + "@octokit/plugin-rest-endpoint-methods": "^10.0.0" } }, "@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", + "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", "dev": true, "requires": { - "tunnel": "^0.0.6" + "tunnel": "^0.0.6", + "undici": "^5.25.4" } }, "@adobe/css-tools": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.0.1.tgz", - "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", + "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", "dev": true }, "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", "dev": true, "requires": { - "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" } }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/compat-data": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.1.tgz", - "integrity": "sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", + "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", "dev": true }, "@babel/core": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.1.tgz", - "integrity": "sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-compilation-targets": "^7.19.1", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.1", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.1", - "@babel/types": "^7.19.0", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz", + "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.9", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.8", + "@babel/types": "^7.22.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.2", + "semver": "^6.3.1" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } } }, "@babel/generator": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", - "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.19.0", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } } }, "@babel/helper-compilation-targets": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz", - "integrity": "sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz", + "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==", "dev": true, "requires": { - "@babel/compat-data": "^7.19.1", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", + "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" } }, "@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true }, "@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", "dev": true }, "@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", + "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.6", + "@babel/types": "^7.22.5" } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -5935,9 +7085,9 @@ } }, "@babel/parser": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.1.tgz", - "integrity": "sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -5986,12 +7136,12 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -6058,12 +7208,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/runtime": { @@ -6076,42 +7226,42 @@ } }, "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.1.tgz", - "integrity": "sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.1", - "@babel/types": "^7.19.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -6121,6 +7271,90 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true + }, + "@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "dev": true + }, + "@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -6152,12 +7386,6 @@ "argparse": "^1.0.7", "esprima": "^4.0.0" } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true } } }, @@ -6168,51 +7396,51 @@ "dev": true }, "@jest/console": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.3.tgz", - "integrity": "sha512-cGg0r+klVHSYnfE977S9wmpuQ9L+iYuYgL+5bPXiUlUynLLYunRxswEmhBzvrSKGof5AKiHuTTmUKAqRcDY9dg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" } }, "@jest/core": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.3.tgz", - "integrity": "sha512-1d0hLbOrM1qQE3eP3DtakeMbKTcXiXP3afWxqz103xPyddS2NhnNghS7MaXx1dcDt4/6p4nlhmeILo2ofgi8cQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "requires": { - "@jest/console": "^29.0.3", - "@jest/reporters": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-resolve-dependencies": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "jest-watcher": "^29.0.3", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -6223,19 +7451,13 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true }, - "ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -6249,74 +7471,74 @@ } }, "@jest/environment": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz", - "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "requires": { - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.0.3" + "jest-mock": "^29.7.0" } }, "@jest/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-6W7K+fsI23FQ01H/BWccPyDZFrnU9QlzDcKOjrNVU5L8yUORFAJJIpmyxWPW70+X624KUNqzZwPThPMX28aXEQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "requires": { - "expect": "^29.0.3", - "jest-snapshot": "^29.0.3" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" } }, "@jest/expect-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.3.tgz", - "integrity": "sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "requires": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.6.3" } }, "@jest/fake-timers": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz", - "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "requires": { - "@jest/types": "^29.0.3", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "@jest/globals": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.3.tgz", - "integrity": "sha512-YqGHT65rFY2siPIHHFjuCGUsbzRjdqkwbat+Of6DmYRg5shIXXrLdZoVE/+TJ9O1dsKsFmYhU58JvIbZRU1Z9w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "requires": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/types": "^29.0.3", - "jest-mock": "^29.0.3" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" } }, "@jest/reporters": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.3.tgz", - "integrity": "sha512-3+QU3d4aiyOWfmk1obDerie4XNCaD5Xo1IlKNde2yGEi02WQD+ZQD0i5Hgqm1e73sMV7kw6pMlCnprtEwEVwxw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -6324,94 +7546,132 @@ "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.0.tgz", + "integrity": "sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "requires": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" } }, "@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.3.tgz", - "integrity": "sha512-vViVnQjCgTmbhDKEonKJPtcFe9G/CJO4/Np4XwYJah+lF2oI7KKeRp8t1dFvv44wN2NdbDb/qC6pi++Vpp0Dlg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "requires": { - "@jest/console": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.3.tgz", - "integrity": "sha512-Hf4+xYSWZdxTNnhDykr8JBs0yBN/nxOXyUQWfotBUqqy0LF9vzcFB0jm/EDNZCx587znLWTIgxcokW7WeZMobQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "requires": { - "@jest/test-result": "^29.0.3", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.7.0", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.3.tgz", - "integrity": "sha512-C5ihFTRYaGDbi/xbRQRdbo5ddGtI4VSpmL6AIcZxdhwLbXMa7PcXxxqyI91vGOFHnn5aVM3WYnYKCHEqmLVGzg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" } }, "@jest/types": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz", - "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -6420,13 +7680,14 @@ } }, "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" } }, "@jridgewell/resolve-uri": { @@ -6442,180 +7703,208 @@ "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + } + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" } }, - "@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { - "@octokit/types": "^6.0.3" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" } }, + "@octokit/auth-token": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "dev": true + }, "@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.1.tgz", + "integrity": "sha512-lyeeeZyESFo+ffI801SaBKmCfsvarO+dgV8/0gD8u1d87clbEdWsP5yC+dSj3zLhb2eIf5SJrn6vDz9AheETHw==", "dev": true, "requires": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", + "@octokit/auth-token": "^4.0.0", + "@octokit/graphql": "^7.0.0", + "@octokit/request": "^8.0.2", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" } }, "@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.1.tgz", + "integrity": "sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==", "dev": true, "requires": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "is-plain-object": "^5.0.0", "universal-user-agent": "^6.0.0" } }, "@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", + "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", "dev": true, "requires": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", + "@octokit/request": "^8.0.1", + "@octokit/types": "^12.0.0", "universal-user-agent": "^6.0.0" } }, "@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz", + "integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==", "dev": true }, "@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.0.0.tgz", + "integrity": "sha512-oIJzCpttmBTlEhBmRvb+b9rlnGpmFgDtZ0bB6nq39qIod6A5DP+7RkVLMOixIgRCYSHDTeayWqmiJ2SZ6xgfdw==", "dev": true, "requires": { - "@octokit/types": "^6.40.0" + "@octokit/types": "^12.0.0" } }, "@octokit/plugin-rest-endpoint-methods": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.1.tgz", - "integrity": "sha512-4gQg4ySoW7ktKB0Mf38fHzcSffVZd6mT5deJQtpqkuPuAqzlED5AJTeW8Uk7dPRn7KaOlWcXB0MedTFJU1j4qA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.0.1.tgz", + "integrity": "sha512-fgS6HPkPvJiz8CCliewLyym9qAx0RZ/LKh3sATaPfM41y/O2wQ4Z9MrdYeGPVh04wYmHFmWiGlKPC7jWVtZXQA==", "dev": true, "requires": { - "@octokit/types": "^6.13.0", - "deprecation": "^2.3.1" + "@octokit/types": "^12.0.0" } }, "@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.4.tgz", + "integrity": "sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==", "dev": true, "requires": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", + "@octokit/endpoint": "^9.0.0", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" } }, "@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", + "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", "dev": true, "requires": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz", + "integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==", "dev": true, "requires": { - "@octokit/openapi-types": "^12.11.0" + "@octokit/openapi-types": "^19.0.0" } }, "@sinclair/typebox": { - "version": "0.24.42", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.42.tgz", - "integrity": "sha512-d+2AtrHGyWek2u2ITF0lHRIv6Tt7X0dEHW+0rP+5aDCEjC3fiN2RBjrLD0yU0at52BcZbRGxLbAtXiR0hFCjYw==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", + "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "@testing-library/dom": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.18.1.tgz", - "integrity": "sha512-oEvsm2B/WtcHKE+IcEeeCqNU/ltFGaVyGbpcm4g/2ytuT49jrlH9x5qRKL/H3A6yfM4YAbSbC0ceT5+9CEXnLg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^5.0.0", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", + "lz-string": "^1.5.0", "pretty-format": "^27.0.2" } }, "@testing-library/jest-dom": { - "version": "5.16.5", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz", - "integrity": "sha512-N5ixQ2qKpi5OLYfwQmUb/5mSV9LneAcaUfp32pn4yCnpb8r/Yz0pXFPck21dIicKmi+ta5WRAknkZCfA8refMA==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.6.tgz", + "integrity": "sha512-8qpnGVincVDLEcQXWaHOf6zmlbwTKc6Us6PPu4CRnPXCzo2OGBS5cwgMMOWdxDpEz1mkbvXHpEy99M5Yvt682w==", "dev": true, "requires": { - "@adobe/css-tools": "^4.0.1", + "@adobe/css-tools": "^4.4.0", "@babel/runtime": "^7.9.2", - "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^5.0.0", "chalk": "^3.0.0", "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", - "lodash": "^4.17.15", + "dom-accessibility-api": "^0.6.3", + "lodash": "^4.17.21", "redent": "^3.0.0" }, "dependencies": { @@ -6628,6 +7917,12 @@ "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } + }, + "dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true } } }, @@ -6638,37 +7933,37 @@ "dev": true }, "@types/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz", + "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==", "dev": true }, "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", + "integrity": "sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.5.tgz", + "integrity": "sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.2.tgz", + "integrity": "sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -6676,18 +7971,18 @@ } }, "@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.2.tgz", + "integrity": "sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==", "dev": true, "requires": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", "dev": true, "requires": { "@types/node": "*" @@ -6717,41 +8012,6 @@ "@types/istanbul-lib-report": "*" } }, - "@types/jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.0.3.tgz", - "integrity": "sha512-F6ukyCTwbfsEX5F2YmVYmM5TcTHy1q9P5rWlRbrk56KyMh3v9xRGUO3aa8+SkvMi0SHXtASJv1283enXimC0Og==", - "dev": true, - "requires": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", - "dev": true, - "requires": { - "@jest/schemas": "^29.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - } - } - }, "@types/jsdom": { "version": "20.0.0", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz", @@ -6769,27 +8029,12 @@ "integrity": "sha512-Sq1itGUKUX1ap7GgZlrzdBydjbsJL/NSQt/4wkAxUJ7/OS5c2WkoN6WSpWc2Yc5wtKMZOUA0VCs/j2XJadN3HA==", "dev": true }, - "@types/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==", - "dev": true - }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "@types/testing-library__jest-dom": { - "version": "5.14.5", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz", - "integrity": "sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==", - "dev": true, - "requires": { - "@types/jest": "*" - } - }, "@types/tough-cookie": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", @@ -6811,6 +8056,12 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "@uppercod/css-to-object": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@uppercod/css-to-object/-/css-to-object-1.1.1.tgz", @@ -6824,33 +8075,32 @@ "dev": true }, "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true }, "acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", + "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - }, - "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - } + "acorn": "^8.1.0", + "acorn-walk": "^8.0.2" } }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true }, "agent-base": { @@ -6862,14 +8112,16 @@ "debug": "4" } }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, "ansi-escapes": { @@ -6897,9 +8149,9 @@ } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -6913,35 +8165,33 @@ "dev": true }, "aria-query": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.2.tgz", - "integrity": "sha512-eigU3vhqSO+Z8BKDnVLN/ompjhf3pYzecKXz8+whRy+9gZu8n1TCGfwzQUUPnqdHl9ax1Hr9031orZ+UOEYr7Q==", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "requires": { + "dequal": "^2.0.3" + } }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", "requires": { - "follow-redirects": "^1.14.4" + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "axios-mock-adapter": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.21.2.tgz", - "integrity": "sha512-jzyNxU3JzB2XVhplZboUcF0YDs7xuExzoRSHXPHr+UQajaGmcTqvkkUADgkVI2WkGlpZ1zZlMVdcTMU0ejV8zQ==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", + "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", "dev": true, "requires": { "fast-deep-equal": "^3.1.3", @@ -6949,15 +8199,15 @@ } }, "babel-jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.3.tgz", - "integrity": "sha512-ApPyHSOhS/sVzwUOQIWJmdvDhBsMG01HX9z7ogtkp1TToHGGUWFlnXJUIzCgKPSfiYLn3ibipCYzsKSURHEwLg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "requires": { - "@jest/transform": "^29.0.3", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -6977,9 +8227,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -7009,12 +8259,12 @@ } }, "babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -7025,11 +8275,21 @@ "dev": true }, "before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", "dev": true }, + "benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==", + "dev": true, + "requires": { + "lodash": "^4.17.4", + "platform": "^1.3.3" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -7041,30 +8301,24 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" } }, "bser": { @@ -7095,9 +8349,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001410", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001410.tgz", - "integrity": "sha512-QoblBnuE+rG0lc3Ur9ltP5q47lbguipa/ncNMyyGuqPk44FxbScWAeEO+k5fSQ8WekdAK4mWqNs1rADDAiN5xQ==", + "version": "1.0.30001518", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001518.tgz", + "integrity": "sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA==", "dev": true }, "chalk": { @@ -7116,35 +8370,35 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, - "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", "dev": true, "requires": { - "restore-cursor": "^3.1.0" + "restore-cursor": "^4.0.0" } }, "cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "requires": { "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" + "string-width": "^7.0.0" }, "dependencies": { "ansi-regex": { @@ -7154,26 +8408,26 @@ "dev": true }, "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" } }, "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "requires": { "ansi-regex": "^6.0.1" @@ -7182,13 +8436,13 @@ } }, "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, @@ -7199,9 +8453,9 @@ "dev": true }, "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "color-contrast-checker": { @@ -7226,24 +8480,23 @@ "dev": true }, "colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } }, "commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true }, "concat-map": { @@ -7253,12 +8506,24 @@ "dev": true }, "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "requires": { - "safe-buffer": "~5.1.1" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" } }, "cross-spawn": { @@ -7328,10 +8593,11 @@ "dev": true }, "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "requires": {} }, "deep-is": { "version": "0.1.4", @@ -7340,16 +8606,15 @@ "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" }, "deprecation": { "version": "2.3.1", @@ -7357,6 +8622,12 @@ "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", "dev": true }, + "dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true + }, "detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -7364,11 +8635,20 @@ "dev": true }, "diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-accessibility-api": { "version": "0.5.14", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.14.tgz", @@ -7385,26 +8665,20 @@ } }, "dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==" - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" }, "electron-to-chromium": { - "version": "1.4.260", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.260.tgz", - "integrity": "sha512-1GxPM2Bdz1AjuNjho9/TqJfxM7KZ7R8s4vA5cbbIoVacQXfvZlV+d7Y1lu4BhGzEBfjjhakr3NXKqN0PxPXIsg==", + "version": "1.4.478", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.478.tgz", + "integrity": "sha512-qjTA8djMXd+ruoODDFGnRCRBpID+AAfYWCyGtYTNhsuwxI19s8q19gbjKTwRS5z/LyVf5wICaIiPQGLekmbJbA==", "dev": true }, "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-name-map": { @@ -7468,12 +8742,200 @@ "source-map": "~0.6.1" } }, + "eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "requires": {} + }, + "eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + }, + "espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "requires": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -7486,6 +8948,12 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -7510,16 +8978,16 @@ "dev": true }, "expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "requires": { - "@jest/expect-utils": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" } }, "fast-deep-equal": { @@ -7540,6 +9008,15 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -7549,10 +9026,19 @@ "bser": "2.1.1" } }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -7568,16 +9054,31 @@ "path-exists": "^4.0.0" } }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -7591,9 +9092,9 @@ "dev": true }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, @@ -7615,6 +9116,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true + }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -7646,6 +9153,15 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -7658,6 +9174,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -7722,9 +9244,9 @@ "dev": true }, "husky": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", - "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.1.tgz", + "integrity": "sha512-fCqlqLXcBnXa/TJXmT93/A36tJsjdJkibQ1MuIiFyCCYUlpYpIaj2mv1w+3KR6Rzu1IC3slFTje5f6DUp2A2rg==", "dev": true }, "iconv-lite": { @@ -7736,6 +9258,30 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, + "ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, "import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -7744,17 +9290,6 @@ "requires": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" - }, - "dependencies": { - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } } }, "imurmurhash": { @@ -7798,14 +9333,20 @@ "dev": true }, "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "requires": { "has": "^1.0.3" } }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -7818,12 +9359,27 @@ "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", @@ -7855,9 +9411,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, "requires": { "@babel/core": "^7.12.3", @@ -7868,13 +9424,13 @@ } }, "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, @@ -7890,9 +9446,9 @@ } }, "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -7905,50 +9461,66 @@ "integrity": "sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw==" }, "jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.3.tgz", - "integrity": "sha512-ElgUtJBLgXM1E8L6K1RW1T96R897YY/3lRYqq9uVcPWtP2AAl/nQ16IYDh/FzQOOQ12VEuLdcPU83mbhG2C3PQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "requires": { - "@jest/core": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^29.0.3" + "jest-cli": "^29.7.0" + } + }, + "jest-bench": { + "version": "29.7.1", + "resolved": "https://registry.npmjs.org/jest-bench/-/jest-bench-29.7.1.tgz", + "integrity": "sha512-eFjQa+KVThwqY+Ecs9jeD+CdTUlDrJUAAFLy+DlWW5H1crnG1F4ad5Dk8K+kV6nB2aGCdFcusKBdgtx1SXYiHQ==", + "dev": true, + "requires": { + "@jest/globals": "^29.7.0", + "@jest/reporters": "^29.7.0", + "benchmark": "^2.1.4", + "chalk": "^4.1.0", + "lodash": "^4.17.20", + "ndjson": "^2.0.0" } }, "jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "requires": { "execa": "^5.0.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0" } }, "jest-circus": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.3.tgz", - "integrity": "sha512-QeGzagC6Hw5pP+df1+aoF8+FBSgkPmraC1UdkeunWh0jmrp7wC0Hr6umdUAOELBQmxtKAOMNC3KAdjmCds92Zg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "requires": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "p-limit": "^3.1.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -7960,12 +9532,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -7979,51 +9551,50 @@ } }, "jest-cli": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.3.tgz", - "integrity": "sha512-aUy9Gd/Kut1z80eBzG10jAn6BgS3BoBbXyv+uXEqBJ8wnnuZ5RpNfARoskSrTIy1GY4a8f32YGuCMwibtkl9CQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "requires": { - "@jest/core": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "prompts": "^2.0.1", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "yargs": "^17.3.1" } }, "jest-config": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.3.tgz", - "integrity": "sha512-U5qkc82HHVYe3fNu2CRXLN4g761Na26rWKf7CjM8LlZB3In1jadEkZdMwsE37rd9RSPV0NfYaCjHdk/gu3v+Ew==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.3", - "@jest/types": "^29.0.3", - "babel-jest": "^29.0.3", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.3", - "jest-environment-node": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -8034,19 +9605,13 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true }, - "ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8060,15 +9625,15 @@ } }, "jest-diff": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.3.tgz", - "integrity": "sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { @@ -8078,12 +9643,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8097,25 +9662,25 @@ } }, "jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.3.tgz", - "integrity": "sha512-wILhZfESURHHBNvPMJ0lZlYZrvOQJxAo3wNHi+ycr90V7M+uGR9Gh4+4a/BmaZF0XTyZsk4OiYEf3GJN7Ltqzg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.0.3", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { @@ -8125,12 +9690,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8144,69 +9709,69 @@ } }, "jest-environment-jsdom": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.3.tgz", - "integrity": "sha512-KIGvpm12c71hoYTjL4wC2c8K6KfhOHJqJtaHc1IApu5rG047YWZoEP13BlbucWfzGISBrmli8KFqdhdQEa8Wnw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", + "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", "dev": true, "requires": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0", "jsdom": "^20.0.0" } }, "jest-environment-node": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.3.tgz", - "integrity": "sha512-cdZqRCnmIlTXC+9vtvmfiY/40Cj6s2T0czXuq1whvQdmpzAnj4sbqVYuZ4zFHk766xTTJ+Ij3uUqkk8KCfXoyg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "requires": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true }, "jest-haste-map": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.3.tgz", - "integrity": "sha512-uMqR99+GuBHo0RjRhOE4iA6LmsxEwRdgiIAQgMU/wdT2XebsLDz5obIwLZm/Psj+GwSEQhw9AfAVKGYbh2G55A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.3.tgz", - "integrity": "sha512-YfW/G63dAuiuQ3QmQlh8hnqLDe25WFY3eQhuc/Ev1AGmkw5zREblTh7TCSKLoheyggu6G9gxO2hY8p9o6xbaRQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "requires": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { @@ -8216,12 +9781,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8235,15 +9800,15 @@ } }, "jest-matcher-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.3.tgz", - "integrity": "sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { @@ -8253,12 +9818,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8272,18 +9837,18 @@ } }, "jest-message-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz", - "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -8295,12 +9860,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8314,144 +9879,141 @@ } }, "jest-mock": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz", - "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "requires": { - "@jest/types": "^29.0.3", - "@types/node": "*" + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" } }, "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "requires": {} }, "jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true }, "jest-resolve": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.3.tgz", - "integrity": "sha512-toVkia85Y/BPAjJasTC9zIPY6MmVXQPtrCk8SmiheC4MwVFE/CMFlOtMN6jrwPMC6TtNh8+sTMllasFeu1wMPg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.3.tgz", - "integrity": "sha512-KzuBnXqNvbuCdoJpv8EanbIGObk7vUBNt/PwQPPx2aMhlv/jaXpUJsqWYRpP/0a50faMBY7WFFP8S3/CCzwfDw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "requires": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.3" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" } }, "jest-runner": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.3.tgz", - "integrity": "sha512-Usu6VlTOZlCZoNuh3b2Tv/yzDpKqtiNAetG9t3kJuHfUyVMNW7ipCCJOUojzKkjPoaN7Bl1f7Buu6PE0sGpQxw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "requires": { - "@jest/console": "^29.0.3", - "@jest/environment": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-leak-detector": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-resolve": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-util": "^29.0.3", - "jest-watcher": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "jest-runtime": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.3.tgz", - "integrity": "sha512-12gZXRQ7ozEeEHKTY45a+YLqzNDR/x4c//X6AqwKwKJPpWM8FY4vwn4VQJOcLRS3Nd1fWwgP7LU4SoynhuUMHQ==", - "dev": true, - "requires": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/globals": "^29.0.3", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" } }, "jest-snapshot": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.3.tgz", - "integrity": "sha512-52q6JChm04U3deq+mkQ7R/7uy7YyfVIrebMi6ZkBoDJ85yEjm/sJwdr1P0LOIEHmpyLlXrxy3QP0Zf5J2kj0ew==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "requires": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.3", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.3", - "semver": "^7.3.5" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "dependencies": { "ansi-styles": { @@ -8460,13 +10022,22 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8478,50 +10049,48 @@ "dev": true }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, "jest-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz", - "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" - }, - "dependencies": { - "ci-info": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz", - "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==", - "dev": true - } } }, "jest-validate": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.3.tgz", - "integrity": "sha512-OebiqqT6lK8cbMPtrSoS3aZP4juID762lZvpf1u+smZnwTEBCBInan0GAIIhv36MxGaJvmq5uJm7dl5gVt+Zrw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^29.0.3" + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { @@ -8537,12 +10106,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } @@ -8556,28 +10125,29 @@ } }, "jest-watcher": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.3.tgz", - "integrity": "sha512-tQX9lU91A+9tyUQKUMp0Ns8xAcdhC9fo73eqA3LFxP2bSgiF49TNcc+vf3qgGYYK9qRjFpXW9+4RgF/mbxyOOw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "requires": { - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.0.3", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", - "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "requires": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -8609,18 +10179,18 @@ } }, "jsdom": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz", - "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==", + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-pksjj7Rqoa+wdpkKcLzQRHhJCEE42qQhl/xLMUKHgoSejaKOdaXEAnqs6uDNwMl/fciHTzKeR8Wm8cw7N+g98A==", "dev": true, "requires": { "abab": "^2.0.6", - "acorn": "^8.7.1", - "acorn-globals": "^6.0.0", + "acorn": "^8.8.0", + "acorn-globals": "^7.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", "data-urls": "^3.0.2", - "decimal.js": "^10.3.1", + "decimal.js": "^10.4.1", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", @@ -8628,18 +10198,17 @@ "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "^7.0.0", + "nwsapi": "^2.2.2", + "parse5": "^7.1.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", + "tough-cookie": "^4.1.2", "w3c-xmlserializer": "^3.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", "whatwg-url": "^11.0.0", - "ws": "^8.8.0", + "ws": "^8.9.0", "xml-name-validator": "^4.0.0" } }, @@ -8655,10 +10224,28 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "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==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "kleur": { @@ -8684,9 +10271,9 @@ } }, "lilconfig": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", "dev": true }, "lines-and-columns": { @@ -8696,47 +10283,56 @@ "dev": true }, "lint-staged": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", - "dev": true, - "requires": { - "cli-truncate": "^3.1.0", - "colorette": "^2.0.17", - "commander": "^9.3.0", - "debug": "^4.3.4", - "execa": "^6.1.0", - "lilconfig": "2.0.5", - "listr2": "^4.0.5", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-inspect": "^1.12.2", - "pidtree": "^0.6.0", - "string-argv": "^0.3.1", - "yaml": "^2.1.1" + "version": "15.2.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.7.tgz", + "integrity": "sha512-+FdVbbCZ+yoh7E/RosSdqKJyUM2OEjTciH0TFNkawKgvFp1zbGlEC39RADg+xKBG1R4mhoH2j85myBQZ5wR+lw==", + "dev": true, + "requires": { + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.4", + "execa": "~8.0.1", + "lilconfig": "~3.1.1", + "listr2": "~8.2.1", + "micromatch": "~4.0.7", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.4.2" }, "dependencies": { + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true + }, "execa": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "requires": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^3.0.1", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", - "signal-exit": "^3.0.7", + "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" } }, + "get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true + }, "human-signals": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true }, "is-stream": { @@ -8775,6 +10371,12 @@ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, "strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -8784,40 +10386,66 @@ } }, "listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", - "dev": true, - "requires": { - "cli-truncate": "^2.1.0", - "colorette": "^2.0.16", - "log-update": "^4.0.0", - "p-map": "^4.0.0", - "rfdc": "^1.3.0", - "rxjs": "^7.5.5", - "through": "^2.3.8", - "wrap-ansi": "^7.0.0" + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.1.tgz", + "integrity": "sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g==", + "dev": true, + "requires": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.0.0", + "rfdc": "^1.3.1", + "wrap-ansi": "^9.0.0" }, "dependencies": { - "cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, "requires": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" } }, - "slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } @@ -8837,6 +10465,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", @@ -8844,63 +10478,142 @@ "dev": true }, "log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", "dev": true, "requires": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" + "ansi-escapes": "^6.2.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "dependencies": { + "ansi-escapes": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", + "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", + "dev": true + }, + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "requires": { + "get-east-asian-width": "^1.0.0" + } + }, "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + } + }, + "string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-regex": "^6.0.1" } }, "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } }, "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "yallist": "^4.0.0" + "yallist": "^3.0.2" } }, "lz-string": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true }, "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "requires": { - "semver": "^6.0.0" + "semver": "^7.5.3" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "makeerror": { @@ -8927,26 +10640,24 @@ "dev": true }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "requires": { "mime-db": "1.52.0" } @@ -8972,6 +10683,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -8984,37 +10701,17 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "ndjson": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", + "integrity": "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==", "dev": true, "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.5", + "readable-stream": "^3.6.0", + "split2": "^3.0.0", + "through2": "^4.0.0" } }, "node-int64": { @@ -9024,9 +10721,9 @@ "dev": true }, "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "normalize-path": { @@ -9050,12 +10747,6 @@ "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==", "dev": true }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -9117,25 +10808,25 @@ } } }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parse-diff": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.7.1.tgz", - "integrity": "sha512-1j3l8IKcy4yRK2W4o9EYvJLSzpAVwz4DXqCewYyx2vEwk2gcf3DBPqc8Fj4XV3K33OYJ08A8fWwyu/ykD/HUSg==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.11.1.tgz", + "integrity": "sha512-Oq4j8LAOPOcssanQkIjxosjATBIEJhCxMCxPhMu+Ci4wdNmAEdx0O+a7gzbR2PyKXgKPvRLIN5g224+dJAsKHA==", "dev": true }, "parse-json": { @@ -9202,9 +10893,24 @@ "dev": true }, "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "platform": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", "dev": true }, "prelude-ls": { @@ -9214,9 +10920,9 @@ "dev": true }, "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true }, "pretty-format": { @@ -9248,6 +10954,11 @@ "sisteransi": "^1.0.5" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -9260,18 +10971,41 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pure-rand": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.3.tgz", + "integrity": "sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==", + "dev": true + }, "querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -9301,12 +11035,12 @@ "dev": true }, "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", + "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dev": true, "requires": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -9318,51 +11052,64 @@ "dev": true, "requires": { "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } } }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true }, "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dev": true, "requires": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", "dev": true }, - "rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { - "tslib": "^2.1.0" + "queue-microtask": "^1.2.2" } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safer-buffer": { @@ -9381,9 +11128,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "shebang-command": { @@ -9430,9 +11177,9 @@ }, "dependencies": { "ansi-styles": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.1.tgz", - "integrity": "sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true }, "is-fullwidth-code-point": { @@ -9459,6 +11206,15 @@ "source-map": "^0.6.0" } }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "requires": { + "readable-stream": "^3.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -9474,10 +11230,19 @@ "escape-string-regexp": "^2.0.0" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", "dev": true }, "string-length": { @@ -9546,16 +11311,6 @@ "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -9568,16 +11323,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, "test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -9589,12 +11334,21 @@ "minimatch": "^3.0.4" } }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "requires": { + "readable-stream": "3" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -9617,9 +11371,9 @@ } }, "tough-cookie": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz", - "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, "requires": { "psl": "^1.1.33", @@ -9637,12 +11391,6 @@ "punycode": "^2.1.1" } }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -9670,6 +11418,15 @@ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true }, + "undici": { + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "dev": true, + "requires": { + "@fastify/busboy": "^2.0.0" + } + }, "universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -9683,9 +11440,9 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz", - "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -9697,6 +11454,15 @@ "resolved": "https://registry.npmjs.org/upgrade/-/upgrade-1.1.0.tgz", "integrity": "sha512-NtkVvqVCqsJo5U3mYRum2Tw6uCltOxfIJ/AfTZeTmw6U39IB5X23xF+kRZ9aiPaORqeiQQ7Q209/ibhOvxzwHA==" }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -9707,6 +11473,12 @@ "requires-port": "^1.0.0" } }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -9714,23 +11486,22 @@ "dev": true }, "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0" - } - }, - "w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "requires": { - "browser-process-hrtime": "^1.0.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } } }, "w3c-xmlserializer": { @@ -9792,9 +11563,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" }, "wrap-ansi": { "version": "7.0.0", @@ -9824,9 +11595,9 @@ } }, "ws": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", - "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "dev": true, "requires": {} }, @@ -9849,30 +11620,30 @@ "dev": true }, "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "yaml": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", - "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz", + "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", "dev": true }, "yargs": { - "version": "17.5.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", - "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { diff --git a/package.json b/package.json index 95b1a11dad93f..e36f09f69d40e 100644 --- a/package.json +++ b/package.json @@ -29,37 +29,45 @@ "generate-langs-json": "node scripts/generate-langs-json", "format": "prettier --write .", "format:check": "prettier --check .", - "prepare": "husky install" + "prepare": "husky", + "lint": "npx eslint --max-warnings 0 \"./src/**/*.js\" \"./scripts/**/*.js\" \"./tests/**/*.js\" \"./api/**/*.js\" \"./themes/**/*.js\"", + "bench": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.bench.config.js" }, "author": "Anurag Hazra", "license": "MIT", "devDependencies": { - "@actions/core": "^1.9.1", - "@actions/github": "^4.0.0", - "@testing-library/dom": "^8.17.1", - "@testing-library/jest-dom": "^5.16.5", + "@actions/core": "^1.10.1", + "@actions/github": "^6.0.0", + "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.4.6", "@uppercod/css-to-object": "^1.1.1", - "axios-mock-adapter": "^1.18.1", + "axios-mock-adapter": "^1.22.0", "color-contrast-checker": "^2.1.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", "hjson": "^3.2.2", - "husky": "^8.0.0", - "jest": "^29.0.3", - "jest-environment-jsdom": "^29.0.3", + "husky": "^9.1.1", + "jest": "^29.7.0", + "jest-bench": "^29.7.1", + "jest-environment-jsdom": "^29.7.0", "js-yaml": "^4.1.0", - "lint-staged": "^13.0.3", + "lint-staged": "^15.2.7", "lodash.snakecase": "^4.1.1", - "parse-diff": "^0.7.0", - "prettier": "^2.1.2" + "parse-diff": "^0.11.1", + "prettier": "^3.3.3" }, "dependencies": { - "axios": "^0.24.0", - "dotenv": "^8.2.0", + "axios": "^1.7.2", + "dotenv": "^16.4.5", "emoji-name-map": "^1.2.8", "github-username-regex": "^1.0.0", "upgrade": "^1.1.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" }, "lint-staged": { "*.{js,css,md}": "prettier --write" + }, + "engines": { + "node": ">=18.0.0" } } diff --git a/readme.md b/readme.md index bfe042fcc2032..363b008b2f8c2 100644 --- a/readme.md +++ b/readme.md @@ -11,7 +11,7 @@ GitHub Contributors - + Tests Coverage Issues @@ -19,24 +19,26 @@ GitHub pull requests + + OpenSSF Scorecard +

- - - - - + +

- View Demo + View Demo · - Report Bug + Report Bug · - Request Feature + Request Feature · - Ask Question + FAQ + · + Ask Question

Français @@ -54,50 +56,84 @@ Italiano · 한국어 - . + · Nederlands - . + · नेपाली - . + · Türkçe

+

Please note that documentation translations may be outdated; try to use English documentation if possible.

+

Love the project? Please consider donating to help it improve!

- Give india logo + Give india logo -Are you considering supporting the project by donating? Please DO NOT!! +Are you considering supporting the project by donating to me? Please DO NOT!!! + +Picture of Coromandel Express train tragedy -Instead, Help India fight the second deadly wave of COVID-19. -Thousands of people are dying in India because of a lack of Oxygen & also COVID-related infrastructure. +India has recently suffered one of the most devastating train accidents, and your help will be immensely valuable for the people who were affected by this tragedy. -Visit and make a small donation to help us fight COVID and overcome this crisis. A small donation goes a long way. :heart: +Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of-the-coromandel-express-train-tragedy-in-odisha-donate-now) and make a small donation to help the people in need. A small donation goes a long way. :heart:

-# Features - -- [GitHub Stats Card](#github-stats-card) -- [GitHub Extra Pins](#github-extra-pins) -- [Top Languages Card](#top-languages-card) -- [Wakatime Week Stats](#wakatime-week-stats) -- [Themes](#themes) - - [Responsive Card Theme](#responsive-card-theme) -- [Customization](#customization) - - [Common Options](#common-options) - - [Stats Card Exclusive Options](#stats-card-exclusive-options) - - [Repo Card Exclusive Options](#repo-card-exclusive-options) - - [Language Card Exclusive Options](#language-card-exclusive-options) - - [Wakatime Card Exclusive Option](#wakatime-card-exclusive-options) -- [Deploy Yourself](#deploy-on-your-own-vercel-instance) - - [Keep your fork up to date](#keep-your-fork-up-to-date) +# Features + +- [GitHub Stats Card](#github-stats-card) + - [Hiding individual stats](#hiding-individual-stats) + - [Showing additional individual stats](#showing-additional-individual-stats) + - [Showing icons](#showing-icons) + - [Themes](#themes) + - [Customization](#customization) +- [GitHub Extra Pins](#github-extra-pins) + - [Usage](#usage) + - [Demo](#demo) +- [GitHub Gist Pins](#github-gist-pins) + - [Usage](#usage-1) + - [Demo](#demo-1) +- [Top Languages Card](#top-languages-card) + - [Usage](#usage-2) + - [Language stats algorithm](#language-stats-algorithm) + - [Exclude individual repositories](#exclude-individual-repositories) + - [Hide individual languages](#hide-individual-languages) + - [Show more languages](#show-more-languages) + - [Compact Language Card Layout](#compact-language-card-layout) + - [Donut Chart Language Card Layout](#donut-chart-language-card-layout) + - [Donut Vertical Chart Language Card Layout](#donut-vertical-chart-language-card-layout) + - [Pie Chart Language Card Layout](#pie-chart-language-card-layout) + - [Hide Progress Bars](#hide-progress-bars) + - [Demo](#demo-2) +- [WakaTime Stats Card](#wakatime-stats-card) + - [Demo](#demo-3) +- [All Demos](#all-demos) + - [Quick Tip (Align The Cards)](#quick-tip-align-the-cards) +- [Deploy on your own](#deploy-on-your-own) + - [On Vercel](#on-vercel) + - [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr) + - [On other platforms](#on-other-platforms) + - [Disable rate limit protections](#disable-rate-limit-protections) + - [Keep your fork up to date](#keep-your-fork-up-to-date) +- [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project) + +# Important Notices + +> [!IMPORTANT]\ +> Since the GitHub API only [allows 5k requests per hour per user account](https://docs.github.com/en/graphql/overview/resource-limitations), the public Vercel instance hosted on `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). We use caching to prevent this from happening (see https://github.com/anuraghazra/github-readme-stats#common-options). You can turn off these rate limit protections by deploying [your own Vercel instance](#disable-rate-limit-protections). + +Uptime Badge + +> [!IMPORTANT]\ +> We're a small team, and to prioritize, we rely on upvotes :+1:. We use the Top Issues dashboard for tracking community demand (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935)). Do not hesitate to upvote the issues and pull requests you are interested in. We will work on the most upvoted first. # GitHub Stats Card -Copy-paste this into your markdown content, and that is it. Simple! +Copy and paste this into your markdown, and that's it. Simple! Change the `?username=` value to your GitHub username. @@ -105,8 +141,11 @@ Change the `?username=` value to your GitHub username. [![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) ``` -> **Note** -> Available ranks are S+ (top 1%), S (top 25%), A++ (top 45%), A+ (top 60%), and B+ (everyone). The values are calculated by using the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function) using commits, contributions, issues, stars, pull requests, followers, and owned repositories. The implementation can be investigated at [src/calculateRank.js](./src/calculateRank.js). +> [!WARNING]\ +> By default, the stats card only shows statistics like stars, commits, and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token. + +> [!NOTE]\ +> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars, and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](https://github.com/anuraghazra/github-readme-stats/blob/master/src/calculateRank.js). The circle around the rank shows 100 minus the global percentile. ### Hiding individual stats @@ -118,22 +157,19 @@ You can pass a query parameter `&hide=` to hide any specific stats with comma-se ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=contribs,prs) ``` -### Adding private contributions count to total commits count - -You can add the count of all your private contributions to the total commits count by using the query parameter `&count_private=true`. +### Showing additional individual stats -> **Note** -> If you are deploying this project yourself, the private contributions will be counted by default. If you are using the public Vercel instance, you need to choose to [share your private contributions](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/showing-your-private-contributions-and-achievements-on-your-profile). +You can pass a query parameter `&show=` to show any specific additional stats with comma-separated values. -> Options: `&count_private=true` +> Options: `&show=reviews,discussions_started,discussions_answered,prs_merged,prs_merged_percentage` ```md -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&count_private=true) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show=reviews,discussions_started,discussions_answered,prs_merged,prs_merged_percentage) ``` ### Showing icons -To enable icons, you can pass `show_icons=true` in the query param, like so: +To enable icons, you can pass `&show_icons=true` in the query param, like so: ```md ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true) @@ -151,16 +187,16 @@ Use `&theme=THEME_NAME` parameter like so : #### All inbuilt themes -GitHub readme stats comes with several built-in themes (e.g. `dark`, `radical`, `merko`, `gruvbox`, `tokyonight`, `onedark`, `cobalt`, `synthwave`, `highcontrast`, `dracula`). +GitHub Readme Stats comes with several built-in themes (e.g. `dark`, `radical`, `merko`, `gruvbox`, `tokyonight`, `onedark`, `cobalt`, `synthwave`, `highcontrast`, `dracula`). GitHub Readme Stats Themes -You can look at a preview for [all available themes](./themes/README.md) or checkout the [theme config file](./themes/index.js) & **you can also contribute new themes** if you like :D +You can look at a preview for [all available themes](themes/README.md) or checkout the [theme config file](themes/index.js). Please note that we paused the addition of new themes to decrease maintenance efforts; all pull requests related to new themes will be closed. #### Responsive Card Theme -[![Anurag's GitHub stats-Dark](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=dark#gh-dark-mode-only)](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only) -[![Anurag's GitHub stats-Light](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=default#gh-light-mode-only)](https://github.com/anuraghazra/github-readme-stats#gh-light-mode-only) +[![Anurag's GitHub stats-Dark](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&theme=dark#gh-dark-mode-only)](https://github.com/anuraghazra/github-readme-stats#responsive-card-theme#gh-dark-mode-only) +[![Anurag's GitHub stats-Light](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&theme=default#gh-light-mode-only)](https://github.com/anuraghazra/github-readme-stats#responsive-card-theme#gh-light-mode-only) Since GitHub will re-upload the cards and serve them from their [CDN](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls), we can not infer the browser/GitHub theme on the server side. There are, however, four methods you can use to create dynamics themes on the client side. @@ -175,13 +211,13 @@ We have included a `transparent` theme that has a transparent background. This t
:eyes: Show example -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=transparent) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&theme=transparent)
-##### Add transparent alpha channel to a themes bg_color +##### Add transparent alpha channel to a themes bg\_color -You can use the `bg_color` parameter to make any of [the available themes](./themes/README.md) transparent. This is done by setting the `bg_color` to a colour with a transparent alpha channel (i.e. `bg_color=00000000`): +You can use the `bg_color` parameter to make any of [the available themes](themes/README.md) transparent. This is done by setting the `bg_color` to a color with a transparent alpha channel (i.e. `bg_color=00000000`): ```md ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&bg_color=00000000) @@ -190,7 +226,7 @@ You can use the `bg_color` parameter to make any of [the available themes](./the
:eyes: Show example -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&bg_color=00000000) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&bg_color=00000000)
@@ -206,26 +242,26 @@ You can use [GitHub's theme context](https://github.blog/changelog/2021-11-24-sp
:eyes: Show example -[![Anurag's GitHub stats-Dark](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=dark#gh-dark-mode-only)](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only) -[![Anurag's GitHub stats-Light](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=default#gh-light-mode-only)](https://github.com/anuraghazra/github-readme-stats#gh-light-mode-only) +[![Anurag's GitHub stats-Dark](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&theme=dark#gh-dark-mode-only)](https://github.com/anuraghazra/github-readme-stats#gh-dark-mode-only) +[![Anurag's GitHub stats-Light](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&theme=default#gh-light-mode-only)](https://github.com/anuraghazra/github-readme-stats#gh-light-mode-only)
##### Use GitHub's new media feature You can use [GitHub's new media feature](https://github.blog/changelog/2022-05-19-specify-theme-context-for-images-in-markdown-beta/) in HTML to specify whether to display images for light or dark themes. This is done using the HTML `` element in combination with the `prefers-color-scheme` media feature. - + ```html - - - + + + ``` @@ -233,100 +269,178 @@ You can use [GitHub's new media feature](https://github.blog/changelog/2022-05-1 :eyes: Show example - - - + + + ### Customization -You can customize the appearance of your `Stats Card` or `Repo Card` however you wish with URL parameters. +You can customize the appearance of all your cards however you wish with URL parameters. #### Common Options -- `title_color` - Card's title color _(hex color)_. Default: `2f80ed`. -- `text_color` - Body text color _(hex color)_. Default: `434d58`. -- `icon_color` - Icons color if available _(hex color)_. Default: `4c71f2`. -- `border_color` - Card's border color _(hex color)_. Default: `e4e2e2` (Does not apply when `hide_border` is enabled). -- `bg_color` - Card's background color _(hex color)_ **or** a gradient in the form of _angle,start,end_. Default: `fffefe` -- `hide_border` - Hides the card's border _(boolean)_. Default: `false` -- `theme` - name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme. -- `cache_seconds` - set the cache header manually _(min: 7200, max: 86400)_. Default: `14400 seconds (4 hours)`. -- `locale` - set the language in the card _(e.g. cn, de, es, etc.)_. Default: `en`. -- `border_radius` - Corner rounding on the card. Default: `4.5`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `title_color` | Card's title color. | string (hex color) | `2f80ed` | +| `text_color` | Body text color. | string (hex color) | `434d58` | +| `icon_color` | Icons color if available. | string (hex color) | `4c71f2` | +| `border_color` | Card's border color. Does not apply when `hide_border` is enabled. | string (hex color) | `e4e2e2` | +| `bg_color` | Card's background color. | string (hex color or a gradient in the form of *angle,start,end*) | `fffefe` | +| `hide_border` | Hides the card's border. | boolean | `false` | +| `theme` | Name of the theme, choose from [all available themes](themes/README.md). | enum | `default` | +| `cache_seconds` | Sets the cache header manually (min: 21600, max: 86400). | integer | `21600` | +| `locale` | Sets the language in the card, you can check full list of available locales [here](#available-locales). | enum | `en` | +| `border_radius` | Corner rounding on the card. | number | `4.5` | -> **Warning** -> We use caching to decrease the load on our servers (see https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425). Our cards have a default cache of 4 hours (14400 seconds). Also, note that the cache is clamped to a minimum of 4 hours and a maximum of 24 hours. +> [!WARNING]\ +> We use caching to decrease the load on our servers (see ). Our cards have a default cache of 6 hours (21600 seconds). Also, note that the cache is clamped to a minimum of 6 hours and a maximum of 24 hours. If you want the data on your statistics card to be updated more often you can [deploy your own instance](#deploy-on-your-own) and set [environment variable](#disable-rate-limit-protections) `CACHE_SECONDS` to a value of your choosing. -##### Gradient in bg_color +##### Gradient in bg\_color -You can provide multiple comma-separated values in the bg_color option to render a gradient with the following format: +You can provide multiple comma-separated values in the bg\_color option to render a gradient with the following format: &bg_color=DEG,COLOR1,COLOR2,COLOR3...COLOR10 +##### Available locales + +Here is a list of all available locales: + + + +
+ +| Code | Locale | +| --- | --- | +| `cn` | Chinese | +| `zh-tw` | Chinese (Taiwan) | +| `ar` | Arabic | +| `cs` | Czech | +| `de` | German | +| `en` | English | +| `bn` | Bengali | +| `es` | Spanish | +| `fr` | French | +| `hu` | Hungarian | + + + +| Code | Locale | +| --- | --- | +| `it` | Italian | +| `ja` | Japanese | +| `kr` | Korean | +| `nl` | Dutch | +| `pt-pt` | Portuguese (Portugal) | +| `pt-br` | Portuguese (Brazil) | +| `np` | Nepali | +| `el` | Greek | +| `ru` | Russian | +| `uk-ua` | Ukrainian | + + + +| Code | Locale | +| --- | --- | +| `id` | Indonesian | +| `ml` | Malayalam | +| `my` | Burmese | +| `sk` | Slovak | +| `tr` | Turkish | +| `pl` | Polish | +| `uz` | Uzbek | +| `vi` | Vietnamese | +| `se` | Swedish | + +
+ +If we don't support your language, please consider contributing! You can find more information about how to do it in our [contributing guidelines](CONTRIBUTING.md#translations-contribution). + #### Stats Card Exclusive Options -- `hide` - Hides the [specified items](#hiding-individual-stats) from stats _(Comma-separated values)_. Default: `[] (blank array)`. -- `hide_title` - _(boolean)_. Default: `false`. -- `card_width` - Set the card's width manually _(number)_. Default: `500px (approx.)`. -- `hide_rank` - _(boolean)_ hides the rank and automatically resizes the card width. Default: `false`. -- `show_icons` - _(boolean)_. Default: `false`. -- `include_all_commits` - Count total commits instead of just the current year commits _(boolean)_. Default: `false`. -- `count_private` - Count private commits _(boolean)_. Default: `false`. -- `line_height` - Sets the line height between text _(number)_. Default: `25`. -- `exclude_repo` - Exclude stars from specified repositories _(Comma-separated values)_. Default: `[] (blank array)`. -- `custom_title` - Sets a custom title for the card. Default: ` GitHub Stats`. -- `text_bold` - Use bold text _(boolean)_. Default: `true`. -- `disable_animations` - Disables all animations in the card _(boolean)_. Default: `false`. -- `ring_color` - Color of the rank circle _(hex color)_. Defaults to the theme ring color if it exists and otherwise the title color. - -> **Note** -> When hide_rank=`true`, the minimum card width is 270 px + the title length and padding. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `hide` | Hides the [specified items](#hiding-individual-stats) from stats. | string (comma-separated values) | `null` | +| `hide_title` | Hides the title of your stats card. | boolean | `false` | +| `card_width` | Sets the card's width manually. | number | `500px (approx.)` | +| `hide_rank` | Hides the rank and automatically resizes the card width. | boolean | `false` | +| `rank_icon` | Shows alternative rank icon (i.e. `github`, `percentile` or `default`). | enum | `default` | +| `show_icons` | Shows icons near all stats. | boolean | `false` | +| `include_all_commits` | Count total commits instead of just the current year commits. | boolean | `false` | +| `line_height` | Sets the line height between text. | integer | `25` | +| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` | +| `custom_title` | Sets a custom title for the card. | string | ` GitHub Stats` | +| `text_bold` | Uses bold text. | boolean | `true` | +| `disable_animations` | Disables all animations in the card. | boolean | `false` | +| `ring_color` | Color of the rank circle. | string (hex color) | `2f80ed` | +| `number_format` | Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). | enum | `short` | +| `show` | Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started`, `discussions_answered`, `prs_merged` or `prs_merged_percentage`). | string (comma-separated values) | `null` | + +> [!NOTE]\ +> When hide\_rank=`true`, the minimum card width is 270 px + the title length and padding. #### Repo Card Exclusive Options -- `show_owner` - Show the repo's owner name _(boolean)_. Default: `false`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `show_owner` | Shows the repo's owner name. | boolean | `false` | +| `description_lines_count` | Manually set the number of lines for the description. Specified value will be clamped between 1 and 3. If this parameter is not specified, the number of lines will be automatically adjusted according to the actual length of the description. | number | `null` | -#### Language Card Exclusive Options +#### Gist Card Exclusive Options + +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `show_owner` | Shows the gist's owner name. | boolean | `false` | -- `hide` - Hide the languages specified from the card _(Comma-separated values)_. Default: `[] (blank array)`. -- `hide_title` - _(boolean)_. Default: `false`. -- `layout` - Switch between two available layouts `default` & `compact`. Default: `default`. -- `card_width` - Set the card's width manually _(number)_. Default `300`. -- `langs_count` - Show more languages on the card, between 1-10 _(number)_. Default `5`. -- `exclude_repo` - Exclude specified repositories _(Comma-separated values)_. Default: `[] (blank array)`. -- `custom_title` - Sets a custom title for the card _(string)_. Default `Most Used Languages`. +#### Language Card Exclusive Options -> **Warning** +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `hide` | Hides the [specified languages](#hide-individual-languages) from card. | string (comma-separated values) | `null` | +| `hide_title` | Hides the title of your card. | boolean | `false` | +| `layout` | Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. | enum | `normal` | +| `card_width` | Sets the card's width manually. | number | `300` | +| `langs_count` | Shows more languages on the card, between 1-20. | integer | `5` for `normal` and `donut`, `6` for other layouts | +| `exclude_repo` | Excludes specified repositories. | string (comma-separated values) | `null` | +| `custom_title` | Sets a custom title for the card. | string | `Most Used Languages` | +| `disable_animations` | Disables all animations in the card. | boolean | `false` | +| `hide_progress` | Uses the compact layout option, hides percentages, and removes the bars. | boolean | `false` | +| `size_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `1` | +| `count_weight` | Configures language stats algorithm (see [Language stats algorithm](#language-stats-algorithm)). | integer | `0` | + +> [!WARNING]\ > Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding) > (i.e: `c++` should become `c%2B%2B`, `jupyter notebook` should become `jupyter%20notebook`, etc.) You can use > [urlencoder.org](https://www.urlencoder.org/) to help you do this automatically. -#### Wakatime Card Exclusive Options +#### WakaTime Card Exclusive Options -- `hide` - Hide the languages specified from the card _(Comma-separated values)_. Default: `[] (blank array)`. -- `hide_title` - _(boolean)_. Default `false`. -- `line_height` - Sets the line height between text _(number)_. Default `25`. -- `hide_progress` - Hides the progress bar and percentage _(boolean)_. Default `false`. -- `custom_title` - Sets a custom title for the card _(string)_. Default `Wakatime Stats`. -- `layout` - Switch between two available layouts `default` & `compact`. Default `default`. -- `langs_count` - Limit the number of languages on the card, defaults to all reported languages _(number)_. -- `api_domain` - Set a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) _(string)_. Default `Waka API`. -- `range` – Request a range different from your WakaTime default, e.g. `last_7_days`. See [WakaTime API docs](https://wakatime.com/developers#stats) for a list of available options. _(YYYY-MM, last_7_days, last_30_days, last_6_months, last_year, or all_time)_. Default `all_time`. +| Name | Description | Type | Default value | +| --- | --- | --- | --- | +| `hide` | Hides the languages specified from the card. | string (comma-separated values) | `null` | +| `hide_title` | Hides the title of your card. | boolean | `false` | +| `line_height` | Sets the line height between text. | integer | `25` | +| `hide_progress` | Hides the progress bar and percentage. | boolean | `false` | +| `custom_title` | Sets a custom title for the card. | string | `WakaTime Stats` | +| `layout` | Switches between two available layouts `default` & `compact`. | enum | `default` | +| `langs_count` | Limits the number of languages on the card, defaults to all reported languages. | integer | `null` | +| `api_domain` | Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) | string | `wakatime.com` | +| `display_format` | Sets the WakaTime stats display format. Choose `time` to display time-based stats or `percent` to show percentages. | enum | `time` | +| `disable_animations` | Disables all animations in the card. | boolean | `false` | -* * * +*** # GitHub Extra Pins -GitHub extra pins allow you to pin more than six repositories in your profile using a GitHub readme profile. +GitHub extra pins allow you to pin more than 6 repositories in your profile using a GitHub readme profile. Yay! You are no longer limited to 6 pinned repositories. @@ -342,18 +456,49 @@ Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats` ### Demo -[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats)](https://github.com/anuraghazra/github-readme-stats) +![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra\&repo=github-readme-stats) + +Use [show\_owner](#repo-card-exclusive-options) query option to include the repo's owner username + +![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra\&repo=github-readme-stats\&show_owner=true) + +# GitHub Gist Pins + +GitHub gist pins allow you to pin gists in your GitHub profile using a GitHub readme profile. + +### Usage + +Copy-paste this code into your readme and change the links. + +Endpoint: `api/gist?id=bbfce31e0217a3689c8d961a356cb10d` + +```md +[![Gist Card](https://github-readme-stats.vercel.app/api/gist?id=bbfce31e0217a3689c8d961a356cb10d)](https://gist.github.com/Yizack/bbfce31e0217a3689c8d961a356cb10d/) +``` + +### Demo -Use [show_owner](#customization) variable to include the repo's owner username +![Gist Card](https://github-readme-stats.vercel.app/api/gist?id=bbfce31e0217a3689c8d961a356cb10d) -[![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&show_owner=true)](https://github.com/anuraghazra/github-readme-stats) +Use [show\_owner](#gist-card-exclusive-options) query option to include the gist's owner username + +![Gist Card](https://github-readme-stats.vercel.app/api/gist?id=bbfce31e0217a3689c8d961a356cb10d\&show_owner=true) # Top Languages Card -The top languages card shows a GitHub user's most frequently used top language. +The top languages card shows a GitHub user's most frequently used languages. + +> [!WARNING]\ +> By default, the language card shows language results only from public repositories. To include languages used in private repositories, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token. + +> [!NOTE]\ +> Top Languages does not indicate the user's skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats. + +> [!WARNING]\ +> This card shows language usage only inside your own non-forked repositories, not depending on who the author of the commits is. It does not include your contributions into another users/organizations repositories. Currently there are no way to get this data from GitHub API. If you want this behavior to be improved you can support [this feature request](https://github.com/orgs/community/discussions/18230) created by [@rickstaa](https://github.com/rickstaa) inside GitHub Community. -> **Note** -> Top Languages does not indicate my skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats._ +> [!WARNING]\ +> Currently this card shows data only about first 100 repositories. This is because GitHub API limitations which cause downtimes of public instances (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). In future this behavior will be improved by releasing GitHub action or providing environment variables for user's own instances. ### Usage @@ -365,12 +510,30 @@ Endpoint: `api/top-langs?username=anuraghazra` [![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) ``` +### Language stats algorithm + +We use the following algorithm to calculate the languages percentages on the language card: + +```js +ranking_index = (byte_count ^ size_weight) * (repo_count ^ count_weight) +``` + +By default, only the byte count is used for determining the languages percentages shown on the language card (i.e. `size_weight=1` and `count_weight=0`). You can, however, use the `&size_weight=` and `&count_weight=` options to weight the language usage calculation. The values must be positive real numbers. [More details about the algorithm can be found here](https://github.com/anuraghazra/github-readme-stats/issues/1600#issuecomment-1046056305). + +* `&size_weight=1&count_weight=0` - *(default)* Orders by byte count. +* `&size_weight=0.5&count_weight=0.5` - *(recommended)* Uses both byte and repo count for ranking +* `&size_weight=0&count_weight=1` - Orders by repo count + +```md +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&size_weight=0.5&count_weight=0.5) +``` + ### Exclude individual repositories You can use the `&exclude_repo=repo1,repo2` parameter to exclude individual repositories. ```md -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&exclude_repo=github-readme-stats,anuraghazra.github.io)](https://github.com/anuraghazra/github-readme-stats) +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&exclude_repo=github-readme-stats,anuraghazra.github.io) ``` ### Hide individual languages @@ -378,15 +541,15 @@ You can use the `&exclude_repo=repo1,repo2` parameter to exclude individual repo You can use `&hide=language1,language2` parameter to hide individual languages. ```md -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&hide=javascript,html)](https://github.com/anuraghazra/github-readme-stats) +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&hide=javascript,html) ``` ### Show more languages -You can use the `&langs_count=` option to increase or decrease the number of languages shown on the card. Valid values are integers between 1 and 10 (inclusive), and the default is 5. +You can use the `&langs_count=` option to increase or decrease the number of languages shown on the card. Valid values are integers between 1 and 20 (inclusive). By default it was set to `5` for `normal` & `donut` and `6` for other layouts. ```md -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&langs_count=8)](https://github.com/anuraghazra/github-readme-stats) +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&langs_count=8) ``` ### Compact Language Card Layout @@ -394,98 +557,175 @@ You can use the `&langs_count=` option to increase or decrease the number of lan You can use the `&layout=compact` option to change the card design. ```md -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact) ``` -### Demo +### Donut Chart Language Card Layout -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) +You can use the `&layout=donut` option to change the card design. + +```md +[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=donut)](https://github.com/anuraghazra/github-readme-stats) +``` -- Compact layout +### Donut Vertical Chart Language Card Layout -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +You can use the `&layout=donut-vertical` option to change the card design. + +```md +[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=donut-vertical)](https://github.com/anuraghazra/github-readme-stats) +``` -# Wakatime Week Stats +### Pie Chart Language Card Layout -Change the `?username=` value to your [Wakatime](https://wakatime.com) username. +You can use the `&layout=pie` option to change the card design. ```md -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&layout=pie)](https://github.com/anuraghazra/github-readme-stats) ``` -> **Note**: -> Please be aware that we currently only show data from Wakatime profiles that are public. +### Hide Progress Bars + +You can use the `&hide_progress=true` option to hide the percentages and the progress bars (layout will be automatically set to `compact`). + +```md +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&hide_progress=true) +``` ### Demo -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra) + +* Compact layout + +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra\&layout=compact) + +* Donut Chart layout -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&hide_progress=true)](https://github.com/anuraghazra/github-readme-stats) +[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra\&layout=donut)](https://github.com/anuraghazra/github-readme-stats) -- Compact layout +* Donut Vertical Chart layout -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod&layout=compact)](https://github.com/anuraghazra/github-readme-stats) +[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra\&layout=donut-vertical)](https://github.com/anuraghazra/github-readme-stats) -* * * +* Pie Chart layout -### All Demos +[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra\&layout=pie)](https://github.com/anuraghazra/github-readme-stats) -- Default +* Hidden progress bars + +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra\&hide_progress=true) + +# WakaTime Stats Card + +> [!WARNING]\ +> Please be aware that we currently only show data from WakaTime profiles that are public. You therefore have to make sure that **BOTH** `Display code time publicly` and `Display languages, editors, os, categories publicly` are enabled. + +Change the `?username=` value to your [WakaTime](https://wakatime.com) username. + +```md +[![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs)](https://github.com/anuraghazra/github-readme-stats) +``` + +### Demo + +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs) + +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs\&hide_progress=true) + +* Compact layout + +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs\&layout=compact) + +*** + +# All Demos + +* Default ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra) -- Hiding specific stats +* Hiding specific stats -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=contribs,issues) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&hide=contribs,issues) -- Showing icons +* Showing additional stats -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=issues&show_icons=true) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&show=reviews,discussions_started,discussions_answered,prs_merged,prs_merged_percentage) -- Customize Border Color +* Showing icons -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&border_color=2e4058) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&hide=issues\&show_icons=true) -- Include All Commits +* Shows Github logo instead rank level -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&include_all_commits=true) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&rank_icon=github) -- Themes +* Shows user rank percentile instead of rank level + +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&rank_icon=percentile) + +* Customize Border Color + +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&border_color=2e4058) + +* Include All Commits + +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&include_all_commits=true) + +* Themes Choose from any of the [default themes](#themes) -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=radical) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&show_icons=true\&theme=radical) -- Gradient +* Gradient -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&bg_color=30,e96443,904e95&title_color=fff&text_color=fff) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra\&bg_color=30,e96443,904e95\&title_color=fff\&text_color=fff) -- Customizing stats card +* Customizing stats card -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&show_icons=true&title_color=fff&icon_color=79ff97&text_color=9f9f9f&bg_color=151515) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra\&show_icons=true\&title_color=fff\&icon_color=79ff97\&text_color=9f9f9f\&bg_color=151515) -- Setting card locale +* Setting card locale -![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra&locale=es) +![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api/?username=anuraghazra\&locale=es) -- Customizing repo card +* Customizing repo card -![Customized Card](https://github-readme-stats.vercel.app/api/pin?username=anuraghazra&repo=github-readme-stats&title_color=fff&icon_color=f9f9f9&text_color=9f9f9f&bg_color=151515) +![Customized Card](https://github-readme-stats.vercel.app/api/pin?username=anuraghazra\&repo=github-readme-stats\&title_color=fff\&icon_color=f9f9f9\&text_color=9f9f9f\&bg_color=151515) -- Top languages +* Gist card -[![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats) +![Gist Card](https://github-readme-stats.vercel.app/api/gist?id=bbfce31e0217a3689c8d961a356cb10d) -- WakaTime card +* Customizing gist card -[![willianrod's wakatime stats](https://github-readme-stats.vercel.app/api/wakatime?username=willianrod)](https://github.com/anuraghazra/github-readme-stats) +![Gist Card](https://github-readme-stats.vercel.app/api/gist?id=bbfce31e0217a3689c8d961a356cb10d&theme=calm) -* * * +* Top languages -### Quick Tip (Align The Repo Cards) +![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra) + +* WakaTime card + +![Harlok's WakaTime stats](https://github-readme-stats.vercel.app/api/wakatime?username=ffflabs) + +*** + +## Quick Tip (Align The Cards) By default, GitHub does not lay out the cards side by side. To do that, you can use this approach: +```html + + + + + + +``` + ```html @@ -495,18 +735,41 @@ By default, GitHub does not lay out the cards side by side. To do that, you can ``` -## Deploy on your own Vercel instance +
+:eyes: Show example + + + + + + + -#### [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107) +*** -> **Warning** -> If you are on the [hobby (i.e. free)](https://vercel.com/pricing) Vercel plan, please make sure you change the `maxDuration` parameter in the [vercel.json](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json) file from `30` to `10` (see [#1416](https://github.com/anuraghazra/github-readme-stats/issues/1416#issuecomment-950275476) for more information). + + + + + + + +
+ +# Deploy on your own + +## On Vercel + +### :film\_projector: [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107) Since the GitHub API only allows 5k requests per hour, my `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter. If you host it on your own Vercel server, then you do not have to worry about anything. Click on the deploy button to get started! -> **Note** +> [!NOTE]\ > Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58), we should be able to handle more than 5k requests and have fewer issues with downtime :grin:. +> [!NOTE]\ +> If you are on the [Pro (i.e. paid)](https://vercel.com/pricing) Vercel plan, the [maxDuration](https://vercel.com/docs/concepts/projects/project-configuration#value-definition) value found in the [vercel.json](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json) can be increased when your Vercel instance frequently times out during the card request. You are advised to keep this value lower than `30` seconds to prevent high memory usage. + [![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/anuraghazra/github-readme-stats)
@@ -519,40 +782,64 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme ![](https://files.catbox.moe/b9oxey.png) 4. Sign in to GitHub and allow access to all repositories if prompted. 5. Fork this repo. -6. After forking the repo, open the [`vercel.json`](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json#L5) file and change the `maxDuration` field to `10`. -7. Go back to your [Vercel dashboard](https://vercel.com/dashboard). -8. To import a project, click the `Add New...` button and select the `Project` option. +6. Go back to your [Vercel dashboard](https://vercel.com/dashboard). +7. To import a project, click the `Add New...` button and select the `Project` option. ![](https://files.catbox.moe/3n76fh.png) -9. Click the `Continue with GitHub` button, search for the required Git Repository and import it by clicking the `Import` button. Alternatively, you can import a Third-Party Git Repository using the `Import Third-Party Git Repository ->` link at the bottom of the page. +8. Click the `Continue with GitHub` button, search for the required Git Repository and import it by clicking the `Import` button. Alternatively, you can import a Third-Party Git Repository using the `Import Third-Party Git Repository ->` link at the bottom of the page. ![](https://files.catbox.moe/mg5p04.png) -10. Create a personal access token (PAT) [here](https://github.com/settings/tokens/new) and enable the `repo` permissions (this allows access to see private repo stats). -11. Add the PAT as an environment variable named `PAT_1` (as shown). +9. Create a personal access token (PAT) [here](https://github.com/settings/tokens/new) and enable the `repo` and `user` permissions (this allows access to see private repo and user stats). +10. Add the PAT as an environment variable named `PAT_1` (as shown). ![](https://files.catbox.moe/0yclio.png) -12. Click deploy, and you're good to go. See your domains to use the API! +11. Click deploy, and you're good to go. See your domains to use the API!
-### Keep your fork up to date +## On other platforms + +> [!WARNING]\ +> This way of using GRS is not officially supported and was added to cater to some particular use cases where Vercel could not be used (e.g. [#2341](https://github.com/anuraghazra/github-readme-stats/discussions/2341)). The support for this method, therefore, is limited. + +
+:hammer_and_wrench: Step-by-step guide for deploying on other platforms + +1. Fork or clone this repo as per your needs +2. Add `express` to the dependencies section of `package.json` + +3. Run `npm i` if needed (initial setup) +4. Run `node express.js` to start the server, or set the entry point to `express.js` in `package.json` if you're deploying on a managed service + +5. You're done 🎉 +
+ +## Disable rate limit protections + +Github Readme Stats contains several Vercel environment variables that can be used to remove the rate limit protections: + +* `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self-hosted Vercel instances. + +See [the Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables) on adding these environment variables to your Vercel instance. + +## Keep your fork up to date -You can keep your fork, and thus your private Vercel instance up to date with the upstream using GitHubs' [Sync Fork button](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork). You can also use the [pull](https://github.com/wei/pull) package created by [@wei](https://github.com/wei) to automate this process. +You can keep your fork, and thus your private Vercel instance up to date with the upstream using GitHub's [Sync Fork button](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork). You can also use the [pull](https://github.com/wei/pull) package created by [@wei](https://github.com/wei) to automate this process. -## :sparkling_heart: Support the project +# :sparkling\_heart: Support the project I open-source almost everything I can and try to reply to everyone needing help using these projects. Obviously, this takes time. You can use this service for free. However, if you are using this project and are happy with it or just want to encourage me to continue creating stuff, there are a few ways you can do it: -- Giving proper credit when you use github-readme-stats on your readme, linking back to it :D -- Starring and sharing the project :rocket: -- [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: +* Giving proper credit when you use github-readme-stats on your readme, linking back to it. :D +* Starring and sharing the project. :rocket: +* [![paypal.me/anuraghazra](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/anuraghazra) - You can make a one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea: Thanks! :heart: -* * * +*** -[![https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss](./powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team&utm_campaign=oss) +[![https://vercel.com?utm\_source=github\_readme\_stats\_team\&utm\_campaign=oss](powered-by-vercel.svg)](https://vercel.com?utm_source=github_readme_stats_team\&utm_campaign=oss) -Contributions are welcome! <3 +Contributions are welcome! <3 Made with :heart: and JavaScript. diff --git a/scripts/close-stale-theme-prs.js b/scripts/close-stale-theme-prs.js index 7db66f9775adb..4f2c936dca84f 100644 --- a/scripts/close-stale-theme-prs.js +++ b/scripts/close-stale-theme-prs.js @@ -25,10 +25,12 @@ const getReviewer = () => { /** * Fetch open PRs from a given repository. - * @param user The user name of the repository owner. - * @param repo The name of the repository. - * @param reviewer The reviewer to filter by. - * @returns The open PRs. + * + * @param {module:@actions/github.Octokit} octokit The octokit client. + * @param {string} user The user name of the repository owner. + * @param {string} repo The name of the repository. + * @param {string} reviewer The reviewer to filter by. + * @returns {Promise} The open PRs. */ export const fetchOpenPRs = async (octokit, user, repo, reviewer) => { const openPRs = []; @@ -88,8 +90,10 @@ export const fetchOpenPRs = async (octokit, user, repo, reviewer) => { /** * Retrieve pull requests that have a given label. - * @param pull The pull requests to check. - * @param label The label to check for. + * + * @param {Object[]} pulls The pull requests to check. + * @param {string} label The label to check for. + * @returns {Object[]} The pull requests that have the given label. */ export const pullsWithLabel = (pulls, label) => { return pulls.filter((pr) => { @@ -99,9 +103,10 @@ export const pullsWithLabel = (pulls, label) => { /** * Check if PR is stale. Meaning that it hasn't been updated in a given time. + * * @param {Object} pullRequest request object. - * @param {number} days number of days. - * @returns Boolean indicating if PR is stale. + * @param {number} staleDays number of days. + * @returns {boolean} indicating if PR is stale. */ const isStale = (pullRequest, staleDays) => { const lastCommitDate = new Date( @@ -122,6 +127,8 @@ const isStale = (pullRequest, staleDays) => { /** * Main function. + * + * @returns {Promise} A promise. */ const run = async () => { try { @@ -148,21 +155,21 @@ const run = async () => { // Loop through all stale invalid theme pull requests and close them. for (const prNumber of staleThemePRsNumbers) { debug(`Closing #${prNumber} because it is stale...`); - if (!dryRun) { - await octokit.issues.createComment({ + if (dryRun) { + debug("Dry run enabled, skipping..."); + } else { + await octokit.rest.issues.createComment({ owner, repo, issue_number: prNumber, body: CLOSING_COMMENT, }); - await octokit.pulls.update({ + await octokit.rest.pulls.update({ owner, repo, pull_number: prNumber, state: "closed", }); - } else { - debug("Dry run enabled, skipping..."); } } } catch (error) { diff --git a/scripts/generate-theme-doc.js b/scripts/generate-theme-doc.js index 8ef3c2089716b..1716ea6e95122 100644 --- a/scripts/generate-theme-doc.js +++ b/scripts/generate-theme-doc.js @@ -14,7 +14,7 @@ const THEME_TEMPLATE = `## Available Themes With inbuilt themes, you can customize the look of the card without doing any manual customization. -Use \`?theme=THEME_NAME\` parameter like so :- +Use \`?theme=THEME_NAME\` parameter like so: \`\`\`md ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&theme=dark&show_icons=true) @@ -22,7 +22,7 @@ Use \`?theme=THEME_NAME\` parameter like so :- ## Stats -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -30,7 +30,7 @@ ${STAT_CARD_TABLE_FLAG} ## Repo Card -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | @@ -60,13 +60,16 @@ const generateLinks = (fn) => { }; const createTableItem = ({ link, label, isRepoCard }) => { - if (!link || !label) return ""; + if (!link || !label) { + return ""; + } return `\`${label}\` ![${link}][${link}${isRepoCard ? "_repo" : ""}]`; }; + const generateTable = ({ isRepoCard }) => { const rows = []; const themesFiltered = Object.keys(themes).filter( - (name) => name !== (!isRepoCard ? "default_repocard" : "default"), + (name) => name !== (isRepoCard ? "default" : "default_repocard"), ); for (let i = 0; i < themesFiltered.length; i += 3) { diff --git a/scripts/helpers.js b/scripts/helpers.js index 6746adc92693c..f518a53153746 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -10,7 +10,7 @@ const REPO = "github-readme-stats"; /** * Retrieve information about the repository that ran the action. * - * @param {Object} context Action context. + * @param {Object} ctx Action context. * @returns {Object} Repository information. */ export const getRepoInfo = (ctx) => { diff --git a/scripts/preview-theme.js b/scripts/preview-theme.js index 38faf873ce3d5..25a2e45d0e40d 100644 --- a/scripts/preview-theme.js +++ b/scripts/preview-theme.js @@ -12,7 +12,7 @@ import Hjson from "hjson"; import snakeCase from "lodash.snakecase"; import parse from "parse-diff"; import { inspect } from "util"; -import { isValidHexColor } from "../src/common/utils.js"; +import { isValidHexColor, isValidGradient } from "../src/common/utils.js"; import { themes } from "../themes/index.js"; import { getGithubToken, getRepoInfo } from "./helpers.js"; @@ -26,23 +26,51 @@ const FAIL_TEXT = ` \rUnfortunately, your theme PR contains an error or does not adhere to our [theme guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). Please fix the issues below, and we will review your\ \r PR again. This pull request will **automatically close in 20 days** if no changes are made. After this time, you must re-open the PR for it to be reviewed. `; -const THEME_CONTRIB_GUIDELINESS = ` +const THEME_CONTRIB_GUIDELINES = ` \rHi, thanks for the theme contribution. Please read our theme [contribution guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution). - \rWe are currently only accepting color combinations from any VSCode theme or themes with good colour combinations to minimize bloating the themes collection. + \r> [!WARNING]\ + \r> Keep in mind that we already have a vast collection of different themes. To keep their number manageable, we began to add only themes supported by the community. Your pull request with theme addition will be merged once we get enough positive feedback from the community in the form of thumbs up :+1: emojis (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). We expect to see at least 10-15 thumbs up before making a decision to merge your pull request into the master branch. Remember that you can also support themes of other contributors that you liked to speed up their merge. + + \r> [!WARNING]\ + \r> Please do not submit a pull request with a batch of themes, since it will be hard to judge how the community will react to each of them. We will only merge one theme per pull request. If you have several themes, please submit a separate pull request for each of them. Situations when you have several versions of the same theme (e.g. light and dark) are an exception to this rule. + + \r> [!NOTE]\ \r> Also, note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection, you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization). `; const COLOR_PROPS = { title_color: 6, icon_color: 6, text_color: 6, - bg_color: 8, + bg_color: 23, border_color: 6, }; const ACCEPTED_COLOR_PROPS = Object.keys(COLOR_PROPS); const REQUIRED_COLOR_PROPS = ACCEPTED_COLOR_PROPS.slice(0, 4); const INVALID_REVIEW_COMMENT = (commentUrl) => `Some themes are invalid. See the [Automated Theme Preview](${commentUrl}) comment above for more information.`; +var OCTOKIT; +var OWNER; +var REPO; +var PULL_REQUEST_ID; + +/** + * Incorrect JSON format error. + * @extends Error + * @param {string} message Error message. + * @returns {Error} IncorrectJsonFormatError. + */ +class IncorrectJsonFormatError extends Error { + /** + * Constructor. + * + * @param {string} message Error message. + */ + constructor(message) { + super(message); + this.name = "IncorrectJsonFormatError"; + } +} /** * Retrieve PR number from the event payload. @@ -50,7 +78,9 @@ const INVALID_REVIEW_COMMENT = (commentUrl) => * @returns {number} PR number. */ const getPrNumber = () => { - if (process.env.MOCK_PR_NUMBER) return process.env.MOCK_PR_NUMBER; // For testing purposes. + if (process.env.MOCK_PR_NUMBER) { + return process.env.MOCK_PR_NUMBER; // For testing purposes. + } const pullRequest = github.context.payload.pull_request; if (!pullRequest) { @@ -90,9 +120,10 @@ const isPreviewComment = (inputs, comment) => { * * @param {Object} octokit Octokit instance. * @param {number} issueNumber Issue number. - * @param {string} repo Repository name. * @param {string} owner Owner of the repository. - * @returns {Object} The GitHub comment object. + * @param {string} repo Repository name. + * @param {string} commenter Comment author. + * @returns {Object | undefined} The GitHub comment object. */ const findComment = async (octokit, issueNumber, owner, repo, commenter) => { const parameters = { @@ -120,21 +151,44 @@ const findComment = async (octokit, issueNumber, owner, repo, commenter) => { debug(`No theme preview comment found.`); } } + + return undefined; }; /** * Create or update the preview comment. * * @param {Object} octokit Octokit instance. - * @param {Object} props Comment properties. - * @return {string} The comment URL. + * @param {number} issueNumber Issue number. + * @param {Object} repo Repository name. + * @param {Object} owner Owner of the repository. + * @param {number} commentId Comment ID. + * @param {string} body Comment body. + * @returns {string} The comment URL. */ -const upsertComment = async (octokit, props) => { +const upsertComment = async ( + octokit, + issueNumber, + repo, + owner, + commentId, + body, +) => { let resp; - if (props.comment_id !== undefined) { - resp = await octokit.issues.updateComment(props); + if (commentId === undefined) { + resp = await octokit.rest.issues.createComment({ + owner, + repo, + issue_number: issueNumber, + body, + }); } else { - resp = await octokit.issues.createComment(props); + resp = await octokit.rest.issues.updateComment({ + owner, + repo, + comment_id: commentId, + body, + }); } return resp.data.html_url; }; @@ -148,6 +202,7 @@ const upsertComment = async (octokit, props) => { * @param {string} repo Repository name. * @param {string} reviewState The review state. Options are (APPROVE, REQUEST_CHANGES, COMMENT, PENDING). * @param {string} reason The reason for the review. + * @returns {Promise} Promise. */ const addReview = async ( octokit, @@ -157,7 +212,7 @@ const addReview = async ( reviewState, reason, ) => { - await octokit.pulls.createReview({ + await octokit.rest.pulls.createReview({ owner, repo, pull_number: prNumber, @@ -174,9 +229,10 @@ const addReview = async ( * @param {string} owner Repository owner. * @param {string} repo Repository name. * @param {string[]} labels Labels to add. + * @returns {Promise} Promise. */ const addLabel = async (octokit, prNumber, owner, repo, labels) => { - await octokit.issues.addLabels({ + await octokit.rest.issues.addLabels({ owner, repo, issue_number: prNumber, @@ -192,9 +248,10 @@ const addLabel = async (octokit, prNumber, owner, repo, labels) => { * @param {string} owner Repository owner. * @param {string} repo Repository name. * @param {string} label Label to add or remove. + * @returns {Promise} Promise. */ const removeLabel = async (octokit, prNumber, owner, repo, label) => { - await octokit.issues.removeLabel({ + await octokit.rest.issues.removeLabel({ owner, repo, issue_number: prNumber, @@ -211,9 +268,10 @@ const removeLabel = async (octokit, prNumber, owner, repo, label) => { * @param {string} repo Repository name. * @param {string} label Label to add or remove. * @param {boolean} add Whether to add or remove the label. + * @returns {Promise} Promise. */ const addRemoveLabel = async (octokit, prNumber, owner, repo, label, add) => { - const res = await octokit.pulls.get({ + const res = await octokit.rest.pulls.get({ owner, repo, pull_number: prNumber, @@ -269,22 +327,38 @@ const parseJSON = (json) => { if (typeof parsedJson === "object") { return parsedJson; } else { - throw new Error("PR diff is not a valid theme JSON object."); + throw new IncorrectJsonFormatError( + "PR diff is not a valid theme JSON object.", + ); } } catch (error) { - let parsedJson = json + // Remove trailing commas (if any). + let parsedJson = json.replace(/(,\s*})/g, "}"); + + // Remove JS comments (if any). + parsedJson = parsedJson.replace(/\/\/[A-z\s]*\s/g, ""); + + // Fix incorrect open bracket (if any). + const splitJson = parsedJson .split(/([\s\r\s]*}[\s\r\s]*,[\s\r\s]*)(?=[\w"-]+:)/) - .filter((x) => typeof x !== "string" || !!x.trim()); - if (parsedJson[0].replace(/\s+/g, "") === "},") { - parsedJson[0] = "},"; - if (!/\s*}\s*,?\s*$/.test(parsedJson[1])) { - parsedJson.push(parsedJson.shift()); + .filter((x) => typeof x !== "string" || !!x.trim()); // Split json into array of strings and objects. + if (splitJson[0].replace(/\s+/g, "") === "},") { + splitJson[0] = "},"; + if (/\s*}\s*,?\s*$/.test(splitJson[1])) { + splitJson.shift(); } else { - parsedJson.shift(); + splitJson.push(splitJson.shift()); } - return Hjson.parse(parsedJson.join("")); - } else { - throw error; + parsedJson = splitJson.join(""); + } + + // Try to parse the fixed json. + try { + return Hjson.parse(parsedJson); + } catch (error) { + throw new IncorrectJsonFormatError( + `Theme JSON file could not be parsed: ${error.message}`, + ); } } }; @@ -298,53 +372,66 @@ const themeNameAlreadyExists = (name) => { return themes[name] !== undefined; }; +const DRY_RUN = process.env.DRY_RUN === "true" || false; + /** * Main function. + * + * @returns {Promise} Promise. */ -export const run = async (prNumber) => { +export const run = async () => { try { - const dryRun = process.env.DRY_RUN === "true" || false; debug("Retrieve action information from context..."); debug(`Context: ${inspect(github.context)}`); let commentBody = ` \r# ${COMMENT_TITLE} - \r${THEME_CONTRIB_GUIDELINESS} + \r${THEME_CONTRIB_GUIDELINES} `; const ccc = new ColorContrastChecker(); - const octokit = github.getOctokit(getGithubToken()); - const pullRequestId = prNumber ? prNumber : getPrNumber(); - const commenter = getCommenter(); + OCTOKIT = github.getOctokit(getGithubToken()); + PULL_REQUEST_ID = getPrNumber(); const { owner, repo } = getRepoInfo(github.context); - debug(`Owner: ${owner}`); - debug(`Repo: ${repo}`); + OWNER = owner; + REPO = repo; + const commenter = getCommenter(); + PULL_REQUEST_ID = getPrNumber(); + debug(`Owner: ${OWNER}`); + debug(`Repo: ${REPO}`); debug(`Commenter: ${commenter}`); // Retrieve the PR diff and preview-theme comment. debug("Retrieve PR diff..."); - const res = await octokit.pulls.get({ - owner, - repo, - pull_number: pullRequestId, + const res = await OCTOKIT.rest.pulls.get({ + owner: OWNER, + repo: REPO, + pull_number: PULL_REQUEST_ID, mediaType: { format: "diff", }, }); debug("Retrieve preview-theme comment..."); const comment = await findComment( - octokit, - pullRequestId, - owner, - repo, + OCTOKIT, + PULL_REQUEST_ID, + OWNER, + REPO, commenter, ); // Retrieve theme changes from the PR diff. debug("Retrieve themes..."); const diff = parse(res.data); + + // Retrieve all theme changes from the PR diff and convert to JSON. + debug("Retrieve theme changes..."); const content = diff .find((file) => file.to === "themes/index.js") - .chunks[0].changes.filter((c) => c.type === "add") - .map((c) => c.content.replace("+", "")) + .chunks.map((chunk) => + chunk.changes + .filter((c) => c.type === "add") + .map((c) => c.content.replace("+", "")) + .join(""), + ) .join(""); const themeObject = parseJSON(content); if ( @@ -382,10 +469,7 @@ export const run = async (prNumber) => { // Check if the theme colors are valid. debug("Theme preview body: Check if the theme colors are valid..."); let invalidColors = false; - if (!colors) { - warning.push("Theme colors are missing"); - invalidColors = true; - } else { + if (colors) { const missingKeys = REQUIRED_COLOR_PROPS.filter( (x) => !Object.keys(colors).includes(x), ); @@ -415,14 +499,21 @@ export const run = async (prNumber) => { `Theme color property \`${colorKey}\` can not be longer than \`${COLOR_PROPS[colorKey]}\` characters`, ); invalidColors = true; - } else if (!isValidHexColor(colorValue)) { + } else if ( + !(colorKey === "bg_color" && colorValue.split(",").length > 1 + ? isValidGradient(colorValue.split(",")) + : isValidHexColor(colorValue)) + ) { errors.push( - `Theme color property \`${colorKey}\` is not a valid hex color: #${colorValue}`, + `Theme color property \`${colorKey}\` is not a valid hex color: ${colorValue}`, ); invalidColors = true; } } } + } else { + warnings.push("Theme colors are missing"); + invalidColors = true; } if (invalidColors) { themeValid[theme] = false; @@ -455,6 +546,10 @@ export const run = async (prNumber) => { Object.keys(colorPairs).forEach((item) => { let color1 = colorPairs[item][0]; let color2 = colorPairs[item][1]; + const isGradientColor = color2.split(",").length > 1; + if (isGradientColor) { + return; + } color1 = color1.length === 4 ? color1.slice(0, 3) : color1.slice(0, 6); color2 = color2.length === 4 ? color2.slice(0, 3) : color2.slice(0, 6); if (!ccc.isLevelAA(`#${color1}`, `#${color2}`)) { @@ -476,8 +571,8 @@ export const run = async (prNumber) => { \r${warnings.map((warning) => `- :warning: ${warning}.\n`).join("")} \ntitle_color: #${titleColor} | icon_color: #${iconColor} | text_color: #${textColor} | bg_color: #${bgColor}${ - borderColor ? ` | border_color: #${borderColor}` : "" - } + borderColor ? ` | border_color: #${borderColor}` : "" + } \r[Preview Link](${url}) @@ -513,17 +608,18 @@ export const run = async (prNumber) => { // Create or update theme-preview comment. debug("Create or update theme-preview comment..."); let comment_url; - if (!dryRun) { - comment_url = await upsertComment(octokit, { - comment_id: comment?.id, - issue_number: pullRequestId, - owner, - repo, - body: commentBody, - }); - } else { + if (DRY_RUN) { info(`DRY_RUN: Comment body: ${commentBody}`); comment_url = ""; + } else { + comment_url = await upsertComment( + OCTOKIT, + PULL_REQUEST_ID, + REPO, + OWNER, + comment?.id, + commentBody, + ); } // Change review state and add/remove `invalid` label based on theme PR validity. @@ -535,49 +631,51 @@ export const run = async (prNumber) => { const reviewReason = themesValid ? undefined : INVALID_REVIEW_COMMENT(comment_url); - if (!dryRun) { + if (DRY_RUN) { + info(`DRY_RUN: Review state: ${reviewState}`); + info(`DRY_RUN: Review reason: ${reviewReason}`); + } else { await addReview( - octokit, - pullRequestId, - owner, - repo, + OCTOKIT, + PULL_REQUEST_ID, + OWNER, + REPO, reviewState, reviewReason, ); await addRemoveLabel( - octokit, - pullRequestId, - owner, - repo, + OCTOKIT, + PULL_REQUEST_ID, + OWNER, + REPO, "invalid", !themesValid, ); - } else { - info(`DRY_RUN: Review state: ${reviewState}`); - info(`DRY_RUN: Review reason: ${reviewReason}`); } } catch (error) { debug("Set review state to `REQUEST_CHANGES` and add `invalid` label..."); - if (!dryRun) { + if (DRY_RUN) { + info(`DRY_RUN: Review state: REQUEST_CHANGES`); + info(`DRY_RUN: Review reason: ${error.message}`); + } else { await addReview( - octokit, - pullRequestId, - owner, - repo, + OCTOKIT, + PULL_REQUEST_ID, + OWNER, + REPO, "REQUEST_CHANGES", - error.message, + "**Something went wrong in the theme preview action:** `" + + error.message + + "`", ); await addRemoveLabel( - octokit, - pullRequestId, - owner, - repo, + OCTOKIT, + PULL_REQUEST_ID, + OWNER, + REPO, "invalid", true, ); - } else { - info(`DRY_RUN: Review state: REQUEST_CHANGES`); - info(`DRY_RUN: Review reason: ${error.message}`); } setFailed(error.message); } diff --git a/scripts/push-theme-readme.sh b/scripts/push-theme-readme.sh index 4a035db3041a0..d983d54aa5603 100755 --- a/scripts/push-theme-readme.sh +++ b/scripts/push-theme-readme.sh @@ -6,9 +6,10 @@ export BRANCH_NAME=updated-theme-readme git --version git config --global user.email "no-reply@githubreadmestats.com" git config --global user.name "GitHub Readme Stats Bot" +git config --global --add safe.directory ${GITHUB_WORKSPACE} git branch -d $BRANCH_NAME || true git checkout -b $BRANCH_NAME git add --all -git commit --message "docs(theme): Auto update theme readme" || exit 0 +git commit --no-verify --message "docs(theme): auto update theme readme" git remote add origin-$BRANCH_NAME https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git git push --force --quiet --set-upstream origin-$BRANCH_NAME $BRANCH_NAME diff --git a/src/calculateRank.js b/src/calculateRank.js index 24845bc7d9944..4724d0388c846 100644 --- a/src/calculateRank.js +++ b/src/calculateRank.js @@ -1,104 +1,87 @@ /** - * Calculates the probability of x taking on x or a value less than x in a normal distribution - * with mean and standard deviation. + * Calculates the exponential cdf. * - * @see https://stackoverflow.com/a/5263759/10629172 + * @param {number} x The value. + * @returns {number} The exponential cdf. + */ +function exponential_cdf(x) { + return 1 - 2 ** -x; +} + +/** + * Calculates the log normal cdf. * - * @param {string} mean The mean of the normal distribution. - * @param {number} sigma The standard deviation of the normal distribution. - * @param {number} to The value to calculate the probability for. - * @returns {number} Probability. + * @param {number} x The value. + * @returns {number} The log normal cdf. */ -const normalcdf = (mean, sigma, to) => { - var z = (to - mean) / Math.sqrt(2 * sigma * sigma); - var t = 1 / (1 + 0.3275911 * Math.abs(z)); - var a1 = 0.254829592; - var a2 = -0.284496736; - var a3 = 1.421413741; - var a4 = -1.453152027; - var a5 = 1.061405429; - var erf = - 1 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t * Math.exp(-z * z); - var sign = 1; - if (z < 0) { - sign = -1; - } - return (1 / 2) * (1 + sign * erf); -}; +function log_normal_cdf(x) { + // approximation + return x / (1 + x); +} /** * Calculates the users rank. * - * @param {number} totalRepos Total number of repos. - * @param {number} totalCommits Total number of commits. - * @param {number} contributions The number of contributions. - * @param {number} followers The number of followers. - * @param {number} prs The number of pull requests. - * @param {number} issues The number of issues. - * @param {number} stargazers The number of stars. - * @returns {{level: string, score: number}}} The users rank. + * @param {object} params Parameters on which the user's rank depends. + * @param {boolean} params.all_commits Whether `include_all_commits` was used. + * @param {number} params.commits Number of commits. + * @param {number} params.prs The number of pull requests. + * @param {number} params.issues The number of issues. + * @param {number} params.reviews The number of reviews. + * @param {number} params.repos Total number of repos. + * @param {number} params.stars The number of stars. + * @param {number} params.followers The number of followers. + * @returns {{level: string, percentile: number}}} The users rank. */ -const calculateRank = ({ - totalRepos, - totalCommits, - contributions, - followers, +function calculateRank({ + all_commits, + commits, prs, issues, - stargazers, -}) => { - const COMMITS_OFFSET = 1.65; - const CONTRIBS_OFFSET = 1.65; - const ISSUES_OFFSET = 1; - const STARS_OFFSET = 0.75; - const PRS_OFFSET = 0.5; - const FOLLOWERS_OFFSET = 0.45; - const REPO_OFFSET = 1; - - const ALL_OFFSETS = - CONTRIBS_OFFSET + - ISSUES_OFFSET + - STARS_OFFSET + - PRS_OFFSET + - FOLLOWERS_OFFSET + - REPO_OFFSET; - - const RANK_S_VALUE = 1; - const RANK_DOUBLE_A_VALUE = 25; - const RANK_A2_VALUE = 45; - const RANK_A3_VALUE = 60; - const RANK_B_VALUE = 100; + reviews, + // eslint-disable-next-line no-unused-vars + repos, // unused + stars, + followers, +}) { + const COMMITS_MEDIAN = all_commits ? 1000 : 250, + COMMITS_WEIGHT = 2; + const PRS_MEDIAN = 50, + PRS_WEIGHT = 3; + const ISSUES_MEDIAN = 25, + ISSUES_WEIGHT = 1; + const REVIEWS_MEDIAN = 2, + REVIEWS_WEIGHT = 1; + const STARS_MEDIAN = 50, + STARS_WEIGHT = 4; + const FOLLOWERS_MEDIAN = 10, + FOLLOWERS_WEIGHT = 1; - const TOTAL_VALUES = - RANK_S_VALUE + - RANK_DOUBLE_A_VALUE + - RANK_A2_VALUE + - RANK_A3_VALUE + - RANK_B_VALUE; + const TOTAL_WEIGHT = + COMMITS_WEIGHT + + PRS_WEIGHT + + ISSUES_WEIGHT + + REVIEWS_WEIGHT + + STARS_WEIGHT + + FOLLOWERS_WEIGHT; - // prettier-ignore - const score = ( - totalCommits * COMMITS_OFFSET + - contributions * CONTRIBS_OFFSET + - issues * ISSUES_OFFSET + - stargazers * STARS_OFFSET + - prs * PRS_OFFSET + - followers * FOLLOWERS_OFFSET + - totalRepos * REPO_OFFSET - ) / 100; + const THRESHOLDS = [1, 12.5, 25, 37.5, 50, 62.5, 75, 87.5, 100]; + const LEVELS = ["S", "A+", "A", "A-", "B+", "B", "B-", "C+", "C"]; - const normalizedScore = normalcdf(score, TOTAL_VALUES, ALL_OFFSETS) * 100; + const rank = + 1 - + (COMMITS_WEIGHT * exponential_cdf(commits / COMMITS_MEDIAN) + + PRS_WEIGHT * exponential_cdf(prs / PRS_MEDIAN) + + ISSUES_WEIGHT * exponential_cdf(issues / ISSUES_MEDIAN) + + REVIEWS_WEIGHT * exponential_cdf(reviews / REVIEWS_MEDIAN) + + STARS_WEIGHT * log_normal_cdf(stars / STARS_MEDIAN) + + FOLLOWERS_WEIGHT * log_normal_cdf(followers / FOLLOWERS_MEDIAN)) / + TOTAL_WEIGHT; - const level = (() => { - if (normalizedScore < RANK_S_VALUE) return "S+"; - if (normalizedScore < RANK_DOUBLE_A_VALUE) return "S"; - if (normalizedScore < RANK_A2_VALUE) return "A++"; - if (normalizedScore < RANK_A3_VALUE) return "A+"; - return "B+"; - })(); + const level = LEVELS[THRESHOLDS.findIndex((t) => rank * 100 <= t)]; - return { level, score: normalizedScore }; -}; + return { level, percentile: rank * 100 }; +} export { calculateRank }; export default calculateRank; diff --git a/src/cards/gist-card.js b/src/cards/gist-card.js new file mode 100644 index 0000000000000..9e889e74424cd --- /dev/null +++ b/src/cards/gist-card.js @@ -0,0 +1,152 @@ +// @ts-check + +import { + getCardColors, + parseEmojis, + wrapTextMultiline, + encodeHTML, + kFormatter, + measureText, + flexLayout, + iconWithLabel, + createLanguageNode, +} from "../common/utils.js"; +import Card from "../common/Card.js"; +import { icons } from "../common/icons.js"; + +/** Import language colors. + * + * @description Here we use the workaround found in + * https://stackoverflow.com/questions/66726365/how-should-i-import-json-in-node + * since vercel is using v16.14.0 which does not yet support json imports without the + * --experimental-json-modules flag. + */ +import { createRequire } from "module"; +const require = createRequire(import.meta.url); +const languageColors = require("../common/languageColors.json"); // now works + +const ICON_SIZE = 16; +const CARD_DEFAULT_WIDTH = 400; +const HEADER_MAX_LENGTH = 35; + +/** + * @typedef {import('./types').GistCardOptions} GistCardOptions Gist card options. + * @typedef {import('../fetchers/types').GistData} GistData Gist data. + */ + +/** + * Render gist card. + * + * @param {GistData} gistData Gist data. + * @param {Partial} options Gist card options. + * @returns {string} Gist card. + */ +const renderGistCard = (gistData, options = {}) => { + const { name, nameWithOwner, description, language, starsCount, forksCount } = + gistData; + const { + title_color, + icon_color, + text_color, + bg_color, + theme, + border_radius, + border_color, + show_owner = false, + hide_border = false, + } = options; + + // returns theme based colors with proper overrides and defaults + const { titleColor, textColor, iconColor, bgColor, borderColor } = + getCardColors({ + title_color, + icon_color, + text_color, + bg_color, + border_color, + theme, + }); + + const lineWidth = 59; + const linesLimit = 10; + const desc = parseEmojis(description || "No description provided"); + const multiLineDescription = wrapTextMultiline(desc, lineWidth, linesLimit); + const descriptionLines = multiLineDescription.length; + const descriptionSvg = multiLineDescription + .map((line) => `${encodeHTML(line)}`) + .join(""); + + const lineHeight = descriptionLines > 3 ? 12 : 10; + const height = + (descriptionLines > 1 ? 120 : 110) + descriptionLines * lineHeight; + + const totalStars = kFormatter(starsCount); + const totalForks = kFormatter(forksCount); + const svgStars = iconWithLabel( + icons.star, + totalStars, + "starsCount", + ICON_SIZE, + ); + const svgForks = iconWithLabel( + icons.fork, + totalForks, + "forksCount", + ICON_SIZE, + ); + + const languageName = language || "Unspecified"; + const languageColor = languageColors[languageName] || "#858585"; + + const svgLanguage = createLanguageNode(languageName, languageColor); + + const starAndForkCount = flexLayout({ + items: [svgLanguage, svgStars, svgForks], + sizes: [ + measureText(languageName, 12), + ICON_SIZE + measureText(`${totalStars}`, 12), + ICON_SIZE + measureText(`${totalForks}`, 12), + ], + gap: 25, + }).join(""); + + const header = show_owner ? nameWithOwner : name; + + const card = new Card({ + defaultTitle: + header.length > HEADER_MAX_LENGTH + ? `${header.slice(0, HEADER_MAX_LENGTH)}...` + : header, + titlePrefixIcon: icons.gist, + width: CARD_DEFAULT_WIDTH, + height, + border_radius, + colors: { + titleColor, + textColor, + iconColor, + bgColor, + borderColor, + }, + }); + + card.setCSS(` + .description { font: 400 13px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} } + .gray { font: 400 12px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} } + .icon { fill: ${iconColor} } + `); + card.setHideBorder(hide_border); + + return card.render(` + + ${descriptionSvg} + + + + ${starAndForkCount} + + `); +}; + +export { renderGistCard, HEADER_MAX_LENGTH }; +export default renderGistCard; diff --git a/src/cards/repo-card.js b/src/cards/repo-card.js index a306c1d56a561..bbfda52d47778 100644 --- a/src/cards/repo-card.js +++ b/src/cards/repo-card.js @@ -10,9 +10,16 @@ import { measureText, parseEmojis, wrapTextMultiline, + iconWithLabel, + createLanguageNode, + clampValue, } from "../common/utils.js"; import { repoCardLocales } from "../translations.js"; +const ICON_SIZE = 16; +const DESCRIPTION_LINE_WIDTH = 59; +const DESCRIPTION_MAX_LINES = 3; + /** * Retrieves the repository description and wraps it to fit the card width. * @@ -36,54 +43,15 @@ const getBadgeSVG = (label, textColor) => ` `; /** - * Creates a node to display the primary programming language of the repository. - * - * @param {string} langName Language name. - * @param {string} langColor Language color. - * @returns {string} Language display SVG object. + * @typedef {import("../fetchers/types").RepositoryData} RepositoryData Repository data. + * @typedef {import("./types").RepoCardOptions} RepoCardOptions Repo card options. */ -const createLanguageNode = (langName, langColor) => { - return ` - - - ${langName} - - `; -}; - -const ICON_SIZE = 16; - -/** - * Creates an icon with label to display repository stats like forks, stars, etc. - * - * @param {string} icon The icon to display. - * @param {number|string} label The label to display. - * @param {string} testid The testid to assign to the label. - * @returns {string} Icon with label SVG object. - */ -const iconWithLabel = (icon, label, testid) => { - if (label <= 0) return ""; - const iconSvg = ` - - ${icon} - - `; - const text = `${label}`; - return flexLayout({ items: [iconSvg, text], gap: 20 }).join(""); -}; /** * Renders repository card details. * - * @param {import('../fetchers/types').RepositoryData} repo Repository data. - * @param {Partial} options Card options. + * @param {RepositoryData} repo Repository data. + * @param {Partial} options Card options. * @returns {string} Repository card SVG object. */ const renderRepoCard = (repo, options = {}) => { @@ -108,22 +76,34 @@ const renderRepoCard = (repo, options = {}) => { border_radius, border_color, locale, + description_lines_count, } = options; const lineHeight = 10; const header = show_owner ? nameWithOwner : name; const langName = (primaryLanguage && primaryLanguage.name) || "Unspecified"; const langColor = (primaryLanguage && primaryLanguage.color) || "#333"; + const descriptionMaxLines = description_lines_count + ? clampValue(description_lines_count, 1, DESCRIPTION_MAX_LINES) + : DESCRIPTION_MAX_LINES; const desc = parseEmojis(description || "No description provided"); - const multiLineDescription = wrapTextMultiline(desc); - const descriptionLines = multiLineDescription.length; + const multiLineDescription = wrapTextMultiline( + desc, + DESCRIPTION_LINE_WIDTH, + descriptionMaxLines, + ); + const descriptionLinesCount = description_lines_count + ? clampValue(description_lines_count, 1, DESCRIPTION_MAX_LINES) + : multiLineDescription.length; + const descriptionSvg = multiLineDescription .map((line) => `${encodeHTML(line)}`) .join(""); const height = - (descriptionLines > 1 ? 120 : 110) + descriptionLines * lineHeight; + (descriptionLinesCount > 1 ? 120 : 110) + + descriptionLinesCount * lineHeight; const i18n = new I18n({ locale, @@ -146,8 +126,18 @@ const renderRepoCard = (repo, options = {}) => { const totalStars = kFormatter(starCount); const totalForks = kFormatter(forkCount); - const svgStars = iconWithLabel(icons.star, totalStars, "stargazers"); - const svgForks = iconWithLabel(icons.fork, totalForks, "forkcount"); + const svgStars = iconWithLabel( + icons.star, + totalStars, + "stargazers", + ICON_SIZE, + ); + const svgForks = iconWithLabel( + icons.fork, + totalForks, + "forkcount", + ICON_SIZE, + ); const starAndForkCount = flexLayout({ items: [svgLanguage, svgStars, svgForks], @@ -185,9 +175,9 @@ const renderRepoCard = (repo, options = {}) => { ? // @ts-ignore getBadgeSVG(i18n.t("repocard.template"), colors.textColor) : isArchived - ? // @ts-ignore - getBadgeSVG(i18n.t("repocard.archived"), colors.textColor) - : "" + ? // @ts-ignore + getBadgeSVG(i18n.t("repocard.archived"), colors.textColor) + : "" } diff --git a/src/cards/stats-card.js b/src/cards/stats-card.js index a049ecce1c7e3..5b7f0d268f9bd 100644 --- a/src/cards/stats-card.js +++ b/src/cards/stats-card.js @@ -1,41 +1,54 @@ // @ts-check import { Card } from "../common/Card.js"; import { I18n } from "../common/I18n.js"; -import { icons } from "../common/icons.js"; +import { icons, rankIcon } from "../common/icons.js"; import { + CustomError, clampValue, flexLayout, getCardColors, kFormatter, measureText, } from "../common/utils.js"; -import { getStyles } from "../getStyles.js"; import { statCardLocales } from "../translations.js"; +const CARD_MIN_WIDTH = 287; +const CARD_DEFAULT_WIDTH = 287; +const RANK_CARD_MIN_WIDTH = 420; +const RANK_CARD_DEFAULT_WIDTH = 450; +const RANK_ONLY_CARD_MIN_WIDTH = 290; +const RANK_ONLY_CARD_DEFAULT_WIDTH = 290; + /** * Create a stats card text item. * - * @param {object[]} createTextNodeParams Object that contains the createTextNode parameters. + * @param {object} createTextNodeParams Object that contains the createTextNode parameters. + * @param {string} createTextNodeParams.icon The icon to display. * @param {string} createTextNodeParams.label The label to display. - * @param {string} createTextNodeParams.value The value to display. + * @param {number} createTextNodeParams.value The value to display. * @param {string} createTextNodeParams.id The id of the stat. + * @param {string=} createTextNodeParams.unitSymbol The unit symbol of the stat. * @param {number} createTextNodeParams.index The index of the stat. * @param {boolean} createTextNodeParams.showIcons Whether to show icons. * @param {number} createTextNodeParams.shiftValuePos Number of pixels the value has to be shifted to the right. * @param {boolean} createTextNodeParams.bold Whether to bold the label. - * @returns + * @param {string} createTextNodeParams.number_format The format of numbers on card. + * @returns {string} The stats card text item SVG object. */ const createTextNode = ({ icon, label, value, id, + unitSymbol, index, showIcons, shiftValuePos, bold, + number_format, }) => { - const kValue = kFormatter(value); + const kValue = + number_format.toLowerCase() === "long" ? value : kFormatter(value); const staggerDelay = (index + 3) * 150; const labelOffset = showIcons ? `x="25"` : ""; @@ -57,25 +70,147 @@ const createTextNode = ({ x="${(showIcons ? 140 : 120) + shiftValuePos}" y="12.5" data-testid="${id}" - >${kValue} + >${kValue}${unitSymbol ? ` ${unitSymbol}` : ""} `; }; +/** + * Calculates progress along the boundary of the circle, i.e. its circumference. + * + * @param {number} value The rank value to calculate progress for. + * @returns {number} Progress value. + */ +const calculateCircleProgress = (value) => { + const radius = 40; + const c = Math.PI * (radius * 2); + + if (value < 0) { + value = 0; + } + if (value > 100) { + value = 100; + } + + return ((100 - value) / 100) * c; +}; + +/** + * Retrieves the animation to display progress along the circumference of circle + * from the beginning to the given value in a clockwise direction. + * + * @param {{progress: number}} progress The progress value to animate to. + * @returns {string} Progress animation css. + */ +const getProgressAnimation = ({ progress }) => { + return ` + @keyframes rankAnimation { + from { + stroke-dashoffset: ${calculateCircleProgress(0)}; + } + to { + stroke-dashoffset: ${calculateCircleProgress(progress)}; + } + } + `; +}; + +/** + * Retrieves CSS styles for a card. + * + * @param {Object} colors The colors to use for the card. + * @param {string} colors.titleColor The title color. + * @param {string} colors.textColor The text color. + * @param {string} colors.iconColor The icon color. + * @param {string} colors.ringColor The ring color. + * @param {boolean} colors.show_icons Whether to show icons. + * @param {number} colors.progress The progress value to animate to. + * @returns {string} Card CSS styles. + */ +const getStyles = ({ + // eslint-disable-next-line no-unused-vars + titleColor, + textColor, + iconColor, + ringColor, + show_icons, + progress, +}) => { + return ` + .stat { + font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${textColor}; + } + @supports(-moz-appearance: auto) { + /* Selector detects Firefox */ + .stat { font-size:12px; } + } + .stagger { + opacity: 0; + animation: fadeInAnimation 0.3s ease-in-out forwards; + } + .rank-text { + font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor}; + animation: scaleInAnimation 0.3s ease-in-out forwards; + } + .rank-percentile-header { + font-size: 14px; + } + .rank-percentile-text { + font-size: 16px; + } + + .not_bold { font-weight: 400 } + .bold { font-weight: 700 } + .icon { + fill: ${iconColor}; + display: ${show_icons ? "block" : "none"}; + } + + .rank-circle-rim { + stroke: ${ringColor}; + fill: none; + stroke-width: 6; + opacity: 0.2; + } + .rank-circle { + stroke: ${ringColor}; + stroke-dasharray: 250; + fill: none; + stroke-width: 6; + stroke-linecap: round; + opacity: 0.8; + transform-origin: -10px 8px; + transform: rotate(-90deg); + animation: rankAnimation 1s forwards ease-in-out; + } + ${process.env.NODE_ENV === "test" ? "" : getProgressAnimation({ progress })} + `; +}; + +/** + * @typedef {import('../fetchers/types').StatsData} StatsData + * @typedef {import('./types').StatCardOptions} StatCardOptions + */ + /** * Renders the stats card. * - * @param {Partial} stats The stats data. - * @param {Partial} options The card options. + * @param {StatsData} stats The stats data. + * @param {Partial} options The card options. * @returns {string} The stats card SVG object. */ -const renderStatsCard = (stats = {}, options = { hide: [] }) => { +const renderStatsCard = (stats, options = {}) => { const { name, totalStars, totalCommits, totalIssues, totalPRs, + totalPRsMerged, + mergedPRsPercentage, + totalReviews, + totalDiscussionsStarted, + totalDiscussionsAnswered, contributedTo, rank, } = stats; @@ -98,8 +233,11 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { custom_title, border_radius, border_color, + number_format = "short", locale, disable_animations = false, + rank_icon = "default", + show = [], } = options; const lheight = parseInt(String(line_height), 10); @@ -125,39 +263,86 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { }); // Meta data for creating text nodes with createTextNode function - const STATS = { - stars: { - icon: icons.star, - label: i18n.t("statcard.totalstars"), - value: totalStars, - id: "stars", - }, - commits: { - icon: icons.commits, - label: `${i18n.t("statcard.commits")}${ - include_all_commits ? "" : ` (${new Date().getFullYear()})` - }`, - value: totalCommits, - id: "commits", - }, - prs: { - icon: icons.prs, - label: i18n.t("statcard.prs"), - value: totalPRs, - id: "prs", - }, - issues: { - icon: icons.issues, - label: i18n.t("statcard.issues"), - value: totalIssues, - id: "issues", - }, - contribs: { - icon: icons.contribs, - label: i18n.t("statcard.contribs") + " (last year)", - value: contributedTo, - id: "contribs", - }, + const STATS = {}; + + STATS.stars = { + icon: icons.star, + label: i18n.t("statcard.totalstars"), + value: totalStars, + id: "stars", + }; + STATS.commits = { + icon: icons.commits, + label: `${i18n.t("statcard.commits")}${ + include_all_commits ? "" : ` (${new Date().getFullYear()})` + }`, + value: totalCommits, + id: "commits", + }; + STATS.prs = { + icon: icons.prs, + label: i18n.t("statcard.prs"), + value: totalPRs, + id: "prs", + }; + + if (show.includes("prs_merged")) { + STATS.prs_merged = { + icon: icons.prs_merged, + label: i18n.t("statcard.prs-merged"), + value: totalPRsMerged, + id: "prs_merged", + }; + } + + if (show.includes("prs_merged_percentage")) { + STATS.prs_merged_percentage = { + icon: icons.prs_merged_percentage, + label: i18n.t("statcard.prs-merged-percentage"), + value: mergedPRsPercentage.toFixed(2), + id: "prs_merged_percentage", + unitSymbol: "%", + }; + } + + if (show.includes("reviews")) { + STATS.reviews = { + icon: icons.reviews, + label: i18n.t("statcard.reviews"), + value: totalReviews, + id: "reviews", + }; + } + + STATS.issues = { + icon: icons.issues, + label: i18n.t("statcard.issues"), + value: totalIssues, + id: "issues", + }; + + if (show.includes("discussions_started")) { + STATS.discussions_started = { + icon: icons.discussions_started, + label: i18n.t("statcard.discussions-started"), + value: totalDiscussionsStarted, + id: "discussions_started", + }; + } + if (show.includes("discussions_answered")) { + STATS.discussions_answered = { + icon: icons.discussions_answered, + label: i18n.t("statcard.discussions-answered"), + value: totalDiscussionsAnswered, + id: "discussions_answered", + }; + } + + STATS.contribs = { + icon: icons.contribs, + label: i18n.t("statcard.contribs"), + value: contributedTo, + id: "contribs", }; const longLocales = [ @@ -168,13 +353,15 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { "ru", "uk-ua", "id", + "ml", "my", "pl", "de", "nl", "zh-tw", + "uz", ]; - const isLongLocale = longLocales.includes(locale) === true; + const isLongLocale = locale ? longLocales.includes(locale) : false; // filter out hidden stats defined by user & create the text nodes const statItems = Object.keys(STATS) @@ -182,24 +369,35 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { .map((key, index) => // create the text nodes, and pass index so that we can calculate the line spacing createTextNode({ - ...STATS[key], + icon: STATS[key].icon, + label: STATS[key].label, + value: STATS[key].value, + id: STATS[key].id, + unitSymbol: STATS[key].unitSymbol, index, showIcons: show_icons, shiftValuePos: 79.01 + (isLongLocale ? 50 : 0), bold: text_bold, + number_format, }), ); + if (statItems.length === 0 && hide_rank) { + throw new CustomError( + "Could not render stats card.", + "Either stats or rank are required.", + ); + } + // Calculate the card height depending on how many items there are // but if rank circle is visible clamp the minimum height to `150` let height = Math.max( 45 + (statItems.length + 1) * lheight, - hide_rank ? 0 : 150, + hide_rank ? 0 : statItems.length ? 150 : 180, ); - // the better user's score the the rank will be closer to zero so - // subtracting 100 to get the progress in 100% - const progress = 100 - rank.score; + // the lower the user's percentile the better + const progress = 100 - rank.percentile; const cssStyles = getStyles({ titleColor, ringColor, @@ -210,7 +408,13 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { }); const calculateTextWidth = () => { - return measureText(custom_title ? custom_title : i18n.t("statcard.title")); + return measureText( + custom_title + ? custom_title + : statItems.length + ? i18n.t("statcard.title") + : i18n.t("statcard.ranktitle"), + ); }; /* @@ -218,19 +422,37 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { When hide_rank=false, the minimum card_width is 340 px + the icon width (if show_icons=true). Numbers are picked by looking at existing dimensions on production. */ - const iconWidth = show_icons ? 16 : 0; - const minCardWidth = hide_rank - ? clampValue(50 /* padding */ + calculateTextWidth() * 2, 270, Infinity) - : 340 + iconWidth; - const defaultCardWidth = hide_rank ? 270 : 495; - let width = isNaN(card_width) ? defaultCardWidth : card_width; + const iconWidth = show_icons && statItems.length ? 16 + /* padding */ 1 : 0; + const minCardWidth = + (hide_rank + ? clampValue( + 50 /* padding */ + calculateTextWidth() * 2, + CARD_MIN_WIDTH, + Infinity, + ) + : statItems.length + ? RANK_CARD_MIN_WIDTH + : RANK_ONLY_CARD_MIN_WIDTH) + iconWidth; + const defaultCardWidth = + (hide_rank + ? CARD_DEFAULT_WIDTH + : statItems.length + ? RANK_CARD_DEFAULT_WIDTH + : RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth; + let width = card_width + ? isNaN(card_width) + ? defaultCardWidth + : card_width + : defaultCardWidth; if (width < minCardWidth) { width = minCardWidth; } const card = new Card({ customTitle: custom_title, - defaultTitle: i18n.t("statcard.title"), + defaultTitle: statItems.length + ? i18n.t("statcard.title") + : i18n.t("statcard.ranktitle"), width, height, border_radius, @@ -247,22 +469,31 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { card.setHideTitle(hide_title); card.setCSS(cssStyles); - if (disable_animations) card.disableAnimations(); + if (disable_animations) { + card.disableAnimations(); + } /** * Calculates the right rank circle translation values such that the rank circle - * keeps respecting the padding. + * keeps respecting the following padding: * - * width > 450: The default left padding of 50 px will be used. - * width < 450: The left and right padding will shrink equally. + * width > RANK_CARD_DEFAULT_WIDTH: The default right padding of 70 px will be used. + * width < RANK_CARD_DEFAULT_WIDTH: The left and right padding will be enlarged + * equally from a certain minimum at RANK_CARD_MIN_WIDTH. * * @returns {number} - Rank circle translation value. */ const calculateRankXTranslation = () => { - if (width < 450) { - return width - 95 + (45 * (450 - 340)) / 110; + if (statItems.length) { + const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70; + if (width > RANK_CARD_DEFAULT_WIDTH) { + const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2; + return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH; + } else { + return minXTranslation + (width - minCardWidth) / 2; + } } else { - return width - 95; + return width / 2 + 20 - 10; } }; @@ -271,20 +502,12 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { ? "" : ` + height / 2 - 50 + })"> - - ${rank.level} - + ${rankIcon(rank_icon, rank?.level, rank?.percentile)} `; @@ -295,7 +518,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => { if (key === "commits") { return `${i18n.t("statcard.commits")} ${ include_all_commits ? "" : `in ${new Date().getFullYear()}` - } : ${totalStars}`; + } : ${STATS[key].value}`; } return `${STATS[key].label}: ${STATS[key].value}`; }) diff --git a/src/cards/top-languages-card.js b/src/cards/top-languages-card.js index 602d1b811b5df..9385f4a7ebed3 100644 --- a/src/cards/top-languages-card.js +++ b/src/cards/top-languages-card.js @@ -13,10 +13,17 @@ import { import { langCardLocales } from "../translations.js"; const DEFAULT_CARD_WIDTH = 300; -const MIN_CARD_WIDTH = 230; -const DEFAULT_LANGS_COUNT = 5; +const MIN_CARD_WIDTH = 280; const DEFAULT_LANG_COLOR = "#858585"; const CARD_PADDING = 25; +const COMPACT_LAYOUT_BASE_HEIGHT = 90; +const MAXIMUM_LANGS_COUNT = 20; + +const NORMAL_LAYOUT_DEFAULT_LANGS_COUNT = 5; +const COMPACT_LAYOUT_DEFAULT_LANGS_COUNT = 6; +const DONUT_LAYOUT_DEFAULT_LANGS_COUNT = 5; +const PIE_LAYOUT_DEFAULT_LANGS_COUNT = 6; +const DONUT_VERTICAL_LAYOUT_DEFAULT_LANGS_COUNT = 6; /** * @typedef {import("../fetchers/types").Lang} Lang @@ -26,76 +33,238 @@ const CARD_PADDING = 25; * Retrieves the programming language whose name is the longest. * * @param {Lang[]} arr Array of programming languages. - * @returns {Object} Longest programming language object. + * @returns {{ name: string, size: number, color: string }} Longest programming language object. */ const getLongestLang = (arr) => arr.reduce( (savedLang, lang) => lang.name.length > savedLang.name.length ? lang : savedLang, - { name: "", size: null, color: "" }, + { name: "", size: 0, color: "" }, ); /** - * Creates a node to display usage of a programming language in percentage - * using text and a horizontal progress bar. + * Convert degrees to radians. + * + * @param {number} angleInDegrees Angle in degrees. + * @returns {number} Angle in radians. + */ +const degreesToRadians = (angleInDegrees) => angleInDegrees * (Math.PI / 180.0); + +/** + * Convert radians to degrees. + * + * @param {number} angleInRadians Angle in radians. + * @returns {number} Angle in degrees. + */ +const radiansToDegrees = (angleInRadians) => angleInRadians / (Math.PI / 180.0); + +/** + * Convert polar coordinates to cartesian coordinates. + * + * @param {number} centerX Center x coordinate. + * @param {number} centerY Center y coordinate. + * @param {number} radius Radius of the circle. + * @param {number} angleInDegrees Angle in degrees. + * @returns {{x: number, y: number}} Cartesian coordinates. + */ +const polarToCartesian = (centerX, centerY, radius, angleInDegrees) => { + const rads = degreesToRadians(angleInDegrees); + return { + x: centerX + radius * Math.cos(rads), + y: centerY + radius * Math.sin(rads), + }; +}; + +/** + * Convert cartesian coordinates to polar coordinates. + * + * @param {number} centerX Center x coordinate. + * @param {number} centerY Center y coordinate. + * @param {number} x Point x coordinate. + * @param {number} y Point y coordinate. + * @returns {{radius: number, angleInDegrees: number}} Polar coordinates. + */ +const cartesianToPolar = (centerX, centerY, x, y) => { + const radius = Math.sqrt(Math.pow(x - centerX, 2) + Math.pow(y - centerY, 2)); + let angleInDegrees = radiansToDegrees(Math.atan2(y - centerY, x - centerX)); + if (angleInDegrees < 0) { + angleInDegrees += 360; + } + return { radius, angleInDegrees }; +}; + +/** + * Calculates length of circle. + * + * @param {number} radius Radius of the circle. + * @returns {number} The length of the circle. + */ +const getCircleLength = (radius) => { + return 2 * Math.PI * radius; +}; + +/** + * Calculates height for the compact layout. + * + * @param {number} totalLangs Total number of languages. + * @returns {number} Card height. + */ +const calculateCompactLayoutHeight = (totalLangs) => { + return COMPACT_LAYOUT_BASE_HEIGHT + Math.round(totalLangs / 2) * 25; +}; + +/** + * Calculates height for the normal layout. + * + * @param {number} totalLangs Total number of languages. + * @returns {number} Card height. + */ +const calculateNormalLayoutHeight = (totalLangs) => { + return 45 + (totalLangs + 1) * 40; +}; + +/** + * Calculates height for the donut layout. + * + * @param {number} totalLangs Total number of languages. + * @returns {number} Card height. + */ +const calculateDonutLayoutHeight = (totalLangs) => { + return 215 + Math.max(totalLangs - 5, 0) * 32; +}; + +/** + * Calculates height for the donut vertical layout. + * + * @param {number} totalLangs Total number of languages. + * @returns {number} Card height. + */ +const calculateDonutVerticalLayoutHeight = (totalLangs) => { + return 300 + Math.round(totalLangs / 2) * 25; +}; + +/** + * Calculates height for the pie layout. * - * @param {object[]} props Function properties. + * @param {number} totalLangs Total number of languages. + * @returns {number} Card height. + */ +const calculatePieLayoutHeight = (totalLangs) => { + return 300 + Math.round(totalLangs / 2) * 25; +}; + +/** + * Calculates the center translation needed to keep the donut chart centred. + * @param {number} totalLangs Total number of languages. + * @returns {number} Donut center translation. + */ +const donutCenterTranslation = (totalLangs) => { + return -45 + Math.max(totalLangs - 5, 0) * 16; +}; + +/** + * Trim top languages to lang_count while also hiding certain languages. + * + * @param {Record} topLangs Top languages. + * @param {number} langs_count Number of languages to show. + * @param {string[]=} hide Languages to hide. + * @returns {{ langs: Lang[], totalLanguageSize: number }} Trimmed top languages and total size. + */ +const trimTopLanguages = (topLangs, langs_count, hide) => { + let langs = Object.values(topLangs); + let langsToHide = {}; + let langsCount = clampValue(langs_count, 1, MAXIMUM_LANGS_COUNT); + + // populate langsToHide map for quick lookup + // while filtering out + if (hide) { + hide.forEach((langName) => { + langsToHide[lowercaseTrim(langName)] = true; + }); + } + + // filter out languages to be hidden + langs = langs + .sort((a, b) => b.size - a.size) + .filter((lang) => { + return !langsToHide[lowercaseTrim(lang.name)]; + }) + .slice(0, langsCount); + + const totalLanguageSize = langs.reduce((acc, curr) => acc + curr.size, 0); + + return { langs, totalLanguageSize }; +}; + +/** + * Create progress bar text item for a programming language. + * + * @param {object} props Function properties. * @param {number} props.width The card width - * @param {string} props.name Name of the programming language. * @param {string} props.color Color of the programming language. - * @param {string} props.progress Usage of the programming language in percentage. + * @param {string} props.name Name of the programming language. + * @param {number} props.progress Usage of the programming language in percentage. + * @param {number} props.index Index of the programming language. * @returns {string} Programming language SVG node. */ -const createProgressTextNode = ({ width, color, name, progress }) => { +const createProgressTextNode = ({ width, color, name, progress, index }) => { + const staggerDelay = (index + 3) * 150; const paddingRight = 95; const progressTextX = width - paddingRight + 10; const progressWidth = width - paddingRight; return ` - ${name} - ${progress}% - ${createProgressNode({ - x: 0, - y: 25, - color, - width: progressWidth, - progress, - progressBarBackgroundColor: "#ddd", - })} + + ${name} + ${progress}% + ${createProgressNode({ + x: 0, + y: 25, + color, + width: progressWidth, + progress, + progressBarBackgroundColor: "#ddd", + delay: staggerDelay + 300, + })} + `; }; /** - * Creates a text only node to display usage of a programming language in percentage. + * Creates compact text item for a programming language. * - * @param {object[]} props Function properties. + * @param {object} props Function properties. * @param {Lang} props.lang Programming language object. * @param {number} props.totalSize Total size of all languages. + * @param {boolean=} props.hideProgress Whether to hide percentage. + * @param {number} props.index Index of the programming language. * @returns {string} Compact layout programming language SVG node. */ -const createCompactLangNode = ({ lang, totalSize }) => { +const createCompactLangNode = ({ lang, totalSize, hideProgress, index }) => { const percentage = ((lang.size / totalSize) * 100).toFixed(2); + const staggerDelay = (index + 3) * 150; const color = lang.color || "#858585"; return ` - + - ${lang.name} ${percentage}% + ${lang.name} ${hideProgress ? "" : percentage + "%"} `; }; /** - * Creates compact layout of text only language nodes. + * Create compact languages text items for all programming languages. * - * @param {object[]} props Function properties. + * @param {object} props Function properties. * @param {Lang[]} props.langs Array of programming languages. * @param {number} props.totalSize Total size of all languages. + * @param {boolean=} props.hideProgress Whether to hide percentage. * @returns {string} Programming languages SVG node. */ -const createLanguageTextNode = ({ langs, totalSize }) => { +const createLanguageTextNode = ({ langs, totalSize, hideProgress }) => { const longestLang = getLongestLang(langs); const chunked = chunkArray(langs, langs.length / 2); const layouts = chunked.map((array) => { @@ -104,7 +273,7 @@ const createLanguageTextNode = ({ langs, totalSize }) => { createCompactLangNode({ lang, totalSize, - // @ts-ignore + hideProgress, index, }), ); @@ -125,7 +294,30 @@ const createLanguageTextNode = ({ langs, totalSize }) => { }; /** - * Renders layout to display user's most frequently used programming languages. + * Create donut languages text items for all programming languages. + * + * @param {object} props Function properties. + * @param {Lang[]} props.langs Array of programming languages. + * @param {number} props.totalSize Total size of all languages. + * @returns {string} Donut layout programming language SVG node. + */ +const createDonutLanguagesNode = ({ langs, totalSize }) => { + return flexLayout({ + items: langs.map((lang, index) => { + return createCompactLangNode({ + lang, + totalSize, + hideProgress: false, + index, + }); + }), + gap: 32, + direction: "column", + }).join(""); +}; + +/** + * Renders the default language card layout. * * @param {Lang[]} langs Array of programming languages. * @param {number} width Card width. @@ -134,12 +326,15 @@ const createLanguageTextNode = ({ langs, totalSize }) => { */ const renderNormalLayout = (langs, width, totalLanguageSize) => { return flexLayout({ - items: langs.map((lang) => { + items: langs.map((lang, index) => { return createProgressTextNode({ - width: width, + width, name: lang.name, color: lang.color || DEFAULT_LANG_COLOR, - progress: ((lang.size / totalLanguageSize) * 100).toFixed(2), + progress: parseFloat( + ((lang.size / totalLanguageSize) * 100).toFixed(2), + ), + index, }); }), gap: 40, @@ -148,14 +343,15 @@ const renderNormalLayout = (langs, width, totalLanguageSize) => { }; /** - * Renders compact layout to display user's most frequently used programming languages. + * Renders the compact language card layout. * * @param {Lang[]} langs Array of programming languages. * @param {number} width Card width. * @param {number} totalLanguageSize Total size of all languages. + * @param {boolean=} hideProgress Whether to hide progress bar. * @returns {string} Compact layout card SVG object. */ -const renderCompactLayout = (langs, width, totalLanguageSize) => { +const renderCompactLayout = (langs, width, totalLanguageSize, hideProgress) => { const paddingRight = 50; const offsetWidth = width - paddingRight; // progressOffset holds the previous language's width and used to offset the next language @@ -186,96 +382,362 @@ const renderCompactLayout = (langs, width, totalLanguageSize) => { .join(""); return ` - - - - ${compactProgressBar} - - + ${ + hideProgress + ? "" + : ` + + + + ${compactProgressBar} + ` + } + ${createLanguageTextNode({ langs, totalSize: totalLanguageSize, + hideProgress, })} `; }; /** - * Calculates height for the compact layout. + * Renders donut vertical layout to display user's most frequently used programming languages. * - * @param {number} totalLangs Total number of languages. - * @returns {number} Card height. + * @param {Lang[]} langs Array of programming languages. + * @param {number} totalLanguageSize Total size of all languages. + * @returns {string} Compact layout card SVG object. */ -const calculateCompactLayoutHeight = (totalLangs) => { - return 90 + Math.round(totalLangs / 2) * 25; +const renderDonutVerticalLayout = (langs, totalLanguageSize) => { + // Donut vertical chart radius and total length + const radius = 80; + const totalCircleLength = getCircleLength(radius); + + // SVG circles + let circles = []; + + // Start indent for donut vertical chart parts + let indent = 0; + + // Start delay coefficient for donut vertical chart parts + let startDelayCoefficient = 1; + + // Generate each donut vertical chart part + for (const lang of langs) { + const percentage = (lang.size / totalLanguageSize) * 100; + const circleLength = totalCircleLength * (percentage / 100); + const delay = startDelayCoefficient * 100; + + circles.push(` + + + + `); + + // Update the indent for the next part + indent += circleLength; + // Update the start delay coefficient for the next part + startDelayCoefficient += 1; + } + + return ` + + + + ${circles.join("")} + + + + + ${createLanguageTextNode({ + langs, + totalSize: totalLanguageSize, + hideProgress: false, + })} + + + + `; }; /** - * Calculates height for the normal layout. + * Renders pie layout to display user's most frequently used programming languages. * - * @param {number} totalLangs Total number of languages. - * @returns {number} Card height. + * @param {Lang[]} langs Array of programming languages. + * @param {number} totalLanguageSize Total size of all languages. + * @returns {string} Compact layout card SVG object. */ -const calculateNormalLayoutHeight = (totalLangs) => { - return 45 + (totalLangs + 1) * 40; +const renderPieLayout = (langs, totalLanguageSize) => { + // Pie chart radius and center coordinates + const radius = 90; + const centerX = 150; + const centerY = 100; + + // Start angle for the pie chart parts + let startAngle = 0; + + // Start delay coefficient for the pie chart parts + let startDelayCoefficient = 1; + + // SVG paths + const paths = []; + + // Generate each pie chart part + for (const lang of langs) { + if (langs.length === 1) { + paths.push(` + + `); + break; + } + + const langSizePart = lang.size / totalLanguageSize; + const percentage = langSizePart * 100; + // Calculate the angle for the current part + const angle = langSizePart * 360; + + // Calculate the end angle + const endAngle = startAngle + angle; + + // Calculate the coordinates of the start and end points of the arc + const startPoint = polarToCartesian(centerX, centerY, radius, startAngle); + const endPoint = polarToCartesian(centerX, centerY, radius, endAngle); + + // Determine the large arc flag based on the angle + const largeArcFlag = angle > 180 ? 1 : 0; + + // Calculate delay + const delay = startDelayCoefficient * 100; + + // SVG arc markup + paths.push(` + + + + `); + + // Update the start angle for the next part + startAngle = endAngle; + // Update the start delay coefficient for the next part + startDelayCoefficient += 1; + } + + return ` + + + + ${paths.join("")} + + + + + ${createLanguageTextNode({ + langs, + totalSize: totalLanguageSize, + hideProgress: false, + })} + + + + `; }; /** - * Hides languages and trims the list to show only the top N languages. + * Creates the SVG paths for the language donut chart. * - * @param {Record} topLangs Top languages. - * @param {string[]} hide Languages to hide. - * @param {string} langs_count Number of languages to show. + * @param {number} cx Donut center x-position. + * @param {number} cy Donut center y-position. + * @param {number} radius Donut arc Radius. + * @param {number[]} percentages Array with donut section percentages. + * @returns {{d: string, percent: number}[]} Array of svg path elements */ -const useLanguages = (topLangs, hide, langs_count) => { - let langs = Object.values(topLangs); - let langsToHide = {}; - let langsCount = clampValue(parseInt(langs_count), 1, 10); +const createDonutPaths = (cx, cy, radius, percentages) => { + const paths = []; + let startAngle = 0; + let endAngle = 0; - // populate langsToHide map for quick lookup - // while filtering out - if (hide) { - hide.forEach((langName) => { - langsToHide[lowercaseTrim(langName)] = true; - }); + const totalPercent = percentages.reduce((acc, curr) => acc + curr, 0); + for (let i = 0; i < percentages.length; i++) { + const tmpPath = {}; + + let percent = parseFloat( + ((percentages[i] / totalPercent) * 100).toFixed(2), + ); + + endAngle = 3.6 * percent + startAngle; + const startPoint = polarToCartesian(cx, cy, radius, endAngle - 90); // rotate donut 90 degrees counter-clockwise. + const endPoint = polarToCartesian(cx, cy, radius, startAngle - 90); // rotate donut 90 degrees counter-clockwise. + const largeArc = endAngle - startAngle <= 180 ? 0 : 1; + + tmpPath.percent = percent; + tmpPath.d = `M ${startPoint.x} ${startPoint.y} A ${radius} ${radius} 0 ${largeArc} 0 ${endPoint.x} ${endPoint.y}`; + + paths.push(tmpPath); + startAngle = endAngle; } - // filter out languages to be hidden - langs = langs - .sort((a, b) => b.size - a.size) - .filter((lang) => { - return !langsToHide[lowercaseTrim(lang.name)]; - }) - .slice(0, langsCount); + return paths; +}; - const totalLanguageSize = langs.reduce((acc, curr) => acc + curr.size, 0); +/** + * Renders the donut language card layout. + * + * @param {Lang[]} langs Array of programming languages. + * @param {number} width Card width. + * @param {number} totalLanguageSize Total size of all languages. + * @returns {string} Donut layout card SVG object. + */ +const renderDonutLayout = (langs, width, totalLanguageSize) => { + const centerX = width / 3; + const centerY = width / 3; + const radius = centerX - 60; + const strokeWidth = 12; + + const colors = langs.map((lang) => lang.color); + const langsPercents = langs.map((lang) => + parseFloat(((lang.size / totalLanguageSize) * 100).toFixed(2)), + ); - return { langs, totalLanguageSize }; + const langPaths = createDonutPaths(centerX, centerY, radius, langsPercents); + + const donutPaths = + langs.length === 1 + ? `` + : langPaths + .map((section, index) => { + const staggerDelay = (index + 3) * 100; + const delay = staggerDelay + 300; + + const output = ` + + + + + `; + + return output; + }) + .join(""); + + const donut = `${donutPaths}`; + + return ` + + + ${createDonutLanguagesNode({ langs, totalSize: totalLanguageSize })} + + + + ${donut} + + + `; +}; + +/** + * @typedef {import("./types").TopLangOptions} TopLangOptions + * @typedef {TopLangOptions["layout"]} Layout + */ + +/** + * Creates the no languages data SVG node. + * + * @param {object} props Object with function properties. + * @param {string} props.color No languages data text color. + * @param {string} props.text No languages data translated text. + * @param {Layout | undefined} props.layout Card layout. + * @returns {string} No languages data SVG node string. + */ +const noLanguagesDataNode = ({ color, text, layout }) => { + return ` + ${text} + `; }; /** - * Renders card to display user's most frequently used programming languages. + * Get default languages count for provided card layout. * - * @param {import('../fetchers/types').TopLangData} topLangs User's most frequently used programming languages. - * @param {Partial} options Card options. + * @param {object} props Function properties. + * @param {Layout=} props.layout Input layout string. + * @param {boolean=} props.hide_progress Input hide_progress parameter value. + * @returns {number} Default languages count for input layout. + */ +const getDefaultLanguagesCountByLayout = ({ layout, hide_progress }) => { + if (layout === "compact" || hide_progress === true) { + return COMPACT_LAYOUT_DEFAULT_LANGS_COUNT; + } else if (layout === "donut") { + return DONUT_LAYOUT_DEFAULT_LANGS_COUNT; + } else if (layout === "donut-vertical") { + return DONUT_VERTICAL_LAYOUT_DEFAULT_LANGS_COUNT; + } else if (layout === "pie") { + return PIE_LAYOUT_DEFAULT_LANGS_COUNT; + } else { + return NORMAL_LAYOUT_DEFAULT_LANGS_COUNT; + } +}; + +/** + * @typedef {import('../fetchers/types').TopLangData} TopLangData + */ + +/** + * Renders card that display user's most frequently used programming languages. + * + * @param {TopLangData} topLangs User's most frequently used programming languages. + * @param {Partial} options Card options. * @returns {string} Language card SVG object. */ const renderTopLanguages = (topLangs, options = {}) => { const { hide_title = false, - hide_border, + hide_border = false, card_width, title_color, text_color, bg_color, hide, + hide_progress, theme, layout, custom_title, locale, - langs_count = DEFAULT_LANGS_COUNT, + langs_count = getDefaultLanguagesCountByLayout({ layout, hide_progress }), border_radius, border_color, + disable_animations, } = options; const i18n = new I18n({ @@ -283,29 +745,21 @@ const renderTopLanguages = (topLangs, options = {}) => { translations: langCardLocales, }); - const { langs, totalLanguageSize } = useLanguages( + const { langs, totalLanguageSize } = trimTopLanguages( topLangs, + langs_count, hide, - String(langs_count), ); - let width = isNaN(card_width) - ? DEFAULT_CARD_WIDTH - : card_width < MIN_CARD_WIDTH - ? MIN_CARD_WIDTH - : card_width; + let width = card_width + ? isNaN(card_width) + ? DEFAULT_CARD_WIDTH + : card_width < MIN_CARD_WIDTH + ? MIN_CARD_WIDTH + : card_width + : DEFAULT_CARD_WIDTH; let height = calculateNormalLayoutHeight(langs.length); - let finalLayout = ""; - if (layout === "compact") { - width = width + 50; // padding - height = calculateCompactLayoutHeight(langs.length); - - finalLayout = renderCompactLayout(langs, width, totalLanguageSize); - } else { - finalLayout = renderNormalLayout(langs, width, totalLanguageSize); - } - // returns theme based colors with proper overrides and defaults const colors = getCardColors({ title_color, @@ -315,6 +769,38 @@ const renderTopLanguages = (topLangs, options = {}) => { theme, }); + let finalLayout = ""; + if (langs.length === 0) { + height = COMPACT_LAYOUT_BASE_HEIGHT; + finalLayout = noLanguagesDataNode({ + color: colors.textColor, + text: i18n.t("langcard.nodata"), + layout, + }); + } else if (layout === "pie") { + height = calculatePieLayoutHeight(langs.length); + finalLayout = renderPieLayout(langs, totalLanguageSize); + } else if (layout === "donut-vertical") { + height = calculateDonutVerticalLayoutHeight(langs.length); + finalLayout = renderDonutVerticalLayout(langs, totalLanguageSize); + } else if (layout === "compact" || hide_progress == true) { + height = + calculateCompactLayoutHeight(langs.length) + (hide_progress ? -25 : 0); + + finalLayout = renderCompactLayout( + langs, + width, + totalLanguageSize, + hide_progress, + ); + } else if (layout === "donut") { + height = calculateDonutLayoutHeight(langs.length); + width = width + 50; // padding + finalLayout = renderDonutLayout(langs, width, totalLanguageSize); + } else { + finalLayout = renderNormalLayout(langs, width, totalLanguageSize); + } + const card = new Card({ customTitle: custom_title, defaultTitle: i18n.t("langcard.title"), @@ -324,13 +810,59 @@ const renderTopLanguages = (topLangs, options = {}) => { colors, }); - card.disableAnimations(); + if (disable_animations) { + card.disableAnimations(); + } + card.setHideBorder(hide_border); card.setHideTitle(hide_title); card.setCSS( - `.lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${colors.textColor} }`, + ` + @keyframes slideInAnimation { + from { + width: 0; + } + to { + width: calc(100%-100px); + } + } + @keyframes growWidthAnimation { + from { + width: 0; + } + to { + width: 100%; + } + } + .stat { + font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${colors.textColor}; + } + @supports(-moz-appearance: auto) { + /* Selector detects Firefox */ + .stat { font-size:12px; } + } + .bold { font-weight: 700 } + .lang-name { + font: 400 11px "Segoe UI", Ubuntu, Sans-Serif; + fill: ${colors.textColor}; + } + .stagger { + opacity: 0; + animation: fadeInAnimation 0.3s ease-in-out forwards; + } + #rect-mask rect{ + animation: slideInAnimation 1s ease-in-out forwards; + } + .lang-progress{ + animation: growWidthAnimation 0.6s ease-in-out forwards; + } + `, ); + if (layout === "pie" || layout === "donut-vertical") { + return card.render(finalLayout); + } + return card.render(` ${finalLayout} @@ -338,4 +870,21 @@ const renderTopLanguages = (topLangs, options = {}) => { `); }; -export { renderTopLanguages, MIN_CARD_WIDTH }; +export { + getLongestLang, + degreesToRadians, + radiansToDegrees, + polarToCartesian, + cartesianToPolar, + getCircleLength, + calculateCompactLayoutHeight, + calculateNormalLayoutHeight, + calculateDonutLayoutHeight, + calculateDonutVerticalLayoutHeight, + calculatePieLayoutHeight, + donutCenterTranslation, + trimTopLanguages, + renderTopLanguages, + MIN_CARD_WIDTH, + getDefaultLanguagesCountByLayout, +}; diff --git a/src/cards/types.d.ts b/src/cards/types.d.ts index 502314c41fa92..9a21be4a0160a 100644 --- a/src/cards/types.d.ts +++ b/src/cards/types.d.ts @@ -1,4 +1,5 @@ type ThemeNames = keyof typeof import("../../themes/index.js"); +type RankIcon = "default" | "github" | "percentile"; export type CommonOptions = { title_color: string; @@ -9,43 +10,54 @@ export type CommonOptions = { border_radius: number; border_color: string; locale: string; + hide_border: boolean; }; export type StatCardOptions = CommonOptions & { hide: string[]; show_icons: boolean; hide_title: boolean; - hide_border: boolean; card_width: number; hide_rank: boolean; include_all_commits: boolean; line_height: number | string; custom_title: string; disable_animations: boolean; + number_format: string; + ring_color: string; + text_bold: boolean; + rank_icon: RankIcon; + show: string[]; }; export type RepoCardOptions = CommonOptions & { - hide_border: boolean; show_owner: boolean; + description_lines_count: number; }; export type TopLangOptions = CommonOptions & { hide_title: boolean; - hide_border: boolean; card_width: number; hide: string[]; - layout: "compact" | "normal"; + layout: "compact" | "normal" | "donut" | "donut-vertical" | "pie"; custom_title: string; langs_count: number; + disable_animations: boolean; + hide_progress: boolean; }; -type WakaTimeOptions = CommonOptions & { +export type WakaTimeOptions = CommonOptions & { hide_title: boolean; - hide_border: boolean; hide: string[]; line_height: string; hide_progress: boolean; custom_title: string; layout: "compact" | "normal"; langs_count: number; + display_format: "time" | "percent"; + disable_animations: boolean; +}; + +export type GistCardOptions = CommonOptions & { + show_owner: boolean; }; diff --git a/src/cards/wakatime-card.js b/src/cards/wakatime-card.js index e7af1df710f9c..65e1d54d779ea 100644 --- a/src/cards/wakatime-card.js +++ b/src/cards/wakatime-card.js @@ -8,7 +8,6 @@ import { getCardColors, lowercaseTrim, } from "../common/utils.js"; -import { getStyles } from "../getStyles.js"; import { wakatimeCardLocales } from "../translations.js"; /** Import language colors. @@ -25,7 +24,10 @@ const languageColors = require("../common/languageColors.json"); // now works /** * Creates the no coding activity SVG node. * - * @param {{color: string, text: string}} The function prop + * @param {object} props The function properties. + * @param {string} props.color No coding activity text color. + * @param {string} props.text No coding activity translated text. + * @returns {string} No coding activity SVG node string. */ const noCodingActivityNode = ({ color, text }) => { return ` @@ -33,23 +35,43 @@ const noCodingActivityNode = ({ color, text }) => { `; }; +/** + * @typedef {import('../fetchers/types').WakaTimeLang} WakaTimeLang + */ + +/** + * Format language value. + * + * @param {Object} args The function arguments. + * @param {WakaTimeLang} args.lang The language object. + * @param {"time" | "percent"} args.display_format The display format of the language node. + * @returns {string} The formatted language value. + */ +const formatLanguageValue = ({ display_format, lang }) => { + return display_format === "percent" + ? `${lang.percent.toFixed(2).toString()} %` + : lang.text; +}; + /** * Create compact WakaTime layout. * - * @param {Object[]} args The function arguments. - * @param {import("../fetchers/types").WakaTimeLang[]} languages The languages array. - * @param {number} totalSize The total size of the languages. - * @param {number} x The x position of the language node. - * @param {number} y The y position of the language node. + * @param {Object} args The function arguments. + * @param {WakaTimeLang} args.lang The languages array. + * @param {number} args.x The x position of the language node. + * @param {number} args.y The y position of the language node. + * @param {"time" | "percent"} args.display_format The display format of the language node. + * @returns {string} The compact layout language SVG node. */ -const createCompactLangNode = ({ lang, totalSize, x, y }) => { +const createCompactLangNode = ({ lang, x, y, display_format }) => { const color = languageColors[lang.name] || "#858585"; + const value = formatLanguageValue({ display_format, lang }); return ` - ${lang.name} - ${lang.text} + ${lang.name} - ${value} `; @@ -58,27 +80,27 @@ const createCompactLangNode = ({ lang, totalSize, x, y }) => { /** * Create WakaTime language text node item. * - * @param {Object[]} args The function arguments. - * @param {import("../fetchers/types").WakaTimeLang} lang The language object. - * @param {number} totalSize The total size of the languages. - * @param {number} x The x position of the language node. - * @param {number} y The y position of the language node. + * @param {Object} args The function arguments. + * @param {WakaTimeLang[]} args.langs The language objects. + * @param {number} args.y The y position of the language node. + * @param {"time" | "percent"} args.display_format The display format of the language node. + * @returns {string[]} The language text node items. */ -const createLanguageTextNode = ({ langs, totalSize, x, y }) => { +const createLanguageTextNode = ({ langs, y, display_format }) => { return langs.map((lang, index) => { if (index % 2 === 0) { return createCompactLangNode({ lang, x: 25, y: 12.5 * index + y, - totalSize, + display_format, }); } return createCompactLangNode({ lang, x: 230, y: 12.5 + 12.5 * index, - totalSize, + display_format, }); }); }; @@ -86,14 +108,16 @@ const createLanguageTextNode = ({ langs, totalSize, x, y }) => { /** * Create WakaTime text item. * - * @param {Object[]} args The function arguments. - * @param {string} id The id of the text node item. - * @param {string} label The label of the text node item. - * @param {string} value The value of the text node item. - * @param {number} index The index of the text node item. - * @param {percent} percent Percentage of the text node item. - * @param {boolean} hideProgress Whether to hide the progress bar. - * @param {string} progressBarBackgroundColor The color of the progress bar background. + * @param {Object} args The function arguments. + * @param {string} args.id The id of the text node item. + * @param {string} args.label The label of the text node item. + * @param {string} args.value The value of the text node item. + * @param {number} args.index The index of the text node item. + * @param {number} args.percent Percentage of the text node item. + * @param {boolean=} args.hideProgress Whether to hide the progress bar. + * @param {string} args.progressBarColor The color of the progress bar. + * @param {string} args.progressBarBackgroundColor The color of the progress bar background. + * @returns {string} The text SVG node. */ const createTextNode = ({ id, @@ -118,6 +142,7 @@ const createTextNode = ({ // @ts-ignore name: label, progressBarBackgroundColor, + delay: staggerDelay + 300, }); return ` @@ -137,8 +162,8 @@ const createTextNode = ({ * Recalculating percentages so that, compact layout's progress bar does not break when * hiding languages. * - * @param {import("../fetchers/types").WakaTimeLang[]} languages The languages array. - * @return {import("../fetchers/types").WakaTimeLang[]} The recalculated languages array. + * @param {WakaTimeLang[]} languages The languages array. + * @returns {void} The recalculated languages array. */ const recalculatePercentages = (languages) => { const totalSum = languages.reduce( @@ -151,11 +176,46 @@ const recalculatePercentages = (languages) => { }); }; +/** + * Retrieves CSS styles for a card. + * + * @param {Object} colors The colors to use for the card. + * @param {string} colors.titleColor The title color. + * @param {string} colors.textColor The text color. + * @returns {string} Card CSS styles. + */ +const getStyles = ({ + // eslint-disable-next-line no-unused-vars + titleColor, + textColor, +}) => { + return ` + .stat { + font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${textColor}; + } + @supports(-moz-appearance: auto) { + /* Selector detects Firefox */ + .stat { font-size:12px; } + } + .stagger { + opacity: 0; + animation: fadeInAnimation 0.3s ease-in-out forwards; + } + .not_bold { font-weight: 400 } + .bold { font-weight: 700 } + `; +}; + +/** + * @typedef {import('../fetchers/types').WakaTimeData} WakaTimeData + * @typedef {import('./types').WakaTimeOptions} WakaTimeOptions + */ + /** * Renders WakaTime card. * - * @param {Partial} stats WakaTime stats. - * @param {Partial} options Card options. + * @param {Partial} stats WakaTime stats. + * @param {Partial} options Card options. * @returns {string} WakaTime card SVG. */ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { @@ -177,6 +237,8 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { langs_count = languages.length, border_radius, border_color, + display_format = "time", + disable_animations, } = options; const shouldHideLangs = Array.isArray(hide) && hide.length > 0; @@ -199,7 +261,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { const lheight = parseInt(String(line_height), 10); - const langsCount = clampValue(parseInt(String(langs_count)), 1, langs_count); + const langsCount = clampValue(langs_count, 1, langs_count); // returns theme based colors with proper overrides and defaults const { titleColor, textColor, iconColor, bgColor, borderColor } = @@ -223,7 +285,6 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { const cssStyles = getStyles({ titleColor, textColor, - iconColor, }); let finalLayout = ""; @@ -266,21 +327,33 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { ${compactProgressBar} - ${createLanguageTextNode({ - x: 0, - y: 25, - langs: filteredLanguages, - totalSize: 100, - }).join("")} + ${ + filteredLanguages.length + ? createLanguageTextNode({ + y: 25, + langs: filteredLanguages, + display_format, + }).join("") + : noCodingActivityNode({ + // @ts-ignore + color: textColor, + text: stats.is_coding_activity_visible + ? stats.is_other_usage_visible + ? i18n.t("wakatimecard.nocodingactivity") + : i18n.t("wakatimecard.nocodedetails") + : i18n.t("wakatimecard.notpublic"), + }) + } `; } else { finalLayout = flexLayout({ items: filteredLanguages.length - ? filteredLanguages.map((language) => { + ? filteredLanguages.map((language, index) => { return createTextNode({ id: language.name, label: language.name, - value: language.text, + value: formatLanguageValue({ display_format, lang: language }), + index, percent: language.percent, // @ts-ignore progressBarColor: titleColor, @@ -293,7 +366,11 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { noCodingActivityNode({ // @ts-ignore color: textColor, - text: i18n.t("wakatimecard.nocodingactivity"), + text: stats.is_coding_activity_visible + ? stats.is_other_usage_visible + ? i18n.t("wakatimecard.nocodingactivity") + : i18n.t("wakatimecard.nocodedetails") + : i18n.t("wakatimecard.notpublic"), }), ], gap: lheight, @@ -301,9 +378,20 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { }).join(""); } + // Get title range text + let titleText = i18n.t("wakatimecard.title"); + switch (stats.range) { + case "last_7_days": + titleText += ` (${i18n.t("wakatimecard.last7days")})`; + break; + case "last_year": + titleText += ` (${i18n.t("wakatimecard.lastyear")})`; + break; + } + const card = new Card({ customTitle: custom_title, - defaultTitle: i18n.t("wakatimecard.title"), + defaultTitle: titleText, width: 495, height, border_radius, @@ -316,12 +404,38 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => { }, }); + if (disable_animations) { + card.disableAnimations(); + } + card.setHideBorder(hide_border); card.setHideTitle(hide_title); card.setCSS( ` ${cssStyles} + @keyframes slideInAnimation { + from { + width: 0; + } + to { + width: calc(100%-100px); + } + } + @keyframes growWidthAnimation { + from { + width: 0; + } + to { + width: 100%; + } + } .lang-name { font: 400 11px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor} } + #rect-mask rect{ + animation: slideInAnimation 1s ease-in-out forwards; + } + .lang-progress{ + animation: growWidthAnimation 0.6s ease-in-out forwards; + } `, ); diff --git a/src/common/Card.js b/src/common/Card.js index 2f1d9c29f274d..d32da56255f89 100644 --- a/src/common/Card.js +++ b/src/common/Card.js @@ -1,4 +1,3 @@ -import { getAnimations } from "../getStyles.js"; import { encodeHTML, flexLayout } from "./utils.js"; class Card { @@ -12,6 +11,12 @@ class Card { * @param {string?=} args.customTitle Card custom title. * @param {string?=} args.defaultTitle Card default title. * @param {string?=} args.titlePrefixIcon Card title prefix icon. + * @param {object?=} args.colors Card colors arguments. + * @param {string} args.colors.titleColor Card title color. + * @param {string} args.colors.textColor Card text color. + * @param {string} args.colors.iconColor Card icon color. + * @param {string|Array} args.colors.bgColor Card background color. + * @param {string} args.colors.borderColor Card border color. * @returns {Card} Card instance. */ constructor({ @@ -34,9 +39,9 @@ class Card { // returns theme based colors with proper overrides and defaults this.colors = colors; this.title = - customTitle !== undefined - ? encodeHTML(customTitle) - : encodeHTML(defaultTitle); + customTitle === undefined + ? encodeHTML(defaultTitle) + : encodeHTML(customTitle); this.css = ""; @@ -48,12 +53,18 @@ class Card { this.a11yDesc = ""; } + /** + * @returns {void} + */ disableAnimations() { this.animations = false; } /** - * @param {{title: string, desc: string}} prop + * @param {Object} props The props object. + * @param {string} props.title Accessibility title. + * @param {string} props.desc Accessibility description. + * @returns {void} */ setAccessibilityLabel({ title, desc }) { this.a11yTitle = title; @@ -61,21 +72,24 @@ class Card { } /** - * @param {string} value + * @param {string} value The CSS to add to the card. + * @returns {void} */ setCSS(value) { this.css = value; } /** - * @param {boolean} value + * @param {boolean} value Whether to hide the border or not. + * @returns {void} */ setHideBorder(value) { this.hideBorder = value; } /** - * @param {boolean} value + * @param {boolean} value Whether to hide the title or not. + * @returns {void} */ setHideTitle(value) { this.hideTitle = value; @@ -85,12 +99,16 @@ class Card { } /** - * @param {string} text + * @param {string} text The title to set. + * @returns {void} */ setTitle(text) { this.title = text; } + /** + * @returns {string} The rendered card title. + */ renderTitle() { const titleText = ` { + return ` + /* Animations */ + @keyframes scaleInAnimation { + from { + transform: translate(-5px, 5px) scale(0); + } + to { + transform: translate(-5px, 5px) scale(1); + } + } + @keyframes fadeInAnimation { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + `; + }; + + /** + * @param {string} body The inner body of the card. + * @returns {string} The rendered card. */ render(body) { return ` @@ -177,7 +228,7 @@ class Card { } ${this.css} - ${process.env.NODE_ENV === "test" ? "" : getAnimations()} + ${process.env.NODE_ENV === "test" ? "" : this.getAnimations()} ${ this.animations === false ? `* { animation-duration: 0s !important; animation-delay: 0s !important; }` diff --git a/src/common/I18n.js b/src/common/I18n.js index 48242af264c95..bd5f29fcb6a84 100644 --- a/src/common/I18n.js +++ b/src/common/I18n.js @@ -1,23 +1,39 @@ +const FALLBACK_LOCALE = "en"; + /** * I18n translation class. */ class I18n { + /** + * Constructor. + * + * @param {Object} options Options. + * @param {string=} options.locale Locale. + * @param {Object} options.translations Translations. + */ constructor({ locale, translations }) { - this.locale = locale; + this.locale = locale || FALLBACK_LOCALE; this.translations = translations; - this.fallbackLocale = "en"; } + /** + * Get translation. + * + * @param {string} str String to translate. + * @returns {string} Translated string. + */ t(str) { if (!this.translations[str]) { throw new Error(`${str} Translation string not found`); } - if (!this.translations[str][this.locale || this.fallbackLocale]) { - throw new Error(`${str} Translation locale not found`); + if (!this.translations[str][this.locale]) { + throw new Error( + `'${str}' translation not found for locale '${this.locale}'`, + ); } - return this.translations[str][this.locale || this.fallbackLocale]; + return this.translations[str][this.locale]; } } diff --git a/src/common/createProgressNode.js b/src/common/createProgressNode.js index c36818b193b2f..2d7303a5a78ef 100644 --- a/src/common/createProgressNode.js +++ b/src/common/createProgressNode.js @@ -1,3 +1,5 @@ +// @ts-check + import { clampValue } from "./utils.js"; /** @@ -8,8 +10,9 @@ import { clampValue } from "./utils.js"; * @param {number} createProgressNodeParams.y Y-axis position. * @param {number} createProgressNodeParams.width Width of progress bar. * @param {string} createProgressNodeParams.color Progress color. - * @param {string} createProgressNodeParams.progress Progress value. + * @param {number} createProgressNodeParams.progress Progress value. * @param {string} createProgressNodeParams.progressBarBackgroundColor Progress bar bg color. + * @param {number} createProgressNodeParams.delay Delay before animation starts. * @returns {string} Progress node. */ const createProgressNode = ({ @@ -19,20 +22,22 @@ const createProgressNode = ({ color, progress, progressBarBackgroundColor, + delay, }) => { const progressPercentage = clampValue(progress, 2, 100); return ` - - + + + `; }; diff --git a/src/common/icons.js b/src/common/icons.js index 5282a93ec8725..771704a335d12 100644 --- a/src/common/icons.js +++ b/src/common/icons.js @@ -2,11 +2,52 @@ const icons = { star: ``, commits: ``, prs: ``, + prs_merged: ``, + prs_merged_percentage: ``, issues: ``, icon: ``, contribs: ``, fork: ``, + reviews: ``, + discussions_started: ``, + discussions_answered: ``, + gist: ``, }; -export { icons }; +/** + * Get rank icon + * + * @param {string} rankIcon - The rank icon type. + * @param {string} rankLevel - The rank level. + * @param {number} percentile - The rank percentile. + * @returns {string} - The SVG code of the rank icon + */ +const rankIcon = (rankIcon, rankLevel, percentile) => { + switch (rankIcon) { + case "github": + return ` + + `; + case "percentile": + return ` + + Top + + + ${percentile.toFixed(1)}% + + `; + case "default": + default: + return ` + + ${rankLevel} + + `; + } +}; + +export { icons, rankIcon }; export default icons; diff --git a/src/common/languageColors.json b/src/common/languageColors.json index 7e8cd551264b8..ed67b623f8041 100644 --- a/src/common/languageColors.json +++ b/src/common/languageColors.json @@ -40,6 +40,7 @@ "Avro IDL": "#0040FF", "Awk": "#c30e9b", "BASIC": "#ff0000", + "BQN": "#2b7067", "Ballerina": "#FF5000", "Batchfile": "#C1F12E", "Beef": "#a52f4e", @@ -53,6 +54,7 @@ "BlitzBasic": "#00FFAE", "BlitzMax": "#cd6400", "Bluespec": "#12223c", + "Bluespec BH": "#12223c", "Boo": "#d4bec1", "Boogie": "#c80fa0", "Brainfuck": "#2F2530", @@ -72,6 +74,7 @@ "CUE": "#5886E1", "CWeb": "#00007a", "Cabal Config": "#483465", + "Caddyfile": "#22b638", "Cadence": "#00ef8b", "Cairo": "#ff4a48", "CameLIGO": "#3be133", @@ -79,6 +82,7 @@ "Ceylon": "#dfa535", "Chapel": "#8dc63f", "ChucK": "#3f8000", + "Circom": "#707575", "Cirru": "#ccccff", "Clarion": "#db901e", "Clarity": "#5546ff", @@ -102,8 +106,10 @@ "Csound Score": "#1a1a1a", "Cuda": "#3A4E3A", "Curry": "#531242", + "Cypher": "#34c0eb", "Cython": "#fedf5b", "D": "#ba595e", + "D2": "#526ee8", "DM": "#447265", "Dafny": "#FFEC25", "Darcs Patch": "#8eff23", @@ -115,6 +121,7 @@ "DirectX 3D File": "#aace60", "Dockerfile": "#384d54", "Dogescript": "#cca760", + "Dotenv": "#e5d559", "Dylan": "#6c616e", "E": "#ccce35", "ECL": "#8a1267", @@ -124,11 +131,15 @@ "Earthly": "#2af0ff", "Easybuild": "#069406", "Ecere Projects": "#913960", + "Ecmarkup": "#eb8131", + "Edge": "#0dffe0", + "EdgeQL": "#31A7FF", "EditorConfig": "#fff1f2", "Eiffel": "#4d6977", "Elixir": "#6e4a7e", "Elm": "#60B5CC", "Elvish": "#55BB55", + "Elvish Transcript": "#55BB55", "Emacs Lisp": "#c065db", "EmberScript": "#FFF4F3", "Erlang": "#B83998", @@ -136,6 +147,7 @@ "F#": "#b845fc", "F*": "#572e30", "FIGlet Font": "#FFDDBB", + "FIRRTL": "#2f632f", "FLUX": "#88ccff", "Factor": "#636746", "Fancy": "#7b9db4", @@ -147,7 +159,7 @@ "Forth": "#341708", "Fortran": "#4d41b1", "Fortran Free Form": "#4d41b1", - "FreeBasic": "#867db1", + "FreeBasic": "#141AC9", "FreeMarker": "#0050b2", "Frege": "#00cafe", "Futhark": "#5f021f", @@ -163,8 +175,8 @@ "Game Maker Language": "#71b417", "Gemfile.lock": "#701516", "Gemini": "#ff6900", - "Genero": "#63408e", - "Genero Forms": "#d8df39", + "Genero 4gl": "#63408e", + "Genero per": "#d8df39", "Genie": "#fb855d", "Genshi": "#951531", "Gentoo Ebuild": "#9400ff", @@ -175,21 +187,27 @@ "Git Config": "#F44D27", "Git Revision List": "#F44D27", "Gleam": "#ffaff3", + "Glimmer JS": "#F5835F", + "Glimmer TS": "#3178c6", "Glyph": "#c1ac7f", "Gnuplot": "#f0a9f0", "Go": "#00ADD8", "Go Checksums": "#00ADD8", "Go Module": "#00ADD8", + "Go Workspace": "#00ADD8", + "Godot Resource": "#355570", "Golo": "#88562A", "Gosu": "#82937f", "Grace": "#615f8b", "Gradle": "#02303a", + "Gradle Kotlin DSL": "#02303a", "Grammatical Framework": "#ff0000", "GraphQL": "#e10098", "Graphviz (DOT)": "#2596be", "Groovy": "#4298b8", "Groovy Server Pages": "#4298b8", "HAProxy": "#106da9", + "HCL": "#844FBA", "HLSL": "#aace60", "HOCON": "#9ff8ee", "HTML": "#e34c26", @@ -208,6 +226,7 @@ "Haxe": "#df7900", "HiveQL": "#dce200", "HolyC": "#ffefaf", + "Hosts File": "#308888", "Hy": "#7790B2", "IDL": "#a3522f", "IGOR Pro": "#0000cc", @@ -215,6 +234,7 @@ "Idris": "#b30000", "Ignore List": "#000000", "ImageJ Macro": "#99AAFF", + "Imba": "#16cec6", "Inno Setup": "#264b99", "Io": "#a9188d", "Ioke": "#078193", @@ -222,6 +242,7 @@ "Isabelle ROOT": "#FEFE00", "J": "#9EEDFF", "JAR Manifest": "#b07219", + "JCL": "#d90e09", "JFlex": "#DBCA00", "JSON": "#292929", "JSON with Comments": "#292929", @@ -243,10 +264,13 @@ "Jolie": "#843179", "Jsonnet": "#0064bd", "Julia": "#a270ba", + "Julia REPL": "#a270ba", "Jupyter Notebook": "#DA5B0B", + "Just": "#384d54", "KRL": "#28430A", "Kaitai Struct": "#773b37", "KakouneScript": "#6f8042", + "KerboScript": "#41adf0", "KiCad Layout": "#2f4aab", "KiCad Legacy Layout": "#2f4aab", "KiCad Schematic": "#2f4aab", @@ -271,8 +295,10 @@ "Logtalk": "#295b9a", "LookML": "#652B81", "Lua": "#000080", + "Luau": "#00A2FF", "MATLAB": "#e16737", "MAXScript": "#00a6a6", + "MDX": "#fcb32c", "MLIR": "#5EC8DB", "MQL4": "#62A8D6", "MQL5": "#4A76B8", @@ -286,6 +312,7 @@ "Mathematica": "#dd1100", "Max": "#c4a79c", "Mercury": "#ff2b2b", + "Mermaid": "#ff3670", "Meson": "#007800", "Metal": "#8f14e9", "MiniYAML": "#ff1111", @@ -294,6 +321,7 @@ "Modelica": "#de1d31", "Modula-2": "#10253f", "Modula-3": "#223388", + "Mojo": "#ff4c1f", "Monkey C": "#8D6747", "MoonScript": "#ff4585", "Motoko": "#fbb03b", @@ -301,6 +329,7 @@ "Move": "#4a137a", "Mustache": "#724b3b", "NCL": "#28431f", + "NMODL": "#00356B", "NPM Config": "#cb3837", "NWScript": "#111522", "Nasal": "#1d2c4e", @@ -318,7 +347,12 @@ "Nu": "#c9df40", "NumPy": "#9C8AF9", "Nunjucks": "#3d8137", - "OCaml": "#3be133", + "Nushell": "#4E9906", + "OASv2-json": "#85ea2d", + "OASv2-yaml": "#85ea2d", + "OASv3-json": "#85ea2d", + "OASv3-yaml": "#85ea2d", + "OCaml": "#ef7a08", "ObjectScript": "#424893", "Objective-C": "#438eff", "Objective-C++": "#6866fb", @@ -327,19 +361,24 @@ "Omgrofl": "#cabbff", "Opal": "#f7ede0", "Open Policy Agent": "#7d9199", + "OpenAPI Specification v2": "#85ea2d", + "OpenAPI Specification v3": "#85ea2d", "OpenCL": "#ed2e2d", "OpenEdge ABL": "#5ce600", "OpenQASM": "#AA70FF", "OpenSCAD": "#e5cd45", + "Option List": "#476732", "Org": "#77aa99", "Oxygene": "#cdd0e3", "Oz": "#fab738", "P4": "#7055b5", + "PDDL": "#0d00ff", "PEG.js": "#234d6b", "PHP": "#4F5D95", "PLSQL": "#dad8d8", "PLpgSQL": "#336790", "POV-Ray SDL": "#6bac65", + "Pact": "#F7A8B8", "Pan": "#cc0000", "Papyrus": "#6600cc", "Parrot": "#f3ca0a", @@ -350,12 +389,17 @@ "PicoLisp": "#6067af", "PigLatin": "#fcd7de", "Pike": "#005390", + "Pip Requirements": "#FFD343", + "Pkl": "#6b9543", + "PlantUML": "#fbbd16", "PogoScript": "#d80074", + "Polar": "#ae81ff", "Portugol": "#f8bd00", "PostCSS": "#dc3a0c", "PostScript": "#da291c", "PowerBuilder": "#8f0f8d", "PowerShell": "#012456", + "Praat": "#c8506d", "Prisma": "#0c344b", "Processing": "#0096D8", "Procfile": "#3B2F63", @@ -366,6 +410,7 @@ "Puppet": "#302B6D", "PureBasic": "#5a6986", "PureScript": "#1D222D", + "Pyret": "#ee1e10", "Python": "#3572A5", "Python console": "#3572A5", "Python traceback": "#3572A5", @@ -375,9 +420,11 @@ "Quake": "#882233", "R": "#198CE7", "RAML": "#77d9fb", + "RBS": "#701516", "RDoc": "#701516", "REXX": "#d90e09", "RMarkdown": "#198ce7", + "RON": "#a62c00", "RPGLE": "#2BDE21", "RUNOFF": "#665a4e", "Racket": "#3c5caa", @@ -392,9 +439,11 @@ "Red": "#f50000", "Regular Expression": "#009a00", "Ren'Py": "#ff7f7f", + "Rez": "#FFDAB3", "Ring": "#2D54CB", "Riot": "#A71E49", "RobotFramework": "#00c0b5", + "Roc": "#7c38f5", "Roff": "#ecdebe", "Roff Manpage": "#ecdebe", "Rouge": "#cc0088", @@ -414,6 +463,7 @@ "Sass": "#a53b70", "Scala": "#c22d40", "Scaml": "#bd181a", + "Scenic": "#fdc700", "Scheme": "#1e4aec", "Scilab": "#ca0f21", "Self": "#0579aa", @@ -421,13 +471,17 @@ "Shell": "#89e051", "ShellCheck Config": "#cecfcb", "Shen": "#120F14", + "Simple File Verification": "#C9BFED", "Singularity": "#64E6AD", "Slash": "#007eff", "Slice": "#003fa2", "Slim": "#2b2b2b", + "Slint": "#2379F4", "SmPL": "#c94949", "Smalltalk": "#596706", "Smarty": "#f0c040", + "Smithy": "#c44536", + "Snakemake": "#419179", "Solidity": "#AA6746", "SourcePawn": "#f69e1d", "Squirrel": "#800000", @@ -441,9 +495,12 @@ "SugarSS": "#2fcc9f", "SuperCollider": "#46390b", "Svelte": "#ff3e00", + "Sway": "#00F58C", + "Sweave": "#198ce7", "Swift": "#F05138", "SystemVerilog": "#DAE1C2", "TI Program": "#A0AA87", + "TL-Verilog": "#C40023", "TLA": "#4b0079", "TOML": "#9c4221", "TSQL": "#e38c00", @@ -454,12 +511,16 @@ "Tcl": "#e4cc98", "TeX": "#3D6117", "Terra": "#00004c", + "Terraform Template": "#7b42bb", + "TextGrid": "#c8506d", "TextMate Properties": "#df66e4", "Textile": "#ffe7ac", "Thrift": "#D12127", + "Toit": "#c2c9fb", "Turing": "#cf142b", "Twig": "#c1d026", "TypeScript": "#3178c6", + "Typst": "#239dad", "Unified Parallel C": "#4e3617", "Unity3D Asset": "#222c37", "Uno": "#9933cc", @@ -478,11 +539,15 @@ "Vim Script": "#199f4b", "Vim Snippet": "#199f4b", "Visual Basic .NET": "#945db7", + "Visual Basic 6.0": "#2c6353", "Volt": "#1F1F1F", "Vue": "#41b883", "Vyper": "#2980b9", + "WDL": "#42f1f4", + "WGSL": "#1a5e9a", "Web Ontology Language": "#5b70bd", "WebAssembly": "#04133b", + "WebAssembly Interface Type": "#6250e7", "Whiley": "#d5c397", "Wikitext": "#fc5757", "Windows Registry Entries": "#52d5ff", @@ -510,6 +575,7 @@ "Zephir": "#118f9e", "Zig": "#ec915c", "Zimpl": "#d67711", + "crontab": "#ead7ac", "eC": "#913960", "fish": "#4aae47", "hoon": "#00b171", @@ -524,7 +590,7 @@ "q": "#0040cd", "reStructuredText": "#141414", "sed": "#64b970", - "wdl": "#42f1f4", + "templ": "#66D0DD", "wisp": "#7582D1", "xBase": "#403a40" } \ No newline at end of file diff --git a/src/common/retryer.js b/src/common/retryer.js index e54eedbec6dd5..3f294d3751327 100644 --- a/src/common/retryer.js +++ b/src/common/retryer.js @@ -1,23 +1,35 @@ import { CustomError, logger } from "./utils.js"; // Script variables. + +// Count the number of GitHub API tokens available. const PATs = Object.keys(process.env).filter((key) => /PAT_\d*$/.exec(key), ).length; -const RETRIES = PATs ? PATs : 7; +const RETRIES = process.env.NODE_ENV === "test" ? 7 : PATs; + +/** + * @typedef {import("axios").AxiosResponse} AxiosResponse Axios response. + * @typedef {(variables: object, token: string) => Promise} FetcherFunction Fetcher function. + */ /** * Try to execute the fetcher function until it succeeds or the max number of retries is reached. * - * @param {object[]} retryerParams Object that contains the createTextNode parameters. - * @param {object[]} retryerParams.fetcher The fetcher function. - * @param {object[]} retryerParams.variables Object with arguments to pass to the fetcher function. - * @param {number} retryerParams.retries How many times to retry. - * @returns Promise + * @param {FetcherFunction} fetcher The fetcher function. + * @param {object} variables Object with arguments to pass to the fetcher function. + * @param {number} retries How many times to retry. + * @returns {Promise} The response from the fetcher function. */ const retryer = async (fetcher, variables, retries = 0) => { + if (!RETRIES) { + throw new CustomError("No GitHub API tokens found", CustomError.NO_TOKENS); + } if (retries > RETRIES) { - throw new CustomError("Maximum retries exceeded", CustomError.MAX_RETRY); + throw new CustomError( + "Downtime due to GitHub API rate limiting", + CustomError.MAX_RETRY, + ); } try { // try to fetch with the first token since RETRIES is 0 index i'm adding +1 @@ -45,8 +57,11 @@ const retryer = async (fetcher, variables, retries = 0) => { // prettier-ignore // also checking for bad credentials if any tokens gets invalidated const isBadCredential = err.response.data && err.response.data.message === "Bad credentials"; + const isAccountSuspended = + err.response.data && + err.response.data.message === "Sorry. Your account was suspended."; - if (isBadCredential) { + if (isBadCredential || isAccountSuspended) { logger.log(`PAT_${retries + 1} Failed`); retries++; // directly return from the function @@ -57,5 +72,5 @@ const retryer = async (fetcher, variables, retries = 0) => { } }; -export { retryer }; +export { retryer, RETRIES }; export default retryer; diff --git a/src/common/utils.js b/src/common/utils.js index 1215fc9ac8cc2..48ea051783b7f 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -4,50 +4,109 @@ import toEmoji from "emoji-name-map"; import wrap from "word-wrap"; import { themes } from "../../themes/index.js"; -// Script parameters. -const ERROR_CARD_LENGTH = 576.5; +const TRY_AGAIN_LATER = "Please try again later"; + +const SECONDARY_ERROR_MESSAGES = { + MAX_RETRY: + "You can deploy own instance or wait until public will be no longer limited", + NO_TOKENS: + "Please add an env variable called PAT_1 with your GitHub API token in vercel", + USER_NOT_FOUND: "Make sure the provided username is not an organization", + GRAPHQL_ERROR: TRY_AGAIN_LATER, + GITHUB_REST_API_ERROR: TRY_AGAIN_LATER, + WAKATIME_USER_NOT_FOUND: "Make sure you have a public WakaTime profile", +}; /** - * Renders error message on the card. + * Custom error class to handle custom GRS errors. + */ +class CustomError extends Error { + /** + * @param {string} message Error message. + * @param {string} type Error type. + */ + constructor(message, type) { + super(message); + this.type = type; + this.secondaryMessage = SECONDARY_ERROR_MESSAGES[type] || type; + } + + static MAX_RETRY = "MAX_RETRY"; + static NO_TOKENS = "NO_TOKENS"; + static USER_NOT_FOUND = "USER_NOT_FOUND"; + static GRAPHQL_ERROR = "GRAPHQL_ERROR"; + static GITHUB_REST_API_ERROR = "GITHUB_REST_API_ERROR"; + static WAKATIME_ERROR = "WAKATIME_ERROR"; +} + +/** + * Auto layout utility, allows us to layout things vertically or horizontally with + * proper gaping. * - * @param {string} message Main error message. - * @param {string} secondaryMessage The secondary error message. - * @returns {string} The SVG markup. + * @param {object} props Function properties. + * @param {string[]} props.items Array of items to layout. + * @param {number} props.gap Gap between items. + * @param {"column" | "row"=} props.direction Direction to layout items. + * @param {number[]=} props.sizes Array of sizes for each item. + * @returns {string[]} Array of items with proper layout. */ -const renderError = (message, secondaryMessage = "") => { - return ` - - - - Something went wrong! file an issue at https://tiny.one/readme-stats - - ${encodeHTML(message)} - ${secondaryMessage} - - - `; +const flexLayout = ({ items, gap, direction, sizes = [] }) => { + let lastSize = 0; + // filter() for filtering out empty strings + return items.filter(Boolean).map((item, i) => { + const size = sizes[i] || 0; + let transform = `translate(${lastSize}, 0)`; + if (direction === "column") { + transform = `translate(0, ${lastSize})`; + } + lastSize += size + gap; + return `${item}`; + }); }; /** - * Encode string as HTML. + * Creates a node to display the primary programming language of the repository/gist. * - * @see https://stackoverflow.com/a/48073476/10629172 + * @param {string} langName Language name. + * @param {string} langColor Language color. + * @returns {string} Language display SVG object. + */ +const createLanguageNode = (langName, langColor) => { + return ` + + + ${langName} + + `; +}; + +/** + * Creates an icon with label to display repository/gist stats like forks, stars, etc. * - * @param {string} str String to encode. - * @returns {string} Encoded string. + * @param {string} icon The icon to display. + * @param {number|string} label The label to display. + * @param {string} testid The testid to assign to the label. + * @param {number} iconSize The size of the icon. + * @returns {string} Icon with label SVG object. */ -const encodeHTML = (str) => { - return str - .replace(/[\u00A0-\u9999<>&](?!#)/gim, (i) => { - return "&#" + i.charCodeAt(0) + ";"; - }) - .replace(/\u0008/gim, ""); +const iconWithLabel = (icon, label, testid, iconSize) => { + if (typeof label === "number" && label <= 0) { + return ""; + } + const iconSvg = ` + + ${icon} + + `; + const text = `${label}`; + return flexLayout({ items: [iconSvg, text], gap: 20 }).join(""); }; /** @@ -81,7 +140,9 @@ const isValidHexColor = (hexColor) => { * @returns {boolean | undefined } The parsed value. */ const parseBoolean = (value) => { - if (typeof value === "boolean") return value; + if (typeof value === "boolean") { + return value; + } if (typeof value === "string") { if (value.toLowerCase() === "true") { @@ -100,7 +161,9 @@ const parseBoolean = (value) => { * @returns {string[]} The array of strings. */ const parseArray = (str) => { - if (!str) return []; + if (!str) { + return []; + } return str.split(","); }; @@ -110,11 +173,13 @@ const parseArray = (str) => { * @param {number} number The number to clamp. * @param {number} min The minimum value. * @param {number} max The maximum value. - * returns {number} The clamped number. + * @returns {number} The clamped number. */ const clampValue = (number, min, max) => { // @ts-ignore - if (Number.isNaN(parseInt(number))) return min; + if (Number.isNaN(parseInt(number, 10))) { + return min; + } return Math.max(min, Math.min(number, max)); }; @@ -125,14 +190,17 @@ const clampValue = (number, min, max) => { * @returns {boolean} True if the given string is a valid gradient. */ const isValidGradient = (colors) => { - return isValidHexColor(colors[1]) && isValidHexColor(colors[2]); + return ( + colors.length > 2 && + colors.slice(1).every((color) => isValidHexColor(color)) + ); }; /** * Retrieves a gradient if color has more than one valid hex codes else a single color. * * @param {string} color The color to parse. - * @param {string} fallbackColor The fallback color. + * @param {string | string[]} fallbackColor The fallback color. * @returns {string | string[]} The gradient or color. */ const fallbackColor = (color, fallbackColor) => { @@ -149,15 +217,19 @@ const fallbackColor = (color, fallbackColor) => { ); }; +/** + * @typedef {import('axios').AxiosRequestConfig['data']} AxiosRequestConfigData Axios request data. + * @typedef {import('axios').AxiosRequestConfig['headers']} AxiosRequestConfigHeaders Axios request headers. + */ + /** * Send GraphQL request to GitHub API. * - * @param {import('axios').AxiosRequestConfig['data']} data Request data. - * @param {import('axios').AxiosRequestConfig['headers']} headers Request headers. + * @param {AxiosRequestConfigData} data Request data. + * @param {AxiosRequestConfigHeaders} headers Request headers. * @returns {Promise} Request response. */ const request = (data, headers) => { - // @ts-ignore return axios({ url: "https://api.github.com/graphql", method: "post", @@ -167,42 +239,30 @@ const request = (data, headers) => { }; /** - * Auto layout utility, allows us to layout things vertically or horizontally with - * proper gaping. - * - * @param {object} props Function properties. - * @param {string[]} props.items Array of items to layout. - * @param {number} props.gap Gap between items. - * @param {number[]?=} props.sizes Array of sizes for each item. - * @param {"column" | "row"?=} props.direction Direction to layout items. - * @returns {string[]} Array of items with proper layout. + * Object containing card colors. + * @typedef {{ + * titleColor: string; + * iconColor: string; + * textColor: string; + * bgColor: string | string[]; + * borderColor: string; + * ringColor: string; + * }} CardColors */ -const flexLayout = ({ items, gap, direction, sizes = [] }) => { - let lastSize = 0; - // filter() for filtering out empty strings - return items.filter(Boolean).map((item, i) => { - const size = sizes[i] || 0; - let transform = `translate(${lastSize}, 0)`; - if (direction === "column") { - transform = `translate(0, ${lastSize})`; - } - lastSize += size + gap; - return `${item}`; - }); -}; /** * Returns theme based colors with proper overrides and defaults. * - * @param {Object[]} args Function arguments. - * @param {string} args.title_color Card title color. - * @param {string} args.text_color Card text color. - * @param {string} args.icon_color Card icon color. - * @param {string} args.bg_color Card background color. - * @param {string} args.border_color Card border color. - * @param {string} args.theme Card theme. - * @param {string} args.fallbackTheme Fallback theme. - * + * @param {Object} args Function arguments. + * @param {string=} args.title_color Card title color. + * @param {string=} args.text_color Card text color. + * @param {string=} args.icon_color Card icon color. + * @param {string=} args.bg_color Card background color. + * @param {string=} args.border_color Card border color. + * @param {string=} args.ring_color Card ring color. + * @param {string=} args.theme Card theme. + * @param {string=} args.fallbackTheme Fallback theme. + * @returns {CardColors} Card colors. */ const getCardColors = ({ title_color, @@ -250,9 +310,96 @@ const getCardColors = ({ "#" + defaultBorderColor, ); + if ( + typeof titleColor !== "string" || + typeof textColor !== "string" || + typeof ringColor !== "string" || + typeof iconColor !== "string" || + typeof borderColor !== "string" + ) { + throw new Error( + "Unexpected behavior, all colors except background should be string.", + ); + } + return { titleColor, iconColor, textColor, bgColor, borderColor, ringColor }; }; +// Script parameters. +const ERROR_CARD_LENGTH = 576.5; + +/** + * Encode string as HTML. + * + * @see https://stackoverflow.com/a/48073476/10629172 + * + * @param {string} str String to encode. + * @returns {string} Encoded string. + */ +const encodeHTML = (str) => { + return str + .replace(/[\u00A0-\u9999<>&](?!#)/gim, (i) => { + return "&#" + i.charCodeAt(0) + ";"; + }) + .replace(/\u0008/gim, ""); +}; + +const UPSTREAM_API_ERRORS = [ + TRY_AGAIN_LATER, + SECONDARY_ERROR_MESSAGES.MAX_RETRY, +]; + +/** + * Renders error message on the card. + * + * @param {string} message Main error message. + * @param {string} secondaryMessage The secondary error message. + * @param {object} options Function options. + * @returns {string} The SVG markup. + */ +const renderError = (message, secondaryMessage = "", options = {}) => { + const { + title_color, + text_color, + bg_color, + border_color, + theme = "default", + } = options; + + // returns theme based colors with proper overrides and defaults + const { titleColor, textColor, bgColor, borderColor } = getCardColors({ + title_color, + text_color, + icon_color: "", + bg_color, + border_color, + ring_color: "", + theme, + }); + + return ` + + + + Something went wrong!${ + UPSTREAM_API_ERRORS.includes(secondaryMessage) + ? "" + : " file an issue at https://tiny.one/readme-stats" + } + + ${encodeHTML(message)} + ${secondaryMessage} + + + `; +}; + /** * Split text over multiple lines based on the card width. * @@ -291,48 +438,43 @@ const wrapTextMultiline = (text, width = 59, maxLines = 3) => { const noop = () => {}; // return console instance based on the environment const logger = - process.env.NODE_ENV !== "test" ? console : { log: noop, error: noop }; + process.env.NODE_ENV === "test" ? { log: noop, error: noop } : console; + +const ONE_MINUTE = 60; +const FIVE_MINUTES = 300; +const TEN_MINUTES = 600; +const FIFTEEN_MINUTES = 900; +const THIRTY_MINUTES = 1800; +const TWO_HOURS = 7200; +const FOUR_HOURS = 14400; +const SIX_HOURS = 21600; +const EIGHT_HOURS = 28800; +const ONE_DAY = 86400; const CONSTANTS = { - THIRTY_MINUTES: 1800, - TWO_HOURS: 7200, - FOUR_HOURS: 14400, - ONE_DAY: 86400, -}; - -const SECONDARY_ERROR_MESSAGES = { - MAX_RETRY: - "Please add an env variable called PAT_1 with your github token in vercel", - USER_NOT_FOUND: "Make sure the provided username is not an organization", - GRAPHQL_ERROR: "Please try again later", + ONE_MINUTE, + FIVE_MINUTES, + TEN_MINUTES, + FIFTEEN_MINUTES, + THIRTY_MINUTES, + TWO_HOURS, + FOUR_HOURS, + SIX_HOURS, + EIGHT_HOURS, + ONE_DAY, + CARD_CACHE_SECONDS: SIX_HOURS, + ERROR_CACHE_SECONDS: TEN_MINUTES, }; -/** - * Custom error class to handle custom GRS errors. - */ -class CustomError extends Error { - /** - * @param {string} message Error message. - * @param {string} type Error type. - */ - constructor(message, type) { - super(message); - this.type = type; - this.secondaryMessage = SECONDARY_ERROR_MESSAGES[type] || type; - } - - static MAX_RETRY = "MAX_RETRY"; - static USER_NOT_FOUND = "USER_NOT_FOUND"; - static GRAPHQL_ERROR = "GRAPHQL_ERROR"; -} - /** * Missing query parameter class. */ class MissingParamError extends Error { /** - * @param {string[]} missedParams - * @param {string?=} secondaryMessage + * Missing query parameter error constructor. + * + * @param {string[]} missedParams An array of missing parameters names. + * @param {string=} secondaryMessage Optional secondary message to display. */ constructor(missedParams, secondaryMessage) { const msg = `Missing params ${missedParams @@ -386,13 +528,18 @@ const measureText = (str, fontSize = 10) => { ); }; -/** @param {string} name */ +/** + * Lowercase and trim string. + * + * @param {string} name String to lowercase and trim. + * @returns {string} Lowercased and trimmed string. + */ const lowercaseTrim = (name) => name.toLowerCase().trim(); /** * Split array of languages in two columns. * - * @template T Langauge object. + * @template T Language object. * @param {Array} arr Array of languages. * @param {number} perChunk Number of languages per column. * @returns {Array} Array of languages split in two columns. @@ -402,9 +549,11 @@ const chunkArray = (arr, perChunk) => { const chunkIndex = Math.floor(index / perChunk); if (!resultArray[chunkIndex]) { + // @ts-ignore resultArray[chunkIndex] = []; // start a new chunk } + // @ts-ignore resultArray[chunkIndex].push(item); return resultArray; @@ -418,15 +567,33 @@ const chunkArray = (arr, perChunk) => { * @returns {string} String with emoji parsed. */ const parseEmojis = (str) => { - if (!str) throw new Error("[parseEmoji]: str argument not provided"); + if (!str) { + throw new Error("[parseEmoji]: str argument not provided"); + } return str.replace(/:\w+:/gm, (emoji) => { return toEmoji.get(emoji) || ""; }); }; +/** + * Get diff in minutes between two dates. + * + * @param {Date} d1 First date. + * @param {Date} d2 Second date. + * @returns {number} Number of minutes between the two dates. + */ +const dateDiff = (d1, d2) => { + const date1 = new Date(d1); + const date2 = new Date(d2); + const diff = date1.getTime() - date2.getTime(); + return Math.round(diff / (1000 * 60)); +}; + export { ERROR_CARD_LENGTH, renderError, + createLanguageNode, + iconWithLabel, encodeHTML, kFormatter, isValidHexColor, @@ -447,4 +614,5 @@ export { lowercaseTrim, chunkArray, parseEmojis, + dateDiff, }; diff --git a/src/fetchers/gist-fetcher.js b/src/fetchers/gist-fetcher.js new file mode 100644 index 0000000000000..4e0e0f5e7e4f2 --- /dev/null +++ b/src/fetchers/gist-fetcher.js @@ -0,0 +1,114 @@ +// @ts-check + +import { request, MissingParamError } from "../common/utils.js"; +import { retryer } from "../common/retryer.js"; + +/** + * @typedef {import('axios').AxiosRequestHeaders} AxiosRequestHeaders Axios request headers. + * @typedef {import('axios').AxiosResponse} AxiosResponse Axios response. + */ + +const QUERY = ` +query gistInfo($gistName: String!) { + viewer { + gist(name: $gistName) { + description + owner { + login + } + stargazerCount + forks { + totalCount + } + files { + name + language { + name + } + size + } + } + } +} +`; + +/** + * Gist data fetcher. + * + * @param {AxiosRequestHeaders} variables Fetcher variables. + * @param {string} token GitHub token. + * @returns {Promise} The response. + */ +const fetcher = async (variables, token) => { + return await request( + { query: QUERY, variables }, + { Authorization: `token ${token}` }, + ); +}; + +/** + * @typedef {{ name: string; language: { name: string; }, size: number }} GistFile Gist file. + */ + +/** + * This function calculates the primary language of a gist by files size. + * + * @param {GistFile[]} files Files. + * @returns {string} Primary language. + */ +const calculatePrimaryLanguage = (files) => { + const languages = {}; + for (const file of files) { + if (file.language) { + if (languages[file.language.name]) { + languages[file.language.name] += file.size; + } else { + languages[file.language.name] = file.size; + } + } + } + let primaryLanguage = Object.keys(languages)[0]; + for (const language in languages) { + if (languages[language] > languages[primaryLanguage]) { + primaryLanguage = language; + } + } + return primaryLanguage; +}; + +/** + * @typedef {import('./types').GistData} GistData Gist data. + */ + +/** + * Fetch GitHub gist information by given username and ID. + * + * @param {string} id Github gist ID. + * @returns {Promise} Gist data. + */ +const fetchGist = async (id) => { + if (!id) { + throw new MissingParamError(["id"], "/api/gist?id=GIST_ID"); + } + const res = await retryer(fetcher, { gistName: id }); + if (res.data.errors) { + throw new Error(res.data.errors[0].message); + } + if (!res.data.data.viewer.gist) { + throw new Error("Gist not found"); + } + const data = res.data.data.viewer.gist; + return { + name: data.files[Object.keys(data.files)[0]].name, + nameWithOwner: `${data.owner.login}/${ + data.files[Object.keys(data.files)[0]].name + }`, + description: data.description, + language: calculatePrimaryLanguage(data.files), + starsCount: data.stargazerCount, + forksCount: data.forks.totalCount, + }; +}; + +export { fetchGist }; +export default fetchGist; diff --git a/src/fetchers/repo-fetcher.js b/src/fetchers/repo-fetcher.js index ff7a2be8164cc..6438f8895cfb6 100644 --- a/src/fetchers/repo-fetcher.js +++ b/src/fetchers/repo-fetcher.js @@ -2,12 +2,17 @@ import { retryer } from "../common/retryer.js"; import { MissingParamError, request } from "../common/utils.js"; +/** + * @typedef {import('axios').AxiosRequestHeaders} AxiosRequestHeaders Axios request headers. + * @typedef {import('axios').AxiosResponse} AxiosResponse Axios response. + */ + /** * Repo data fetcher. * - * @param {import('Axios').AxiosRequestHeaders} variables Fetcher variables. + * @param {AxiosRequestHeaders} variables Fetcher variables. * @param {string} token GitHub token. - * @returns {Promise} The response. + * @returns {Promise} The response. */ const fetcher = (variables, token) => { return request( @@ -53,19 +58,27 @@ const fetcher = (variables, token) => { const urlExample = "/api/pin?username=USERNAME&repo=REPO_NAME"; +/** + * @typedef {import("./types").RepositoryData} RepositoryData Repository data. + */ + /** * Fetch repository data. * * @param {string} username GitHub username. * @param {string} reponame GitHub repository name. - * @returns {Promise} Repository data. + * @returns {Promise} Repository data. */ const fetchRepo = async (username, reponame) => { if (!username && !reponame) { throw new MissingParamError(["username", "repo"], urlExample); } - if (!username) throw new MissingParamError(["username"], urlExample); - if (!reponame) throw new MissingParamError(["repo"], urlExample); + if (!username) { + throw new MissingParamError(["username"], urlExample); + } + if (!reponame) { + throw new MissingParamError(["repo"], urlExample); + } let res = await retryer(fetcher, { login: username, repo: reponame }); @@ -100,6 +113,8 @@ const fetchRepo = async (username, reponame) => { starCount: data.organization.repository.stargazers.totalCount, }; } + + throw new Error("Unexpected behavior"); }; export { fetchRepo }; diff --git a/src/fetchers/stats-fetcher.js b/src/fetchers/stats-fetcher.js index 7f6cb9e5e95b4..115cd50a51564 100644 --- a/src/fetchers/stats-fetcher.js +++ b/src/fetchers/stats-fetcher.js @@ -1,5 +1,6 @@ // @ts-check import axios from "axios"; +import * as dotenv from "dotenv"; import githubUsernameRegex from "github-username-regex"; import { calculateRank } from "../calculateRank.js"; import { retryer } from "../common/retryer.js"; @@ -11,46 +12,87 @@ import { wrapTextMultiline, } from "../common/utils.js"; +dotenv.config(); + +// GraphQL queries. +const GRAPHQL_REPOS_FIELD = ` + repositories(first: 100, ownerAffiliations: OWNER, orderBy: {direction: DESC, field: STARGAZERS}, after: $after) { + totalCount + nodes { + name + stargazers { + totalCount + } + } + pageInfo { + hasNextPage + endCursor + } + } +`; + +const GRAPHQL_REPOS_QUERY = ` + query userInfo($login: String!, $after: String) { + user(login: $login) { + ${GRAPHQL_REPOS_FIELD} + } + } +`; + +const GRAPHQL_STATS_QUERY = ` + query userInfo($login: String!, $after: String, $includeMergedPullRequests: Boolean!, $includeDiscussions: Boolean!, $includeDiscussionsAnswers: Boolean!) { + user(login: $login) { + name + login + contributionsCollection { + totalCommitContributions, + totalPullRequestReviewContributions + } + repositoriesContributedTo(first: 1, contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]) { + totalCount + } + pullRequests(first: 1) { + totalCount + } + mergedPullRequests: pullRequests(states: MERGED) @include(if: $includeMergedPullRequests) { + totalCount + } + openIssues: issues(states: OPEN) { + totalCount + } + closedIssues: issues(states: CLOSED) { + totalCount + } + followers { + totalCount + } + repositoryDiscussions @include(if: $includeDiscussions) { + totalCount + } + repositoryDiscussionComments(onlyAnswers: true) @include(if: $includeDiscussionsAnswers) { + totalCount + } + ${GRAPHQL_REPOS_FIELD} + } + } +`; + +/** + * @typedef {import('axios').AxiosResponse} AxiosResponse Axios response. + */ + /** * Stats fetcher object. * - * @param {import('axios').AxiosRequestHeaders} variables Fetcher variables. + * @param {object} variables Fetcher variables. * @param {string} token GitHub token. - * @returns {Promise} Stats fetcher response. + * @returns {Promise} Axios response. */ const fetcher = (variables, token) => { + const query = variables.after ? GRAPHQL_REPOS_QUERY : GRAPHQL_STATS_QUERY; return request( { - query: ` - query userInfo($login: String!) { - user(login: $login) { - name - login - contributionsCollection { - totalCommitContributions - restrictedContributionsCount - } - repositoriesContributedTo(contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]) { - totalCount - } - pullRequests { - totalCount - } - openIssues: issues(states: OPEN) { - totalCount - } - closedIssues: issues(states: CLOSED) { - totalCount - } - followers { - totalCount - } - repositories(ownerAffiliations: OWNER) { - totalCount - } - } - } - `, + query, variables, }, { @@ -60,45 +102,66 @@ const fetcher = (variables, token) => { }; /** - * Fetch first 100 repositories for a given username. + * Fetch stats information for a given username. * - * @param {import('axios').AxiosRequestHeaders} variables Fetcher variables. - * @param {string} token GitHub token. - * @returns {Promise} Repositories fetcher response. + * @param {object} variables Fetcher variables. + * @param {string} variables.username Github username. + * @param {boolean} variables.includeMergedPullRequests Include merged pull requests. + * @param {boolean} variables.includeDiscussions Include discussions. + * @param {boolean} variables.includeDiscussionsAnswers Include discussions answers. + * @returns {Promise} Axios response. + * + * @description This function supports multi-page fetching if the 'FETCH_MULTI_PAGE_STARS' environment variable is set to true. */ -const repositoriesFetcher = (variables, token) => { - return request( - { - query: ` - query userInfo($login: String!, $after: String) { - user(login: $login) { - repositories(first: 100, ownerAffiliations: OWNER, orderBy: {direction: DESC, field: STARGAZERS}, after: $after) { - nodes { - name - stargazers { - totalCount - } - } - pageInfo { - hasNextPage - endCursor - } - } - } - } - `, - variables, - }, - { - Authorization: `bearer ${token}`, - }, - ); +const statsFetcher = async ({ + username, + includeMergedPullRequests, + includeDiscussions, + includeDiscussionsAnswers, +}) => { + let stats; + let hasNextPage = true; + let endCursor = null; + while (hasNextPage) { + const variables = { + login: username, + first: 100, + after: endCursor, + includeMergedPullRequests, + includeDiscussions, + includeDiscussionsAnswers, + }; + let res = await retryer(fetcher, variables); + if (res.data.errors) { + return res; + } + + // Store stats data. + const repoNodes = res.data.data.user.repositories.nodes; + if (stats) { + stats.data.data.user.repositories.nodes.push(...repoNodes); + } else { + stats = res; + } + + // Disable multi page fetching on public Vercel instance due to rate limits. + const repoNodesWithStars = repoNodes.filter( + (node) => node.stargazers.totalCount !== 0, + ); + hasNextPage = + process.env.FETCH_MULTI_PAGE_STARS === "true" && + repoNodes.length === repoNodesWithStars.length && + res.data.data.user.repositories.pageInfo.hasNextPage; + endCursor = res.data.data.user.repositories.pageInfo.endCursor; + } + + return stats; }; /** * Fetch all the commits for all the repositories of a given username. * - * @param {*} username GitHub username. + * @param {string} username GitHub username. * @returns {Promise} Total commits. * * @description Done like this because the GitHub API does not provide a way to fetch all the commits. See @@ -106,8 +169,8 @@ const repositoriesFetcher = (variables, token) => { */ const totalCommitsFetcher = async (username) => { if (!githubUsernameRegex.test(username)) { - logger.log("Invalid username"); - return 0; + logger.log("Invalid username provided."); + throw new Error("Invalid username provided."); } // https://developer.github.com/v3/search/#search-commits @@ -123,87 +186,72 @@ const totalCommitsFetcher = async (username) => { }); }; + let res; try { - let res = await retryer(fetchTotalCommits, { login: username }); - let total_count = res.data.total_count; - if (!!total_count && !isNaN(total_count)) { - return res.data.total_count; - } + res = await retryer(fetchTotalCommits, { login: username }); } catch (err) { logger.log(err); + throw new Error(err); } - // just return 0 if there is something wrong so that - // we don't break the whole app - return 0; -}; -/** - * Fetch all the stars for all the repositories of a given username. - * - * @param {string} username GitHub username. - * @param {array} repoToHide Repositories to hide. - * @returns {Promise} Total stars. - */ -const totalStarsFetcher = async (username, repoToHide) => { - let nodes = []; - let hasNextPage = true; - let endCursor = null; - while (hasNextPage) { - const variables = { login: username, first: 100, after: endCursor }; - let res = await retryer(repositoriesFetcher, variables); - - if (res.data.errors) { - logger.error(res.data.errors); - throw new CustomError( - res.data.errors[0].message || "Could not fetch user", - CustomError.USER_NOT_FOUND, - ); - } - - const allNodes = res.data.data.user.repositories.nodes; - const nodesWithStars = allNodes.filter( - (node) => node.stargazers.totalCount !== 0, + const totalCount = res.data.total_count; + if (!totalCount || isNaN(totalCount)) { + throw new CustomError( + "Could not fetch total commits.", + CustomError.GITHUB_REST_API_ERROR, ); - nodes.push(...nodesWithStars); - // hasNextPage = - // allNodes.length === nodesWithStars.length && - // res.data.data.user.repositories.pageInfo.hasNextPage; - hasNextPage = false; // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - endCursor = res.data.data.user.repositories.pageInfo.endCursor; } - - return nodes - .filter((data) => !repoToHide[data.name]) - .reduce((prev, curr) => prev + curr.stargazers.totalCount, 0); + return totalCount; }; +/** + * @typedef {import("./types").StatsData} StatsData Stats data. + */ + /** * Fetch stats for a given username. * * @param {string} username GitHub username. - * @param {boolean} count_private Include private contributions. * @param {boolean} include_all_commits Include all commits. - * @returns {Promise} Stats data. + * @param {string[]} exclude_repo Repositories to exclude. + * @param {boolean} include_merged_pull_requests Include merged pull requests. + * @param {boolean} include_discussions Include discussions. + * @param {boolean} include_discussions_answers Include discussions answers. + * @returns {Promise} Stats data. */ const fetchStats = async ( username, - count_private = false, include_all_commits = false, exclude_repo = [], + include_merged_pull_requests = false, + include_discussions = false, + include_discussions_answers = false, ) => { - if (!username) throw new MissingParamError(["username"]); + if (!username) { + throw new MissingParamError(["username"]); + } const stats = { name: "", totalPRs: 0, + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 0, totalCommits: 0, totalIssues: 0, totalStars: 0, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, contributedTo: 0, - rank: { level: "C", score: 0 }, + rank: { level: "C", percentile: 100 }, }; - let res = await retryer(fetcher, { login: username }); + let res = await statsFetcher({ + username, + includeMergedPullRequests: include_merged_pull_requests, + includeDiscussions: include_discussions, + includeDiscussionsAnswers: include_discussions_answers, + }); // Catch GraphQL errors. if (res.data.errors) { @@ -221,54 +269,60 @@ const fetchStats = async ( ); } throw new CustomError( - "Something went while trying to retrieve the stats data using the GraphQL API.", + "Something went wrong while trying to retrieve the stats data using the GraphQL API.", CustomError.GRAPHQL_ERROR, ); } const user = res.data.data.user; - // populate repoToHide map for quick lookup - // while filtering out - let repoToHide = {}; - if (exclude_repo) { - exclude_repo.forEach((repoName) => { - repoToHide[repoName] = true; - }); - } - stats.name = user.name || user.login; - stats.totalIssues = user.openIssues.totalCount + user.closedIssues.totalCount; - - // normal commits - stats.totalCommits = user.contributionsCollection.totalCommitContributions; - // if include_all_commits then just get that, - // since totalCommitsFetcher already sends totalCommits no need to += + // if include_all_commits, fetch all commits using the REST API. if (include_all_commits) { stats.totalCommits = await totalCommitsFetcher(username); - } - - // if count_private then add private commits to totalCommits so far. - if (count_private) { - stats.totalCommits += - user.contributionsCollection.restrictedContributionsCount; + } else { + stats.totalCommits = user.contributionsCollection.totalCommitContributions; } stats.totalPRs = user.pullRequests.totalCount; + if (include_merged_pull_requests) { + stats.totalPRsMerged = user.mergedPullRequests.totalCount; + stats.mergedPRsPercentage = + (user.mergedPullRequests.totalCount / user.pullRequests.totalCount) * 100; + } + stats.totalReviews = + user.contributionsCollection.totalPullRequestReviewContributions; + stats.totalIssues = user.openIssues.totalCount + user.closedIssues.totalCount; + if (include_discussions) { + stats.totalDiscussionsStarted = user.repositoryDiscussions.totalCount; + } + if (include_discussions_answers) { + stats.totalDiscussionsAnswered = + user.repositoryDiscussionComments.totalCount; + } stats.contributedTo = user.repositoriesContributedTo.totalCount; - // Retrieve stars while filtering out repositories to be hidden - stats.totalStars = await totalStarsFetcher(username, repoToHide); + // Retrieve stars while filtering out repositories to be hidden. + let repoToHide = new Set(exclude_repo); + + stats.totalStars = user.repositories.nodes + .filter((data) => { + return !repoToHide.has(data.name); + }) + .reduce((prev, curr) => { + return prev + curr.stargazers.totalCount; + }, 0); stats.rank = calculateRank({ - totalCommits: stats.totalCommits, - totalRepos: user.repositories.totalCount, - followers: user.followers.totalCount, - contributions: stats.contributedTo, - stargazers: stats.totalStars, + all_commits: include_all_commits, + commits: stats.totalCommits, prs: stats.totalPRs, + reviews: stats.totalReviews, issues: stats.totalIssues, + repos: user.repositories.totalCount, + stars: stats.totalStars, + followers: user.followers.totalCount, }); return stats; diff --git a/src/fetchers/top-languages-fetcher.js b/src/fetchers/top-languages-fetcher.js index 86d794435be08..485cc8b75de8a 100644 --- a/src/fetchers/top-languages-fetcher.js +++ b/src/fetchers/top-languages-fetcher.js @@ -8,12 +8,17 @@ import { wrapTextMultiline, } from "../common/utils.js"; +/** + * @typedef {import("axios").AxiosRequestHeaders} AxiosRequestHeaders Axios request headers. + * @typedef {import("axios").AxiosResponse} AxiosResponse Axios response. + */ + /** * Top languages fetcher object. * - * @param {import('Axios').AxiosRequestHeaders} variables Fetcher variables. + * @param {AxiosRequestHeaders} variables Fetcher variables. * @param {string} token GitHub token. - * @returns {Promise} Languages fetcher response. + * @returns {Promise} Languages fetcher response. */ const fetcher = (variables, token) => { return request( @@ -47,24 +52,31 @@ const fetcher = (variables, token) => { ); }; +/** + * @typedef {import("./types").TopLangData} TopLangData Top languages data. + */ + /** * Fetch top languages for a given username. * * @param {string} username GitHub username. * @param {string[]} exclude_repo List of repositories to exclude. - * @returns {Promise} Top languages data. + * @param {number} size_weight Weightage to be given to size. + * @param {number} count_weight Weightage to be given to count. + * @returns {Promise} Top languages data. */ -const fetchTopLanguages = async (username, exclude_repo = []) => { - if (!username) throw new MissingParamError(["username"]); +const fetchTopLanguages = async ( + username, + exclude_repo = [], + size_weight = 1, + count_weight = 0, +) => { + if (!username) { + throw new MissingParamError(["username"]); + } const res = await retryer(fetcher, { login: username }); - if (res.data.errors) { - logger.error(res.data.errors); - throw Error(res.data.errors[0].message || "Could not fetch user"); - } - - // Catch GraphQL errors. if (res.data.errors) { logger.error(res.data.errors); if (res.data.errors[0].type === "NOT_FOUND") { @@ -80,7 +92,7 @@ const fetchTopLanguages = async (username, exclude_repo = []) => { ); } throw new CustomError( - "Something went while trying to retrieve the language data using the GraphQL API.", + "Something went wrong while trying to retrieve the language data using the GraphQL API.", CustomError.GRAPHQL_ERROR, ); } @@ -101,6 +113,8 @@ const fetchTopLanguages = async (username, exclude_repo = []) => { .sort((a, b) => b.size - a.size) .filter((name) => !repoToHide[name.name]); + let repoCount = 0; + repoNodes = repoNodes .filter((node) => node.languages.edges.length > 0) // flatten the list of language nodes @@ -111,9 +125,14 @@ const fetchTopLanguages = async (username, exclude_repo = []) => { // if we already have the language in the accumulator // & the current language name is same as previous name - // add the size to the language size. + // add the size to the language size and increase repoCount. if (acc[prev.node.name] && prev.node.name === acc[prev.node.name].name) { langSize = prev.size + acc[prev.node.name].size; + repoCount += 1; + } else { + // reset repoCount to 1 + // language must exist in at least one repo to be detected + repoCount = 1; } return { ...acc, @@ -121,10 +140,18 @@ const fetchTopLanguages = async (username, exclude_repo = []) => { name: prev.node.name, color: prev.node.color, size: langSize, + count: repoCount, }, }; }, {}); + Object.keys(repoNodes).forEach((name) => { + // comparison index calculation + repoNodes[name].size = + Math.pow(repoNodes[name].size, size_weight) * + Math.pow(repoNodes[name].count, count_weight); + }); + const topLangs = Object.keys(repoNodes) .sort((a, b) => repoNodes[b].size - repoNodes[a].size) .reduce((result, key) => { diff --git a/src/fetchers/types.d.ts b/src/fetchers/types.d.ts index 854e1315a04ac..affb407b816b0 100644 --- a/src/fetchers/types.d.ts +++ b/src/fetchers/types.d.ts @@ -1,3 +1,12 @@ +export type GistData = { + name: string; + nameWithOwner: string; + description: string | null; + language: string | null; + starsCount: number; + forksCount: number; +}; + export type RepositoryData = { name: string; nameWithOwner: string; @@ -18,11 +27,16 @@ export type RepositoryData = { export type StatsData = { name: string; totalPRs: number; + totalPRsMerged: number; + mergedPRsPercentage: number; + totalReviews: number; totalCommits: number; totalIssues: number; totalStars: number; + totalDiscussionsStarted: number; + totalDiscussionsAnswered: number; contributedTo: number; - rank: { level: string; score: number }; + rank: { level: string; percentile: number }; }; export type Lang = { diff --git a/src/fetchers/wakatime-fetcher.js b/src/fetchers/wakatime-fetcher.js index fa1f3d890920f..f69d6ae498eef 100644 --- a/src/fetchers/wakatime-fetcher.js +++ b/src/fetchers/wakatime-fetcher.js @@ -1,27 +1,30 @@ import axios from "axios"; -import { MissingParamError } from "../common/utils.js"; +import { CustomError, MissingParamError } from "../common/utils.js"; /** * WakaTime data fetcher. * - * @param {{username: string, api_domain: string, range: string}} props Fetcher props. + * @param {{username: string, api_domain: string }} props Fetcher props. * @returns {Promise} WakaTime data response. */ -const fetchWakatimeStats = async ({ username, api_domain, range }) => { - if (!username) throw new MissingParamError(["username"]); +const fetchWakatimeStats = async ({ username, api_domain }) => { + if (!username) { + throw new MissingParamError(["username"]); + } try { const { data } = await axios.get( `https://${ api_domain ? api_domain.replace(/\/$/gi, "") : "wakatime.com" - }/api/v1/users/${username}/stats/${range || ""}?is_including_today=true`, + }/api/v1/users/${username}/stats?is_including_today=true`, ); return data.data; } catch (err) { if (err.response.status < 200 || err.response.status > 299) { - throw new Error( - "Wakatime user not found, make sure you have a wakatime profile", + throw new CustomError( + `Could not resolve to a User with the login of '${username}'`, + "WAKATIME_USER_NOT_FOUND", ); } throw err; diff --git a/src/getStyles.js b/src/getStyles.js deleted file mode 100644 index f7b90f4adc7b4..0000000000000 --- a/src/getStyles.js +++ /dev/null @@ -1,129 +0,0 @@ -// @ts-check -/** - * Calculates progress along the boundary of the circle i.e it's circumference. - * - * @param {number} value The rank value to calculate progress for. - * @returns {number} Progress value. - */ -const calculateCircleProgress = (value) => { - const radius = 40; - const c = Math.PI * (radius * 2); - - if (value < 0) value = 0; - if (value > 100) value = 100; - - return ((100 - value) / 100) * c; -}; - -/** - * Retrieves the animation to display progress along the circumference of circle - * from the beginning to the given value in a clockwise direction. - * - * @param {{progress: number}} progress The progress value to animate to. - * @returns {string} Progress animation css. - */ -const getProgressAnimation = ({ progress }) => { - return ` - @keyframes rankAnimation { - from { - stroke-dashoffset: ${calculateCircleProgress(0)}; - } - to { - stroke-dashoffset: ${calculateCircleProgress(progress)}; - } - } - `; -}; - -/** - * Retrieves css animations for a card. - * - * @returns {string} Animation css. - */ -const getAnimations = () => { - return ` - /* Animations */ - @keyframes scaleInAnimation { - from { - transform: translate(-5px, 5px) scale(0); - } - to { - transform: translate(-5px, 5px) scale(1); - } - } - @keyframes fadeInAnimation { - from { - opacity: 0; - } - to { - opacity: 1; - } - } - `; -}; - -/** - * Retrieves CSS styles for a card. - * - * @param {Object[]} colors The colors to use for the card. - * @param {string} colors.titleColor The title color. - * @param {string} colors.textColor The text color. - * @param {string} colors.iconColor The icon color. - * @param {boolean} colors.show_icons Whether to show icons. - * @param {number} colors.progress The progress value to animate to. - * @returns {string} Card CSS styles. - */ -const getStyles = ({ - titleColor, - textColor, - iconColor, - ringColor, - show_icons, - progress, -}) => { - return ` - .stat { - font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${textColor}; - } - @supports(-moz-appearance: auto) { - /* Selector detects Firefox */ - .stat { font-size:12px; } - } - .stagger { - opacity: 0; - animation: fadeInAnimation 0.3s ease-in-out forwards; - } - .rank-text { - font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor}; - animation: scaleInAnimation 0.3s ease-in-out forwards; - } - - .not_bold { font-weight: 400 } - .bold { font-weight: 700 } - .icon { - fill: ${iconColor}; - display: ${!!show_icons ? "block" : "none"}; - } - - .rank-circle-rim { - stroke: ${ringColor}; - fill: none; - stroke-width: 6; - opacity: 0.2; - } - .rank-circle { - stroke: ${ringColor}; - stroke-dasharray: 250; - fill: none; - stroke-width: 6; - stroke-linecap: round; - opacity: 0.8; - transform-origin: -10px 8px; - transform: rotate(-90deg); - animation: rankAnimation 1s forwards ease-in-out; - } - ${process.env.NODE_ENV === "test" ? "" : getProgressAnimation({ progress })} - `; -}; - -export { getStyles, getAnimations }; diff --git a/src/index.js b/src/index.js index 27577f80f58db..ca8d586db136b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,2 @@ export * from "./common/index.js"; export * from "./cards/index.js"; -export { getStyles, getAnimations } from "./getStyles.js"; diff --git a/src/translations.js b/src/translations.js index 45c8295e024de..aa8744d7e1391 100644 --- a/src/translations.js +++ b/src/translations.js @@ -1,11 +1,16 @@ +// @ts-check + import { encodeHTML } from "./common/utils.js"; /** * Retrieves stat card labels in the available locales. * - * @param {string} name The name of the locale. - * @param {string} apostrophe Whether to use apostrophe or not. - * @returns {Object} The locales object. + * @param {object} props Function arguments. + * @param {string} props.name The name of the locale. + * @param {string} props.apostrophe Whether to use apostrophe or not. + * @returns {object} The locales object. + * + * @see https://www.andiamo.co.uk/resources/iso-language-codes/ for language codes. */ const statCardLocales = ({ name, apostrophe }) => { const encodedName = encodeHTML(name); @@ -41,6 +46,37 @@ const statCardLocales = ({ name, apostrophe }) => { vi: `Thống Kê GitHub ${encodedName}`, se: `GitHubstatistik för ${encodedName}`, }, + "statcard.ranktitle": { + ar: `${encodedName} إحصائيات غيت هاب`, + cn: `${encodedName} 的 GitHub 统计数据`, + "zh-tw": `${encodedName} 的 GitHub 統計數據`, + cs: `GitHub statistiky uživatele ${encodedName}`, + de: `${encodedName + apostrophe} GitHub-Statistiken`, + en: `${encodedName}'${apostrophe} GitHub Rank`, + bn: `${encodedName} এর GitHub পরিসংখ্যান`, + es: `Estadísticas de GitHub de ${encodedName}`, + fr: `Statistiques GitHub de ${encodedName}`, + hu: `${encodedName} GitHub statisztika`, + it: `Statistiche GitHub di ${encodedName}`, + ja: `${encodedName} の GitHub ランク`, + kr: `${encodedName}의 GitHub 통계`, + nl: `${encodedName}'${apostrophe} GitHub-statistieken`, + "pt-pt": `Estatísticas do GitHub de ${encodedName}`, + "pt-br": `Estatísticas do GitHub de ${encodedName}`, + np: `${encodedName}'${apostrophe} गिटहब तथ्याङ्क`, + el: `Στατιστικά GitHub του ${encodedName}`, + ru: `Статистика GitHub пользователя ${encodedName}`, + "uk-ua": `Статистика GitHub користувача ${encodedName}`, + id: `Statistik GitHub ${encodedName}`, + ml: `${encodedName}'${apostrophe} ഗിറ്റ്ഹബ് സ്ഥിതിവിവരക്കണക്കുകൾ`, + my: `Statistik GitHub ${encodedName}`, + sk: `GitHub štatistiky používateľa ${encodedName}`, + tr: `${encodedName} Hesabının GitHub Yıldızları`, + pl: `Statystyki GitHub użytkownika ${encodedName}`, + uz: `${encodedName}ning GitHub'dagi statistikasi`, + vi: `Thống Kê GitHub ${encodedName}`, + se: `GitHubstatistik för ${encodedName}`, + }, "statcard.totalstars": { ar: "مجموع النجوم", cn: "获标星数(star)", @@ -92,7 +128,7 @@ const statCardLocales = ({ name, apostrophe }) => { np: "कुल Commits", el: "Σύνολο Commits", ru: "Всего коммитов", - "uk-ua": "Всього коммітов", + "uk-ua": "Всього комітів", id: "Total Komitmen", ml: "ആകെ കമ്മിറ്റുകൾ", my: "Jumlah Komitmen", @@ -166,35 +202,188 @@ const statCardLocales = ({ name, apostrophe }) => { se: "Total antal issues", }, "statcard.contribs": { - ar: "ساهم في", - cn: "参与项目数", - "zh-tw": "參與項目數", - cs: "Přispěl k", - de: "Beigetragen zu", - en: "Contributed to", - bn: "অবদান রেখেছেন", - es: "Contribuciones en", - fr: "Contribué à", - hu: "Hozzájárulások", - it: "Ha contribuito a", - ja: "貢献したリポジトリ", - kr: "전체 기여도", - nl: "Bijgedragen aan", - "pt-pt": "Contribuiu em", - "pt-br": "Contribuiu para", - np: "कुल योगदानहरू", - el: "Συνεισφέρθηκε σε", - ru: "Внёс вклад в", - "uk-ua": "Вніс внесок у", - id: "Berkontribusi ke", - ml: "സമർപ്പിച്ചിരിക്കുന്നത്", - my: "Menyumbang kepada", - sk: "Účasti", - tr: "Katkı Verildi", - pl: "Kontrybucje", - uz: "Hissa qoʻshgan", - vi: "Đã Đóng Góp", - se: "Bidragit till", + ar: "ساهم في (العام الماضي)", + cn: "贡献于(去年)", + "zh-tw": "參與項目數 (去年)", + cs: "Přispěl k (minulý rok)", + de: "Beigetragen zu (letztes Jahr)", + en: "Contributed to (last year)", + bn: "অবদান (গত বছর)", + es: "Contribuciones en (el año pasado)", + fr: "Contribué à (l'année dernière)", + hu: "Hozzájárulások (tavaly)", + it: "Ha contribuito a (l'anno scorso)", + ja: "貢献したリポジトリ (昨年)", + kr: "(작년) 기여", + nl: "Bijgedragen aan (vorig jaar)", + "pt-pt": "Contribuiu em (ano passado)", + "pt-br": "Contribuiu para (ano passado)", + np: "कुल योगदानहरू (गत वर्ष)", + el: "Συνεισφέρθηκε σε (πέρυσι)", + ru: "Внёс вклад в (за прошлый год)", + "uk-ua": "Зробив внесок у (за минулий рік)", + id: "Berkontribusi ke (tahun lalu)", + ml: "സമർപ്പിച്ചിരിക്കുന്നത് (കഴിഞ്ഞ വർഷം)", + my: "Menyumbang kepada (tahun lepas)", + sk: "Účasti (minulý rok)", + tr: "Katkı Verildi (geçen yıl)", + pl: "Kontrybucje (w zeszłym roku)", + uz: "Hissa qoʻshgan (o'tgan yili)", + vi: "Đã Đóng Góp (năm ngoái)", + se: "Bidragit till (förra året)", + }, + "statcard.reviews": { + ar: "تمت مراجعة إجمالي العلاقات العامة", + cn: "審查的 PR 總數", + "zh-tw": "审查的 PR 总数", + cs: "Celkový počet PR", + de: "Insgesamt überprüfte PRs", + en: "Total PRs Reviewed", + bn: "সর্বমোট পুনরালোচনা করা PR", + es: "PR totales revisados", + fr: "Nombre total de PR examinés", + hu: "Összes ellenőrzött PR", + it: "PR totali esaminati", + ja: "レビューされた PR の総数", + kr: "검토된 총 PR", + nl: "Totaal beoordeelde PR's", + "pt-pt": "Total de PRs revistos", + "pt-br": "Total de PRs revisados", + np: "कुल पीआर समीक्षित", + el: "Σύνολο Αναθεωρημένων PR", + ru: "Всего pull request`ов проверено", + "uk-ua": "Всього pull request`iв перевірено", + id: "Total PR yang Direview", + ml: "ആകെ പുൾ അഭിപ്രായങ്ങൾ", + my: "Jumlah PR Dikaji Semula", + sk: "Celkový počet PR", + tr: "İncelenen toplam PR", + pl: "Łącznie sprawdzonych PR", + uz: "Koʻrib chiqilgan PR-lar soni", + vi: "Tổng Số PR Đã Xem Xét", + se: "Totalt antal granskade PR", + }, + "statcard.discussions-started": { + ar: "مجموع بدء المناقشات", + cn: "发起的讨论总数", + "zh-tw": "發起的討論總數", + cs: "Celkem zahájených diskusí", + de: "Gesamt gestartete Diskussionen", + en: "Total Discussions Started", + bn: "সর্বমোট আলোচনা শুরু", + es: "Discusiones totales iniciadas", + fr: "Nombre total de discussions lancées", + hu: "Összes megkezdett megbeszélés", + it: "Discussioni totali avviate", + ja: "開始されたディスカッションの総数", + kr: "시작된 토론 총 수", + nl: "Totaal gestarte discussies", + "pt-pt": "Total de Discussões Iniciadas", + "pt-br": "Total de Discussões Iniciadas", + np: "कुल चर्चा सुरु", + el: "Σύνολο Συζητήσεων που Ξεκίνησαν", + ru: "Всего начатых дискуссий", + "uk-ua": "Всього розпочатих дискусій", + id: "Total Diskusi Dimulai", + ml: "ആരംഭിച്ച ആലോചനകൾ", + my: "Jumlah Perbincangan Bermula", + sk: "Celkový počet začatých diskusií", + tr: "Başlatılan Toplam Tartışma", + pl: "Łącznie rozpoczętych dyskusji", + uz: "Boshlangan muzokaralar soni", + vi: "Tổng Số Thảo Luận Bắt Đầu", + se: "Totalt antal diskussioner startade", + }, + "statcard.discussions-answered": { + ar: "مجموع الردود على المناقشات", + cn: "回复的讨论总数", + "zh-tw": "回覆的討論總數", + cs: "Celkem zodpovězených diskusí", + de: "Gesamt beantwortete Diskussionen", + en: "Total Discussions Answered", + bn: "সর্বমোট আলোচনা উত্তর", + es: "Discusiones totales respondidas", + fr: "Nombre total de discussions répondues", + hu: "Összes megválaszolt megbeszélés", + it: "Discussioni totali risposte", + ja: "回答されたディスカッションの総数", + kr: "답변된 토론 총 수", + nl: "Totaal beantwoorde discussies", + "pt-pt": "Total de Discussões Respondidas", + "pt-br": "Total de Discussões Respondidas", + np: "कुल चर्चा उत्तर", + el: "Σύνολο Συζητήσεων που Απαντήθηκαν", + ru: "Всего отвеченных дискуссий", + "uk-ua": "Всього відповідей на дискусії", + id: "Total Diskusi Dibalas", + ml: "ഉത്തരം നൽകിയ ആലോചനകൾ", + my: "Jumlah Perbincangan Dijawab", + sk: "Celkový počet zodpovedaných diskusií", + tr: "Toplam Cevaplanan Tartışma", + pl: "Łącznie odpowiedzianych dyskusji", + uz: "Javob berilgan muzokaralar soni", + vi: "Tổng Số Thảo Luận Đã Trả Lời", + se: "Totalt antal diskussioner besvarade", + }, + "statcard.prs-merged": { + ar: "مجموع الطلبات المدمجة", + cn: "合并的 PR 总数", + "zh-tw": "合併的 PR 總數", + cs: "Celkem sloučených PR", + de: "Insgesamt zusammengeführte PRs", + en: "Total PRs Merged", + bn: "সর্বমোট PR একত্রীকৃত", + es: "PR totales fusionados", + fr: "Nombre total de PR fusionnés", + hu: "Összes egyesített PR", + it: "PR totali uniti", + ja: "マージされた PR の総数", + kr: "병합된 총 PR", + nl: "Totaal samengevoegde PR's", + "pt-pt": "Total de PRs Fundidos", + "pt-br": "Total de PRs Fundidos", + np: "कुल PRs मर्ज गरिएको", + el: "Σύνολο Συγχωνευμένων PR", + ru: "Всего объединённых pull request`ов", + "uk-ua": "Всього об'єднаних pull request`iв", + id: "Total PR Digabungkan", + my: "Jumlah PR Digabungkan", + sk: "Celkový počet zlúčených PR", + tr: "Toplam Birleştirilmiş PR", + pl: "Łącznie połączonych PR", + uz: "Birlangan PR-lar soni", + vi: "Tổng Số PR Đã Hợp Nhất", + se: "Totalt antal sammanfogade PR", + }, + "statcard.prs-merged-percentage": { + ar: "نسبة الطلبات المدمجة", + cn: "合并的 PR 百分比", + "zh-tw": "合併的 PR 百分比", + cs: "Sloučené PRs v procentech", + de: "Zusammengeführte PRs in Prozent", + en: "Merged PRs Percentage", + bn: "PR একত্রীকরণের শতাংশ", + es: "Porcentaje de PR fusionados", + fr: "Pourcentage de PR fusionnés", + hu: "Egyesített PR-k százaléka", + it: "Percentuale di PR uniti", + ja: "マージされた PR の割合", + kr: "병합된 PR의 비율", + nl: "Percentage samengevoegde PR's", + "pt-pt": "Percentagem de PRs Fundidos", + "pt-br": "Porcentagem de PRs Fundidos", + np: "PR मर्ज गरिएको प्रतिशत", + el: "Ποσοστό Συγχωνευμένων PR", + ru: "Процент объединённых pull request`ов", + "uk-ua": "Відсоток об'єднаних pull request`iв", + id: "Persentase PR Digabungkan", + my: "Peratus PR Digabungkan", + sk: "Percento zlúčených PR", + tr: "Birleştirilmiş PR Yüzdesi", + pl: "Procent połączonych PR", + uz: "Birlangan PR-lar foizi", + vi: "Tỷ Lệ PR Đã Hợp Nhất", + se: "Procent av sammanfogade PR", }, }; }; @@ -227,6 +416,7 @@ const repoCardLocales = { sk: "Šablóna", tr: "Şablon", pl: "Szablony", + uz: "Shablon", vi: "Mẫu", se: "Mall", }, @@ -250,13 +440,14 @@ const repoCardLocales = { np: "अभिलेख राखियो", el: "Αρχειοθετημένα", ru: "Архивирован", - "uk-ua": "Архивирован", + "uk-ua": "Архивований", id: "Arsip", ml: "ശേഖരിച്ചത്", my: "Arkib", sk: "Archivované", tr: "Arşiv", pl: "Zarchiwizowano", + uz: "Arxivlangan", vi: "Đã Lưu Trữ", se: "Arkiverade", }, @@ -283,48 +474,207 @@ const langCardLocales = { np: "अधिक प्रयोग गरिएको भाषाहरू", el: "Οι περισσότερο χρησιμοποιούμενες γλώσσες", ru: "Наиболее часто используемые языки", - "uk-ua": "Найбільш часто використовувані мови", + "uk-ua": "Найчастіше використовувані мови", id: "Bahasa Yang Paling Banyak Digunakan", ml: "കൂടുതൽ ഉപയോഗിച്ച ഭാഷകൾ", my: "Bahasa Paling Digunakan", sk: "Najviac používané jazyky", tr: "En Çok Kullanılan Diller", pl: "Najczęściej używane języki", + uz: "Eng koʻp ishlatiladigan tillar", vi: "Ngôn Ngữ Thường Sử Dụng", se: "Mest använda språken", }, + "langcard.nodata": { + ar: "لا توجد بيانات لغات.", + cn: "沒有語言數據。", + "zh-tw": "沒有語言數據。", + cs: "Žádné jazykové údaje.", + de: "Keine Sprachdaten.", + bn: "কোন ভাষার ডেটা নেই।", + en: "No languages data.", + es: "Sin datos de idiomas.", + fr: "Aucune donnée sur les langues.", + hu: "Nincsenek nyelvi adatok.", + it: "Nessun dato sulle lingue.", + ja: "言語データがありません。", + kr: "언어 데이터가 없습니다.", + nl: "Ingen sprogdata.", + "pt-pt": "Sem dados de idiomas.", + "pt-br": "Sem dados de idiomas.", + np: "कुनै भाषा डाटा छैन।", + el: "Δεν υπάρχουν δεδομένα γλωσσών.", + ru: "Нет данных о языках.", + "uk-ua": "Немає даних про мови.", + id: "Tidak ada data bahasa.", + ml: "ഭാഷാ ഡാറ്റയില്ല.", + my: "Tiada data bahasa.", + sk: "Žiadne údaje o jazykoch.", + tr: "Dil verisi yok.", + pl: "Brak danych dotyczących języków.", + uz: "Til haqida ma'lumot yo'q.", + vi: "Không có dữ liệu ngôn ngữ.", + se: "Inga språkdata.", + }, }; const wakatimeCardLocales = { "wakatimecard.title": { ar: "إحصائيات واكا تايم", - cn: "Wakatime 周统计", - "zh-tw": "Wakatime 周統計", - cs: "Statistiky Wakatime", - de: "Wakatime Status", - en: "Wakatime Stats", - bn: "Wakatime স্ট্যাটাস", - es: "Estadísticas de Wakatime", - fr: "Statistiques de Wakatime", - hu: "Wakatime statisztika", - it: "Statistiche Wakatime", - ja: "Wakatime ワカタイム統計", - kr: "Wakatime 주간 통계", - nl: "Wakatime-statistieken", - "pt-pt": "Estatísticas Wakatime", - "pt-br": "Estatísticas Wakatime", - np: "Wakatime तथ्या .्क", - el: "Στατιστικά Wakatime", - ru: "Статистика Wakatime", - "uk-ua": "Статистика Wakatime", - id: "Status Wakatime", + cn: "WakaTime 周统计", + "zh-tw": "WakaTime 周統計", + cs: "Statistiky WakaTime", + de: "WakaTime Status", + en: "WakaTime Stats", + bn: "WakaTime স্ট্যাটাস", + es: "Estadísticas de WakaTime", + fr: "Statistiques de WakaTime", + hu: "WakaTime statisztika", + it: "Statistiche WakaTime", + ja: "WakaTime ワカタイム統計", + kr: "WakaTime 주간 통계", + nl: "WakaTime-statistieken", + "pt-pt": "Estatísticas WakaTime", + "pt-br": "Estatísticas WakaTime", + np: "WakaTime तथ्या .्क", + el: "Στατιστικά WakaTime", + ru: "Статистика WakaTime", + "uk-ua": "Статистика WakaTime", + id: "Status WakaTime", ml: "വേക്ക് ടൈം സ്ഥിതിവിവരക്കണക്കുകൾ", - my: "Statistik Wakatime", - sk: "Wakatime štatistika", - tr: "Waketime İstatistikler", - pl: "Statystyki Wakatime", - vi: "Thống Kê Wakatime", - se: "Wakatime statistik", + my: "Statistik WakaTime", + sk: "WakaTime štatistika", + tr: "WakaTime İstatistikler", + pl: "Statystyki WakaTime", + uz: "WakaTime statistikasi", + vi: "Thống Kê WakaTime", + se: "WakaTime statistik", + }, + "wakatimecard.lastyear": { + ar: "العام الماضي", + cn: "去年", + "zh-tw": "去年", + cs: "Minulý rok", + de: "Letztes Jahr", + en: "last year", + bn: "গত বছর", + es: "El año pasado", + fr: "L'année dernière", + hu: "Tavaly", + it: "L'anno scorso", + ja: "昨年", + kr: "작년", + nl: "Vorig jaar", + "pt-pt": "Ano passado", + "pt-br": "Ano passado", + np: "गत वर्ष", + el: "Πέρυσι", + ru: "За прошлый год", + "uk-ua": "За минулий рік", + id: "Tahun lalu", + ml: "കഴിഞ്ഞ വർഷം", + my: "Tahun lepas", + sk: "Minulý rok", + tr: "Geçen yıl", + pl: "W zeszłym roku", + uz: "O'tgan yil", + vi: "Năm ngoái", + se: "Förra året", + }, + "wakatimecard.last7days": { + ar: "آخر 7 أيام", + cn: "最近 7 天", + "zh-tw": "最近 7 天", + cs: "Posledních 7 dní", + de: "Letzte 7 Tage", + en: "last 7 days", + bn: "গত ৭ দিন", + es: "Últimos 7 días", + fr: "7 derniers jours", + hu: "Elmúlt 7 nap", + it: "Ultimi 7 giorni", + ja: "過去 7 日間", + kr: "지난 7 일", + nl: "Afgelopen 7 dagen", + "pt-pt": "Últimos 7 dias", + "pt-br": "Últimos 7 dias", + np: "गत ७ दिन", + el: "Τελευταίες 7 ημέρες", + ru: "Последние 7 дней", + "uk-ua": "Останні 7 днів", + id: "7 hari terakhir", + ml: "കഴിഞ്ഞ 7 ദിവസം", + my: "7 hari lepas", + sk: "Posledných 7 dní", + tr: "Son 7 gün", + pl: "Ostatnie 7 dni", + uz: "O'tgan 7 kun", + vi: "7 ngày qua", + se: "Senaste 7 dagarna", + }, + "wakatimecard.notpublic": { + ar: "ملف المستخدم غير عام", + cn: "WakaTime 用户个人资料未公开", + "zh-tw": "WakaTime 使用者個人資料未公開", + cs: "Profil uživatele WakaTime není veřejný", + de: "WakaTime-Benutzerprofil nicht öffentlich", + en: "WakaTime user profile not public", + bn: "WakaTime ব্যবহারকারীর প্রোফাইল প্রকাশ্য নয়", + es: "Perfil de usuario de WakaTime no público", + fr: "Profil utilisateur WakaTime non public", + hu: "A WakaTime felhasználói profilja nem nyilvános", + it: "Profilo utente WakaTime non pubblico", + ja: "WakaTime ユーザープロファイルは公開されていません", + kr: "WakaTime 사용자 프로필이 공개되지 않았습니다", + nl: "WakaTime gebruikersprofiel niet openbaar", + "pt-pt": "Perfil de usuário WakaTime não público", + "pt-br": "Perfil de usuário WakaTime não público", + np: "WakaTime प्रयोगकर्ता प्रोफाइल सार्वजनिक छैन", + el: "Το προφίλ χρήστη WakaTime δεν είναι δημόσιο", + ru: "Профиль пользователя WakaTime не является общедоступным", + "uk-ua": "Профіль користувача WakaTime не є публічним", + id: "Profil pengguna WakaTime tidak publik", + ml: "WakaTime ഉപയോക്തൃ പ്രൊഫൈൽ പൊതുവായി പ്രസിദ്ധീകരിക്കപ്പെടാത്തതാണ്", + my: "Profil pengguna WakaTime tidak awam", + sk: "Profil používateľa WakaTime nie je verejný", + tr: "WakaTime kullanıcı profili herkese açık değil", + pl: "Profil użytkownika WakaTime nie jest publiczny", + uz: "WakaTime foydalanuvchi profili ochiq emas", + vi: "Hồ sơ người dùng WakaTime không công khai", + se: "WakaTime användarprofil inte offentlig", + }, + "wakatimecard.nocodedetails": { + ar: "المستخدم لا يشارك معلومات تفصيلية عن البرمجة", + cn: "用户不公开分享详细的代码统计信息", + "zh-tw": "使用者不公開分享詳細的程式碼統計資訊", + cs: "Uživatel nesdílí podrobné statistiky kódu", + de: "Benutzer teilt keine detaillierten Code-Statistiken", + en: "User doesn't publicly share detailed code statistics", + bn: "ব্যবহারকারী বিস্তারিত কোড পরিসংখ্যান প্রকাশ করেন না", + es: "El usuario no comparte públicamente estadísticas detalladas de código", + fr: "L'utilisateur ne partage pas publiquement de statistiques de code détaillées", + hu: "A felhasználó nem osztja meg nyilvánosan a részletes kódstatisztikákat", + it: "L'utente non condivide pubblicamente statistiche dettagliate sul codice", + ja: "ユーザーは詳細なコード統計を公開しません", + kr: "사용자는 자세한 코드 통계를 공개하지 않습니다", + nl: "Gebruiker deelt geen gedetailleerde code-statistieken", + "pt-pt": + "O utilizador não partilha publicamente estatísticas detalhadas de código", + "pt-br": + "O usuário não compartilha publicamente estatísticas detalhadas de código", + np: "प्रयोगकर्ता सार्वजनिक रूपमा विस्तृत कोड तथ्याङ्क साझा गर्दैन", + el: "Ο χρήστης δεν δημοσιεύει δημόσια λεπτομερείς στατιστικές κώδικα", + ru: "Пользователь не делится подробной статистикой кода", + "uk-ua": "Користувач не публікує детальну статистику коду", + id: "Pengguna tidak membagikan statistik kode terperinci secara publik", + ml: "ഉപയോക്താവ് പൊതുവെ വിശദീകരിച്ച കോഡ് സ്റ്റാറ്റിസ്റ്റിക്സ് പങ്കിടുന്നില്ല", + my: "Pengguna tidak berkongsi statistik kod terperinci secara awam", + sk: "Používateľ neposkytuje verejne podrobné štatistiky kódu", + tr: "Kullanıcı ayrıntılı kod istatistiklerini herkese açık olarak paylaşmıyor", + pl: "Użytkownik nie udostępnia publicznie szczegółowych statystyk kodu", + uz: "Foydalanuvchi umumiy ko`d statistikasini ochiq ravishda almashmaydi", + vi: "Người dùng không chia sẻ thống kê mã chi tiết công khai", + se: "Användaren delar inte offentligt detaljerad kodstatistik", }, "wakatimecard.nocodingactivity": { ar: "لا يوجد نشاط برمجي لهذا الأسبوع", @@ -372,10 +722,10 @@ const isLocaleAvailable = (locale) => { }; export { - isLocaleAvailable, availableLocales, - statCardLocales, - repoCardLocales, + isLocaleAvailable, langCardLocales, + repoCardLocales, + statCardLocales, wakatimeCardLocales, }; diff --git a/tests/__snapshots__/renderWakatimeCard.test.js.snap b/tests/__snapshots__/renderWakatimeCard.test.js.snap index 1c0bd701fbbfe..f38ac26ef07f7 100644 --- a/tests/__snapshots__/renderWakatimeCard.test.js.snap +++ b/tests/__snapshots__/renderWakatimeCard.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Test Render Wakatime Card should render correctly 1`] = `[Function]`; +exports[`Test Render WakaTime Card should render correctly 1`] = `[Function]`; -exports[`Test Render Wakatime Card should render correctly with compact layout 1`] = ` +exports[`Test Render WakaTime Card should render correctly with compact layout 1`] = ` " Wakatime Stats + >WakaTime Stats (last 7 days) @@ -160,7 +154,7 @@ exports[`Test Render Wakatime Card should render correctly with compact layout 1 " `; -exports[`Test Render Wakatime Card should render correctly with compact layout when langs_count is set 1`] = ` +exports[`Test Render WakaTime Card should render correctly with compact layout when langs_count is set 1`] = ` " Wakatime Stats + >WakaTime Stats (last 7 days) diff --git a/tests/api.test.js b/tests/api.test.js index 0037bcdb566b2..eee9a1a0a61af 100644 --- a/tests/api.test.js +++ b/tests/api.test.js @@ -5,6 +5,7 @@ import api from "../api/index.js"; import { calculateRank } from "../src/calculateRank.js"; import { renderStatsCard } from "../src/cards/stats-card.js"; import { CONSTANTS, renderError } from "../src/common/utils.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; const stats = { name: "Anurag Hazra", @@ -12,47 +13,50 @@ const stats = { totalCommits: 200, totalIssues: 300, totalPRs: 400, - contributedTo: 500, + totalPRsMerged: 320, + mergedPRsPercentage: 80, + totalReviews: 50, + totalDiscussionsStarted: 10, + totalDiscussionsAnswered: 40, + contributedTo: 50, rank: null, }; + stats.rank = calculateRank({ - totalCommits: stats.totalCommits, - totalRepos: 1, - followers: 0, - contributions: stats.contributedTo, - stargazers: stats.totalStars, + all_commits: false, + commits: stats.totalCommits, prs: stats.totalPRs, + reviews: stats.totalReviews, issues: stats.totalIssues, + repos: 1, + stars: stats.totalStars, + followers: 0, }); -const data = { +const data_stats = { data: { user: { name: stats.name, repositoriesContributedTo: { totalCount: stats.contributedTo }, contributionsCollection: { totalCommitContributions: stats.totalCommits, - restrictedContributionsCount: 100, + totalPullRequestReviewContributions: stats.totalReviews, }, pullRequests: { totalCount: stats.totalPRs }, + mergedPullRequests: { totalCount: stats.totalPRsMerged }, openIssues: { totalCount: stats.totalIssues }, closedIssues: { totalCount: 0 }, followers: { totalCount: 0 }, - repositories: { - totalCount: 1, + repositoryDiscussions: { totalCount: stats.totalDiscussionsStarted }, + repositoryDiscussionComments: { + totalCount: stats.totalDiscussionsAnswered, }, - }, - }, -}; - -const repositoriesData = { - data: { - user: { repositories: { + totalCount: 1, nodes: [{ stargazers: { totalCount: 100 } }], pageInfo: { hasNextPage: false, - cursor: "cursor", + endCursor: "cursor", }, }, }, @@ -83,11 +87,7 @@ const faker = (query, data) => { setHeader: jest.fn(), send: jest.fn(), }; - mock - .onPost("https://api.github.com/graphql") - .replyOnce(200, data) - .onPost("https://api.github.com/graphql") - .replyOnce(200, repositoriesData); + mock.onPost("https://api.github.com/graphql").replyOnce(200, data); return { req, res }; }; @@ -98,7 +98,7 @@ afterEach(() => { describe("Test /api/", () => { it("should test the request", async () => { - const { req, res } = faker({}, data); + const { req, res } = faker({}, data_stats); await api(req, res); @@ -120,6 +120,21 @@ describe("Test /api/", () => { ); }); + it("should render error card in same theme as requested card", async () => { + const { req, res } = faker({ theme: "merko" }, error); + + await api(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError( + error.errors[0].message, + "Make sure the provided username is not an organization", + { theme: "merko" }, + ), + ); + }); + it("should get the query options", async () => { const { req, res } = faker( { @@ -133,7 +148,7 @@ describe("Test /api/", () => { text_color: "fff", bg_color: "fff", }, - data, + data_stats, ); await api(req, res); @@ -154,7 +169,7 @@ describe("Test /api/", () => { }); it("should have proper cache", async () => { - const { req, res } = faker({}, data); + const { req, res } = faker({}, data_stats); await api(req, res); @@ -162,41 +177,49 @@ describe("Test /api/", () => { ["Content-Type", "image/svg+xml"], [ "Cache-Control", - `max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${ - CONSTANTS.FOUR_HOURS + `max-age=${CONSTANTS.SIX_HOURS / 2}, s-maxage=${ + CONSTANTS.SIX_HOURS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ], ]); }); it("should set proper cache", async () => { - const { req, res } = faker({ cache_seconds: 15000 }, data); + const cache_seconds = 35000; + const { req, res } = faker({ cache_seconds }, data_stats); await api(req, res); expect(res.setHeader.mock.calls).toEqual([ ["Content-Type", "image/svg+xml"], [ "Cache-Control", - `max-age=7500, s-maxage=${15000}, stale-while-revalidate=${ + `max-age=${ + cache_seconds / 2 + }, s-maxage=${cache_seconds}, stale-while-revalidate=${ CONSTANTS.ONE_DAY }`, ], ]); }); - it("should not store cache when error", async () => { + it("should set shorter cache when error", async () => { const { req, res } = faker({}, error); await api(req, res); expect(res.setHeader.mock.calls).toEqual([ ["Content-Type", "image/svg+xml"], - ["Cache-Control", `no-cache, no-store, must-revalidate`], + [ + "Cache-Control", + `max-age=${CONSTANTS.ERROR_CACHE_SECONDS / 2}, s-maxage=${ + CONSTANTS.ERROR_CACHE_SECONDS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ], ]); }); it("should set proper cache with clamped values", async () => { { - let { req, res } = faker({ cache_seconds: 200000 }, data); + let { req, res } = faker({ cache_seconds: 200000 }, data_stats); await api(req, res); expect(res.setHeader.mock.calls).toEqual([ @@ -212,68 +235,36 @@ describe("Test /api/", () => { // note i'm using block scoped vars { - let { req, res } = faker({ cache_seconds: 0 }, data); + let { req, res } = faker({ cache_seconds: 0 }, data_stats); await api(req, res); expect(res.setHeader.mock.calls).toEqual([ ["Content-Type", "image/svg+xml"], [ "Cache-Control", - `max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${ - CONSTANTS.FOUR_HOURS + `max-age=${CONSTANTS.SIX_HOURS / 2}, s-maxage=${ + CONSTANTS.SIX_HOURS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ], ]); } { - let { req, res } = faker({ cache_seconds: -10000 }, data); + let { req, res } = faker({ cache_seconds: -10000 }, data_stats); await api(req, res); expect(res.setHeader.mock.calls).toEqual([ ["Content-Type", "image/svg+xml"], [ "Cache-Control", - `max-age=${CONSTANTS.FOUR_HOURS / 2}, s-maxage=${ - CONSTANTS.FOUR_HOURS + `max-age=${CONSTANTS.SIX_HOURS / 2}, s-maxage=${ + CONSTANTS.SIX_HOURS }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, ], ]); } }); - it("should add private contributions", async () => { - const { req, res } = faker( - { - username: "anuraghazra", - count_private: true, - }, - data, - ); - - await api(req, res); - - expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); - expect(res.send).toBeCalledWith( - renderStatsCard( - { - ...stats, - totalCommits: stats.totalCommits + 100, - rank: calculateRank({ - totalCommits: stats.totalCommits + 100, - totalRepos: 1, - followers: 0, - contributions: stats.contributedTo, - stargazers: stats.totalStars, - prs: stats.totalPRs, - issues: stats.totalIssues, - }), - }, - {}, - ), - ); - }); - it("should allow changing ring_color", async () => { const { req, res } = faker( { @@ -288,7 +279,7 @@ describe("Test /api/", () => { text_color: "fff", bg_color: "fff", }, - data, + data_stats, ); await api(req, res); @@ -308,4 +299,48 @@ describe("Test /api/", () => { }), ); }); + + it("should render error card if username in blacklist", async () => { + const { req, res } = faker({ username: "renovate-bot" }, data_stats); + + await api(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "This username is blacklisted"), + ); + }); + + it("should render error card when wrong locale is provided", async () => { + const { req, res } = faker({ locale: "asdf" }, data_stats); + + await api(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "Language not found"), + ); + }); + + it("should render error card when include_all_commits true and upstream API fails", async () => { + mock + .onGet("https://api.github.com/search/commits?q=author:anuraghazra") + .reply(200, { error: "Some test error message" }); + + const { req, res } = faker( + { username: "anuraghazra", include_all_commits: true }, + data_stats, + ); + + await api(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Could not fetch total commits.", "Please try again later"), + ); + // Received SVG output should not contain string "https://tiny.one/readme-stats" + expect(res.send.mock.calls[0][0]).not.toContain( + "https://tiny.one/readme-stats", + ); + }); }); diff --git a/tests/bench/api.bench.js b/tests/bench/api.bench.js new file mode 100644 index 0000000000000..4796b64306e24 --- /dev/null +++ b/tests/bench/api.bench.js @@ -0,0 +1,76 @@ +import { benchmarkSuite } from "jest-bench"; +import api from "../../api/index.js"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { jest } from "@jest/globals"; + +const stats = { + name: "Anurag Hazra", + totalStars: 100, + totalCommits: 200, + totalIssues: 300, + totalPRs: 400, + totalPRsMerged: 320, + mergedPRsPercentage: 80, + totalReviews: 50, + totalDiscussionsStarted: 10, + totalDiscussionsAnswered: 40, + contributedTo: 50, + rank: null, +}; + +const data_stats = { + data: { + user: { + name: stats.name, + repositoriesContributedTo: { totalCount: stats.contributedTo }, + contributionsCollection: { + totalCommitContributions: stats.totalCommits, + totalPullRequestReviewContributions: stats.totalReviews, + }, + pullRequests: { totalCount: stats.totalPRs }, + mergedPullRequests: { totalCount: stats.totalPRsMerged }, + openIssues: { totalCount: stats.totalIssues }, + closedIssues: { totalCount: 0 }, + followers: { totalCount: 0 }, + repositoryDiscussions: { totalCount: stats.totalDiscussionsStarted }, + repositoryDiscussionComments: { + totalCount: stats.totalDiscussionsAnswered, + }, + repositories: { + totalCount: 1, + nodes: [{ stargazers: { totalCount: 100 } }], + pageInfo: { + hasNextPage: false, + endCursor: "cursor", + }, + }, + }, + }, +}; + +const mock = new MockAdapter(axios); + +const faker = (query, data) => { + const req = { + query: { + username: "anuraghazra", + ...query, + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").replyOnce(200, data); + + return { req, res }; +}; + +benchmarkSuite("test /api", { + ["simple request"]: async () => { + const { req, res } = faker({}, data_stats); + + await api(req, res); + }, +}); diff --git a/tests/bench/calculateRank.bench.js b/tests/bench/calculateRank.bench.js new file mode 100644 index 0000000000000..1ce6b05b28291 --- /dev/null +++ b/tests/bench/calculateRank.bench.js @@ -0,0 +1,17 @@ +import { benchmarkSuite } from "jest-bench"; +import { calculateRank } from "../../src/calculateRank.js"; + +benchmarkSuite("calculateRank", { + ["calculateRank"]: () => { + calculateRank({ + all_commits: false, + commits: 1300, + prs: 1500, + issues: 4500, + reviews: 1000, + repos: 0, + stars: 600000, + followers: 50000, + }); + }, +}); diff --git a/tests/bench/gist.bench.js b/tests/bench/gist.bench.js new file mode 100644 index 0000000000000..69f381379c20b --- /dev/null +++ b/tests/bench/gist.bench.js @@ -0,0 +1,51 @@ +import { benchmarkSuite } from "jest-bench"; +import gist from "../../api/gist.js"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { jest } from "@jest/globals"; + +const gist_data = { + data: { + viewer: { + gist: { + description: + "List of countries and territories in English and Spanish: name, continent, capital, dial code, country codes, TLD, and area in sq km. Lista de países y territorios en Inglés y Español: nombre, continente, capital, código de teléfono, códigos de país, dominio y área en km cuadrados. Updated 2023", + owner: { + login: "Yizack", + }, + stargazerCount: 33, + forks: { + totalCount: 11, + }, + files: [ + { + name: "countries.json", + language: { + name: "JSON", + }, + size: 85858, + }, + ], + }, + }, + }, +}; + +const mock = new MockAdapter(axios); +mock.onPost("https://api.github.com/graphql").reply(200, gist_data); + +benchmarkSuite("test /api/gist", { + ["simple request"]: async () => { + const req = { + query: { + id: "bbfce31e0217a3689c8d961a356cb10d", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + await gist(req, res); + }, +}); diff --git a/tests/bench/pin.bench.js b/tests/bench/pin.bench.js new file mode 100644 index 0000000000000..636e0d58bdd79 --- /dev/null +++ b/tests/bench/pin.bench.js @@ -0,0 +1,50 @@ +import { benchmarkSuite } from "jest-bench"; +import pin from "../../api/pin.js"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { jest } from "@jest/globals"; + +const data_repo = { + repository: { + username: "anuraghazra", + name: "convoychat", + stargazers: { + totalCount: 38000, + }, + description: "Help us take over the world! React + TS + GraphQL Chat App", + primaryLanguage: { + color: "#2b7489", + id: "MDg6TGFuZ3VhZ2UyODc=", + name: "TypeScript", + }, + forkCount: 100, + isTemplate: false, + }, +}; + +const data_user = { + data: { + user: { repository: data_repo.repository }, + organization: null, + }, +}; + +const mock = new MockAdapter(axios); +mock.onPost("https://api.github.com/graphql").reply(200, data_user); + +benchmarkSuite("test /api/pin", { + ["simple request"]: async () => { + const req = { + query: { + username: "anuraghazra", + repo: "convoychat", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + await pin(req, res); + }, +}); diff --git a/tests/calculateRank.test.js b/tests/calculateRank.test.js index 235b1b5f20b04..65f60df3cad97 100644 --- a/tests/calculateRank.test.js +++ b/tests/calculateRank.test.js @@ -1,18 +1,110 @@ import "@testing-library/jest-dom"; import { calculateRank } from "../src/calculateRank.js"; +import { expect, it, describe } from "@jest/globals"; describe("Test calculateRank", () => { - it("should calculate rank correctly", () => { + it("new user gets C rank", () => { expect( calculateRank({ - totalCommits: 100, - totalRepos: 5, - followers: 100, - contributions: 61, - stargazers: 400, - prs: 300, - issues: 200, + all_commits: false, + commits: 0, + prs: 0, + issues: 0, + reviews: 0, + repos: 0, + stars: 0, + followers: 0, }), - ).toStrictEqual({ level: "A+", score: 49.25629684876535 }); + ).toStrictEqual({ level: "C", percentile: 100 }); + }); + + it("beginner user gets B- rank", () => { + expect( + calculateRank({ + all_commits: false, + commits: 125, + prs: 25, + issues: 10, + reviews: 5, + repos: 0, + stars: 25, + followers: 5, + }), + ).toStrictEqual({ level: "B-", percentile: 65.02918514848255 }); + }); + + it("median user gets B+ rank", () => { + expect( + calculateRank({ + all_commits: false, + commits: 250, + prs: 50, + issues: 25, + reviews: 10, + repos: 0, + stars: 50, + followers: 10, + }), + ).toStrictEqual({ level: "B+", percentile: 46.09375 }); + }); + + it("average user gets B+ rank (include_all_commits)", () => { + expect( + calculateRank({ + all_commits: true, + commits: 1000, + prs: 50, + issues: 25, + reviews: 10, + repos: 0, + stars: 50, + followers: 10, + }), + ).toStrictEqual({ level: "B+", percentile: 46.09375 }); + }); + + it("advanced user gets A rank", () => { + expect( + calculateRank({ + all_commits: false, + commits: 500, + prs: 100, + issues: 50, + reviews: 20, + repos: 0, + stars: 200, + followers: 40, + }), + ).toStrictEqual({ level: "A", percentile: 20.841471354166664 }); + }); + + it("expert user gets A+ rank", () => { + expect( + calculateRank({ + all_commits: false, + commits: 1000, + prs: 200, + issues: 100, + reviews: 40, + repos: 0, + stars: 800, + followers: 160, + }), + ).toStrictEqual({ level: "A+", percentile: 5.575988339442828 }); + }); + + it("sindresorhus gets S rank", () => { + expect( + calculateRank({ + all_commits: false, + commits: 1300, + prs: 1500, + issues: 4500, + reviews: 1000, + repos: 0, + stars: 600000, + followers: 50000, + }), + ).toStrictEqual({ level: "S", percentile: 0.4578556547153667 }); }); }); diff --git a/tests/card.test.js b/tests/card.test.js index 11c02d4d302e5..61e7ec0e00c14 100644 --- a/tests/card.test.js +++ b/tests/card.test.js @@ -4,6 +4,7 @@ import { cssToObject } from "@uppercod/css-to-object"; import { Card } from "../src/common/Card.js"; import { icons } from "../src/common/icons.js"; import { getCardColors } from "../src/common/utils.js"; +import { expect, it, describe } from "@jest/globals"; describe("Card", () => { it("should hide border", () => { @@ -40,6 +41,16 @@ describe("Card", () => { ); }); + it("should set custom title", () => { + const card = new Card({}); + card.setTitle("custom title"); + + document.body.innerHTML = card.render(``); + expect(queryByTestId(document.body, "card-title")).toHaveTextContent( + "custom title", + ); + }); + it("should hide title", () => { const card = new Card({}); card.setHideTitle(true); @@ -78,7 +89,7 @@ describe("Card", () => { "200", ); expect(document.getElementsByTagName("svg")[0]).toHaveAttribute( - "height", + "width", "200", ); }); diff --git a/tests/e2e/e2e.test.js b/tests/e2e/e2e.test.js index 48bf16a0e083a..ee0deafe132e2 100644 --- a/tests/e2e/e2e.test.js +++ b/tests/e2e/e2e.test.js @@ -4,34 +4,34 @@ import dotenv from "dotenv"; dotenv.config(); -import { describe } from "@jest/globals"; import axios from "axios"; import { renderRepoCard } from "../../src/cards/repo-card.js"; import { renderStatsCard } from "../../src/cards/stats-card.js"; import { renderTopLanguages } from "../../src/cards/top-languages-card.js"; import { renderWakatimeCard } from "../../src/cards/wakatime-card.js"; +import { renderGistCard } from "../../src/cards/gist-card.js"; +import { expect, describe, beforeAll, test } from "@jest/globals"; + +const REPO = "curly-fiesta"; +const USER = "catelinemnemosyne"; +const STATS_CARD_USER = "e2eninja"; +const GIST_ID = "372cef55fd897b31909fdeb3a7262758"; -const REPO = "dummy-cra"; -const USER = "grsdummy"; const STATS_DATA = { - name: "grsdummy", - totalPRs: 2, - totalCommits: 2, + name: "CodeNinja", + totalPRs: 1, + totalReviews: 0, + totalCommits: 3, totalIssues: 1, totalStars: 1, - contributedTo: 2, + contributedTo: 0, rank: { - level: "A+", - score: 50.900829325065935, + level: "C", + percentile: 98.73972605284538, }, }; const LANGS_DATA = { - TypeScript: { - color: "#3178c6", - name: "TypeScript", - size: 2049, - }, HTML: { color: "#e34c26", name: "HTML", @@ -42,49 +42,66 @@ const LANGS_DATA = { name: "CSS", size: 930, }, - Python: { - color: "#3572A5", - name: "Python", - size: 671, + JavaScript: { + color: "#f1e05a", + name: "JavaScript", + size: 1912, }, }; const WAKATIME_DATA = { human_readable_range: "last week", is_already_updating: false, - is_coding_activity_visible: false, + is_coding_activity_visible: true, is_including_today: false, - is_other_usage_visible: false, + is_other_usage_visible: true, is_stuck: false, is_up_to_date: false, is_up_to_date_pending_future: false, percent_calculated: 0, - range: "last_7_days", + range: "all_time", status: "pending_update", timeout: 15, - username: "grsdummy", + username: USER, writes_only: false, }; const REPOSITORY_DATA = { - name: "dummy-cra", - nameWithOwner: "grsdummy/dummy-cra", + name: REPO, + nameWithOwner: `${USER}/cra-test`, isPrivate: false, isArchived: false, isTemplate: false, stargazers: { totalCount: 1, }, - description: "Dummy create react app.", + description: "Simple cra test repo.", primaryLanguage: { - color: "#3178c6", - id: "MDg6TGFuZ3VhZ2UyODc=", - name: "TypeScript", + color: "#f1e05a", + id: "MDg6TGFuZ3VhZ2UxNDA=", + name: "JavaScript", }, forkCount: 0, starCount: 1, }; +/** + * @typedef {import("../../src/fetchers/types").GistData} GistData Gist data type. + */ + +/** + * @type {GistData} + */ +const GIST_DATA = { + name: "link.txt", + nameWithOwner: "qwerty541/link.txt", + description: + "Trying to access this path on Windown 10 ver. 1803+ will breaks NTFS", + language: "Text", + starsCount: 1, + forksCount: 0, +}; + const CACHE_BURST_STRING = `v=${new Date().getTime()}`; describe("Fetch Cards", () => { @@ -100,20 +117,22 @@ describe("Fetch Cards", () => { // Check if the Vercel preview instance stats card function is up and running. await expect( - axios.get(`${VERCEL_PREVIEW_URL}/api?username=${USER}`), + axios.get(`${VERCEL_PREVIEW_URL}/api?username=${STATS_CARD_USER}`), ).resolves.not.toThrow(); // Get local stats card. - const localStatsCardSVG = renderStatsCard(STATS_DATA); + const localStatsCardSVG = renderStatsCard(STATS_DATA, { + include_all_commits: true, + }); // Get the Vercel preview stats card response. const serverStatsSvg = await axios.get( - `${VERCEL_PREVIEW_URL}/api?username=${USER}&${CACHE_BURST_STRING}`, + `${VERCEL_PREVIEW_URL}/api?username=${STATS_CARD_USER}&include_all_commits=true&${CACHE_BURST_STRING}`, ); // Check if stats card from deployment matches the stats card from local. expect(serverStatsSvg.data).toEqual(localStatsCardSVG); - }, 7000); + }, 15000); test("retrieve language card", async () => { expect(VERCEL_PREVIEW_URL).toBeDefined(); @@ -138,7 +157,7 @@ describe("Fetch Cards", () => { // Check if language card from deployment matches the local language card. expect(severLanguageSVG.data).toEqual(localLanguageCardSVG); - }); + }, 15000); test("retrieve WakaTime card", async () => { expect(VERCEL_PREVIEW_URL).toBeDefined(); @@ -158,7 +177,7 @@ describe("Fetch Cards", () => { // Check if WakaTime card from deployment matches the local WakaTime card. expect(serverWakaTimeSvg.data).toEqual(localWakaCardSVG); - }); + }, 15000); test("retrieve repo card", async () => { expect(VERCEL_PREVIEW_URL).toBeDefined(); @@ -180,5 +199,27 @@ describe("Fetch Cards", () => { // Check if Repo card from deployment matches the local Repo card. expect(serverRepoSvg.data).toEqual(localRepoCardSVG); - }); + }, 15000); + + test("retrieve gist card", async () => { + expect(VERCEL_PREVIEW_URL).toBeDefined(); + + // Check if the Vercel preview instance Gist function is up and running. + await expect( + axios.get( + `${VERCEL_PREVIEW_URL}/api/gist?id=${GIST_ID}&${CACHE_BURST_STRING}`, + ), + ).resolves.not.toThrow(); + + // Get local gist card. + const localGistCardSVG = renderGistCard(GIST_DATA); + + // Get the Vercel preview gist card response. + const serverGistSvg = await axios.get( + `${VERCEL_PREVIEW_URL}/api/gist?id=${GIST_ID}&${CACHE_BURST_STRING}`, + ); + + // Check if Gist card from deployment matches the local Gist card. + expect(serverGistSvg.data).toEqual(localGistCardSVG); + }, 15000); }); diff --git a/tests/fetchGist.test.js b/tests/fetchGist.test.js new file mode 100644 index 0000000000000..13c29a8d2fc39 --- /dev/null +++ b/tests/fetchGist.test.js @@ -0,0 +1,117 @@ +import "@testing-library/jest-dom"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { expect, it, describe, afterEach } from "@jest/globals"; +import { fetchGist } from "../src/fetchers/gist-fetcher.js"; + +const gist_data = { + data: { + viewer: { + gist: { + description: + "List of countries and territories in English and Spanish: name, continent, capital, dial code, country codes, TLD, and area in sq km. Lista de países y territorios en Inglés y Español: nombre, continente, capital, código de teléfono, códigos de país, dominio y área en km cuadrados. Updated 2023", + owner: { + login: "Yizack", + }, + stargazerCount: 33, + forks: { + totalCount: 11, + }, + files: [ + { + name: "countries.json", + language: { + name: "JSON", + }, + size: 85858, + }, + { + name: "territories.txt", + language: { + name: "Text", + }, + size: 87858, + }, + { + name: "countries_spanish.json", + language: { + name: "JSON", + }, + size: 85858, + }, + { + name: "territories_spanish.txt", + language: { + name: "Text", + }, + size: 87858, + }, + ], + }, + }, + }, +}; + +const gist_not_found_data = { + data: { + viewer: { + gist: null, + }, + }, +}; + +const gist_errors_data = { + errors: [ + { + message: "Some test GraphQL error", + }, + ], +}; + +const mock = new MockAdapter(axios); + +afterEach(() => { + mock.reset(); +}); + +describe("Test fetchGist", () => { + it("should fetch gist correctly", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, gist_data); + + let gist = await fetchGist("bbfce31e0217a3689c8d961a356cb10d"); + + expect(gist).toStrictEqual({ + name: "countries.json", + nameWithOwner: "Yizack/countries.json", + description: + "List of countries and territories in English and Spanish: name, continent, capital, dial code, country codes, TLD, and area in sq km. Lista de países y territorios en Inglés y Español: nombre, continente, capital, código de teléfono, códigos de país, dominio y área en km cuadrados. Updated 2023", + language: "Text", + starsCount: 33, + forksCount: 11, + }); + }); + + it("should throw correct error if gist not found", async () => { + mock + .onPost("https://api.github.com/graphql") + .reply(200, gist_not_found_data); + + await expect(fetchGist("bbfce31e0217a3689c8d961a356cb10d")).rejects.toThrow( + "Gist not found", + ); + }); + + it("should throw error if reaponse contains them", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, gist_errors_data); + + await expect(fetchGist("bbfce31e0217a3689c8d961a356cb10d")).rejects.toThrow( + "Some test GraphQL error", + ); + }); + + it("should throw error if id is not provided", async () => { + await expect(fetchGist()).rejects.toThrow( + 'Missing params "id" make sure you pass the parameters in URL', + ); + }); +}); diff --git a/tests/fetchRepo.test.js b/tests/fetchRepo.test.js index f74a66ff0790c..a980917f3d628 100644 --- a/tests/fetchRepo.test.js +++ b/tests/fetchRepo.test.js @@ -2,6 +2,7 @@ import "@testing-library/jest-dom"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; import { fetchRepo } from "../src/fetchers/repo-fetcher.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; const data_repo = { repository: { diff --git a/tests/fetchStats.test.js b/tests/fetchStats.test.js index 192146ea5fbe0..ca8d7bc37062e 100644 --- a/tests/fetchStats.test.js +++ b/tests/fetchStats.test.js @@ -3,31 +3,27 @@ import axios from "axios"; import MockAdapter from "axios-mock-adapter"; import { calculateRank } from "../src/calculateRank.js"; import { fetchStats } from "../src/fetchers/stats-fetcher.js"; +import { expect, it, describe, beforeEach, afterEach } from "@jest/globals"; -const data = { +// Test parameters. +const data_stats = { data: { user: { name: "Anurag Hazra", repositoriesContributedTo: { totalCount: 61 }, contributionsCollection: { totalCommitContributions: 100, - restrictedContributionsCount: 50, + totalPullRequestReviewContributions: 50, }, pullRequests: { totalCount: 300 }, + mergedPullRequests: { totalCount: 240 }, openIssues: { totalCount: 100 }, closedIssues: { totalCount: 100 }, followers: { totalCount: 100 }, + repositoryDiscussions: { totalCount: 10 }, + repositoryDiscussionComments: { totalCount: 40 }, repositories: { totalCount: 5, - }, - }, - }, -}; - -const firstRepositoriesData = { - data: { - user: { - repositories: { nodes: [ { name: "test-repo-1", stargazers: { totalCount: 100 } }, { name: "test-repo-2", stargazers: { totalCount: 100 } }, @@ -35,14 +31,14 @@ const firstRepositoriesData = { ], pageInfo: { hasNextPage: true, - cursor: "cursor", + endCursor: "cursor", }, }, }, }, }; -const secondRepositoriesData = { +const data_repo = { data: { user: { repositories: { @@ -52,14 +48,14 @@ const secondRepositoriesData = { ], pageInfo: { hasNextPage: false, - cursor: "cursor", + endCursor: "cursor", }, }, }, }, }; -const repositoriesWithZeroStarsData = { +const data_repo_zero_stars = { data: { user: { repositories: { @@ -72,7 +68,7 @@ const repositoriesWithZeroStarsData = { ], pageInfo: { hasNextPage: true, - cursor: "cursor", + endCursor: "cursor", }, }, }, @@ -93,13 +89,13 @@ const error = { const mock = new MockAdapter(axios); beforeEach(() => { - mock - .onPost("https://api.github.com/graphql") - .replyOnce(200, data) - .onPost("https://api.github.com/graphql") - .replyOnce(200, firstRepositoriesData); - // .onPost("https://api.github.com/graphql") // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - // .replyOnce(200, secondRepositoriesData); // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + process.env.FETCH_MULTI_PAGE_STARS = "false"; // Set to `false` to fetch only one page of stars. + mock.onPost("https://api.github.com/graphql").reply((cfg) => { + return [ + 200, + cfg.data.includes("contributionsCollection") ? data_stats : data_repo, + ]; + }); }); afterEach(() => { @@ -110,14 +106,14 @@ describe("Test fetchStats", () => { it("should fetch correct stats", async () => { let stats = await fetchStats("anuraghazra"); const rank = calculateRank({ - totalCommits: 100, - totalRepos: 5, - followers: 100, - contributions: 61, - // stargazers: 400, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - stargazers: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + all_commits: false, + commits: 100, prs: 300, + reviews: 50, issues: 200, + repos: 5, + stars: 300, + followers: 100, }); expect(stats).toStrictEqual({ @@ -126,8 +122,12 @@ describe("Test fetchStats", () => { totalCommits: 100, totalIssues: 200, totalPRs: 300, - // totalStars: 400, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - totalStars: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -136,19 +136,20 @@ describe("Test fetchStats", () => { mock.reset(); mock .onPost("https://api.github.com/graphql") - .replyOnce(200, data) + .replyOnce(200, data_stats) .onPost("https://api.github.com/graphql") - .replyOnce(200, repositoriesWithZeroStarsData); + .replyOnce(200, data_repo_zero_stars); let stats = await fetchStats("anuraghazra"); const rank = calculateRank({ - totalCommits: 100, - totalRepos: 5, - followers: 100, - contributions: 61, - stargazers: 300, + all_commits: false, + commits: 100, prs: 300, + reviews: 50, issues: 200, + repos: 5, + stars: 300, + followers: 100, }); expect(stats).toStrictEqual({ @@ -157,7 +158,12 @@ describe("Test fetchStats", () => { totalCommits: 100, totalIssues: 200, totalPRs: 300, + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); @@ -171,85 +177,235 @@ describe("Test fetchStats", () => { ); }); - it("should fetch and add private contributions", async () => { + it("should fetch total commits", async () => { + mock + .onGet("https://api.github.com/search/commits?q=author:anuraghazra") + .reply(200, { total_count: 1000 }); + let stats = await fetchStats("anuraghazra", true); const rank = calculateRank({ - totalCommits: 150, - totalRepos: 5, - followers: 100, - contributions: 61, - // stargazers: 400, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - stargazers: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + all_commits: true, + commits: 1000, prs: 300, + reviews: 50, issues: 200, + repos: 5, + stars: 300, + followers: 100, }); expect(stats).toStrictEqual({ contributedTo: 61, name: "Anurag Hazra", - totalCommits: 150, + totalCommits: 1000, totalIssues: 200, totalPRs: 300, - // totalStars: 400, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - totalStars: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); - it("should fetch total commits", async () => { + it("should throw specific error when include_all_commits true and invalid username", async () => { + expect(fetchStats("asdf///---", true)).rejects.toThrow( + new Error("Invalid username provided."), + ); + }); + + it("should throw specific error when include_all_commits true and API returns error", async () => { + mock + .onGet("https://api.github.com/search/commits?q=author:anuraghazra") + .reply(200, { error: "Some test error message" }); + + expect(fetchStats("anuraghazra", true)).rejects.toThrow( + new Error("Could not fetch total commits."), + ); + }); + + it("should exclude stars of the `test-repo-1` repository", async () => { mock .onGet("https://api.github.com/search/commits?q=author:anuraghazra") .reply(200, { total_count: 1000 }); - let stats = await fetchStats("anuraghazra", true, true); + let stats = await fetchStats("anuraghazra", true, ["test-repo-1"]); const rank = calculateRank({ - totalCommits: 1050, - totalRepos: 5, + all_commits: true, + commits: 1000, + prs: 300, + reviews: 50, + issues: 200, + repos: 5, + stars: 200, followers: 100, - contributions: 61, - // stargazers: 400, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - stargazers: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + }); + + expect(stats).toStrictEqual({ + contributedTo: 61, + name: "Anurag Hazra", + totalCommits: 1000, + totalIssues: 200, + totalPRs: 300, + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 200, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, + rank, + }); + }); + + it("should fetch two pages of stars if 'FETCH_MULTI_PAGE_STARS' env variable is set to `true`", async () => { + process.env.FETCH_MULTI_PAGE_STARS = true; + + let stats = await fetchStats("anuraghazra"); + const rank = calculateRank({ + all_commits: false, + commits: 100, prs: 300, + reviews: 50, issues: 200, + repos: 5, + stars: 400, + followers: 100, }); expect(stats).toStrictEqual({ contributedTo: 61, name: "Anurag Hazra", - totalCommits: 1050, + totalCommits: 100, totalIssues: 200, totalPRs: 300, - // totalStars: 400, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - totalStars: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 400, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, rank, }); }); - it("should exclude stars of the `test-repo-1` repository", async () => { - mock - .onGet("https://api.github.com/search/commits?q=author:anuraghazra") - .reply(200, { total_count: 1000 }); + it("should fetch one page of stars if 'FETCH_MULTI_PAGE_STARS' env variable is set to `false`", async () => { + process.env.FETCH_MULTI_PAGE_STARS = "false"; - let stats = await fetchStats("anuraghazra", true, true, ["test-repo-1"]); + let stats = await fetchStats("anuraghazra"); const rank = calculateRank({ - totalCommits: 1050, - totalRepos: 5, + all_commits: false, + commits: 100, + prs: 300, + reviews: 50, + issues: 200, + repos: 5, + stars: 300, followers: 100, - contributions: 61, - // stargazers: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - stargazers: 200, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + }); + + expect(stats).toStrictEqual({ + contributedTo: 61, + name: "Anurag Hazra", + totalCommits: 100, + totalIssues: 200, + totalPRs: 300, + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, + rank, + }); + }); + + it("should fetch one page of stars if 'FETCH_MULTI_PAGE_STARS' env variable is not set", async () => { + process.env.FETCH_MULTI_PAGE_STARS = undefined; + + let stats = await fetchStats("anuraghazra"); + const rank = calculateRank({ + all_commits: false, + commits: 100, prs: 300, + reviews: 50, issues: 200, + repos: 5, + stars: 300, + followers: 100, }); expect(stats).toStrictEqual({ contributedTo: 61, name: "Anurag Hazra", - totalCommits: 1050, + totalCommits: 100, totalIssues: 200, totalPRs: 300, - // totalStars: 300, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. - totalStars: 200, // NOTE: Temporarily disable fetching of multiple pages. Done because of #2130. + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, + rank, + }); + }); + + it("should not fetch additional stats data when it not requested", async () => { + let stats = await fetchStats("anuraghazra"); + const rank = calculateRank({ + all_commits: false, + commits: 100, + prs: 300, + reviews: 50, + issues: 200, + repos: 5, + stars: 300, + followers: 100, + }); + + expect(stats).toStrictEqual({ + contributedTo: 61, + name: "Anurag Hazra", + totalCommits: 100, + totalIssues: 200, + totalPRs: 300, + totalPRsMerged: 0, + mergedPRsPercentage: 0, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 0, + totalDiscussionsAnswered: 0, + rank, + }); + }); + + it("should fetch additional stats when it requested", async () => { + let stats = await fetchStats("anuraghazra", false, [], true, true, true); + const rank = calculateRank({ + all_commits: false, + commits: 100, + prs: 300, + reviews: 50, + issues: 200, + repos: 5, + stars: 300, + followers: 100, + }); + + expect(stats).toStrictEqual({ + contributedTo: 61, + name: "Anurag Hazra", + totalCommits: 100, + totalIssues: 200, + totalPRs: 300, + totalPRsMerged: 240, + mergedPRsPercentage: 80, + totalReviews: 50, + totalStars: 300, + totalDiscussionsStarted: 10, + totalDiscussionsAnswered: 40, rank, }); }); diff --git a/tests/fetchTopLanguages.test.js b/tests/fetchTopLanguages.test.js index 24416cd294525..e7bd54ac87d34 100644 --- a/tests/fetchTopLanguages.test.js +++ b/tests/fetchTopLanguages.test.js @@ -2,6 +2,7 @@ import "@testing-library/jest-dom"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; import { fetchTopLanguages } from "../src/fetchers/top-languages-fetcher.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; const mock = new MockAdapter(axios); @@ -60,20 +61,22 @@ const error = { }; describe("FetchTopLanguages", () => { - it("should fetch correct language data", async () => { + it("should fetch correct language data while using the new calculation", async () => { mock.onPost("https://api.github.com/graphql").reply(200, data_langs); - let repo = await fetchTopLanguages("anuraghazra"); + let repo = await fetchTopLanguages("anuraghazra", [], 0.5, 0.5); expect(repo).toStrictEqual({ HTML: { color: "#0f0", + count: 2, name: "HTML", - size: 200, + size: 20.000000000000004, }, javascript: { color: "#0ff", + count: 2, name: "javascript", - size: 200, + size: 20.000000000000004, }, }); }); @@ -85,22 +88,84 @@ describe("FetchTopLanguages", () => { expect(repo).toStrictEqual({ HTML: { color: "#0f0", + count: 1, name: "HTML", size: 100, }, javascript: { color: "#0ff", + count: 2, + name: "javascript", + size: 200, + }, + }); + }); + + it("should fetch correct language data while using the old calculation", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, data_langs); + + let repo = await fetchTopLanguages("anuraghazra", [], 1, 0); + expect(repo).toStrictEqual({ + HTML: { + color: "#0f0", + count: 2, + name: "HTML", + size: 200, + }, + javascript: { + color: "#0ff", + count: 2, name: "javascript", size: 200, }, }); }); - it("should throw error", async () => { + it("should rank languages by the number of repositories they appear in", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, data_langs); + + let repo = await fetchTopLanguages("anuraghazra", [], 0, 1); + expect(repo).toStrictEqual({ + HTML: { + color: "#0f0", + count: 2, + name: "HTML", + size: 2, + }, + javascript: { + color: "#0ff", + count: 2, + name: "javascript", + size: 2, + }, + }); + }); + + it("should throw specific error when user not found", async () => { mock.onPost("https://api.github.com/graphql").reply(200, error); await expect(fetchTopLanguages("anuraghazra")).rejects.toThrow( "Could not resolve to a User with the login of 'noname'.", ); }); + + it("should throw other errors with their message", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, { + errors: [{ message: "Some test GraphQL error" }], + }); + + await expect(fetchTopLanguages("anuraghazra")).rejects.toThrow( + "Some test GraphQL error", + ); + }); + + it("should throw error with specific message when error does not contain message property", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, { + errors: [{ type: "TEST" }], + }); + + await expect(fetchTopLanguages("anuraghazra")).rejects.toThrow( + "Something went wrong while trying to retrieve the language data using the GraphQL API.", + ); + }); }); diff --git a/tests/fetchWakatime.test.js b/tests/fetchWakatime.test.js index 47ca25b7254a6..8e24893dfe0fd 100644 --- a/tests/fetchWakatime.test.js +++ b/tests/fetchWakatime.test.js @@ -2,6 +2,8 @@ import "@testing-library/jest-dom"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; import { fetchWakatimeStats } from "../src/fetchers/wakatime-fetcher.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; + const mock = new MockAdapter(axios); afterEach(() => { @@ -100,116 +102,34 @@ const wakaTimeData = { }, }; -describe("Wakatime fetcher", () => { - it("should fetch correct wakatime data", async () => { +describe("WakaTime fetcher", () => { + it("should fetch correct WakaTime data", async () => { const username = "anuraghazra"; mock .onGet( - `https://wakatime.com/api/v1/users/${username}/stats/?is_including_today=true`, + `https://wakatime.com/api/v1/users/${username}/stats?is_including_today=true`, ) .reply(200, wakaTimeData); const repo = await fetchWakatimeStats({ username }); - expect(repo).toMatchInlineSnapshot(` - { - "categories": [ - { - "digital": "22:40", - "hours": 22, - "minutes": 40, - "name": "Coding", - "percent": 100, - "text": "22 hrs 40 mins", - "total_seconds": 81643.570077, - }, - ], - "daily_average": 16095, - "daily_average_including_other_language": 16329, - "days_including_holidays": 7, - "days_minus_holidays": 5, - "editors": [ - { - "digital": "22:40", - "hours": 22, - "minutes": 40, - "name": "VS Code", - "percent": 100, - "text": "22 hrs 40 mins", - "total_seconds": 81643.570077, - }, - ], - "holidays": 2, - "human_readable_daily_average": "4 hrs 28 mins", - "human_readable_daily_average_including_other_language": "4 hrs 32 mins", - "human_readable_total": "22 hrs 21 mins", - "human_readable_total_including_other_language": "22 hrs 40 mins", - "id": "random hash", - "is_already_updating": false, - "is_coding_activity_visible": true, - "is_including_today": false, - "is_other_usage_visible": true, - "is_stuck": false, - "is_up_to_date": true, - "languages": [ - { - "digital": "0:19", - "hours": 0, - "minutes": 19, - "name": "Other", - "percent": 1.43, - "text": "19 mins", - "total_seconds": 1170.434361, - }, - { - "digital": "0:01", - "hours": 0, - "minutes": 1, - "name": "TypeScript", - "percent": 0.1, - "text": "1 min", - "total_seconds": 83.293809, - }, - { - "digital": "0:00", - "hours": 0, - "minutes": 0, - "name": "YAML", - "percent": 0.07, - "text": "0 secs", - "total_seconds": 54.975151, - }, - ], - "operating_systems": [ - { - "digital": "22:40", - "hours": 22, - "minutes": 40, - "name": "Mac", - "percent": 100, - "text": "22 hrs 40 mins", - "total_seconds": 81643.570077, - }, - ], - "percent_calculated": 100, - "range": "last_7_days", - "status": "ok", - "timeout": 15, - "total_seconds": 80473.135716, - "total_seconds_including_other_language": 81643.570077, - "user_id": "random hash", - "username": "anuraghazra", - "writes_only": false, - } - `); + expect(repo).toStrictEqual(wakaTimeData.data); }); - it("should throw error", async () => { + it("should throw error if username param missing", async () => { mock.onGet(/\/https:\/\/wakatime\.com\/api/).reply(404, wakaTimeData); await expect(fetchWakatimeStats("noone")).rejects.toThrow( 'Missing params "username" make sure you pass the parameters in URL', ); }); + + it("should throw error if username is not found", async () => { + mock.onGet(/\/https:\/\/wakatime\.com\/api/).reply(404, wakaTimeData); + + await expect(fetchWakatimeStats({ username: "noone" })).rejects.toThrow( + "Could not resolve to a User with the login of 'noone'", + ); + }); }); export { wakaTimeData }; diff --git a/tests/flexLayout.test.js b/tests/flexLayout.test.js index 702cedbfc8e19..e07aae2944290 100644 --- a/tests/flexLayout.test.js +++ b/tests/flexLayout.test.js @@ -1,4 +1,5 @@ import { flexLayout } from "../src/common/utils.js"; +import { expect, it, describe } from "@jest/globals"; describe("flexLayout", () => { it("should work with row & col layouts", () => { diff --git a/tests/gist.test.js b/tests/gist.test.js new file mode 100644 index 0000000000000..8654e3da37d0f --- /dev/null +++ b/tests/gist.test.js @@ -0,0 +1,196 @@ +import { jest } from "@jest/globals"; +import "@testing-library/jest-dom"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import { expect, it, describe, afterEach } from "@jest/globals"; +import { renderGistCard } from "../src/cards/gist-card.js"; +import { renderError, CONSTANTS } from "../src/common/utils.js"; +import gist from "../api/gist.js"; + +const gist_data = { + data: { + viewer: { + gist: { + description: + "List of countries and territories in English and Spanish: name, continent, capital, dial code, country codes, TLD, and area in sq km. Lista de países y territorios en Inglés y Español: nombre, continente, capital, código de teléfono, códigos de país, dominio y área en km cuadrados. Updated 2023", + owner: { + login: "Yizack", + }, + stargazerCount: 33, + forks: { + totalCount: 11, + }, + files: [ + { + name: "countries.json", + language: { + name: "JSON", + }, + size: 85858, + }, + ], + }, + }, + }, +}; + +const gist_not_found_data = { + data: { + viewer: { + gist: null, + }, + }, +}; + +const mock = new MockAdapter(axios); + +afterEach(() => { + mock.reset(); +}); + +describe("Test /api/gist", () => { + it("should test the request", async () => { + const req = { + query: { + id: "bbfce31e0217a3689c8d961a356cb10d", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, gist_data); + + await gist(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderGistCard({ + name: gist_data.data.viewer.gist.files[0].name, + nameWithOwner: `${gist_data.data.viewer.gist.owner.login}/${gist_data.data.viewer.gist.files[0].name}`, + description: gist_data.data.viewer.gist.description, + language: gist_data.data.viewer.gist.files[0].language.name, + starsCount: gist_data.data.viewer.gist.stargazerCount, + forksCount: gist_data.data.viewer.gist.forks.totalCount, + }), + ); + }); + + it("should get the query options", async () => { + const req = { + query: { + id: "bbfce31e0217a3689c8d961a356cb10d", + title_color: "fff", + icon_color: "fff", + text_color: "fff", + bg_color: "fff", + show_owner: true, + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, gist_data); + + await gist(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderGistCard( + { + name: gist_data.data.viewer.gist.files[0].name, + nameWithOwner: `${gist_data.data.viewer.gist.owner.login}/${gist_data.data.viewer.gist.files[0].name}`, + description: gist_data.data.viewer.gist.description, + language: gist_data.data.viewer.gist.files[0].language.name, + starsCount: gist_data.data.viewer.gist.stargazerCount, + forksCount: gist_data.data.viewer.gist.forks.totalCount, + }, + { ...req.query }, + ), + ); + }); + + it("should render error if id is not provided", async () => { + const req = { + query: {}, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + await gist(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError( + 'Missing params "id" make sure you pass the parameters in URL', + "/api/gist?id=GIST_ID", + ), + ); + }); + + it("should render error if gist is not found", async () => { + const req = { + query: { + id: "bbfce31e0217a3689c8d961a356cb10d", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock + .onPost("https://api.github.com/graphql") + .reply(200, gist_not_found_data); + + await gist(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith(renderError("Gist not found")); + }); + + it("should render error if wrong locale is provided", async () => { + const req = { + query: { + id: "bbfce31e0217a3689c8d961a356cb10d", + locale: "asdf", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + await gist(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "Language not found"), + ); + }); + + it("should have proper cache", async () => { + const req = { + query: { + id: "bbfce31e0217a3689c8d961a356cb10d", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, gist_data); + + await gist(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.setHeader).toBeCalledWith( + "Cache-Control", + `max-age=${CONSTANTS.SIX_HOURS / 2}, s-maxage=${ + CONSTANTS.SIX_HOURS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); + }); +}); diff --git a/tests/i18n.test.js b/tests/i18n.test.js new file mode 100644 index 0000000000000..0466682538fb0 --- /dev/null +++ b/tests/i18n.test.js @@ -0,0 +1,33 @@ +import { expect, it, describe } from "@jest/globals"; +import { I18n } from "../src/common/I18n.js"; +import { statCardLocales } from "../src/translations.js"; + +describe("I18n", () => { + it("should return translated string", () => { + const i18n = new I18n({ + locale: "en", + translations: statCardLocales({ name: "Anurag Hazra", apostrophe: "s" }), + }); + expect(i18n.t("statcard.title")).toBe("Anurag Hazra's GitHub Stats"); + }); + + it("should throw error if translation string not found", () => { + const i18n = new I18n({ + locale: "en", + translations: statCardLocales({ name: "Anurag Hazra", apostrophe: "s" }), + }); + expect(() => i18n.t("statcard.title1")).toThrow( + "statcard.title1 Translation string not found", + ); + }); + + it("should throw error if translation not found for locale", () => { + const i18n = new I18n({ + locale: "asdf", + translations: statCardLocales({ name: "Anurag Hazra", apostrophe: "s" }), + }); + expect(() => i18n.t("statcard.title")).toThrow( + "'statcard.title' translation not found for locale 'asdf'", + ); + }); +}); diff --git a/tests/pat-info.test.js b/tests/pat-info.test.js new file mode 100644 index 0000000000000..6c71d401c38f3 --- /dev/null +++ b/tests/pat-info.test.js @@ -0,0 +1,245 @@ +/** + * @file Tests for the status/pat-info cloud function. + */ +import dotenv from "dotenv"; +dotenv.config(); + +import { jest } from "@jest/globals"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import patInfo, { RATE_LIMIT_SECONDS } from "../api/status/pat-info.js"; +import { expect, it, describe, afterEach, beforeAll } from "@jest/globals"; + +const mock = new MockAdapter(axios); + +const successData = { + data: { + rateLimit: { + remaining: 4986, + }, + }, +}; + +const faker = (query) => { + const req = { + query: { ...query }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + return { req, res }; +}; + +const rate_limit_error = { + errors: [ + { + type: "RATE_LIMITED", + message: "API rate limit exceeded for user ID.", + }, + ], + data: { + rateLimit: { + resetAt: Date.now(), + }, + }, +}; + +const other_error = { + errors: [ + { + type: "SOME_ERROR", + message: "This is a error", + }, + ], +}; + +const bad_credentials_error = { + message: "Bad credentials", +}; + +afterEach(() => { + mock.reset(); +}); + +describe("Test /api/status/pat-info", () => { + beforeAll(() => { + // reset patenv first so that dotenv doesn't populate them with local envs + process.env = {}; + process.env.PAT_1 = "testPAT1"; + process.env.PAT_2 = "testPAT2"; + process.env.PAT_3 = "testPAT3"; + process.env.PAT_4 = "testPAT4"; + }); + + it("should return only 'validPATs' if all PATs are valid", async () => { + mock + .onPost("https://api.github.com/graphql") + .replyOnce(200, rate_limit_error) + .onPost("https://api.github.com/graphql") + .reply(200, successData); + + const { req, res } = faker({}, {}); + await patInfo(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith( + JSON.stringify( + { + validPATs: ["PAT_2", "PAT_3", "PAT_4"], + expiredPATs: [], + exhaustedPATs: ["PAT_1"], + suspendedPATs: [], + errorPATs: [], + details: { + PAT_1: { + status: "exhausted", + remaining: 0, + resetIn: "0 minutes", + }, + PAT_2: { + status: "valid", + remaining: 4986, + }, + PAT_3: { + status: "valid", + remaining: 4986, + }, + PAT_4: { + status: "valid", + remaining: 4986, + }, + }, + }, + null, + 2, + ), + ); + }); + + it("should return `errorPATs` if a PAT causes an error to be thrown", async () => { + mock + .onPost("https://api.github.com/graphql") + .replyOnce(200, other_error) + .onPost("https://api.github.com/graphql") + .reply(200, successData); + + const { req, res } = faker({}, {}); + await patInfo(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith( + JSON.stringify( + { + validPATs: ["PAT_2", "PAT_3", "PAT_4"], + expiredPATs: [], + exhaustedPATs: [], + suspendedPATs: [], + errorPATs: ["PAT_1"], + details: { + PAT_1: { + status: "error", + error: { + type: "SOME_ERROR", + message: "This is a error", + }, + }, + PAT_2: { + status: "valid", + remaining: 4986, + }, + PAT_3: { + status: "valid", + remaining: 4986, + }, + PAT_4: { + status: "valid", + remaining: 4986, + }, + }, + }, + null, + 2, + ), + ); + }); + + it("should return `expiredPaths` if a PAT returns a 'Bad credentials' error", async () => { + mock + .onPost("https://api.github.com/graphql") + .replyOnce(404, bad_credentials_error) + .onPost("https://api.github.com/graphql") + .reply(200, successData); + + const { req, res } = faker({}, {}); + await patInfo(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith( + JSON.stringify( + { + validPATs: ["PAT_2", "PAT_3", "PAT_4"], + expiredPATs: ["PAT_1"], + exhaustedPATs: [], + suspendedPATs: [], + errorPATs: [], + details: { + PAT_1: { + status: "expired", + }, + PAT_2: { + status: "valid", + remaining: 4986, + }, + PAT_3: { + status: "valid", + remaining: 4986, + }, + PAT_4: { + status: "valid", + remaining: 4986, + }, + }, + }, + null, + 2, + ), + ); + }); + + it("should throw an error if something goes wrong", async () => { + mock.onPost("https://api.github.com/graphql").networkError(); + + const { req, res } = faker({}, {}); + await patInfo(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith("Something went wrong: Network Error"); + }); + + it("should have proper cache when no error is thrown", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, successData); + + const { req, res } = faker({}, {}); + await patInfo(req, res); + + expect(res.setHeader.mock.calls).toEqual([ + ["Content-Type", "application/json"], + ["Cache-Control", `max-age=0, s-maxage=${RATE_LIMIT_SECONDS}`], + ]); + }); + + it("should have proper cache when error is thrown", async () => { + mock.reset(); + mock.onPost("https://api.github.com/graphql").networkError(); + + const { req, res } = faker({}, {}); + await patInfo(req, res); + + expect(res.setHeader.mock.calls).toEqual([ + ["Content-Type", "application/json"], + ["Cache-Control", "no-store"], + ]); + }); +}); diff --git a/tests/pin.test.js b/tests/pin.test.js index 89e1021dcaa6c..105e4450c3805 100644 --- a/tests/pin.test.js +++ b/tests/pin.test.js @@ -4,7 +4,8 @@ import axios from "axios"; import MockAdapter from "axios-mock-adapter"; import pin from "../api/pin.js"; import { renderRepoCard } from "../src/cards/repo-card.js"; -import { renderError } from "../src/common/utils.js"; +import { renderError, CONSTANTS } from "../src/common/utils.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; const data_repo = { repository: { @@ -137,4 +138,91 @@ describe("Test /api/pin", () => { renderError("Organization Repository Not found"), ); }); + + it("should render error card if username in blacklist", async () => { + const req = { + query: { + username: "renovate-bot", + repo: "convoychat", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, data_user); + + await pin(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "This username is blacklisted"), + ); + }); + + it("should render error card if wrong locale provided", async () => { + const req = { + query: { + username: "anuraghazra", + repo: "convoychat", + locale: "asdf", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, data_user); + + await pin(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "Language not found"), + ); + }); + + it("should render error card if missing required parameters", async () => { + const req = { + query: {}, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + await pin(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError( + 'Missing params "username", "repo" make sure you pass the parameters in URL', + "/api/pin?username=USERNAME&repo=REPO_NAME", + ), + ); + }); + + it("should have proper cache", async () => { + const req = { + query: { + username: "anuraghazra", + repo: "convoychat", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, data_user); + + await pin(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.setHeader).toBeCalledWith( + "Cache-Control", + `max-age=${CONSTANTS.SIX_HOURS / 2}, s-maxage=${ + CONSTANTS.SIX_HOURS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); + }); }); diff --git a/tests/renderGistCard.test.js b/tests/renderGistCard.test.js new file mode 100644 index 0000000000000..f514bf6dc0d93 --- /dev/null +++ b/tests/renderGistCard.test.js @@ -0,0 +1,239 @@ +import { renderGistCard } from "../src/cards/gist-card"; +import { describe, expect, it } from "@jest/globals"; +import { queryByTestId } from "@testing-library/dom"; +import { cssToObject } from "@uppercod/css-to-object"; +import { themes } from "../themes/index.js"; +import "@testing-library/jest-dom"; + +/** + * @type {import("../src/fetchers/gist-fetcher").GistData} + */ +const data = { + name: "test", + nameWithOwner: "anuraghazra/test", + description: "Small test repository with different Python programs.", + language: "Python", + starsCount: 163, + forksCount: 19, +}; + +describe("test renderGistCard", () => { + it("should render correctly", () => { + document.body.innerHTML = renderGistCard(data); + + const [header] = document.getElementsByClassName("header"); + + expect(header).toHaveTextContent("test"); + expect(header).not.toHaveTextContent("anuraghazra"); + expect(document.getElementsByClassName("description")[0]).toHaveTextContent( + "Small test repository with different Python programs.", + ); + expect(queryByTestId(document.body, "starsCount")).toHaveTextContent("163"); + expect(queryByTestId(document.body, "forksCount")).toHaveTextContent("19"); + expect(queryByTestId(document.body, "lang-name")).toHaveTextContent( + "Python", + ); + expect(queryByTestId(document.body, "lang-color")).toHaveAttribute( + "fill", + "#3572A5", + ); + }); + + it("should display username in title if show_owner is true", () => { + document.body.innerHTML = renderGistCard(data, { show_owner: true }); + const [header] = document.getElementsByClassName("header"); + expect(header).toHaveTextContent("anuraghazra/test"); + }); + + it("should trim header if name is too long", () => { + document.body.innerHTML = renderGistCard({ + ...data, + name: "some-really-long-repo-name-for-test-purposes", + }); + const [header] = document.getElementsByClassName("header"); + expect(header).toHaveTextContent("some-really-long-repo-name-for-test..."); + }); + + it("should trim description if description os too long", () => { + document.body.innerHTML = renderGistCard({ + ...data, + description: + "The quick brown fox jumps over the lazy dog is an English-language pangram—a sentence that contains all of the letters of the English alphabet", + }); + expect( + document.getElementsByClassName("description")[0].children[0].textContent, + ).toBe("The quick brown fox jumps over the lazy dog is an"); + + expect( + document.getElementsByClassName("description")[0].children[1].textContent, + ).toBe("English-language pangram—a sentence that contains all"); + }); + + it("should not trim description if it is short", () => { + document.body.innerHTML = renderGistCard({ + ...data, + description: "Small text should not trim", + }); + expect(document.getElementsByClassName("description")[0]).toHaveTextContent( + "Small text should not trim", + ); + }); + + it("should render emojis in description", () => { + document.body.innerHTML = renderGistCard({ + ...data, + description: "This is a test gist description with :heart: emoji.", + }); + expect(document.getElementsByClassName("description")[0]).toHaveTextContent( + "This is a test gist description with ❤️ emoji.", + ); + }); + + it("should render custom colors properly", () => { + const customColors = { + title_color: "5a0", + icon_color: "1b998b", + text_color: "9991", + bg_color: "252525", + }; + + document.body.innerHTML = renderGistCard(data, { + ...customColors, + }); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.innerHTML); + + const headerClassStyles = stylesObject[":host"][".header "]; + const descClassStyles = stylesObject[":host"][".description "]; + const iconClassStyles = stylesObject[":host"][".icon "]; + + expect(headerClassStyles.fill.trim()).toBe(`#${customColors.title_color}`); + expect(descClassStyles.fill.trim()).toBe(`#${customColors.text_color}`); + expect(iconClassStyles.fill.trim()).toBe(`#${customColors.icon_color}`); + expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( + "fill", + "#252525", + ); + }); + + it("should render with all the themes", () => { + Object.keys(themes).forEach((name) => { + document.body.innerHTML = renderGistCard(data, { + theme: name, + }); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.innerHTML); + + const headerClassStyles = stylesObject[":host"][".header "]; + const descClassStyles = stylesObject[":host"][".description "]; + const iconClassStyles = stylesObject[":host"][".icon "]; + + expect(headerClassStyles.fill.trim()).toBe( + `#${themes[name].title_color}`, + ); + expect(descClassStyles.fill.trim()).toBe(`#${themes[name].text_color}`); + expect(iconClassStyles.fill.trim()).toBe(`#${themes[name].icon_color}`); + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, + ); + }); + }); + + it("should render custom colors with themes", () => { + document.body.innerHTML = renderGistCard(data, { + title_color: "5a0", + theme: "radical", + }); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.innerHTML); + + const headerClassStyles = stylesObject[":host"][".header "]; + const descClassStyles = stylesObject[":host"][".description "]; + const iconClassStyles = stylesObject[":host"][".icon "]; + + expect(headerClassStyles.fill.trim()).toBe("#5a0"); + expect(descClassStyles.fill.trim()).toBe(`#${themes.radical.text_color}`); + expect(iconClassStyles.fill.trim()).toBe(`#${themes.radical.icon_color}`); + expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( + "fill", + `#${themes.radical.bg_color}`, + ); + }); + + it("should render custom colors with themes and fallback to default colors if invalid", () => { + document.body.innerHTML = renderGistCard(data, { + title_color: "invalid color", + text_color: "invalid color", + theme: "radical", + }); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.innerHTML); + + const headerClassStyles = stylesObject[":host"][".header "]; + const descClassStyles = stylesObject[":host"][".description "]; + const iconClassStyles = stylesObject[":host"][".icon "]; + + expect(headerClassStyles.fill.trim()).toBe( + `#${themes.default.title_color}`, + ); + expect(descClassStyles.fill.trim()).toBe(`#${themes.default.text_color}`); + expect(iconClassStyles.fill.trim()).toBe(`#${themes.radical.icon_color}`); + expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( + "fill", + `#${themes.radical.bg_color}`, + ); + }); + + it("should not render star count or fork count if either of the are zero", () => { + document.body.innerHTML = renderGistCard({ + ...data, + starsCount: 0, + }); + + expect(queryByTestId(document.body, "starsCount")).toBeNull(); + expect(queryByTestId(document.body, "forksCount")).toBeInTheDocument(); + + document.body.innerHTML = renderGistCard({ + ...data, + starsCount: 1, + forksCount: 0, + }); + + expect(queryByTestId(document.body, "starsCount")).toBeInTheDocument(); + expect(queryByTestId(document.body, "forksCount")).toBeNull(); + + document.body.innerHTML = renderGistCard({ + ...data, + starsCount: 0, + forksCount: 0, + }); + + expect(queryByTestId(document.body, "starsCount")).toBeNull(); + expect(queryByTestId(document.body, "forksCount")).toBeNull(); + }); + + it("should render without rounding", () => { + document.body.innerHTML = renderGistCard(data, { + border_radius: "0", + }); + expect(document.querySelector("rect")).toHaveAttribute("rx", "0"); + document.body.innerHTML = renderGistCard(data, {}); + expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5"); + }); + + it("should fallback to default description", () => { + document.body.innerHTML = renderGistCard({ + ...data, + description: undefined, + }); + expect(document.getElementsByClassName("description")[0]).toHaveTextContent( + "No description provided", + ); + }); +}); diff --git a/tests/renderRepoCard.test.js b/tests/renderRepoCard.test.js index 580e970ae9b32..abbad4dbe2a3b 100644 --- a/tests/renderRepoCard.test.js +++ b/tests/renderRepoCard.test.js @@ -2,6 +2,7 @@ import { queryByTestId } from "@testing-library/dom"; import "@testing-library/jest-dom"; import { cssToObject } from "@uppercod/css-to-object"; import { renderRepoCard } from "../src/cards/repo-card.js"; +import { expect, it, describe } from "@jest/globals"; import { themes } from "../themes/index.js"; @@ -189,9 +190,10 @@ describe("Test renderRepoCard", () => { ); expect(descClassStyles.fill.trim()).toBe(`#${themes[name].text_color}`); expect(iconClassStyles.fill.trim()).toBe(`#${themes[name].icon_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes[name].bg_color}`, + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, ); }); }); @@ -337,4 +339,34 @@ describe("Test renderRepoCard", () => { "No description provided", ); }); + + it("should have correct height with specified `description_lines_count` parameter", () => { + // Testing short description + document.body.innerHTML = renderRepoCard(data_repo.repository, { + description_lines_count: 1, + }); + expect(document.querySelector("svg")).toHaveAttribute("height", "120"); + document.body.innerHTML = renderRepoCard(data_repo.repository, { + description_lines_count: 3, + }); + expect(document.querySelector("svg")).toHaveAttribute("height", "150"); + + // Testing long description + const longDescription = + "A tool that will make a lot of iPhone/iPad developers' life easier. It shares your app over-the-air in a WiFi network. Bonjour is used and no configuration is needed."; + document.body.innerHTML = renderRepoCard( + { ...data_repo.repository, description: longDescription }, + { + description_lines_count: 3, + }, + ); + expect(document.querySelector("svg")).toHaveAttribute("height", "150"); + document.body.innerHTML = renderRepoCard( + { ...data_repo.repository, description: longDescription }, + { + description_lines_count: 1, + }, + ); + expect(document.querySelector("svg")).toHaveAttribute("height", "120"); + }); }); diff --git a/tests/renderStatsCard.test.js b/tests/renderStatsCard.test.js index e39e45b7870e3..973ee0a5a5db6 100644 --- a/tests/renderStatsCard.test.js +++ b/tests/renderStatsCard.test.js @@ -5,6 +5,9 @@ import { } from "@testing-library/dom"; import { cssToObject } from "@uppercod/css-to-object"; import { renderStatsCard } from "../src/cards/stats-card.js"; +import { expect, it, describe } from "@jest/globals"; +import { CustomError } from "../src/common/utils.js"; + // adds special assertions like toHaveTextContent import "@testing-library/jest-dom"; @@ -16,8 +19,13 @@ const stats = { totalCommits: 200, totalIssues: 300, totalPRs: 400, + totalPRsMerged: 320, + mergedPRsPercentage: 80, + totalReviews: 50, + totalDiscussionsStarted: 10, + totalDiscussionsAnswered: 50, contributedTo: 500, - rank: { level: "A+", score: 40 }, + rank: { level: "A+", percentile: 40 }, }; describe("Test renderStatsCard", () => { @@ -38,6 +46,19 @@ describe("Test renderStatsCard", () => { expect(getByTestId(document.body, "contribs").textContent).toBe("500"); expect(queryByTestId(document.body, "card-bg")).toBeInTheDocument(); expect(queryByTestId(document.body, "rank-circle")).toBeInTheDocument(); + + // Default hidden stats + expect(queryByTestId(document.body, "reviews")).not.toBeInTheDocument(); + expect( + queryByTestId(document.body, "discussions_started"), + ).not.toBeInTheDocument(); + expect( + queryByTestId(document.body, "discussions_answered"), + ).not.toBeInTheDocument(); + expect(queryByTestId(document.body, "prs_merged")).not.toBeInTheDocument(); + expect( + queryByTestId(document.body, "prs_merged_percentage"), + ).not.toBeInTheDocument(); }); it("should have proper name apostrophe", () => { @@ -68,6 +89,38 @@ describe("Test renderStatsCard", () => { expect(queryByTestId(document.body, "issues")).toBeNull(); expect(queryByTestId(document.body, "prs")).toBeNull(); expect(queryByTestId(document.body, "contribs")).toBeNull(); + expect(queryByTestId(document.body, "reviews")).toBeNull(); + expect(queryByTestId(document.body, "discussions_started")).toBeNull(); + expect(queryByTestId(document.body, "discussions_answered")).toBeNull(); + expect(queryByTestId(document.body, "prs_merged")).toBeNull(); + expect(queryByTestId(document.body, "prs_merged_percentage")).toBeNull(); + }); + + it("should show additional stats", () => { + document.body.innerHTML = renderStatsCard(stats, { + show: [ + "reviews", + "discussions_started", + "discussions_answered", + "prs_merged", + "prs_merged_percentage", + ], + }); + + expect( + document.body.getElementsByTagName("svg")[0].getAttribute("height"), + ).toBe("320"); + + expect(queryByTestId(document.body, "stars")).toBeDefined(); + expect(queryByTestId(document.body, "commits")).toBeDefined(); + expect(queryByTestId(document.body, "issues")).toBeDefined(); + expect(queryByTestId(document.body, "prs")).toBeDefined(); + expect(queryByTestId(document.body, "contribs")).toBeDefined(); + expect(queryByTestId(document.body, "reviews")).toBeDefined(); + expect(queryByTestId(document.body, "discussions_started")).toBeDefined(); + expect(queryByTestId(document.body, "discussions_answered")).toBeDefined(); + expect(queryByTestId(document.body, "prs_merged")).toBeDefined(); + expect(queryByTestId(document.body, "prs_merged_percentage")).toBeDefined(); }); it("should hide_rank", () => { @@ -78,16 +131,17 @@ describe("Test renderStatsCard", () => { it("should render with custom width set", () => { document.body.innerHTML = renderStatsCard(stats); - expect(document.querySelector("svg")).toHaveAttribute("width", "495"); + expect(document.querySelector("svg")).toHaveAttribute("width", "450"); - document.body.innerHTML = renderStatsCard(stats, { card_width: 400 }); - expect(document.querySelector("svg")).toHaveAttribute("width", "400"); + document.body.innerHTML = renderStatsCard(stats, { card_width: 500 }); + expect(document.querySelector("svg")).toHaveAttribute("width", "500"); }); it("should render with custom width set and limit minimum width", () => { document.body.innerHTML = renderStatsCard(stats, { card_width: 1 }); - expect(document.querySelector("svg")).toHaveAttribute("width", "340"); + expect(document.querySelector("svg")).toHaveAttribute("width", "420"); + // Test default minimum card width without rank circle. document.body.innerHTML = renderStatsCard(stats, { card_width: 1, hide_rank: true, @@ -97,6 +151,7 @@ describe("Test renderStatsCard", () => { "305.81250000000006", ); + // Test minimum card width with rank and icons. document.body.innerHTML = renderStatsCard(stats, { card_width: 1, hide_rank: true, @@ -104,22 +159,24 @@ describe("Test renderStatsCard", () => { }); expect(document.querySelector("svg")).toHaveAttribute( "width", - "305.81250000000006", + "322.81250000000006", ); + // Test minimum card width with icons but without rank. document.body.innerHTML = renderStatsCard(stats, { card_width: 1, hide_rank: false, show_icons: true, }); - expect(document.querySelector("svg")).toHaveAttribute("width", "356"); + expect(document.querySelector("svg")).toHaveAttribute("width", "437"); + // Test minimum card width without icons or rank. document.body.innerHTML = renderStatsCard(stats, { card_width: 1, hide_rank: false, show_icons: false, }); - expect(document.querySelector("svg")).toHaveAttribute("width", "340"); + expect(document.querySelector("svg")).toHaveAttribute("width", "420"); }); it("should render default colors properly", () => { @@ -207,9 +264,10 @@ describe("Test renderStatsCard", () => { ); expect(statClassStyles.fill.trim()).toBe(`#${themes[name].text_color}`); expect(iconClassStyles.fill.trim()).toBe(`#${themes[name].icon_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes[name].bg_color}`, + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, ); }); }); @@ -312,7 +370,7 @@ describe("Test renderStatsCard", () => { expect( document.body.getElementsByTagName("svg")[0].getAttribute("width"), - ).toBe("270"); + ).toBe("287"); }); it("should render translations", () => { @@ -329,7 +387,9 @@ describe("Test renderStatsCard", () => { document.querySelector( 'g[transform="translate(0, 25)"]>.stagger>.stat.bold', ).textContent, - ).toMatchInlineSnapshot(`"累计提交数(commit) (2022):"`); + ).toMatchInlineSnapshot( + `"累计提交数(commit) (${new Date().getFullYear()}):"`, + ); expect( document.querySelector( 'g[transform="translate(0, 50)"]>.stagger>.stat.bold', @@ -344,7 +404,7 @@ describe("Test renderStatsCard", () => { document.querySelector( 'g[transform="translate(0, 100)"]>.stagger>.stat.bold', ).textContent, - ).toMatchInlineSnapshot(`"参与项目数 (last year):"`); + ).toMatchInlineSnapshot(`"贡献于(去年):"`); }); it("should render without rounding", () => { @@ -353,4 +413,58 @@ describe("Test renderStatsCard", () => { document.body.innerHTML = renderStatsCard(stats, {}); expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5"); }); + + it("should shorten values", () => { + stats["totalCommits"] = 1999; + + document.body.innerHTML = renderStatsCard(stats); + expect(getByTestId(document.body, "commits").textContent).toBe("2k"); + document.body.innerHTML = renderStatsCard(stats, { number_format: "long" }); + expect(getByTestId(document.body, "commits").textContent).toBe("1999"); + }); + + it("should render default rank icon with level A+", () => { + document.body.innerHTML = renderStatsCard(stats, { + rank_icon: "default", + }); + expect(queryByTestId(document.body, "level-rank-icon")).toBeDefined(); + expect( + queryByTestId(document.body, "level-rank-icon").textContent.trim(), + ).toBe("A+"); + }); + + it("should render github rank icon", () => { + document.body.innerHTML = renderStatsCard(stats, { + rank_icon: "github", + }); + expect(queryByTestId(document.body, "github-rank-icon")).toBeDefined(); + }); + + it("should show the rank percentile", () => { + document.body.innerHTML = renderStatsCard(stats, { + rank_icon: "percentile", + }); + expect(queryByTestId(document.body, "percentile-top-header")).toBeDefined(); + expect( + queryByTestId(document.body, "percentile-top-header").textContent.trim(), + ).toBe("Top"); + expect(queryByTestId(document.body, "rank-percentile-text")).toBeDefined(); + expect( + queryByTestId(document.body, "percentile-rank-value").textContent.trim(), + ).toBe(stats.rank.percentile.toFixed(1) + "%"); + }); + + it("should throw error if all stats and rank icon are hidden", () => { + expect(() => + renderStatsCard(stats, { + hide: ["stars", "commits", "prs", "issues", "contribs"], + hide_rank: true, + }), + ).toThrow( + new CustomError( + "Could not render stats card.", + "Either stats or rank are required.", + ), + ); + }); }); diff --git a/tests/renderTopLanguages.test.js b/tests/renderTopLanguages.test.js deleted file mode 100644 index 8ae4bbd0c16e6..0000000000000 --- a/tests/renderTopLanguages.test.js +++ /dev/null @@ -1,273 +0,0 @@ -import { queryAllByTestId, queryByTestId } from "@testing-library/dom"; -import { cssToObject } from "@uppercod/css-to-object"; -import { - MIN_CARD_WIDTH, - renderTopLanguages, -} from "../src/cards/top-languages-card.js"; -// adds special assertions like toHaveTextContent -import "@testing-library/jest-dom"; - -import { themes } from "../themes/index.js"; - -const langs = { - HTML: { - color: "#0f0", - name: "HTML", - size: 200, - }, - javascript: { - color: "#0ff", - name: "javascript", - size: 200, - }, - css: { - color: "#ff0", - name: "css", - size: 100, - }, -}; - -describe("Test renderTopLanguages", () => { - it("should render correctly", () => { - document.body.innerHTML = renderTopLanguages(langs); - - expect(queryByTestId(document.body, "header")).toHaveTextContent( - "Most Used Languages", - ); - - expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( - "HTML", - ); - expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent( - "javascript", - ); - expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent( - "css", - ); - expect(queryAllByTestId(document.body, "lang-progress")[0]).toHaveAttribute( - "width", - "40%", - ); - expect(queryAllByTestId(document.body, "lang-progress")[1]).toHaveAttribute( - "width", - "40%", - ); - expect(queryAllByTestId(document.body, "lang-progress")[2]).toHaveAttribute( - "width", - "20%", - ); - }); - - it("should hide languages when hide is passed", () => { - document.body.innerHTML = renderTopLanguages(langs, { - hide: ["HTML"], - }); - expect(queryAllByTestId(document.body, "lang-name")[0]).toBeInTheDocument( - "javascript", - ); - expect(queryAllByTestId(document.body, "lang-name")[1]).toBeInTheDocument( - "css", - ); - expect(queryAllByTestId(document.body, "lang-name")[2]).not.toBeDefined(); - - // multiple languages passed - document.body.innerHTML = renderTopLanguages(langs, { - hide: ["HTML", "css"], - }); - expect(queryAllByTestId(document.body, "lang-name")[0]).toBeInTheDocument( - "javascript", - ); - expect(queryAllByTestId(document.body, "lang-name")[1]).not.toBeDefined(); - }); - - it("should resize the height correctly depending on langs", () => { - document.body.innerHTML = renderTopLanguages(langs, {}); - expect(document.querySelector("svg")).toHaveAttribute("height", "205"); - - document.body.innerHTML = renderTopLanguages( - { - ...langs, - python: { - color: "#ff0", - name: "python", - size: 100, - }, - }, - {}, - ); - expect(document.querySelector("svg")).toHaveAttribute("height", "245"); - }); - - it("should render with custom width set", () => { - document.body.innerHTML = renderTopLanguages(langs, {}); - - expect(document.querySelector("svg")).toHaveAttribute("width", "300"); - - document.body.innerHTML = renderTopLanguages(langs, { card_width: 400 }); - expect(document.querySelector("svg")).toHaveAttribute("width", "400"); - }); - - it("should render with min width", () => { - document.body.innerHTML = renderTopLanguages(langs, { card_width: 190 }); - - expect(document.querySelector("svg")).toHaveAttribute( - "width", - MIN_CARD_WIDTH.toString(), - ); - - document.body.innerHTML = renderTopLanguages(langs, { card_width: 100 }); - expect(document.querySelector("svg")).toHaveAttribute( - "width", - MIN_CARD_WIDTH.toString(), - ); - }); - - it("should render default colors properly", () => { - document.body.innerHTML = renderTopLanguages(langs); - - const styleTag = document.querySelector("style"); - const stylesObject = cssToObject(styleTag.textContent); - - const headerStyles = stylesObject[":host"][".header "]; - const langNameStyles = stylesObject[":host"][".lang-name "]; - - expect(headerStyles.fill.trim()).toBe("#2f80ed"); - expect(langNameStyles.fill.trim()).toBe("#434d58"); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - "#fffefe", - ); - }); - - it("should render custom colors properly", () => { - const customColors = { - title_color: "5a0", - icon_color: "1b998b", - text_color: "9991", - bg_color: "252525", - }; - - document.body.innerHTML = renderTopLanguages(langs, { ...customColors }); - - const styleTag = document.querySelector("style"); - const stylesObject = cssToObject(styleTag.innerHTML); - - const headerStyles = stylesObject[":host"][".header "]; - const langNameStyles = stylesObject[":host"][".lang-name "]; - - expect(headerStyles.fill.trim()).toBe(`#${customColors.title_color}`); - expect(langNameStyles.fill.trim()).toBe(`#${customColors.text_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - "#252525", - ); - }); - - it("should render custom colors with themes", () => { - document.body.innerHTML = renderTopLanguages(langs, { - title_color: "5a0", - theme: "radical", - }); - - const styleTag = document.querySelector("style"); - const stylesObject = cssToObject(styleTag.innerHTML); - - const headerStyles = stylesObject[":host"][".header "]; - const langNameStyles = stylesObject[":host"][".lang-name "]; - - expect(headerStyles.fill.trim()).toBe("#5a0"); - expect(langNameStyles.fill.trim()).toBe(`#${themes.radical.text_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes.radical.bg_color}`, - ); - }); - - it("should render with all the themes", () => { - Object.keys(themes).forEach((name) => { - document.body.innerHTML = renderTopLanguages(langs, { - theme: name, - }); - - const styleTag = document.querySelector("style"); - const stylesObject = cssToObject(styleTag.innerHTML); - - const headerStyles = stylesObject[":host"][".header "]; - const langNameStyles = stylesObject[":host"][".lang-name "]; - - expect(headerStyles.fill.trim()).toBe(`#${themes[name].title_color}`); - expect(langNameStyles.fill.trim()).toBe(`#${themes[name].text_color}`); - expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( - "fill", - `#${themes[name].bg_color}`, - ); - }); - }); - - it("should render with layout compact", () => { - document.body.innerHTML = renderTopLanguages(langs, { layout: "compact" }); - - expect(queryByTestId(document.body, "header")).toHaveTextContent( - "Most Used Languages", - ); - - expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( - "HTML 40.00%", - ); - expect(queryAllByTestId(document.body, "lang-progress")[0]).toHaveAttribute( - "width", - "120", - ); - - expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent( - "javascript 40.00%", - ); - expect(queryAllByTestId(document.body, "lang-progress")[1]).toHaveAttribute( - "width", - "120", - ); - - expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent( - "css 20.00%", - ); - expect(queryAllByTestId(document.body, "lang-progress")[2]).toHaveAttribute( - "width", - "60", - ); - }); - - it("should render a translated title", () => { - document.body.innerHTML = renderTopLanguages(langs, { locale: "cn" }); - expect(document.getElementsByClassName("header")[0].textContent).toBe( - "最常用的语言", - ); - }); - - it("should render without rounding", () => { - document.body.innerHTML = renderTopLanguages(langs, { border_radius: "0" }); - expect(document.querySelector("rect")).toHaveAttribute("rx", "0"); - document.body.innerHTML = renderTopLanguages(langs, {}); - expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5"); - }); - - it("should render langs with specified langs_count", async () => { - const options = { - langs_count: 1, - }; - document.body.innerHTML = renderTopLanguages(langs, { ...options }); - expect(queryAllByTestId(document.body, "lang-name").length).toBe( - options.langs_count, - ); - }); - - it("should render langs with specified langs_count even when hide is set", async () => { - const options = { - hide: ["HTML"], - langs_count: 2, - }; - document.body.innerHTML = renderTopLanguages(langs, { ...options }); - expect(queryAllByTestId(document.body, "lang-name").length).toBe( - options.langs_count, - ); - }); -}); diff --git a/tests/renderTopLanguagesCard.test.js b/tests/renderTopLanguagesCard.test.js new file mode 100644 index 0000000000000..8d67c3fb8ab98 --- /dev/null +++ b/tests/renderTopLanguagesCard.test.js @@ -0,0 +1,852 @@ +import { queryAllByTestId, queryByTestId } from "@testing-library/dom"; +import { cssToObject } from "@uppercod/css-to-object"; +import { + getLongestLang, + degreesToRadians, + radiansToDegrees, + polarToCartesian, + cartesianToPolar, + getCircleLength, + calculateCompactLayoutHeight, + calculateNormalLayoutHeight, + calculateDonutLayoutHeight, + calculateDonutVerticalLayoutHeight, + calculatePieLayoutHeight, + donutCenterTranslation, + trimTopLanguages, + renderTopLanguages, + MIN_CARD_WIDTH, + getDefaultLanguagesCountByLayout, +} from "../src/cards/top-languages-card.js"; +import { expect, it, describe } from "@jest/globals"; + +// adds special assertions like toHaveTextContent +import "@testing-library/jest-dom"; + +import { themes } from "../themes/index.js"; + +const langs = { + HTML: { + color: "#0f0", + name: "HTML", + size: 200, + }, + javascript: { + color: "#0ff", + name: "javascript", + size: 200, + }, + css: { + color: "#ff0", + name: "css", + size: 100, + }, +}; + +/** + * Retrieve number array from SVG path definition string. + * + * @param {string} d SVG path definition string. + * @returns {number[]} Resulting numbers array. + */ +const getNumbersFromSvgPathDefinitionAttribute = (d) => { + return d + .split(" ") + .filter((x) => !isNaN(x)) + .map((x) => parseFloat(x)); +}; + +/** + * Retrieve the language percentage from the donut chart SVG. + * + * @param {string} d The SVG path element. + * @param {number} centerX The center X coordinate of the donut chart. + * @param {number} centerY The center Y coordinate of the donut chart. + * @returns {number} The percentage of the language. + */ +const langPercentFromDonutLayoutSvg = (d, centerX, centerY) => { + const dTmp = getNumbersFromSvgPathDefinitionAttribute(d); + const endAngle = + cartesianToPolar(centerX, centerY, dTmp[0], dTmp[1]).angleInDegrees + 90; + let startAngle = + cartesianToPolar(centerX, centerY, dTmp[7], dTmp[8]).angleInDegrees + 90; + if (startAngle > endAngle) { + startAngle -= 360; + } + return (endAngle - startAngle) / 3.6; +}; + +/** + * Calculate language percentage for donut vertical chart SVG. + * + * @param {number} partLength Length of current chart part.. + * @param {number} totalCircleLength Total length of circle. + * @returns {number} Chart part percentage. + */ +const langPercentFromDonutVerticalLayoutSvg = ( + partLength, + totalCircleLength, +) => { + return (partLength / totalCircleLength) * 100; +}; + +/** + * Retrieve the language percentage from the pie chart SVG. + * + * @param {string} d The SVG path element. + * @param {number} centerX The center X coordinate of the pie chart. + * @param {number} centerY The center Y coordinate of the pie chart. + * @returns {number} The percentage of the language. + */ +const langPercentFromPieLayoutSvg = (d, centerX, centerY) => { + const dTmp = getNumbersFromSvgPathDefinitionAttribute(d); + const startAngle = cartesianToPolar( + centerX, + centerY, + dTmp[2], + dTmp[3], + ).angleInDegrees; + let endAngle = cartesianToPolar( + centerX, + centerY, + dTmp[9], + dTmp[10], + ).angleInDegrees; + return ((endAngle - startAngle) / 360) * 100; +}; + +describe("Test renderTopLanguages helper functions", () => { + it("getLongestLang", () => { + const langArray = Object.values(langs); + expect(getLongestLang(langArray)).toBe(langs.javascript); + }); + + it("degreesToRadians", () => { + expect(degreesToRadians(0)).toBe(0); + expect(degreesToRadians(90)).toBe(Math.PI / 2); + expect(degreesToRadians(180)).toBe(Math.PI); + expect(degreesToRadians(270)).toBe((3 * Math.PI) / 2); + expect(degreesToRadians(360)).toBe(2 * Math.PI); + }); + + it("radiansToDegrees", () => { + expect(radiansToDegrees(0)).toBe(0); + expect(radiansToDegrees(Math.PI / 2)).toBe(90); + expect(radiansToDegrees(Math.PI)).toBe(180); + expect(radiansToDegrees((3 * Math.PI) / 2)).toBe(270); + expect(radiansToDegrees(2 * Math.PI)).toBe(360); + }); + + it("polarToCartesian", () => { + expect(polarToCartesian(100, 100, 60, 0)).toStrictEqual({ x: 160, y: 100 }); + expect(polarToCartesian(100, 100, 60, 45)).toStrictEqual({ + x: 142.42640687119285, + y: 142.42640687119285, + }); + expect(polarToCartesian(100, 100, 60, 90)).toStrictEqual({ + x: 100, + y: 160, + }); + expect(polarToCartesian(100, 100, 60, 135)).toStrictEqual({ + x: 57.573593128807154, + y: 142.42640687119285, + }); + expect(polarToCartesian(100, 100, 60, 180)).toStrictEqual({ + x: 40, + y: 100.00000000000001, + }); + expect(polarToCartesian(100, 100, 60, 225)).toStrictEqual({ + x: 57.57359312880714, + y: 57.573593128807154, + }); + expect(polarToCartesian(100, 100, 60, 270)).toStrictEqual({ + x: 99.99999999999999, + y: 40, + }); + expect(polarToCartesian(100, 100, 60, 315)).toStrictEqual({ + x: 142.42640687119285, + y: 57.57359312880714, + }); + expect(polarToCartesian(100, 100, 60, 360)).toStrictEqual({ + x: 160, + y: 99.99999999999999, + }); + }); + + it("cartesianToPolar", () => { + expect(cartesianToPolar(100, 100, 160, 100)).toStrictEqual({ + radius: 60, + angleInDegrees: 0, + }); + expect( + cartesianToPolar(100, 100, 142.42640687119285, 142.42640687119285), + ).toStrictEqual({ radius: 60.00000000000001, angleInDegrees: 45 }); + expect(cartesianToPolar(100, 100, 100, 160)).toStrictEqual({ + radius: 60, + angleInDegrees: 90, + }); + expect( + cartesianToPolar(100, 100, 57.573593128807154, 142.42640687119285), + ).toStrictEqual({ radius: 60, angleInDegrees: 135 }); + expect(cartesianToPolar(100, 100, 40, 100.00000000000001)).toStrictEqual({ + radius: 60, + angleInDegrees: 180, + }); + expect( + cartesianToPolar(100, 100, 57.57359312880714, 57.573593128807154), + ).toStrictEqual({ radius: 60, angleInDegrees: 225 }); + expect(cartesianToPolar(100, 100, 99.99999999999999, 40)).toStrictEqual({ + radius: 60, + angleInDegrees: 270, + }); + expect( + cartesianToPolar(100, 100, 142.42640687119285, 57.57359312880714), + ).toStrictEqual({ radius: 60.00000000000001, angleInDegrees: 315 }); + expect(cartesianToPolar(100, 100, 160, 99.99999999999999)).toStrictEqual({ + radius: 60, + angleInDegrees: 360, + }); + }); + + it("calculateCompactLayoutHeight", () => { + expect(calculateCompactLayoutHeight(0)).toBe(90); + expect(calculateCompactLayoutHeight(1)).toBe(115); + expect(calculateCompactLayoutHeight(2)).toBe(115); + expect(calculateCompactLayoutHeight(3)).toBe(140); + expect(calculateCompactLayoutHeight(4)).toBe(140); + expect(calculateCompactLayoutHeight(5)).toBe(165); + expect(calculateCompactLayoutHeight(6)).toBe(165); + expect(calculateCompactLayoutHeight(7)).toBe(190); + expect(calculateCompactLayoutHeight(8)).toBe(190); + expect(calculateCompactLayoutHeight(9)).toBe(215); + expect(calculateCompactLayoutHeight(10)).toBe(215); + }); + + it("calculateNormalLayoutHeight", () => { + expect(calculateNormalLayoutHeight(0)).toBe(85); + expect(calculateNormalLayoutHeight(1)).toBe(125); + expect(calculateNormalLayoutHeight(2)).toBe(165); + expect(calculateNormalLayoutHeight(3)).toBe(205); + expect(calculateNormalLayoutHeight(4)).toBe(245); + expect(calculateNormalLayoutHeight(5)).toBe(285); + expect(calculateNormalLayoutHeight(6)).toBe(325); + expect(calculateNormalLayoutHeight(7)).toBe(365); + expect(calculateNormalLayoutHeight(8)).toBe(405); + expect(calculateNormalLayoutHeight(9)).toBe(445); + expect(calculateNormalLayoutHeight(10)).toBe(485); + }); + + it("calculateDonutLayoutHeight", () => { + expect(calculateDonutLayoutHeight(0)).toBe(215); + expect(calculateDonutLayoutHeight(1)).toBe(215); + expect(calculateDonutLayoutHeight(2)).toBe(215); + expect(calculateDonutLayoutHeight(3)).toBe(215); + expect(calculateDonutLayoutHeight(4)).toBe(215); + expect(calculateDonutLayoutHeight(5)).toBe(215); + expect(calculateDonutLayoutHeight(6)).toBe(247); + expect(calculateDonutLayoutHeight(7)).toBe(279); + expect(calculateDonutLayoutHeight(8)).toBe(311); + expect(calculateDonutLayoutHeight(9)).toBe(343); + expect(calculateDonutLayoutHeight(10)).toBe(375); + }); + + it("calculateDonutVerticalLayoutHeight", () => { + expect(calculateDonutVerticalLayoutHeight(0)).toBe(300); + expect(calculateDonutVerticalLayoutHeight(1)).toBe(325); + expect(calculateDonutVerticalLayoutHeight(2)).toBe(325); + expect(calculateDonutVerticalLayoutHeight(3)).toBe(350); + expect(calculateDonutVerticalLayoutHeight(4)).toBe(350); + expect(calculateDonutVerticalLayoutHeight(5)).toBe(375); + expect(calculateDonutVerticalLayoutHeight(6)).toBe(375); + expect(calculateDonutVerticalLayoutHeight(7)).toBe(400); + expect(calculateDonutVerticalLayoutHeight(8)).toBe(400); + expect(calculateDonutVerticalLayoutHeight(9)).toBe(425); + expect(calculateDonutVerticalLayoutHeight(10)).toBe(425); + }); + + it("calculatePieLayoutHeight", () => { + expect(calculatePieLayoutHeight(0)).toBe(300); + expect(calculatePieLayoutHeight(1)).toBe(325); + expect(calculatePieLayoutHeight(2)).toBe(325); + expect(calculatePieLayoutHeight(3)).toBe(350); + expect(calculatePieLayoutHeight(4)).toBe(350); + expect(calculatePieLayoutHeight(5)).toBe(375); + expect(calculatePieLayoutHeight(6)).toBe(375); + expect(calculatePieLayoutHeight(7)).toBe(400); + expect(calculatePieLayoutHeight(8)).toBe(400); + expect(calculatePieLayoutHeight(9)).toBe(425); + expect(calculatePieLayoutHeight(10)).toBe(425); + }); + + it("donutCenterTranslation", () => { + expect(donutCenterTranslation(0)).toBe(-45); + expect(donutCenterTranslation(1)).toBe(-45); + expect(donutCenterTranslation(2)).toBe(-45); + expect(donutCenterTranslation(3)).toBe(-45); + expect(donutCenterTranslation(4)).toBe(-45); + expect(donutCenterTranslation(5)).toBe(-45); + expect(donutCenterTranslation(6)).toBe(-29); + expect(donutCenterTranslation(7)).toBe(-13); + expect(donutCenterTranslation(8)).toBe(3); + expect(donutCenterTranslation(9)).toBe(19); + expect(donutCenterTranslation(10)).toBe(35); + }); + + it("getCircleLength", () => { + expect(getCircleLength(20)).toBeCloseTo(125.663); + expect(getCircleLength(30)).toBeCloseTo(188.495); + expect(getCircleLength(40)).toBeCloseTo(251.327); + expect(getCircleLength(50)).toBeCloseTo(314.159); + expect(getCircleLength(60)).toBeCloseTo(376.991); + expect(getCircleLength(70)).toBeCloseTo(439.822); + expect(getCircleLength(80)).toBeCloseTo(502.654); + expect(getCircleLength(90)).toBeCloseTo(565.486); + expect(getCircleLength(100)).toBeCloseTo(628.318); + }); + + it("trimTopLanguages", () => { + expect(trimTopLanguages([])).toStrictEqual({ + langs: [], + totalLanguageSize: 0, + }); + expect(trimTopLanguages([langs.javascript])).toStrictEqual({ + langs: [langs.javascript], + totalLanguageSize: 200, + }); + expect(trimTopLanguages([langs.javascript, langs.HTML], 5)).toStrictEqual({ + langs: [langs.javascript, langs.HTML], + totalLanguageSize: 400, + }); + expect(trimTopLanguages(langs, 5)).toStrictEqual({ + langs: Object.values(langs), + totalLanguageSize: 500, + }); + expect(trimTopLanguages(langs, 2)).toStrictEqual({ + langs: Object.values(langs).slice(0, 2), + totalLanguageSize: 400, + }); + expect(trimTopLanguages(langs, 5, ["javascript"])).toStrictEqual({ + langs: [langs.HTML, langs.css], + totalLanguageSize: 300, + }); + }); + + it("getDefaultLanguagesCountByLayout", () => { + expect( + getDefaultLanguagesCountByLayout({ layout: "normal" }), + ).toStrictEqual(5); + expect(getDefaultLanguagesCountByLayout({})).toStrictEqual(5); + expect( + getDefaultLanguagesCountByLayout({ layout: "compact" }), + ).toStrictEqual(6); + expect( + getDefaultLanguagesCountByLayout({ hide_progress: true }), + ).toStrictEqual(6); + expect(getDefaultLanguagesCountByLayout({ layout: "donut" })).toStrictEqual( + 5, + ); + expect( + getDefaultLanguagesCountByLayout({ layout: "donut-vertical" }), + ).toStrictEqual(6); + expect(getDefaultLanguagesCountByLayout({ layout: "pie" })).toStrictEqual( + 6, + ); + }); +}); + +describe("Test renderTopLanguages", () => { + it("should render correctly", () => { + document.body.innerHTML = renderTopLanguages(langs); + + expect(queryByTestId(document.body, "header")).toHaveTextContent( + "Most Used Languages", + ); + + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML", + ); + expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent( + "javascript", + ); + expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent( + "css", + ); + expect(queryAllByTestId(document.body, "lang-progress")[0]).toHaveAttribute( + "width", + "40%", + ); + expect(queryAllByTestId(document.body, "lang-progress")[1]).toHaveAttribute( + "width", + "40%", + ); + expect(queryAllByTestId(document.body, "lang-progress")[2]).toHaveAttribute( + "width", + "20%", + ); + }); + + it("should hide languages when hide is passed", () => { + document.body.innerHTML = renderTopLanguages(langs, { + hide: ["HTML"], + }); + expect(queryAllByTestId(document.body, "lang-name")[0]).toBeInTheDocument( + "javascript", + ); + expect(queryAllByTestId(document.body, "lang-name")[1]).toBeInTheDocument( + "css", + ); + expect(queryAllByTestId(document.body, "lang-name")[2]).not.toBeDefined(); + + // multiple languages passed + document.body.innerHTML = renderTopLanguages(langs, { + hide: ["HTML", "css"], + }); + expect(queryAllByTestId(document.body, "lang-name")[0]).toBeInTheDocument( + "javascript", + ); + expect(queryAllByTestId(document.body, "lang-name")[1]).not.toBeDefined(); + }); + + it("should resize the height correctly depending on langs", () => { + document.body.innerHTML = renderTopLanguages(langs, {}); + expect(document.querySelector("svg")).toHaveAttribute("height", "205"); + + document.body.innerHTML = renderTopLanguages( + { + ...langs, + python: { + color: "#ff0", + name: "python", + size: 100, + }, + }, + {}, + ); + expect(document.querySelector("svg")).toHaveAttribute("height", "245"); + }); + + it("should render with custom width set", () => { + document.body.innerHTML = renderTopLanguages(langs, {}); + + expect(document.querySelector("svg")).toHaveAttribute("width", "300"); + + document.body.innerHTML = renderTopLanguages(langs, { card_width: 400 }); + expect(document.querySelector("svg")).toHaveAttribute("width", "400"); + }); + + it("should render with min width", () => { + document.body.innerHTML = renderTopLanguages(langs, { card_width: 190 }); + + expect(document.querySelector("svg")).toHaveAttribute( + "width", + MIN_CARD_WIDTH.toString(), + ); + + document.body.innerHTML = renderTopLanguages(langs, { card_width: 100 }); + expect(document.querySelector("svg")).toHaveAttribute( + "width", + MIN_CARD_WIDTH.toString(), + ); + }); + + it("should render default colors properly", () => { + document.body.innerHTML = renderTopLanguages(langs); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.textContent); + + const headerStyles = stylesObject[":host"][".header "]; + const langNameStyles = stylesObject[":host"][".lang-name "]; + + expect(headerStyles.fill.trim()).toBe("#2f80ed"); + expect(langNameStyles.fill.trim()).toBe("#434d58"); + expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( + "fill", + "#fffefe", + ); + }); + + it("should render custom colors properly", () => { + const customColors = { + title_color: "5a0", + icon_color: "1b998b", + text_color: "9991", + bg_color: "252525", + }; + + document.body.innerHTML = renderTopLanguages(langs, { ...customColors }); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.innerHTML); + + const headerStyles = stylesObject[":host"][".header "]; + const langNameStyles = stylesObject[":host"][".lang-name "]; + + expect(headerStyles.fill.trim()).toBe(`#${customColors.title_color}`); + expect(langNameStyles.fill.trim()).toBe(`#${customColors.text_color}`); + expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( + "fill", + "#252525", + ); + }); + + it("should render custom colors with themes", () => { + document.body.innerHTML = renderTopLanguages(langs, { + title_color: "5a0", + theme: "radical", + }); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.innerHTML); + + const headerStyles = stylesObject[":host"][".header "]; + const langNameStyles = stylesObject[":host"][".lang-name "]; + + expect(headerStyles.fill.trim()).toBe("#5a0"); + expect(langNameStyles.fill.trim()).toBe(`#${themes.radical.text_color}`); + expect(queryByTestId(document.body, "card-bg")).toHaveAttribute( + "fill", + `#${themes.radical.bg_color}`, + ); + }); + + it("should render with all the themes", () => { + Object.keys(themes).forEach((name) => { + document.body.innerHTML = renderTopLanguages(langs, { + theme: name, + }); + + const styleTag = document.querySelector("style"); + const stylesObject = cssToObject(styleTag.innerHTML); + + const headerStyles = stylesObject[":host"][".header "]; + const langNameStyles = stylesObject[":host"][".lang-name "]; + + expect(headerStyles.fill.trim()).toBe(`#${themes[name].title_color}`); + expect(langNameStyles.fill.trim()).toBe(`#${themes[name].text_color}`); + const backgroundElement = queryByTestId(document.body, "card-bg"); + const backgroundElementFill = backgroundElement.getAttribute("fill"); + expect([`#${themes[name].bg_color}`, "url(#gradient)"]).toContain( + backgroundElementFill, + ); + }); + }); + + it("should render with layout compact", () => { + document.body.innerHTML = renderTopLanguages(langs, { layout: "compact" }); + + expect(queryByTestId(document.body, "header")).toHaveTextContent( + "Most Used Languages", + ); + + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-progress")[0]).toHaveAttribute( + "width", + "100", + ); + + expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent( + "javascript 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-progress")[1]).toHaveAttribute( + "width", + "100", + ); + + expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent( + "css 20.00%", + ); + expect(queryAllByTestId(document.body, "lang-progress")[2]).toHaveAttribute( + "width", + "50", + ); + }); + + it("should render with layout donut", () => { + document.body.innerHTML = renderTopLanguages(langs, { layout: "donut" }); + + expect(queryByTestId(document.body, "header")).toHaveTextContent( + "Most Used Languages", + ); + + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[0]).toHaveAttribute( + "size", + "40", + ); + const d = getNumbersFromSvgPathDefinitionAttribute( + queryAllByTestId(document.body, "lang-donut")[0].getAttribute("d"), + ); + const center = { x: d[7], y: d[7] }; + const HTMLLangPercent = langPercentFromDonutLayoutSvg( + queryAllByTestId(document.body, "lang-donut")[0].getAttribute("d"), + center.x, + center.y, + ); + expect(HTMLLangPercent).toBeCloseTo(40); + + expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent( + "javascript 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[1]).toHaveAttribute( + "size", + "40", + ); + const javascriptLangPercent = langPercentFromDonutLayoutSvg( + queryAllByTestId(document.body, "lang-donut")[1].getAttribute("d"), + center.x, + center.y, + ); + expect(javascriptLangPercent).toBeCloseTo(40); + + expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent( + "css 20.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[2]).toHaveAttribute( + "size", + "20", + ); + const cssLangPercent = langPercentFromDonutLayoutSvg( + queryAllByTestId(document.body, "lang-donut")[2].getAttribute("d"), + center.x, + center.y, + ); + expect(cssLangPercent).toBeCloseTo(20); + + expect(HTMLLangPercent + javascriptLangPercent + cssLangPercent).toBe(100); + + // Should render full donut (circle) if one language is 100%. + document.body.innerHTML = renderTopLanguages( + { HTML: langs.HTML }, + { layout: "donut" }, + ); + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML 100.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[0]).toHaveAttribute( + "size", + "100", + ); + expect(queryAllByTestId(document.body, "lang-donut")).toHaveLength(1); + expect(queryAllByTestId(document.body, "lang-donut")[0].tagName).toBe( + "circle", + ); + }); + + it("should render with layout donut vertical", () => { + document.body.innerHTML = renderTopLanguages(langs, { + layout: "donut-vertical", + }); + + expect(queryByTestId(document.body, "header")).toHaveTextContent( + "Most Used Languages", + ); + + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[0]).toHaveAttribute( + "size", + "40", + ); + + const totalCircleLength = queryAllByTestId( + document.body, + "lang-donut", + )[0].getAttribute("stroke-dasharray"); + + const HTMLLangPercent = langPercentFromDonutVerticalLayoutSvg( + queryAllByTestId(document.body, "lang-donut")[1].getAttribute( + "stroke-dashoffset", + ) - + queryAllByTestId(document.body, "lang-donut")[0].getAttribute( + "stroke-dashoffset", + ), + totalCircleLength, + ); + expect(HTMLLangPercent).toBeCloseTo(40); + + expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent( + "javascript 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[1]).toHaveAttribute( + "size", + "40", + ); + const javascriptLangPercent = langPercentFromDonutVerticalLayoutSvg( + queryAllByTestId(document.body, "lang-donut")[2].getAttribute( + "stroke-dashoffset", + ) - + queryAllByTestId(document.body, "lang-donut")[1].getAttribute( + "stroke-dashoffset", + ), + totalCircleLength, + ); + expect(javascriptLangPercent).toBeCloseTo(40); + + expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent( + "css 20.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[2]).toHaveAttribute( + "size", + "20", + ); + const cssLangPercent = langPercentFromDonutVerticalLayoutSvg( + totalCircleLength - + queryAllByTestId(document.body, "lang-donut")[2].getAttribute( + "stroke-dashoffset", + ), + totalCircleLength, + ); + expect(cssLangPercent).toBeCloseTo(20); + + expect(HTMLLangPercent + javascriptLangPercent + cssLangPercent).toBe(100); + }); + + it("should render with layout donut vertical full donut circle of one language is 100%", () => { + document.body.innerHTML = renderTopLanguages( + { HTML: langs.HTML }, + { layout: "donut-vertical" }, + ); + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML 100.00%", + ); + expect(queryAllByTestId(document.body, "lang-donut")[0]).toHaveAttribute( + "size", + "100", + ); + const totalCircleLength = queryAllByTestId( + document.body, + "lang-donut", + )[0].getAttribute("stroke-dasharray"); + + const HTMLLangPercent = langPercentFromDonutVerticalLayoutSvg( + totalCircleLength - + queryAllByTestId(document.body, "lang-donut")[0].getAttribute( + "stroke-dashoffset", + ), + totalCircleLength, + ); + expect(HTMLLangPercent).toBeCloseTo(100); + }); + + it("should render with layout pie", () => { + document.body.innerHTML = renderTopLanguages(langs, { layout: "pie" }); + + expect(queryByTestId(document.body, "header")).toHaveTextContent( + "Most Used Languages", + ); + + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-pie")[0]).toHaveAttribute( + "size", + "40", + ); + + const d = getNumbersFromSvgPathDefinitionAttribute( + queryAllByTestId(document.body, "lang-pie")[0].getAttribute("d"), + ); + const center = { x: d[0], y: d[1] }; + const HTMLLangPercent = langPercentFromPieLayoutSvg( + queryAllByTestId(document.body, "lang-pie")[0].getAttribute("d"), + center.x, + center.y, + ); + expect(HTMLLangPercent).toBeCloseTo(40); + + expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent( + "javascript 40.00%", + ); + expect(queryAllByTestId(document.body, "lang-pie")[1]).toHaveAttribute( + "size", + "40", + ); + const javascriptLangPercent = langPercentFromPieLayoutSvg( + queryAllByTestId(document.body, "lang-pie")[1].getAttribute("d"), + center.x, + center.y, + ); + expect(javascriptLangPercent).toBeCloseTo(40); + + expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent( + "css 20.00%", + ); + expect(queryAllByTestId(document.body, "lang-pie")[2]).toHaveAttribute( + "size", + "20", + ); + const cssLangPercent = langPercentFromPieLayoutSvg( + queryAllByTestId(document.body, "lang-pie")[2].getAttribute("d"), + center.x, + center.y, + ); + expect(cssLangPercent).toBeCloseTo(20); + + expect(HTMLLangPercent + javascriptLangPercent + cssLangPercent).toBe(100); + + // Should render full pie (circle) if one language is 100%. + document.body.innerHTML = renderTopLanguages( + { HTML: langs.HTML }, + { layout: "pie" }, + ); + expect(queryAllByTestId(document.body, "lang-name")[0]).toHaveTextContent( + "HTML 100.00%", + ); + expect(queryAllByTestId(document.body, "lang-pie")[0]).toHaveAttribute( + "size", + "100", + ); + expect(queryAllByTestId(document.body, "lang-pie")).toHaveLength(1); + expect(queryAllByTestId(document.body, "lang-pie")[0].tagName).toBe( + "circle", + ); + }); + + it("should render a translated title", () => { + document.body.innerHTML = renderTopLanguages(langs, { locale: "cn" }); + expect(document.getElementsByClassName("header")[0].textContent).toBe( + "最常用的语言", + ); + }); + + it("should render without rounding", () => { + document.body.innerHTML = renderTopLanguages(langs, { border_radius: "0" }); + expect(document.querySelector("rect")).toHaveAttribute("rx", "0"); + document.body.innerHTML = renderTopLanguages(langs, {}); + expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5"); + }); + + it("should render langs with specified langs_count", () => { + const options = { + langs_count: 1, + }; + document.body.innerHTML = renderTopLanguages(langs, { ...options }); + expect(queryAllByTestId(document.body, "lang-name").length).toBe( + options.langs_count, + ); + }); + + it("should render langs with specified langs_count even when hide is set", () => { + const options = { + hide: ["HTML"], + langs_count: 2, + }; + document.body.innerHTML = renderTopLanguages(langs, { ...options }); + expect(queryAllByTestId(document.body, "lang-name").length).toBe( + options.langs_count, + ); + }); + + it('should show "No languages data." message instead of empty card when nothing to show', () => { + document.body.innerHTML = renderTopLanguages({}); + expect(document.querySelector(".stat").textContent).toBe( + "No languages data.", + ); + }); +}); diff --git a/tests/renderWakatimeCard.test.js b/tests/renderWakatimeCard.test.js index 67969bef50063..7c3710758c5ec 100644 --- a/tests/renderWakatimeCard.test.js +++ b/tests/renderWakatimeCard.test.js @@ -3,10 +3,11 @@ import "@testing-library/jest-dom"; import { renderWakatimeCard } from "../src/cards/wakatime-card.js"; import { getCardColors } from "../src/common/utils.js"; import { wakaTimeData } from "./fetchWakatime.test.js"; +import { expect, it, describe } from "@jest/globals"; -describe("Test Render Wakatime Card", () => { +describe("Test Render WakaTime Card", () => { it("should render correctly", () => { - const card = renderWakatimeCard(wakaTimeData.data); + // const card = renderWakatimeCard(wakaTimeData.data); expect(getCardColors).toMatchSnapshot(); }); @@ -38,12 +39,12 @@ describe("Test Render Wakatime Card", () => { it("should render translations", () => { document.body.innerHTML = renderWakatimeCard({}, { locale: "cn" }); expect(document.getElementsByClassName("header")[0].textContent).toBe( - "Wakatime 周统计", + "WakaTime 周统计", ); expect( document.querySelector('g[transform="translate(0, 0)"]>text.stat.bold') .textContent, - ).toBe("本周没有编程活动"); + ).toBe("WakaTime 用户个人资料未公开"); }); it("should render without rounding", () => { @@ -55,7 +56,7 @@ describe("Test Render Wakatime Card", () => { expect(document.querySelector("rect")).toHaveAttribute("rx", "4.5"); }); - it('should show "no coding activitiy this week" message when there hasn not been activity', () => { + it('should show "no coding activity this week" message when there has not been activity', () => { document.body.innerHTML = renderWakatimeCard( { ...wakaTimeData.data, @@ -67,4 +68,19 @@ describe("Test Render Wakatime Card", () => { "No coding activity this week", ); }); + + it('should show "no coding activity this week" message when using compact layout and there has not been activity', () => { + document.body.innerHTML = renderWakatimeCard( + { + ...wakaTimeData.data, + languages: undefined, + }, + { + layout: "compact", + }, + ); + expect(document.querySelector(".stat").textContent).toBe( + "No coding activity this week", + ); + }); }); diff --git a/tests/retryer.test.js b/tests/retryer.test.js index 1fcf6658387b9..b0b4bd79df857 100644 --- a/tests/retryer.test.js +++ b/tests/retryer.test.js @@ -1,21 +1,22 @@ import { jest } from "@jest/globals"; import "@testing-library/jest-dom"; -import { retryer } from "../src/common/retryer.js"; +import { retryer, RETRIES } from "../src/common/retryer.js"; import { logger } from "../src/common/utils.js"; +import { expect, it, describe } from "@jest/globals"; const fetcher = jest.fn((variables, token) => { logger.log(variables, token); - return new Promise((res, rej) => res({ data: "ok" })); + return new Promise((res) => res({ data: "ok" })); }); const fetcherFail = jest.fn(() => { - return new Promise((res, rej) => + return new Promise((res) => res({ data: { errors: [{ type: "RATE_LIMITED" }] } }), ); }); const fetcherFailOnSecondTry = jest.fn((_vars, _token, retries) => { - return new Promise((res, rej) => { + return new Promise((res) => { // faking rate limit if (retries < 1) { return res({ data: { errors: [{ type: "RATE_LIMITED" }] } }); @@ -39,14 +40,12 @@ describe("Test Retryer", () => { expect(res).toStrictEqual({ data: "ok" }); }); - it("retryer should throw error if maximum retries reached", async () => { - let res; - + it("retryer should throw specific error if maximum retries reached", async () => { try { - res = await retryer(fetcherFail, {}); + await retryer(fetcherFail, {}); } catch (err) { - expect(fetcherFail).toBeCalledTimes(8); - expect(err.message).toBe("Maximum retries exceeded"); + expect(fetcherFail).toBeCalledTimes(RETRIES + 1); + expect(err.message).toBe("Downtime due to GitHub API rate limiting"); } }); }); diff --git a/tests/status.up.test.js b/tests/status.up.test.js new file mode 100644 index 0000000000000..f15b96fb1eb37 --- /dev/null +++ b/tests/status.up.test.js @@ -0,0 +1,195 @@ +/** + * @file Tests for the status/up cloud function. + */ +import { jest } from "@jest/globals"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import up, { RATE_LIMIT_SECONDS } from "../api/status/up.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; + +const mock = new MockAdapter(axios); + +const successData = { + rateLimit: { + remaining: 4986, + }, +}; + +const faker = (query) => { + const req = { + query: { ...query }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + + return { req, res }; +}; + +const rate_limit_error = { + errors: [ + { + type: "RATE_LIMITED", + }, + ], +}; + +const bad_credentials_error = { + message: "Bad credentials", +}; + +const shields_up = { + schemaVersion: 1, + label: "Public Instance", + isError: true, + message: "up", + color: "brightgreen", +}; +const shields_down = { + schemaVersion: 1, + label: "Public Instance", + isError: true, + message: "down", + color: "red", +}; + +afterEach(() => { + mock.reset(); +}); + +describe("Test /api/status/up", () => { + it("should return `true` if request was successful", async () => { + mock.onPost("https://api.github.com/graphql").replyOnce(200, successData); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(true); + }); + + it("should return `false` if all PATs are rate limited", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, rate_limit_error); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(false); + }); + + it("should return JSON `true` if request was successful and type='json'", async () => { + mock.onPost("https://api.github.com/graphql").replyOnce(200, successData); + + const { req, res } = faker({ type: "json" }, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith({ up: true }); + }); + + it("should return JSON `false` if all PATs are rate limited and type='json'", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, rate_limit_error); + + const { req, res } = faker({ type: "json" }, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith({ up: false }); + }); + + it("should return UP shields.io config if request was successful and type='shields'", async () => { + mock.onPost("https://api.github.com/graphql").replyOnce(200, successData); + + const { req, res } = faker({ type: "shields" }, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(shields_up); + }); + + it("should return DOWN shields.io config if all PATs are rate limited and type='shields'", async () => { + mock.onPost("https://api.github.com/graphql").reply(200, rate_limit_error); + + const { req, res } = faker({ type: "shields" }, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(shields_down); + }); + + it("should return `true` if the first PAT is rate limited but the second PATs works", async () => { + mock + .onPost("https://api.github.com/graphql") + .replyOnce(200, rate_limit_error) + .onPost("https://api.github.com/graphql") + .replyOnce(200, successData); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(true); + }); + + it("should return `true` if the first PAT has 'Bad credentials' but the second PAT works", async () => { + mock + .onPost("https://api.github.com/graphql") + .replyOnce(404, bad_credentials_error) + .onPost("https://api.github.com/graphql") + .replyOnce(200, successData); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(true); + }); + + it("should return `false` if all pats have 'Bad credentials'", async () => { + mock + .onPost("https://api.github.com/graphql") + .reply(404, bad_credentials_error); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(false); + }); + + it("should throw an error if the request fails", async () => { + mock.onPost("https://api.github.com/graphql").networkError(); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "application/json"); + expect(res.send).toBeCalledWith(false); + }); + + it("should have proper cache when no error is thrown", async () => { + mock.onPost("https://api.github.com/graphql").replyOnce(200, successData); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader.mock.calls).toEqual([ + ["Content-Type", "application/json"], + ["Cache-Control", `max-age=0, s-maxage=${RATE_LIMIT_SECONDS}`], + ]); + }); + + it("should have proper cache when error is thrown", async () => { + mock.onPost("https://api.github.com/graphql").networkError(); + + const { req, res } = faker({}, {}); + await up(req, res); + + expect(res.setHeader.mock.calls).toEqual([ + ["Content-Type", "application/json"], + ["Cache-Control", "no-store"], + ]); + }); +}); diff --git a/tests/top-langs.test.js b/tests/top-langs.test.js index b5232c29af3d5..692681b294da6 100644 --- a/tests/top-langs.test.js +++ b/tests/top-langs.test.js @@ -4,7 +4,8 @@ import axios from "axios"; import MockAdapter from "axios-mock-adapter"; import topLangs from "../api/top-langs.js"; import { renderTopLanguages } from "../src/cards/top-languages-card.js"; -import { renderError } from "../src/common/utils.js"; +import { renderError, CONSTANTS } from "../src/common/utils.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; const data_langs = { data: { @@ -123,7 +124,7 @@ describe("Test /api/top-langs", () => { ); }); - it("should render error card on error", async () => { + it("should render error card on user data fetch error", async () => { const req = { query: { username: "anuraghazra", @@ -138,6 +139,96 @@ describe("Test /api/top-langs", () => { await topLangs(req, res); expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); - expect(res.send).toBeCalledWith(renderError(error.errors[0].message)); + expect(res.send).toBeCalledWith( + renderError( + error.errors[0].message, + "Make sure the provided username is not an organization", + ), + ); + }); + + it("should render error card on incorrect layout input", async () => { + const req = { + query: { + username: "anuraghazra", + layout: ["pie"], + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, data_langs); + + await topLangs(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "Incorrect layout input"), + ); + }); + + it("should render error card if username in blacklist", async () => { + const req = { + query: { + username: "renovate-bot", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, data_langs); + + await topLangs(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "This username is blacklisted"), + ); + }); + + it("should render error card if wrong locale provided", async () => { + const req = { + query: { + username: "anuraghazra", + locale: "asdf", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, data_langs); + + await topLangs(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith( + renderError("Something went wrong", "Locale not found"), + ); + }); + + it("should have proper cache", async () => { + const req = { + query: { + username: "anuraghazra", + }, + }; + const res = { + setHeader: jest.fn(), + send: jest.fn(), + }; + mock.onPost("https://api.github.com/graphql").reply(200, data_langs); + + await topLangs(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.setHeader).toBeCalledWith( + "Cache-Control", + `max-age=${CONSTANTS.SIX_HOURS / 2}, s-maxage=${ + CONSTANTS.SIX_HOURS + }, stale-while-revalidate=${CONSTANTS.ONE_DAY}`, + ); }); }); diff --git a/tests/utils.test.js b/tests/utils.test.js index c91fe9d54ae5d..5bd43955485c3 100644 --- a/tests/utils.test.js +++ b/tests/utils.test.js @@ -8,6 +8,7 @@ import { renderError, wrapTextMultiline, } from "../src/common/utils.js"; +import { expect, it, describe } from "@jest/globals"; describe("Test utils.js", () => { it("should test kFormatter", () => { diff --git a/tests/wakatime.test.js b/tests/wakatime.test.js new file mode 100644 index 0000000000000..944c3e020dd38 --- /dev/null +++ b/tests/wakatime.test.js @@ -0,0 +1,123 @@ +import { jest } from "@jest/globals"; +import "@testing-library/jest-dom"; +import axios from "axios"; +import MockAdapter from "axios-mock-adapter"; +import wakatime from "../api/wakatime.js"; +import { renderWakatimeCard } from "../src/cards/wakatime-card.js"; +import { expect, it, describe, afterEach } from "@jest/globals"; + +const wakaTimeData = { + data: { + categories: [ + { + digital: "22:40", + hours: 22, + minutes: 40, + name: "Coding", + percent: 100, + text: "22 hrs 40 mins", + total_seconds: 81643.570077, + }, + ], + daily_average: 16095, + daily_average_including_other_language: 16329, + days_including_holidays: 7, + days_minus_holidays: 5, + editors: [ + { + digital: "22:40", + hours: 22, + minutes: 40, + name: "VS Code", + percent: 100, + text: "22 hrs 40 mins", + total_seconds: 81643.570077, + }, + ], + holidays: 2, + human_readable_daily_average: "4 hrs 28 mins", + human_readable_daily_average_including_other_language: "4 hrs 32 mins", + human_readable_total: "22 hrs 21 mins", + human_readable_total_including_other_language: "22 hrs 40 mins", + id: "random hash", + is_already_updating: false, + is_coding_activity_visible: true, + is_including_today: false, + is_other_usage_visible: true, + is_stuck: false, + is_up_to_date: true, + languages: [ + { + digital: "0:19", + hours: 0, + minutes: 19, + name: "Other", + percent: 1.43, + text: "19 mins", + total_seconds: 1170.434361, + }, + { + digital: "0:01", + hours: 0, + minutes: 1, + name: "TypeScript", + percent: 0.1, + text: "1 min", + total_seconds: 83.293809, + }, + { + digital: "0:00", + hours: 0, + minutes: 0, + name: "YAML", + percent: 0.07, + text: "0 secs", + total_seconds: 54.975151, + }, + ], + operating_systems: [ + { + digital: "22:40", + hours: 22, + minutes: 40, + name: "Mac", + percent: 100, + text: "22 hrs 40 mins", + total_seconds: 81643.570077, + }, + ], + percent_calculated: 100, + range: "last_7_days", + status: "ok", + timeout: 15, + total_seconds: 80473.135716, + total_seconds_including_other_language: 81643.570077, + user_id: "random hash", + username: "anuraghazra", + writes_only: false, + }, +}; + +const mock = new MockAdapter(axios); + +afterEach(() => { + mock.reset(); +}); + +describe("Test /api/wakatime", () => { + it("should test the request", async () => { + const username = "anuraghazra"; + const req = { query: { username } }; + const res = { setHeader: jest.fn(), send: jest.fn() }; + mock + .onGet( + `https://wakatime.com/api/v1/users/${username}/stats?is_including_today=true`, + ) + .reply(200, wakaTimeData); + + await wakatime(req, res); + + expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml"); + expect(res.send).toBeCalledWith(renderWakatimeCard(wakaTimeData.data, {})); + }); +}); diff --git a/themes/README.md b/themes/README.md index b8649d43b9564..5e50b5bbc8e6d 100644 --- a/themes/README.md +++ b/themes/README.md @@ -4,7 +4,7 @@ With inbuilt themes, you can customize the look of the card without doing any manual customization. -Use `?theme=THEME_NAME` parameter like so :- +Use `?theme=THEME_NAME` parameter like so: ```md ![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&theme=dark&show_icons=true) @@ -12,11 +12,12 @@ Use `?theme=THEME_NAME` parameter like so :- ## Stats -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | -| `default` ![default][default] | `transparent` ![transparent][transparent] | `dark` ![dark][dark] | +| `default` ![default][default] | `transparent` ![transparent][transparent] | `shadow_red` ![shadow_red][shadow_red] | +| `shadow_green` ![shadow_green][shadow_green] | `shadow_blue` ![shadow_blue][shadow_blue] | `dark` ![dark][dark] | | `radical` ![radical][radical] | `merko` ![merko][merko] | `gruvbox` ![gruvbox][gruvbox] | | `gruvbox_light` ![gruvbox_light][gruvbox_light] | `tokyonight` ![tokyonight][tokyonight] | `onedark` ![onedark][onedark] | | `cobalt` ![cobalt][cobalt] | `synthwave` ![synthwave][synthwave] | `highcontrast` ![highcontrast][highcontrast] | @@ -32,19 +33,23 @@ Use `?theme=THEME_NAME` parameter like so :- | `jolly` ![jolly][jolly] | `maroongold` ![maroongold][maroongold] | `yeblu` ![yeblu][yeblu] | | `blueberry` ![blueberry][blueberry] | `slateorange` ![slateorange][slateorange] | `kacho_ga` ![kacho_ga][kacho_ga] | | `outrun` ![outrun][outrun] | `ocean_dark` ![ocean_dark][ocean_dark] | `city_lights` ![city_lights][city_lights] | -| `github_dark` ![github_dark][github_dark] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple] | `aura_dark` ![aura_dark][aura_dark] | -| `panda` ![panda][panda] | `noctis_minimus` ![noctis_minimus][noctis_minimus] | `cobalt2` ![cobalt2][cobalt2] | -| `swift` ![swift][swift] | `aura` ![aura][aura] | `apprentice` ![apprentice][apprentice] | -| `moltack` ![moltack][moltack] | `codeSTACKr` ![codeSTACKr][codeSTACKr] | `rose_pine` ![rose_pine][rose_pine] | -| [Add your theme][add-theme] | | | +| `github_dark` ![github_dark][github_dark] | `github_dark_dimmed` ![github_dark_dimmed][github_dark_dimmed] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple] | +| `aura_dark` ![aura_dark][aura_dark] | `panda` ![panda][panda] | `noctis_minimus` ![noctis_minimus][noctis_minimus] | +| `cobalt2` ![cobalt2][cobalt2] | `swift` ![swift][swift] | `aura` ![aura][aura] | +| `apprentice` ![apprentice][apprentice] | `moltack` ![moltack][moltack] | `codeSTACKr` ![codeSTACKr][codeSTACKr] | +| `rose_pine` ![rose_pine][rose_pine] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha] | +| `date_night` ![date_night][date_night] | `one_dark_pro` ![one_dark_pro][one_dark_pro] | `rose` ![rose][rose] | +| `holi` ![holi][holi] | `neon` ![neon][neon] | `blue_navy` ![blue_navy][blue_navy] | +| `calm_pink` ![calm_pink][calm_pink] | `ambient_gradient` ![ambient_gradient][ambient_gradient] | [Add your theme][add-theme] | ## Repo Card -> These themes work both for the Stats Card and Repo Card. +> These themes works with all five our cards: Stats Card, Repo Card, Gist Card, Top languages Card and WakaTime Card. | | | | | :--: | :--: | :--: | -| `default_repocard` ![default_repocard][default_repocard_repo] | `transparent` ![transparent][transparent_repo] | `dark` ![dark][dark_repo] | +| `default_repocard` ![default_repocard][default_repocard_repo] | `transparent` ![transparent][transparent_repo] | `shadow_red` ![shadow_red][shadow_red_repo] | +| `shadow_green` ![shadow_green][shadow_green_repo] | `shadow_blue` ![shadow_blue][shadow_blue_repo] | `dark` ![dark][dark_repo] | | `radical` ![radical][radical_repo] | `merko` ![merko][merko_repo] | `gruvbox` ![gruvbox][gruvbox_repo] | | `gruvbox_light` ![gruvbox_light][gruvbox_light_repo] | `tokyonight` ![tokyonight][tokyonight_repo] | `onedark` ![onedark][onedark_repo] | | `cobalt` ![cobalt][cobalt_repo] | `synthwave` ![synthwave][synthwave_repo] | `highcontrast` ![highcontrast][highcontrast_repo] | @@ -60,16 +65,22 @@ Use `?theme=THEME_NAME` parameter like so :- | `jolly` ![jolly][jolly_repo] | `maroongold` ![maroongold][maroongold_repo] | `yeblu` ![yeblu][yeblu_repo] | | `blueberry` ![blueberry][blueberry_repo] | `slateorange` ![slateorange][slateorange_repo] | `kacho_ga` ![kacho_ga][kacho_ga_repo] | | `outrun` ![outrun][outrun_repo] | `ocean_dark` ![ocean_dark][ocean_dark_repo] | `city_lights` ![city_lights][city_lights_repo] | -| `github_dark` ![github_dark][github_dark_repo] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple_repo] | `aura_dark` ![aura_dark][aura_dark_repo] | -| `panda` ![panda][panda_repo] | `noctis_minimus` ![noctis_minimus][noctis_minimus_repo] | `cobalt2` ![cobalt2][cobalt2_repo] | -| `swift` ![swift][swift_repo] | `aura` ![aura][aura_repo] | `apprentice` ![apprentice][apprentice_repo] | -| `moltack` ![moltack][moltack_repo] | `codeSTACKr` ![codeSTACKr][codeSTACKr_repo] | `rose_pine` ![rose_pine][rose_pine_repo] | -| [Add your theme][add-theme] | | | +| `github_dark` ![github_dark][github_dark_repo] | `github_dark_dimmed` ![github_dark_dimmed][github_dark_dimmed_repo] | `discord_old_blurple` ![discord_old_blurple][discord_old_blurple_repo] | +| `aura_dark` ![aura_dark][aura_dark_repo] | `panda` ![panda][panda_repo] | `noctis_minimus` ![noctis_minimus][noctis_minimus_repo] | +| `cobalt2` ![cobalt2][cobalt2_repo] | `swift` ![swift][swift_repo] | `aura` ![aura][aura_repo] | +| `apprentice` ![apprentice][apprentice_repo] | `moltack` ![moltack][moltack_repo] | `codeSTACKr` ![codeSTACKr][codeSTACKr_repo] | +| `rose_pine` ![rose_pine][rose_pine_repo] | `catppuccin_latte` ![catppuccin_latte][catppuccin_latte_repo] | `catppuccin_mocha` ![catppuccin_mocha][catppuccin_mocha_repo] | +| `date_night` ![date_night][date_night_repo] | `one_dark_pro` ![one_dark_pro][one_dark_pro_repo] | `rose` ![rose][rose_repo] | +| `holi` ![holi][holi_repo] | `neon` ![neon][neon_repo] | `blue_navy` ![blue_navy][blue_navy_repo] | +| `calm_pink` ![calm_pink][calm_pink_repo] | `ambient_gradient` ![ambient_gradient][ambient_gradient_repo] | [Add your theme][add-theme] | [default]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=default [default_repocard]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=default_repocard [transparent]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=transparent +[shadow_red]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=shadow_red +[shadow_green]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=shadow_green +[shadow_blue]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=shadow_blue [dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=dark [radical]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=radical [merko]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=merko @@ -117,6 +128,7 @@ Use `?theme=THEME_NAME` parameter like so :- [ocean_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=ocean_dark [city_lights]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=city_lights [github_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=github_dark +[github_dark_dimmed]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=github_dark_dimmed [discord_old_blurple]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=discord_old_blurple [aura_dark]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=aura_dark [panda]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=panda @@ -128,11 +140,24 @@ Use `?theme=THEME_NAME` parameter like so :- [moltack]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=moltack [codeSTACKr]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=codeSTACKr [rose_pine]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=rose_pine +[catppuccin_latte]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=catppuccin_latte +[catppuccin_mocha]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=catppuccin_mocha +[date_night]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=date_night +[one_dark_pro]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=one_dark_pro +[rose]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=rose +[holi]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=holi +[neon]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=neon +[blue_navy]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=blue_navy +[calm_pink]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=calm_pink +[ambient_gradient]: https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&hide=contribs,prs&cache_seconds=86400&theme=ambient_gradient [default_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default [default_repocard_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=default_repocard [transparent_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=transparent +[shadow_red_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=shadow_red +[shadow_green_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=shadow_green +[shadow_blue_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=shadow_blue [dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=dark [radical_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=radical [merko_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=merko @@ -180,6 +205,7 @@ Use `?theme=THEME_NAME` parameter like so :- [ocean_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=ocean_dark [city_lights_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=city_lights [github_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=github_dark +[github_dark_dimmed_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=github_dark_dimmed [discord_old_blurple_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=discord_old_blurple [aura_dark_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=aura_dark [panda_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=panda @@ -191,6 +217,16 @@ Use `?theme=THEME_NAME` parameter like so :- [moltack_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=moltack [codeSTACKr_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=codeSTACKr [rose_pine_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=rose_pine +[catppuccin_latte_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=catppuccin_latte +[catppuccin_mocha_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=catppuccin_mocha +[date_night_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=date_night +[one_dark_pro_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=one_dark_pro +[rose_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=rose +[holi_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=holi +[neon_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=neon +[blue_navy_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=blue_navy +[calm_pink_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=calm_pink +[ambient_gradient_repo]: https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats&cache_seconds=86400&theme=ambient_gradient [add-theme]: https://github.com/anuraghazra/github-readme-stats/edit/master/themes/index.js diff --git a/themes/index.js b/themes/index.js index a5d3abae8cb6f..f5d8d9160fd1b 100644 --- a/themes/index.js +++ b/themes/index.js @@ -18,6 +18,27 @@ export const themes = { text_color: "417E87", bg_color: "ffffff00", }, + shadow_red: { + title_color: "9A0000", + text_color: "444", + icon_color: "4F0000", + border_color: "4F0000", + bg_color: "ffffff00", + }, + shadow_green: { + title_color: "007A00", + text_color: "444", + icon_color: "003D00", + border_color: "003D00", + bg_color: "ffffff00", + }, + shadow_blue: { + title_color: "00779A", + text_color: "444", + icon_color: "004450", + border_color: "004490", + bg_color: "ffffff00", + }, dark: { title_color: "fff", icon_color: "79ff97", @@ -300,6 +321,13 @@ export const themes = { text_color: "C3D1D9", bg_color: "0D1117", }, + github_dark_dimmed: { + title_color: "539bf5", + icon_color: "539bf5", + text_color: "ADBAC7", + bg_color: "24292F", + border_color: "373E47", + }, discord_old_blurple: { title_color: "7289DA", icon_color: "7289DA", @@ -367,6 +395,18 @@ export const themes = { text_color: "e0def4", bg_color: "191724", }, + catppuccin_latte: { + title_color: "137980", + icon_color: "8839ef", + text_color: "4c4f69", + bg_color: "eff1f5", + }, + catppuccin_mocha: { + title_color: "94e2d5", + icon_color: "cba6f7", + text_color: "cdd6f4", + bg_color: "1e1e2e", + }, date_night: { title_color: "DA7885", text_color: "E1B2A2", @@ -374,6 +414,54 @@ export const themes = { border_color: "170F0C", bg_color: "170F0C", }, + one_dark_pro: { + title_color: "61AFEF", + text_color: "E5C06E", + icon_color: "C678DD", + border_color: "3B4048", + bg_color: "23272E", + }, + rose: { + title_color: "8d192b", + text_color: "862931", + icon_color: "B71F36", + border_color: "e9d8d4", + bg_color: "e9d8d4", + }, + holi: { + title_color: "5FABEE", + text_color: "D6E7FF", + icon_color: "5FABEE", + border_color: "85A4C0", + bg_color: "030314", + }, + neon: { + title_color: "00EAD3", + text_color: "FF449F", + icon_color: "00EAD3", + border_color: "ffffff", + bg_color: "000000", + }, + blue_navy: { + title_color: "82AAFF", + text_color: "82AAFF", + icon_color: "82AAFF", + border_color: "ffffff", + bg_color: "000000", + }, + calm_pink: { + title_color: "e07a5f", + text_color: "edae49", + icon_color: "ebcfb2", + border_color: "e1bc29", + bg_color: "2b2d40", + }, + ambient_gradient: { + title_color: "ffffff", + text_color: "ffffff", + icon_color: "ffffff", + bg_color: "35,4158d0,c850c0,ffcc70", + }, }; export default themes; diff --git a/vercel.json b/vercel.json index aee61ce054fd0..ddf82eb15666f 100644 --- a/vercel.json +++ b/vercel.json @@ -2,7 +2,7 @@ "functions": { "api/*.js": { "memory": 128, - "maxDuration": 30 + "maxDuration": 10 } }, "redirects": [