diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml deleted file mode 100644 index ccb521466..000000000 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Bug -description: File a bug report -title: "[BUG]: " -labels: ["Type: Bug", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: textarea - id: what-happened - attributes: - label: What happened? - description: What did you do? What happened? What did you expect to happen? - placeholder: Put your description of the bug here. - validations: - required: true - - type: textarea - id: versions - attributes: - label: Versions - description: What versions of the relevant software are you running? - placeholder: Octokit.js v2.0.10, Node v16.18.0 - validations: - required: true - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml deleted file mode 100644 index 64c1fc075..000000000 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Documentation -description: Update or add documentation -title: "[DOCS]: " -labels: ["Type: Documentation", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill this out! - - type: textarea - id: describe-need - attributes: - label: Describe the need - description: What do you wish was different about our docs? - placeholder: Describe the need for documentation updates here. - validations: - required: true - - type: input - id: sdk_version - attributes: - label: SDK Version - description: Do these docs apply to a specific SDK version? - placeholder: Octokit.NET v4.0.1 - validations: - required: false - - type: input - id: api_version - attributes: - label: API Version - description: Do these docs apply to a specific version of the GitHub REST API or GraphQL API? - placeholder: ex. v1.1.1 - validations: - required: false - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml deleted file mode 100644 index 453cdfda4..000000000 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Feature -description: Suggest an idea for a new feature or enhancement -title: "[FEAT]: " -labels: ["Type: Feature", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill this out! - - type: textarea - id: describe-need - attributes: - label: Describe the need - description: What do you want to happen? What problem are you trying to solve? - placeholder: Describe the need for the feature. - validations: - required: true - - type: input - id: sdk_version - attributes: - label: SDK Version - description: Does this feature suggestion apply to a specific SDK version? - placeholder: Octokit.rb v6.0.0 - validations: - required: false - - type: input - id: api_version - attributes: - label: API Version - description: Does this feature suggestion apply to a specific version of the GitHub REST API or GraphQL API? - placeholder: ex. v1.1.1 - validations: - required: false - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/ISSUE_TEMPLATE/maintenance.yml b/.github/ISSUE_TEMPLATE/maintenance.yml deleted file mode 100644 index 0c5221e2c..000000000 --- a/.github/ISSUE_TEMPLATE/maintenance.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Maintenance -description: Dependencies, cleanup, refactoring, reworking of code -title: "[MAINT]: " -labels: ["Type: Maintenance", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill this out! - - type: textarea - id: describe-need - attributes: - label: Describe the need - description: What do you want to happen? - placeholder: Describe the maintenance need here. - validations: - required: true - - type: input - id: sdk_version - attributes: - label: SDK Version - description: Does this maintenance apply to a specific SDK version? - placeholder: terraform-provider-github v5.7.0 - validations: - required: false - - type: input - id: api_version - attributes: - label: API Version - description: Does this maintenance apply to a specific version of the GitHub REST API or GraphQL API? - placeholder: ex. v1.1.1 - validations: - required: false - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 0aa1f03b6..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,30 +0,0 @@ - - -Resolves #ISSUE_NUMBER - ----- - -### Before the change? - - -* - -### After the change? - - -* - -### Pull request checklist -- [ ] Tests for the changes have been added (for bug fixes / features) -- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features) - -### Does this introduce a breaking change? - - -Please see our docs on [breaking changes](https://github.com/octokit/.github/blob/master/community/breaking_changes.md) to help! - -- [ ] Yes -- [ ] No - ----- - diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index dd7a80645..000000000 --- a/.github/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "github>octokit/.github" - ] -} diff --git a/.github/workflows/add_to_octokit_project.yml b/.github/workflows/add_to_octokit_project.yml deleted file mode 100644 index 8621996e4..000000000 --- a/.github/workflows/add_to_octokit_project.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Add PRs and issues to Octokit org project - -on: - issues: - types: [reopened, opened] - pull_request_target: - types: [reopened, opened] - -jobs: - add-to-project: - name: Add issue to project - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/add-to-project@v1.0.2 - with: - project-url: https://github.com/orgs/octokit/projects/10 - github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }} - labeled: "Status: Stale" - label-operator: NOT diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index e5f1b9f0c..000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,72 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "main" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "main" ] - schedule: - - cron: '30 23 * * 2' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'typescript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹ️ Command-line programs to run using the OS shell. - # πŸ“š See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 \ No newline at end of file diff --git a/.github/workflows/immediate-response.yml b/.github/workflows/immediate-response.yml deleted file mode 100644 index 8a29b200f..000000000 --- a/.github/workflows/immediate-response.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Issue/PR response -permissions: - issues: write - pull-requests: write -on: - issues: - types: - - opened - pull_request_target: - types: - - opened -jobs: - respond-to-issue: - if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' }} - runs-on: ubuntu-latest - steps: - - name: Determine issue or PR number - id: extract - run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" - - - name: Respond to issue or PR - uses: peter-evans/create-or-update-comment@v4 - with: - issue-number: ${{ steps.extract.outputs.NUMBER }} - body: > - πŸ‘‹ Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! - We have a [process in place](https://github.com/octokit/.github/blob/main/community/prioritization_response.md#overview) for prioritizing and responding to your input. - Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with `Status: Up for grabs`. - You & others like you are the reason all of this works! So thank you & happy coding! πŸš€ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index ed9fdedd5..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Release -"on": - push: - branches: - - main - - next - - beta - - "*.x" -# These are recommended by the semantic-release docs: https://github.com/semantic-release/npm#npm-provenance -permissions: - contents: write # to be able to publish a GitHub release - issues: write # to be able to comment on released issues - pull-requests: write # to be able to comment on released pull requests - id-token: write # to enable use of OIDC for npm provenance - -jobs: - release: - name: release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: npm - - run: npm ci - - run: npm run build - - run: npx semantic-release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.OCTOKITBOT_NPM_TOKEN }} diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml new file mode 100644 index 000000000..a0531ec0a --- /dev/null +++ b/.github/workflows/spelling.yml @@ -0,0 +1,168 @@ +name: Check Spelling + +# Comment management is handled through a secondary job, for details see: +# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions +# +# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment +# (in odd cases, it might actually run just to collapse a comment, but that's fairly rare) +# it needs `contents: write` in order to add a comment. +# +# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment +# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment) +# it needs `pull-requests: write` in order to manipulate those comments. + +# Updating pull request branches is managed via comment handling. +# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list +# +# These elements work together to make it happen: +# +# `on.issue_comment` +# This event listens to comments by users asking to update the metadata. +# +# `jobs.update` +# This job runs in response to an issue_comment and will push a new commit +# to update the spelling metadata. +# +# `with.experimental_apply_changes_via_bot` +# Tells the action to support and generate messages that enable it +# to make a commit to update the spelling metadata. +# +# `with.ssh_key` +# In order to trigger workflows when the commit is made, you can provide a +# secret (typically, a write-enabled github deploy key). +# +# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key + +# Sarif reporting +# +# Access to Sarif reports is generally restricted (by GitHub) to members of the repository. +# +# Requires enabling `security-events: write` +# and configuring the action with `use_sarif: 1` +# +# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output + +# Minimal workflow structure: +# +# on: +# push: +# ... +# pull_request_target: +# ... +# jobs: +# # you only want the spelling job, all others should be omitted +# spelling: +# # remove `security-events: write` and `use_sarif: 1` +# # remove `experimental_apply_changes_via_bot: 1` +# ... otherwise adjust the `with:` as you wish + +on: + push: + branches: + - "**" + tags-ignore: + - "**" + pull_request_target: + branches: + - "**" + types: + - 'opened' + - 'reopened' + - 'synchronize' + issue_comment: + types: + - 'created' + +jobs: + spelling: + name: Check Spelling + permissions: + contents: read + pull-requests: read + actions: read + security-events: write + outputs: + followup: ${{ steps.spelling.outputs.followup }} + runs-on: ubuntu-latest + if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }} + concurrency: + group: spelling-${{ github.event.pull_request.number || github.ref }} + # note: If you use only_check_changed_files, you do not want cancel-in-progress + cancel-in-progress: true + steps: + - name: check-spelling + id: spelling + uses: check-spelling/check-spelling@prerelease + with: + suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }} + checkout: true + check_file_names: 1 + spell_check_this: check-spelling/spell-check-this@prerelease + post_comment: 0 + use_magic_file: 1 + report-timing: 1 + warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check + experimental_apply_changes_via_bot: 1 + use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }} + extra_dictionary_limit: 20 + extra_dictionaries: + cspell:software-terms/dict/softwareTerms.txt + + comment-push: + name: Report (Push) + # If your workflow isn't running on push, you can remove this job + runs-on: ubuntu-latest + needs: spelling + permissions: + actions: read + contents: write + if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push' + steps: + - name: comment + uses: check-spelling/check-spelling@prerelease + with: + checkout: true + spell_check_this: check-spelling/spell-check-this@prerelease + task: ${{ needs.spelling.outputs.followup }} + + comment-pr: + name: Report (PR) + # If you workflow isn't running on pull_request*, you can remove this job + runs-on: ubuntu-latest + needs: spelling + permissions: + actions: read + contents: read + pull-requests: write + if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request') + steps: + - name: comment + uses: check-spelling/check-spelling@prerelease + with: + checkout: true + spell_check_this: check-spelling/spell-check-this@prerelease + task: ${{ needs.spelling.outputs.followup }} + experimental_apply_changes_via_bot: 1 + + update: + name: Update PR + permissions: + contents: write + pull-requests: write + actions: read + runs-on: ubuntu-latest + if: ${{ + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains(github.event.comment.body, '@check-spelling-bot apply') + }} + concurrency: + group: spelling-update-${{ github.event.issue.number }} + cancel-in-progress: false + steps: + - name: apply spelling updates + uses: check-spelling/check-spelling@prerelease + with: + experimental_apply_changes_via_bot: 1 + checkout: true + ssh_key: "${{ secrets.CHECK_SPELLING }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index f845d7951..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Test -"on": - push: - branches: - - main - pull_request: - types: - - opened - - synchronize -jobs: - test_matrix: - runs-on: ubuntu-latest - strategy: - matrix: - node_version: - - 20 - - 22 - - 24 - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node_version }} - cache: npm - - run: npm ci - - run: npm test - test: - runs-on: ubuntu-latest - needs: test_matrix - steps: - - run: exit 1 - if: ${{ needs.test_matrix.result != 'success' }} - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: npm - - run: npm ci - - run: npm run lint - - run: npm run build - if: ${{ always() }} diff --git a/.github/workflows/update-prettier.yml b/.github/workflows/update-prettier.yml deleted file mode 100644 index 4799ccfa8..000000000 --- a/.github/workflows/update-prettier.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Update Prettier -"on": - push: - branches: - - renovate/prettier-* - workflow_dispatch: {} -jobs: - update_prettier: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: actions/setup-node@v4 - with: - cache: npm - node-version: 16 - - run: npm ci - - run: npm run lint:fix - - uses: gr2m/create-or-update-pull-request-action@v1.x - env: - GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }} - with: - title: Prettier updated - body: An update to prettier required updates to your code. - branch: ${{ github.ref }} - commit-message: "style: prettier" diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7fdd5aac4..000000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -coverage/ -node_modules/ -pkg/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 42366f02c..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -- The use of sexualized language or imagery and unwelcome sexual attention or - advances -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic - address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at opensource+octokit@github.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [https://contributor-covenant.org/version/1/4][version] - -[homepage]: https://contributor-covenant.org -[version]: https://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index d8c4470c5..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,71 +0,0 @@ -# How to contribute - -Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). -By participating in this project you agree to abide by its terms. - -We appreciate you taking the time to contribute to `@octokit/auth-oauth-user`. Especially as a new contributor, you have a valuable perspective that we lost a long time ago: you will find things confusing and run into problems that no longer occur to us. Please share them with us, so we can make the experience for future contributors the best it could be. - -Thank you πŸ’– - -## Creating an Issue - -Before you create a new Issue: - -1. Please make sure there is no [open issue](https://github.com/octokit/auth-oauth-user.js/issues?utf8=%E2%9C%93&q=is%3Aissue) yet. -2. If it is a bug report, include the steps to reproduce the issue and please create a reproducible test case on [runkit.com](https://runkit.com/). Example: https://runkit.com/gr2m/octokit-rest-js-1808 -3. If it is a feature request, please share the motivation for the new feature, what alternatives you tried, and how you would implement it. -4. Please include links to the corresponding github documentation. - -## Setup the repository locally - -First, fork the repository. - -Setup the repository locally. Replace `` with the name of the account you forked to. - -```shell -git clone https://github.com//auth-oauth-user.js.git -cd auth-oauth-user.js -npm install -``` - -Run the tests before making changes to make sure the local setup is working as expected - -```shell -npm test -``` - -## Submitting the Pull Request - -- Create a new branch locally. -- Make your changes in that branch and push them to your fork -- Submit a pull request from your topic branch to the main branch on the `octokit/auth-oauth-user.js` repository. -- Be sure to tag any issues your pull request is taking care of / contributing to. Adding "Closes #123" to a pull request description will automatically close the issue once the pull request is merged in. - -## Testing a pull request from github repo locally: - -You can install `@octokit/auth-oauth-user` from each pull request. Replace `[PULL REQUEST NUMBER]`: - -``` -npm install https://github.pika.dev/octokit/auth-oauth-user.js/pr/[PULL REQUEST NUMBER] -``` - -Once you are done testing, you can revert back to the default module `@octokit/auth-oauth-user` from npm with `npm install @octokit/auth-oauth-user` - -## Maintainers only - -### Merging the Pull Request & releasing a new version - -Releases are automated using [semantic-release](https://github.com/semantic-release/semantic-release). -The following commit message conventions determine which version is released: - -1. `fix: ...` or `fix(scope name): ...` prefix in subject: bumps fix version, e.g. `1.2.3` β†’ `1.2.4` -2. `feat: ...` or `feat(scope name): ...` prefix in subject: bumps feature version, e.g. `1.2.3` β†’ `1.3.0` -3. `BREAKING CHANGE:` in body: bumps breaking version, e.g. `1.2.3` β†’ `2.0.0` - -Only one version number is bumped at a time, the highest version change trumps the others. -Besides publishing a new version to npm, semantic-release also creates a git tag and release -on GitHub, generates changelogs from the commit messages and puts them into the release notes. - -Before the publish it runs the `npm run build` script which creates a `pkg/` folder with distributions for browsers, node and TypeScript definitions. The contents of the `pkg/` folder are published to the npm registry. - -If the pull request looks good but does not follow the commit conventions, use the Squash & merge button. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 57049d04c..000000000 --- a/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2021 Octokit contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 95e08ec1b..000000000 --- a/README.md +++ /dev/null @@ -1,1038 +0,0 @@ -# auth-oauth-user.js - -> Octokit authentication strategy for OAuth user authentication - -[![@latest](https://img.shields.io/npm/v/@octokit/auth-oauth-user.svg)](https://www.npmjs.com/package/@octokit/auth-oauth-user) -[![Build Status](https://github.com/octokit/auth-oauth-user.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-oauth-user.js/actions?query=workflow%3ATest+branch%3Amain) - -**Important:** `@octokit/auth-oauth-user` requires your app's `client_secret`, which must not be exposed. If you are looking for an OAuth user authentication strategy that can be used on a client (browser, IoT, CLI), check out [`@octokit/auth-oauth-user-client`](https://github.com/octokit/auth-oauth-user-client.js#readme). Note that `@octokit/auth-oauth-user-client` requires a backend. The only exception is [`@octokit/auth-oauth-device`](https://github.com/octokit/auth-oauth-device.js#readme) which does not require the `client_secret`, but does not work in browsers due to CORS constraints. - -
-Table of contents - - - -- [Features](#features) -- [Standalone usage](#standalone-usage) - - [Exchange code from OAuth web flow](#exchange-code-from-oauth-web-flow) - - [OAuth Device flow](#oauth-device-flow) - - [Use an existing authentication](#use-an-existing-authentication) -- [Usage with Octokit](#usage-with-octokit) -- [`createOAuthUserAuth(options)` or `new Octokit({ auth })`](#createoauthuserauthoptions-or-new-octokit-auth-) - - [When using GitHub's OAuth web flow](#when-using-githubs-oauth-web-flow) - - [When using GitHub's OAuth device flow](#when-using-githubs-oauth-device-flow) - - [When passing an existing authentication object](#when-passing-an-existing-authentication-object) -- [`auth(options)` or `octokit.auth(options)`](#authoptions-or-octokitauthoptions) -- [Authentication object](#authentication-object) - - [OAuth APP authentication token](#oauth-app-authentication-token) - - [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) - - [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) -- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) -- [Types](#types) -- [Contributing](#contributing) -- [License](#license) - - - -
- -## Features - -- Code for token exchange from [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) -- [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) -- Caches token for succesive calls -- Auto-refreshing for [expiring user access tokens](https://docs.github.com/en/developers/apps/refreshing-user-to-server-access-tokens) -- Applies the correct authentication strategy based on the request URL when using with `Octokit` -- Token verification -- Token reset -- Token invalidation -- Application grant revocation - -## Standalone usage - - - - - - -
- -Browsers - - - -Load `@octokit/auth-oauth-user` directly from [esm.sh](https://esm.sh) - -```html - -``` - -
- -Node - - - -Install with `npm install @octokit/auth-oauth-user` - -```js -import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; -``` - -
- -### Exchange code from OAuth web flow - -```js -const auth = createOAuthUserAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - code: "code123", - // optional - state: "state123", - redirectUrl: "https://acme-inc.com/login", -}); - -// Exchanges the code for the user access token authentication on first call -// and caches the authentication for successive calls -const { token } = await auth(); -``` - -About [GitHub's OAuth web flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow) - -### OAuth Device flow - -```js -const auth = createOAuthUserAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - onVerification(verification) { - // verification example - // { - // device_code: "3584d83530557fdd1f46af8289938c8ef79f9dc5", - // user_code: "WDJB-MJHT", - // verification_uri: "https://github.com/login/device", - // expires_in: 900, - // interval: 5, - // }; - - console.log("Open %s", verification.verification_uri); - console.log("Enter code: %s", verification.user_code); - }, -}); - -// resolves once the user entered the `user_code` on `verification_uri` -const { token } = await auth(); -``` - -About [GitHub's OAuth device flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#device-flow) - -### Use an existing authentication - -```js -const auth = createOAuthUserAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - clientType: "oauth-app", - token: "token123", -}); - -// will return the passed authentication -const { token } = await auth(); -``` - -See [Authentication object](#authentication-object). - -## Usage with Octokit - - - - - - -
- -Browsers - - - -`@octokit/auth-oauth-user` cannot be used in the browser. It requires `clientSecret` to be set which must not be exposed to clients, and some of the OAuth APIs it uses do not support CORS. - -
- -Node - - - -Install with `npm install @octokit/core @octokit/auth-oauth-user`. Optionally replace `@octokit/core` with a compatible module - -```js -import { Octokit } from "@octokit/core"; -import { createOAuthUserAuth } from "@octokit/auth-oauth-user"; -``` - -
- -```js -const octokit = new Octokit({ - authStrategy: createOAuthUserAuth, - auth: { - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - code: "code123", - }, -}); - -// Exchanges the code for the user access token authentication on first request -// and caches the authentication for successive requests -const { - data: { login }, -} = await octokit.request("GET /user"); -console.log("Hello, %s!", login); -``` - -## `createOAuthUserAuth(options)` or `new Octokit({ auth })` - -The `createOAuthUserAuth` method accepts a single `options` object as argument. The same set of options can be passed as `auth` to the `Octokit` constructor when setting `authStrategy: createOAuthUserAuth` - -### When using GitHub's OAuth web flow - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- clientId - - string - - Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. -
- clientSecret - - string - - Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. -
- clientType - - string - - Either "oauth-app" or "github-app". Defaults to "oauth-app". -
- code - - string - - -**Required.** The authorization code which was passed as query parameter to the callback URL from [GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow). - -
- state - - string - - -The unguessable random string you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). - -
- redirectUrl - - string - - -The redirect_uri parameter you provided in [Step 1 of GitHub's OAuth web application flow](https://docs.github.com/en/developers/apps/authorizing-oauth-apps#1-request-a-users-github-identity). - -
- request - - function - - You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: - -```js -import { request } from "@octokit/request"; -createOAuthAppAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - request: request.defaults({ - baseUrl: "https://ghe.my-company.com/api/v3", - }), -}); -``` - -
- -### When using GitHub's OAuth device flow - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- clientId - - string - - Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. -
- clientSecret - - string - - Required. Client Secret for your GitHub/OAuth App. The clientSecret is not needed for the OAuth device flow itself, but it is required for resetting, refreshing, and invalidating a token. Find the Client Secret on your app's settings page. -
- clientType - - string - - Either "oauth-app" or "github-app". Defaults to "oauth-app". -
- onVerification - - function - - -**Required**. A function that is called once the device and user codes were retrieved - -The `onVerification()` callback can be used to pause until the user completes step 2, which might result in a better user experience. - -```js -const auth = createOAuthUserAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - onVerification(verification) { - console.log("Open %s", verification.verification_uri); - console.log("Enter code: %s", verification.user_code); - - await prompt("press enter when you are ready to continue"); - }, -}); -``` - -
- request - - function - - You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: - -```js -import { request } from "@octokit/request"; -createOAuthAppAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - onVerification(verification) { - console.log("Open %s", verification.verification_uri); - console.log("Enter code: %s", verification.user_code); - - await prompt("press enter when you are ready to continue"); - }, - request: request.defaults({ - baseUrl: "https://ghe.my-company.com/api/v3", - }), -}); -``` - -
- -### When passing an existing authentication object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- clientType - - string - - Required. Either "oauth-app" or "github". -
- clientId - - string - - Required. Client ID of your GitHub/OAuth App. Find it on your app's settings page. -
- clientSecret - - string - - Required. Client Secret for your GitHub/OAuth App. Create one on your app's settings page. -
- token - - string - - Required. The user access token -
- scopes - - array of strings - - Required if clientType is set to "oauth-app". Array of OAuth scope names the token was granted -
- refreshToken - - string - - Only relevant if clientType is set to "github-app" and token expiration is enabled. -
- expiresAt - - string - - Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z -
- refreshTokenExpiresAt - - string - - Only relevant if clientType is set to "github-app" and token expiration is enabled. Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z -
- request - - function - - You can pass in your own @octokit/request instance. For usage with enterprise, set baseUrl to the API root endpoint. Example: - -```js -import { request } from "@octokit/request"; -createOAuthAppAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - request: request.defaults({ - baseUrl: "https://ghe.my-company.com/api/v3", - }), -}); -``` - -
- -> [!IMPORTANT] -> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`. -> -> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).
-> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus) - -## `auth(options)` or `octokit.auth(options)` - -The async `auth()` method is returned by `createOAuthUserAuth(options)` or set on the `octokit` instance when the `Octokit` constructor was called with `authStrategy: createOAuthUserAuth`. - -Once `auth()` receives a valid authentication object it caches it in memory and uses it for subsequent calls. It also caches if the token is invalid and no longer tries to send any requests. If the authentication is using a refresh token, a new token will be requested as needed. Calling `auth({ type: "reset" })` will replace the internally cached authentication. - -Resolves with an [authentication object](#authentication-object). - - - - - - - - - - - - - - - - -
- name - - type - - description -
- type - - string - - -Without setting `type` auth will return the current authentication object, or exchange the `code` from the strategy options on first call. If the current authentication token is expired, the tokens will be refreshed. - -Possible values for `type` are - -- `"get"`: returns the token from internal state and creates it if none was created yet -- `"check"`: sends request to verify the validity of the current token -- `"reset"`: invalidates current token and replaces it with a new one -- `"refresh"`: GitHub Apps only, and only if expiring user tokens are enabled. -- `"delete"`: invalidates current token -- `"deleteAuthorization"`: revokes OAuth access for application. All tokens for the current user created by the same app are invalidated. The user will be prompted to grant access again during the next OAuth web flow. - -
- -## Authentication object - -There are three possible results - -1. [OAuth APP authentication token](#oauth-app-authentication-token) -1. [GitHub APP user authentication token with expiring disabled](#github-app-user-authentication-token-with-expiring-disabled) -1. [GitHub APP user authentication token with expiring enabled](#github-app-user-authentication-token-with-expiring-enabled) - -The differences are - -1. `scopes` is only present for OAuth Apps -2. `refreshToken`, `expiresAt`, `refreshTokenExpiresAt` are only present for GitHub Apps, and only if token expiration is enabled - -### OAuth APP authentication token - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- type - - string - - "token" -
- tokenType - - string - - "oauth" -
- clientType - - string - - "oauth-app" -
- clientId - - string - - The clientId from the strategy options -
- clientSecret - - string - - The clientSecret from the strategy options -
- token - - string - - The user access token -
- scopes - - array of strings - - array of scope names enabled for the token -
- onTokenCreated - - function - - callback invoked when a token is "reset" or "refreshed" -
- invalid - - boolean - - -Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid - -
- -### GitHub APP user authentication token with expiring disabled - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- type - - string - - "token" -
- tokenType - - string - - "oauth" -
- clientType - - string - - "github-app" -
- clientId - - string - - The clientId from the strategy options -
- clientSecret - - string - - The clientSecret from the strategy options -
- token - - string - - The user access token -
- onTokenCreated - - function - - callback invoked when a token is "reset" or "refreshed" -
- invalid - - boolean - - -Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid - -
- -### GitHub APP user authentication token with expiring enabled - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- type - - string - - "token" -
- tokenType - - string - - "oauth" -
- clientType - - string - - "github-app" -
- clientId - - string - - The clientId from the strategy options -
- clientSecret - - string - - The clientSecret from the strategy options -
- token - - string - - The user access token -
- refreshToken - - string - - The refresh token -
- expiresAt - - string - - Date timestamp in ISO 8601 standard. Example: 2022-01-01T08:00:0.000Z -
- refreshTokenExpiresAt - - string - - Date timestamp in ISO 8601 standard. Example: 2021-07-01T00:00:0.000Z -
- invalid - - boolean - - -Either `undefined` or `true`. Will be set to `true` if the token was invalided explicitly or found to be invalid - -
- -## `auth.hook(request, route, parameters)`Β orΒ `auth.hook(request, options)` - -`auth.hook()` hooks directly into the request life cycle. It amends the request to authenticate correctly based on the request URL. - -The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). - -`auth.hook()` can be called directly to send an authenticated request - -```js -const { data: user } = await auth.hook(request, "GET /user"); -``` - -Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). - -```js -const requestWithAuth = request.defaults({ - request: { - hook: auth.hook, - }, -}); - -const { data: user } = await requestWithAuth("GET /user"); -``` - -## Types - -```ts -import { - GitHubAppAuthentication, - GitHubAppAuthenticationWithExpiration, - GitHubAppAuthOptions, - GitHubAppStrategyOptions, - GitHubAppStrategyOptionsDeviceFlow, - GitHubAppStrategyOptionsExistingAuthentication, - GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, - GitHubAppStrategyOptionsWebFlow, - OAuthAppAuthentication, - OAuthAppAuthOptions, - OAuthAppStrategyOptions, - OAuthAppStrategyOptionsDeviceFlow, - OAuthAppStrategyOptionsExistingAuthentication, - OAuthAppStrategyOptionsWebFlow, -} from "@octokit/auth-oauth-user"; -``` - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md) - -## License - -[MIT](LICENSE) diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 0605b07db..000000000 --- a/SECURITY.md +++ /dev/null @@ -1,12 +0,0 @@ -# Security Policy - -Thanks for helping make GitHub Open Source Software safe for everyone. - -GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [Octokit](https://github.com/octokit). - -Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we want to make sure that your finding gets passed along to the maintainers of this project for remediation. - - -## Reporting a Vulnerability - -Since this source is part of [Octokit](https://github.com/octokit) (a GitHub organization) we ask that you follow the guidelines [here](https://github.com/github/.github/blob/master/SECURITY.md#reporting-security-issues) to report anything that you might've found. diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 3167c8eca..000000000 --- a/package-lock.json +++ /dev/null @@ -1,2841 +0,0 @@ -{ - "name": "@octokit/auth-oauth-user", - "version": "0.0.0-development", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@octokit/auth-oauth-user", - "version": "0.0.0-development", - "license": "MIT", - "dependencies": { - "@octokit/auth-oauth-device": "^8.0.1", - "@octokit/oauth-methods": "^6.0.0", - "@octokit/request": "^10.0.2", - "@octokit/types": "^14.0.0", - "universal-user-agent": "^7.0.0" - }, - "devDependencies": { - "@octokit/core": "^7.0.1", - "@octokit/tsconfig": "^4.0.0", - "@types/node": "^22.0.0", - "@vitest/coverage-v8": "^3.0.0", - "esbuild": "^0.25.0", - "fetch-mock": "^11.0.0", - "glob": "^11.0.0", - "mockdate": "^3.0.4", - "prettier": "3.5.3", - "semantic-release-plugin-update-version-in-files": "^2.0.0", - "typescript": "^5.0.0", - "vitest": "^3.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", - "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.27.1" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/types": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", - "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", - "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", - "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", - "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", - "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", - "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", - "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", - "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", - "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", - "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", - "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", - "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", - "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", - "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", - "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", - "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", - "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", - "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", - "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", - "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", - "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", - "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", - "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", - "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", - "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", - "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", - "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@octokit/auth-oauth-device": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-8.0.1.tgz", - "integrity": "sha512-TOqId/+am5yk9zor0RGibmlqn4V0h8vzjxlw/wYr3qzkQxl8aBPur384D1EyHtqvfz0syeXji4OUvKkHvxk/Gw==", - "license": "MIT", - "dependencies": { - "@octokit/oauth-methods": "^6.0.0", - "@octokit/request": "^10.0.2", - "@octokit/types": "^14.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/auth-token": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz", - "integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.1.tgz", - "integrity": "sha512-XgQhCJcpLxv62d9oe8OsiYespL8WciUF0eejZlWYeV8NxjRcxsbetiPERcCIQB4F6t9FSAydSl0y84I0E23oQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.2.2", - "@octokit/request": "^9.2.3", - "@octokit/request-error": "^6.1.8", - "@octokit/types": "^14.0.0", - "before-after-hook": "^4.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/core/node_modules/@octokit/request": { - "version": "9.2.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.3.tgz", - "integrity": "sha512-Ma+pZU8PXLOEYzsWf0cn/gY+ME57Wq8f49WTXA8FMHp2Ps9djKw//xYJ1je8Hm0pR2lU9FUGeJRWOtxq6olt4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/endpoint": "^10.1.4", - "@octokit/request-error": "^6.1.8", - "@octokit/types": "^14.0.0", - "fast-content-type-parse": "^2.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/endpoint": { - "version": "10.1.4", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.4.tgz", - "integrity": "sha512-OlYOlZIsfEVZm5HCSR8aSg02T2lbUWOsCQoPKfTXJwDzcHQBrVBGdGXb89dv2Kw2ToZaRtudp8O3ZIYoaOjKlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/types": "^14.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.2.2.tgz", - "integrity": "sha512-Yi8hcoqsrXGdt0yObxbebHXFOiUA+2v3n53epuOg1QUgOB6c4XzvisBNVXJSl8RYA5KrDuSL2yq9Qmqe5N0ryA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/request": "^9.2.3", - "@octokit/types": "^14.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql/node_modules/@octokit/request": { - "version": "9.2.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.3.tgz", - "integrity": "sha512-Ma+pZU8PXLOEYzsWf0cn/gY+ME57Wq8f49WTXA8FMHp2Ps9djKw//xYJ1je8Hm0pR2lU9FUGeJRWOtxq6olt4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/endpoint": "^10.1.4", - "@octokit/request-error": "^6.1.8", - "@octokit/types": "^14.0.0", - "fast-content-type-parse": "^2.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/oauth-methods": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-6.0.0.tgz", - "integrity": "sha512-Q8nFIagNLIZgM2odAraelMcDssapc+lF+y3OlcIPxyAU+knefO8KmozGqfnma1xegRDP4z5M73ABsamn72bOcA==", - "license": "MIT", - "dependencies": { - "@octokit/oauth-authorization-url": "^8.0.0", - "@octokit/request": "^10.0.2", - "@octokit/request-error": "^7.0.0", - "@octokit/types": "^14.0.0" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/oauth-methods/node_modules/@octokit/oauth-authorization-url": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-8.0.0.tgz", - "integrity": "sha512-7QoLPRh/ssEA/HuHBHdVdSgF8xNLz/Bc5m9fZkArJE5bb6NmVkDm3anKxXPmN1zh6b5WKZPRr3697xKT/yM3qQ==", - "license": "MIT", - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/oauth-methods/node_modules/@octokit/request-error": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz", - "integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^14.0.0" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/openapi-types": { - "version": "25.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-25.0.0.tgz", - "integrity": "sha512-FZvktFu7HfOIJf2BScLKIEYjDsw6RKc7rBJCdvCTfKsVnx2GEB/Nbzjr29DUdb7vQhlzS/j8qDzdditP0OC6aw==", - "license": "MIT" - }, - "node_modules/@octokit/request": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.2.tgz", - "integrity": "sha512-iYj4SJG/2bbhh+iIpFmG5u49DtJ4lipQ+aPakjL9OKpsGY93wM8w06gvFbEQxcMsZcCvk5th5KkIm2m8o14aWA==", - "license": "MIT", - "dependencies": { - "@octokit/endpoint": "^11.0.0", - "@octokit/request-error": "^7.0.0", - "@octokit/types": "^14.0.0", - "fast-content-type-parse": "^3.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/request-error": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.8.tgz", - "integrity": "sha512-WEi/R0Jmq+IJKydWlKDmryPcmdYSVjL3ekaiEL1L9eo1sUnqMJ+grqmC9cjk7CA7+b2/T397tO5d8YLOH3qYpQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@octokit/types": "^14.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/request/node_modules/@octokit/endpoint": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.0.tgz", - "integrity": "sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^14.0.0", - "universal-user-agent": "^7.0.2" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/request/node_modules/@octokit/request-error": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.0.tgz", - "integrity": "sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^14.0.0" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@octokit/request/node_modules/fast-content-type-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz", - "integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "MIT" - }, - "node_modules/@octokit/tsconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-4.0.0.tgz", - "integrity": "sha512-hRd6UhX19m+8WhfrEpNLtm9TjuizYSG/dE0a+ivU71ylSxABVe4mEK+JMAGdjj6/gIQ+5DPegTPofi4P8VC5IA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@octokit/types": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-14.0.0.tgz", - "integrity": "sha512-VVmZP0lEhbo2O1pdq63gZFiGCKkm8PPp8AUOijlwPO6hojEVjspA0MWKP7E4hbvGxzFKNqKr6p0IYtOH/Wf/zA==", - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^25.0.0" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz", - "integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz", - "integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz", - "integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz", - "integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz", - "integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz", - "integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz", - "integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz", - "integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz", - "integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz", - "integrity": "sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz", - "integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz", - "integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz", - "integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz", - "integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz", - "integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz", - "integrity": "sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.0.tgz", - "integrity": "sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz", - "integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz", - "integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz", - "integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/glob-to-regexp": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@types/glob-to-regexp/-/glob-to-regexp-0.4.4.tgz", - "integrity": "sha512-nDKoaKJYbnn1MZxUY0cA1bPmmgZbg0cTq7Rh13d0KWYNOiKbqoR+2d89SnRPszGh7ROzSwZ/GOjZ4jPbmmZ6Eg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.15.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.19.tgz", - "integrity": "sha512-3vMNr4TzNQyjHcRZadojpRaD9Ofr6LsonZAoQ+HMUa/9ORTPoxVIw0e0mpqWpdjj8xybyCM+oKOUH2vwFu/oEw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@vitest/coverage-v8": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.1.4.tgz", - "integrity": "sha512-G4p6OtioySL+hPV7Y6JHlhpsODbJzt1ndwHAFkyk6vVjpK03PFsKnauZIzcd0PrK4zAbc5lc+jeZ+eNGiMA+iw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.3.0", - "@bcoe/v8-coverage": "^1.0.2", - "debug": "^4.4.0", - "istanbul-lib-coverage": "^3.2.2", - "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^5.0.6", - "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.17", - "magicast": "^0.3.5", - "std-env": "^3.9.0", - "test-exclude": "^7.0.1", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@vitest/browser": "3.1.4", - "vitest": "3.1.4" - }, - "peerDependenciesMeta": { - "@vitest/browser": { - "optional": true - } - } - }, - "node_modules/@vitest/expect": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.4.tgz", - "integrity": "sha512-xkD/ljeliyaClDYqHPNCiJ0plY5YIcM0OlRiZizLhlPmpXWpxnGMyTZXOHFhFeG7w9P5PBeL4IdtJ/HeQwTbQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.4.tgz", - "integrity": "sha512-8IJ3CvwtSw/EFXqWFL8aCMu+YyYXG2WUSrQbViOZkWTKTVicVwZ/YiEZDSqD00kX+v/+W+OnxhNWoeVKorHygA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "3.1.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/pretty-format": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.4.tgz", - "integrity": "sha512-cqv9H9GvAEoTaoq+cYqUTCGscUjKqlJZC7PRwY5FMySVj5J+xOm1KQcCiYHJOEzOKRUhLH4R2pTwvFlWCEScsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.4.tgz", - "integrity": "sha512-djTeF1/vt985I/wpKVFBMWUlk/I7mb5hmD5oP8K9ACRmVXgKTae3TUOtXAEBfslNKPzUQvnKhNd34nnRSYgLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "3.1.4", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.4.tgz", - "integrity": "sha512-JPHf68DvuO7vilmvwdPr9TS0SuuIzHvxeaCkxYcCD4jTk67XwL45ZhEHFKIuCm8CYstgI6LZ4XbwD6ANrwMpFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.1.4", - "magic-string": "^0.30.17", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.4.tgz", - "integrity": "sha512-Xg1bXhu+vtPXIodYN369M86K8shGLouNjoVI78g8iAq2rFoHFdajNvJJ5A/9bPMFcfQqdaCpOgWKEoMQg/s0Yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyspy": "^3.0.2" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.4.tgz", - "integrity": "sha512-yriMuO1cfFhmiGc8ataN51+9ooHRuURdfAZfwFd3usWynjzpLslZdYnRegTv32qdgtJTsj15FoeZe2g15fY1gg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.1.4", - "loupe": "^3.1.3", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "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, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/before-after-hook": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz", - "integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/chai": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", - "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-eql": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", - "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "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, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", - "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.4", - "@esbuild/android-arm": "0.25.4", - "@esbuild/android-arm64": "0.25.4", - "@esbuild/android-x64": "0.25.4", - "@esbuild/darwin-arm64": "0.25.4", - "@esbuild/darwin-x64": "0.25.4", - "@esbuild/freebsd-arm64": "0.25.4", - "@esbuild/freebsd-x64": "0.25.4", - "@esbuild/linux-arm": "0.25.4", - "@esbuild/linux-arm64": "0.25.4", - "@esbuild/linux-ia32": "0.25.4", - "@esbuild/linux-loong64": "0.25.4", - "@esbuild/linux-mips64el": "0.25.4", - "@esbuild/linux-ppc64": "0.25.4", - "@esbuild/linux-riscv64": "0.25.4", - "@esbuild/linux-s390x": "0.25.4", - "@esbuild/linux-x64": "0.25.4", - "@esbuild/netbsd-arm64": "0.25.4", - "@esbuild/netbsd-x64": "0.25.4", - "@esbuild/openbsd-arm64": "0.25.4", - "@esbuild/openbsd-x64": "0.25.4", - "@esbuild/sunos-x64": "0.25.4", - "@esbuild/win32-arm64": "0.25.4", - "@esbuild/win32-ia32": "0.25.4", - "@esbuild/win32-x64": "0.25.4" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/expect-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", - "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/fast-content-type-parse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", - "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/fetch-mock": { - "version": "11.1.5", - "resolved": "https://registry.npmjs.org/fetch-mock/-/fetch-mock-11.1.5.tgz", - "integrity": "sha512-KHmZDnZ1ry0pCTrX4YG5DtThHi0MH+GNI9caESnzX/nMJBrvppUHMvLx47M0WY9oAtKOMiPfZDRpxhlHg89BOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/glob-to-regexp": "^0.4.4", - "dequal": "^2.0.3", - "glob-to-regexp": "^0.4.1", - "is-subset": "^0.1.1", - "regexparam": "^3.0.0" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependenciesMeta": { - "node-fetch": { - "optional": true - } - } - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/fsevents": { - "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, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz", - "integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" - }, - "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", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "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, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", - "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.0.tgz", - "integrity": "sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/loupe": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", - "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", - "dev": true, - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", - "dev": true, - "license": "ISC", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" - } - }, - "node_modules/magicast": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", - "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.25.4", - "@babel/types": "^7.25.4", - "source-map-js": "^1.2.0" - } - }, - "node_modules/make-dir": { - "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, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mockdate": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz", - "integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/pathval": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", - "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.8", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/regexparam": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-3.0.0.tgz", - "integrity": "sha512-RSYAtP31mvYLkAHrOlh25pCNQ5hWnT106VukGaaFfuJrZFkGRX5GhUAdPqpSDXxOhA2c4akmRuplv1mRqnBn6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/rollup": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz", - "integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.7" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.0", - "@rollup/rollup-android-arm64": "4.41.0", - "@rollup/rollup-darwin-arm64": "4.41.0", - "@rollup/rollup-darwin-x64": "4.41.0", - "@rollup/rollup-freebsd-arm64": "4.41.0", - "@rollup/rollup-freebsd-x64": "4.41.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.0", - "@rollup/rollup-linux-arm-musleabihf": "4.41.0", - "@rollup/rollup-linux-arm64-gnu": "4.41.0", - "@rollup/rollup-linux-arm64-musl": "4.41.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-musl": "4.41.0", - "@rollup/rollup-linux-s390x-gnu": "4.41.0", - "@rollup/rollup-linux-x64-gnu": "4.41.0", - "@rollup/rollup-linux-x64-musl": "4.41.0", - "@rollup/rollup-win32-arm64-msvc": "4.41.0", - "@rollup/rollup-win32-ia32-msvc": "4.41.0", - "@rollup/rollup-win32-x64-msvc": "4.41.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/semantic-release-plugin-update-version-in-files": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/semantic-release-plugin-update-version-in-files/-/semantic-release-plugin-update-version-in-files-2.0.0.tgz", - "integrity": "sha512-ovpBKjkygkbiTH0CG+vJb62O+eGFoI7PM5KCVuuy2I5Xaj5t9JzmwMtAAls3Ie+R06IQu556P4gIKjJ9FIDJZQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "debug": "^4.1.1", - "glob": "^10.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/semantic-release-plugin-update-version-in-files/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/semantic-release-plugin-update-version-in-files/node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/semantic-release-plugin-update-version-in-files/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/semantic-release-plugin-update-version-in-files/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/semantic-release-plugin-update-version-in-files/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true, - "license": "ISC" - }, - "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, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", - "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", - "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^9.0.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/test-exclude/node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/test-exclude/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/test-exclude/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", - "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinypool": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", - "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, - "node_modules/tinyrainbow": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", - "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", - "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/universal-user-agent": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", - "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==", - "license": "ISC" - }, - "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.4.tgz", - "integrity": "sha512-6enNwYnpyDo4hEgytbmc6mYWHXDHYEn0D1/rw4Q+tnHUGtKTJsn8T1YkX6Q18wI5LCrS8CTYlBaiCqxOy2kvUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.0", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vitest": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.4.tgz", - "integrity": "sha512-Ta56rT7uWxCSJXlBtKgIlApJnT6e6IGmTYxYcmxjJ4ujuZDI59GUQgVDObXXJujOmPDBYXHK1qmaGtneu6TNIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "3.1.4", - "@vitest/mocker": "3.1.4", - "@vitest/pretty-format": "^3.1.4", - "@vitest/runner": "3.1.4", - "@vitest/snapshot": "3.1.4", - "@vitest/spy": "3.1.4", - "@vitest/utils": "3.1.4", - "chai": "^5.2.0", - "debug": "^4.4.0", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", - "pathe": "^2.0.3", - "std-env": "^3.9.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.13", - "tinypool": "^1.0.2", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0", - "vite-node": "3.1.4", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.1.4", - "@vitest/ui": "3.1.4", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/debug": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 7a92dc13e..000000000 --- a/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "@octokit/auth-oauth-user", - "publishConfig": { - "access": "public", - "provenance": true - }, - "type": "module", - "version": "0.0.0-development", - "description": "Octokit authentication strategy for OAuth clients", - "scripts": { - "build": "node scripts/build.mjs && tsc -p tsconfig.json", - "lint": "prettier --check '{src,test,scripts}/**/*' README.md package.json", - "lint:fix": "prettier --write '{src,test,scripts}/**/*' README.md package.json", - "pretest": "npm run -s lint", - "test": "vitest run --coverage" - }, - "repository": "https://github.com/octokit/auth-oauth-user.js", - "keywords": [ - "github", - "api", - "sdk", - "toolkit" - ], - "author": "Gregor Martynus (https://dev.to/gr2m)", - "license": "MIT", - "dependencies": { - "@octokit/auth-oauth-device": "^8.0.1", - "@octokit/oauth-methods": "^6.0.0", - "@octokit/request": "^10.0.2", - "@octokit/types": "^14.0.0", - "universal-user-agent": "^7.0.0" - }, - "devDependencies": { - "@octokit/core": "^7.0.1", - "@octokit/tsconfig": "^4.0.0", - "@types/node": "^22.0.0", - "@vitest/coverage-v8": "^3.0.0", - "esbuild": "^0.25.0", - "fetch-mock": "^11.0.0", - "glob": "^11.0.0", - "mockdate": "^3.0.4", - "prettier": "3.5.3", - "semantic-release-plugin-update-version-in-files": "^2.0.0", - "typescript": "^5.0.0", - "vitest": "^3.0.0" - }, - "release": { - "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", - "@semantic-release/github", - [ - "@semantic-release/npm", - { - "pkgRoot": "./pkg" - } - ], - [ - "semantic-release-plugin-update-version-in-files", - { - "files": [ - "pkg/dist-web/*", - "pkg/dist-node/*", - "pkg/*/version.*" - ] - } - ] - ] - }, - "engines": { - "node": ">= 20" - } -} diff --git a/scripts/build.mjs b/scripts/build.mjs deleted file mode 100644 index 1e1b2d350..000000000 --- a/scripts/build.mjs +++ /dev/null @@ -1,77 +0,0 @@ -import esbuild from "esbuild"; -import { copyFile, readFile, writeFile, rm } from "node:fs/promises"; -import { glob } from "glob"; - -const sharedOptions = { - sourcemap: "external", - sourcesContent: true, - minify: false, - allowOverwrite: true, - packages: "external", - platform: "neutral", - target: "es2022", - format: "esm", -}; - -async function main() { - // Start with a clean slate - await rm("pkg", { recursive: true, force: true }); - // Build the source code for a neutral platform as ESM - await esbuild.build({ - entryPoints: await glob(["./src/*.ts", "./src/**/*.ts"]), - outdir: "pkg/dist-src", - bundle: false, - ...sharedOptions, - sourcemap: false, - }); - - // Remove the types file from the dist-src folder - const typeFiles = await glob([ - "./pkg/dist-src/**/types.js.map", - "./pkg/dist-src/**/types.js", - ]); - for (const typeFile of typeFiles) { - await rm(typeFile); - } - - await esbuild.build({ - entryPoints: ["./pkg/dist-src/index.js"], - outdir: "pkg/dist-bundle", - bundle: true, - ...sharedOptions, - }); - - // Copy the README, LICENSE to the pkg folder - await copyFile("LICENSE", "pkg/LICENSE"); - await copyFile("README.md", "pkg/README.md"); - - // Handle the package.json - let pkg = JSON.parse((await readFile("package.json", "utf8")).toString()); - // Remove unnecessary fields from the package.json - delete pkg.scripts; - delete pkg.prettier; - delete pkg.release; - delete pkg.jest; - await writeFile( - "pkg/package.json", - JSON.stringify( - { - ...pkg, - files: ["dist-*/**", "bin/**"], - types: "./dist-types/index.d.ts", - exports: { - ".": { - types: "./dist-types/index.d.ts", - import: "./dist-bundle/index.js", - // Tooling currently are having issues with the "exports" field when there is no "default", ex: TypeScript, eslint - default: "./dist-bundle/index.js", - }, - }, - sideEffects: false, - }, - null, - 2, - ), - ); -} -main(); diff --git a/src/auth.ts b/src/auth.ts deleted file mode 100644 index b58b32295..000000000 --- a/src/auth.ts +++ /dev/null @@ -1,155 +0,0 @@ -import type { - OAuthAppAuthOptions, - GitHubAppAuthOptions, - OAuthAppAuthentication, - GitHubAppAuthentication, - GitHubAppAuthenticationWithExpiration, - OAuthAppState, - GitHubAppState, -} from "./types.js"; -import { getAuthentication } from "./get-authentication.js"; -import { - checkToken, - deleteAuthorization, - deleteToken, - refreshToken, - resetToken, -} from "@octokit/oauth-methods"; - -export async function auth( - state: OAuthAppState, - options?: OAuthAppAuthOptions, -): Promise; - -export async function auth( - state: GitHubAppState, - options?: GitHubAppAuthOptions, -): Promise; - -export async function auth( - state: OAuthAppState | GitHubAppState, - options: OAuthAppAuthOptions | GitHubAppAuthOptions = {}, -): Promise< - | OAuthAppAuthentication - | GitHubAppAuthentication - | GitHubAppAuthenticationWithExpiration -> { - if (!state.authentication) { - // This is what TS makes us do Β―\_(ツ)_/Β― - state.authentication = - state.clientType === "oauth-app" - ? await getAuthentication(state) - : await getAuthentication(state); - } - - if (state.authentication.invalid) { - throw new Error("[@octokit/auth-oauth-user] Token is invalid"); - } - - const currentAuthentication = state.authentication; - - // (auto) refresh for user-to-server tokens - if ("expiresAt" in currentAuthentication) { - if ( - options.type === "refresh" || - new Date(currentAuthentication.expiresAt) < new Date() - ) { - const { authentication } = await refreshToken({ - clientType: "github-app", - clientId: state.clientId, - clientSecret: state.clientSecret, - refreshToken: currentAuthentication.refreshToken, - request: state.request, - }); - state.authentication = { - tokenType: "oauth", - type: "token", - ...authentication, - }; - } - } - - // throw error for invalid refresh call - if (options.type === "refresh") { - if (state.clientType === "oauth-app") { - throw new Error( - "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens", - ); - } - - if (!currentAuthentication.hasOwnProperty("expiresAt")) { - throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); - } - - await state.onTokenCreated?.(state.authentication, { - type: options.type, - }); - } - - // check or reset token - if (options.type === "check" || options.type === "reset") { - const method = options.type === "check" ? checkToken : resetToken; - try { - const { authentication } = await method({ - // @ts-expect-error making TS happy would require unnecessary code so no - clientType: state.clientType, - clientId: state.clientId, - clientSecret: state.clientSecret, - token: state.authentication.token, - request: state.request, - }); - - state.authentication = { - tokenType: "oauth", - type: "token", - // @ts-expect-error TBD - ...authentication, - }; - - if (options.type === "reset") { - await state.onTokenCreated?.(state.authentication, { - type: options.type, - }); - } - - return state.authentication as - | OAuthAppAuthentication - | GitHubAppAuthentication - | GitHubAppAuthenticationWithExpiration; - } catch (error: any) { - /* v8 ignore next 5 */ - if (error.status === 404) { - error.message = "[@octokit/auth-oauth-user] Token is invalid"; - - // @ts-expect-error TBD - state.authentication.invalid = true; - } - - throw error; - } - } - - // invalidate - if (options.type === "delete" || options.type === "deleteAuthorization") { - const method = - options.type === "delete" ? deleteToken : deleteAuthorization; - try { - await method({ - // @ts-expect-error making TS happy would require unnecessary code so no - clientType: state.clientType, - clientId: state.clientId, - clientSecret: state.clientSecret, - token: state.authentication.token, - request: state.request, - }); - } catch (error: any) { - /* v8 ignore next */ - if (error.status !== 404) throw error; - } - - state.authentication.invalid = true; - return state.authentication; - } - - return state.authentication; -} diff --git a/src/get-authentication.ts b/src/get-authentication.ts deleted file mode 100644 index 4e7fafe0a..000000000 --- a/src/get-authentication.ts +++ /dev/null @@ -1,81 +0,0 @@ -// @ts-nocheck there is only place for one of us in this file. And it's not you, TS - -import type { - OAuthAppState, - GitHubAppState, - OAuthAppAuthentication, - GitHubAppAuthentication, - GitHubAppAuthenticationWithExpiration, - Authentication, -} from "./types.js"; - -import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device"; -import { exchangeWebFlowCode } from "@octokit/oauth-methods"; - -export async function getAuthentication( - state: OAuthAppState, -): Promise; -export async function getAuthentication( - state: GitHubAppState, -): Promise; - -export async function getAuthentication( - state: OAuthAppState | GitHubAppState, -): Promise< - | OAuthAppAuthentication - | GitHubAppAuthentication - | GitHubAppAuthenticationWithExpiration -> { - // handle code exchange form OAuth Web Flow - if ("code" in state.strategyOptions) { - const { authentication } = await exchangeWebFlowCode({ - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions, - request: state.request, - }); - - return { - type: "token", - tokenType: "oauth", - ...authentication, - }; - } - - // handle OAuth device flow - if ("onVerification" in state.strategyOptions) { - const deviceAuth = createOAuthDeviceAuth({ - clientType: state.clientType, - clientId: state.clientId, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions, - request: state.request, - }); - - const authentication = await deviceAuth({ - type: "oauth", - }); - - return { - clientSecret: state.clientSecret, - ...authentication, - }; - } - - // use existing authentication - if ("token" in state.strategyOptions) { - return { - type: "token", - tokenType: "oauth", - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions, - }; - } - - throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); -} diff --git a/src/hook.ts b/src/hook.ts deleted file mode 100644 index fed1fa6b0..000000000 --- a/src/hook.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { - EndpointOptions, - EndpointDefaults, - OctokitResponse, - RequestInterface, - RequestParameters, - Route, -} from "@octokit/types"; - -import type { OAuthAppState, GitHubAppState } from "./types.js"; -import { auth } from "./auth.js"; -import { requiresBasicAuth } from "./requires-basic-auth.js"; - -type AnyResponse = OctokitResponse; - -export async function hook( - state: OAuthAppState, - request: RequestInterface, - route: Route | EndpointOptions, - parameters: RequestParameters, -): Promise; - -export async function hook( - state: GitHubAppState, - request: RequestInterface, - route: Route | EndpointOptions, - parameters: RequestParameters, -): Promise; - -export async function hook( - state: OAuthAppState | GitHubAppState, - request: RequestInterface, - route: Route | EndpointOptions, - parameters: RequestParameters = {}, -): Promise { - const endpoint = request.endpoint.merge( - route as string, - parameters, - ) as EndpointDefaults & { url: string }; - - // Do not intercept OAuth Web/Device flow request - if ( - /\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url as string) - ) { - return request(endpoint); - } - - if (requiresBasicAuth(endpoint.url)) { - const credentials = btoa(`${state.clientId}:${state.clientSecret}`); - endpoint.headers.authorization = `basic ${credentials}`; - return request(endpoint); - } - - // TS makes us do this Β―\_(ツ)_/Β― - const { token } = - state.clientType === "oauth-app" - ? await auth({ ...state, request }) - : await auth({ ...state, request }); - - endpoint.headers.authorization = "token " + token; - - return request(endpoint); -} diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 76aac9241..000000000 --- a/src/index.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { getUserAgent } from "universal-user-agent"; -import { request as octokitRequest } from "@octokit/request"; - -import { VERSION } from "./version.js"; -import { auth } from "./auth.js"; -import { hook } from "./hook.js"; -import type { - State, - OAuthAppStrategyOptions, - GitHubAppStrategyOptions, - OAuthAppAuthInterface, - GitHubAppAuthInterface, -} from "./types.js"; - -export type { - OAuthAppStrategyOptionsWebFlow, - GitHubAppStrategyOptionsWebFlow, - OAuthAppStrategyOptionsDeviceFlow, - GitHubAppStrategyOptionsDeviceFlow, - OAuthAppStrategyOptionsExistingAuthentication, - GitHubAppStrategyOptionsExistingAuthentication, - GitHubAppStrategyOptionsExistingAuthenticationWithExpiration, - OAuthAppStrategyOptions, - GitHubAppStrategyOptions, - OAuthAppAuthOptions, - GitHubAppAuthOptions, - OAuthAppAuthentication, - GitHubAppAuthentication, - GitHubAppAuthenticationWithExpiration, -} from "./types.js"; - -export { requiresBasicAuth } from "./requires-basic-auth.js"; - -export function createOAuthUserAuth( - options: OAuthAppStrategyOptions, -): OAuthAppAuthInterface; -export function createOAuthUserAuth( - options: GitHubAppStrategyOptions, -): GitHubAppAuthInterface; - -export function createOAuthUserAuth({ - clientId, - clientSecret, - clientType = "oauth-app", - request = octokitRequest.defaults({ - headers: { - "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${getUserAgent()}`, - }, - }), - onTokenCreated, - ...strategyOptions -}: OAuthAppStrategyOptions | GitHubAppStrategyOptions): - | OAuthAppAuthInterface - | GitHubAppAuthInterface { - const state: State = Object.assign({ - clientType, - clientId, - clientSecret, - onTokenCreated, - strategyOptions, - request, - }); - - // @ts-expect-error not worth the extra code needed to appease TS - return Object.assign(auth.bind(null, state), { - // @ts-expect-error not worth the extra code needed to appease TS - hook: hook.bind(null, state), - }); -} - -createOAuthUserAuth.VERSION = VERSION; diff --git a/src/requires-basic-auth.ts b/src/requires-basic-auth.ts deleted file mode 100644 index 3ba4e6347..000000000 --- a/src/requires-basic-auth.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * The following endpoints require an OAuth App to authenticate using its client_id and client_secret. - * - * - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token - * - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token - * - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token - * - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token - * - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#delete-an-app-authorization) - Delete an app authorization - * - * deprecated: - * - * - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization - * - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization - * - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application - * - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application - */ -const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; - -export function requiresBasicAuth(url: string | undefined) { - return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); -} diff --git a/src/types.ts b/src/types.ts deleted file mode 100644 index dea92e3b2..000000000 --- a/src/types.ts +++ /dev/null @@ -1,192 +0,0 @@ -import type * as OctokitTypes from "@octokit/types"; -import type * as DeviceTypes from "@octokit/auth-oauth-device"; -import type * as OAuthMethodsTypes from "@octokit/oauth-methods"; - -export type ClientType = "oauth-app" | "github-app"; - -export type WebFlowOptions = { - code: string; - state?: string; - redirectUrl?: string; -}; - -// STRATEGY OPTIONS -type CommonAppStrategyOptions = { - clientType?: ClientType; - clientId: string; - clientSecret: string; - request?: OctokitTypes.RequestInterface; - onTokenCreated?: OnTokenCreatedCallback; -}; - -type CommonOAuthAppStrategyOptions = { - clientType?: "oauth-app"; -} & CommonAppStrategyOptions; - -type CommonGitHubAppStrategyOptions = { - clientType?: "github-app"; -} & CommonAppStrategyOptions; - -type OAuthAppDeviceFlowOptions = { - onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; - scopes?: string[]; -}; -type GitHubDeviceFlowOptions = { - onVerification: DeviceTypes.OAuthAppStrategyOptions["onVerification"]; -}; -type ExistingOAuthAppAuthenticationOptions = { - clientType: "oauth-app"; - token: string; - scopes: string[]; -}; -type ExistingGitHubAppAuthenticationOptions = { - token: string; -}; -type ExistingGitHubAppAuthenticationWithExpirationOptions = { - token: string; - refreshToken: string; - expiresAt: string; - refreshTokenExpiresAt: string; -}; - -export type OAuthAppStrategyOptionsWebFlow = CommonOAuthAppStrategyOptions & - WebFlowOptions; -export type GitHubAppStrategyOptionsWebFlow = CommonGitHubAppStrategyOptions & - WebFlowOptions; - -export type OAuthAppStrategyOptionsDeviceFlow = CommonOAuthAppStrategyOptions & - OAuthAppDeviceFlowOptions; -export type GitHubAppStrategyOptionsDeviceFlow = - CommonGitHubAppStrategyOptions & GitHubDeviceFlowOptions; - -export type OAuthAppStrategyOptionsExistingAuthentication = - CommonOAuthAppStrategyOptions & ExistingOAuthAppAuthenticationOptions; - -export type GitHubAppStrategyOptionsExistingAuthentication = - CommonGitHubAppStrategyOptions & ExistingGitHubAppAuthenticationOptions; - -export type GitHubAppStrategyOptionsExistingAuthenticationWithExpiration = - CommonGitHubAppStrategyOptions & - ExistingGitHubAppAuthenticationWithExpirationOptions; - -export type OAuthAppStrategyOptions = - | OAuthAppStrategyOptionsWebFlow - | OAuthAppStrategyOptionsDeviceFlow - | OAuthAppStrategyOptionsExistingAuthentication; -export type GitHubAppStrategyOptions = - | GitHubAppStrategyOptionsWebFlow - | GitHubAppStrategyOptionsDeviceFlow - | GitHubAppStrategyOptionsExistingAuthentication - | GitHubAppStrategyOptionsExistingAuthenticationWithExpiration; - -// AUTHENTICATION - -export type OAuthAppAuthentication = { - tokenType: "oauth"; - type: "token"; -} & OAuthMethodsTypes.OAuthAppAuthentication; - -export type GitHubAppAuthentication = { - tokenType: "oauth"; - type: "token"; -} & OAuthMethodsTypes.GitHubAppAuthentication; -export type GitHubAppAuthenticationWithExpiration = { - tokenType: "oauth"; - type: "token"; -} & OAuthMethodsTypes.GitHubAppAuthenticationWithExpiration; - -// INTERFACE - -export interface OAuthAppAuthInterface { - (options?: OAuthAppAuthOptions): Promise; - - hook( - request: OctokitTypes.RequestInterface, - route: OctokitTypes.Route | OctokitTypes.EndpointOptions, - parameters?: OctokitTypes.RequestParameters, - ): Promise>; -} - -export interface GitHubAppAuthInterface { - ( - options?: GitHubAppAuthOptions, - ): Promise; - - hook( - request: OctokitTypes.RequestInterface, - route: OctokitTypes.Route | OctokitTypes.EndpointOptions, - parameters?: OctokitTypes.RequestParameters, - ): Promise>; -} - -// INTERNAL STATE - -type OnTokenCreatedCallback = ( - authentication: - | OAuthAppAuthentication - | GitHubAppAuthentication - | GitHubAppAuthenticationWithExpiration - | undefined, - options: OAuthAppAuthOptions | GitHubAppAuthOptions, -) => void | Promise; - -export type OAuthAppState = { - clientId: string; - clientSecret: string; - clientType: "oauth-app"; - request: OctokitTypes.RequestInterface; - onTokenCreated?: CommonAppStrategyOptions["onTokenCreated"]; - strategyOptions: - | WebFlowOptions - | OAuthAppDeviceFlowOptions - | ExistingOAuthAppAuthenticationOptions; - authentication?: OAuthAppAuthentication & { invalid?: true }; -}; - -type GitHubAppStateAuthentication = GitHubAppAuthentication & { - invalid?: true; -}; -type GitHubAppStateAuthenticationWIthExpiration = - GitHubAppAuthenticationWithExpiration & { - invalid?: true; - }; - -export type GitHubAppState = { - clientId: string; - clientSecret: string; - clientType: "github-app"; - request: OctokitTypes.RequestInterface; - onTokenCreated?: CommonAppStrategyOptions["onTokenCreated"]; - strategyOptions: - | WebFlowOptions - | GitHubDeviceFlowOptions - | ExistingGitHubAppAuthenticationOptions - | ExistingGitHubAppAuthenticationWithExpirationOptions; - authentication?: - | GitHubAppStateAuthentication - | GitHubAppStateAuthenticationWIthExpiration; -}; - -export type State = OAuthAppState | GitHubAppState; - -export type WebFlowState = { - clientId: string; - clientSecret: string; - clientType: ClientType; - request: OctokitTypes.RequestInterface; - strategyOptions: WebFlowOptions; -}; - -export type OAuthAppAuthOptions = { - type?: "get" | "check" | "reset" | "delete" | "deleteAuthorization"; -}; - -export type GitHubAppAuthOptions = { - type?: - | "get" - | "check" - | "reset" - | "refresh" - | "delete" - | "deleteAuthorization"; -}; diff --git a/src/version.ts b/src/version.ts deleted file mode 100644 index 86383b116..000000000 --- a/src/version.ts +++ /dev/null @@ -1 +0,0 @@ -export const VERSION = "0.0.0-development"; diff --git a/test/octokit.test.ts b/test/octokit.test.ts deleted file mode 100644 index eab83bff9..000000000 --- a/test/octokit.test.ts +++ /dev/null @@ -1,224 +0,0 @@ -import { describe, expect, it, test } from "vitest"; -import { Octokit } from "@octokit/core"; -import fetchMock from "fetch-mock"; - -import { createOAuthUserAuth } from "../src/index.js"; - -describe("Octokit + OAuth web flow", () => { - it("README example", async () => { - const matchCreateTokenRequest: fetchMock.MockMatcherFunction = ( - url, - options, - ) => { - expect(url).toEqual("https://github.com/login/oauth/access_token"); - expect(options.headers).toEqual( - expect.objectContaining({ - accept: "application/json", - "content-type": "application/json; charset=utf-8", - }), - ); - - return true; - }; - - const matchGetUserRequest: fetchMock.MockMatcherFunction = ( - url, - options, - ) => { - expect(url).toEqual("https://api.github.com/user"); - expect(options.headers).toEqual( - expect.objectContaining({ - accept: "application/vnd.github.v3+json", - authorization: "token token123", - }), - ); - - return true; - }; - - const mock = fetchMock - .sandbox() - .postOnce(matchCreateTokenRequest, { - access_token: "token123", - scope: "", - token_type: "bearer", - }) - .getOnce(matchGetUserRequest, { - login: "octocat", - }); - - const octokit = new Octokit({ - authStrategy: createOAuthUserAuth, - auth: { - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - code: "code123", - }, - request: { - fetch: mock, - }, - }); - - // Exchanges the code for the user access token authentication on first request - // and caches the authentication for successive requests - const { - data: { login }, - } = await octokit.request("GET /user"); - expect(login).toEqual("octocat"); - }); - - it("GitHub App auth", async () => { - const matchCreateTokenRequest: fetchMock.MockMatcherFunction = ( - url, - options, - ) => { - expect(url).toEqual("https://github.com/login/oauth/access_token"); - expect(options.headers).toEqual( - expect.objectContaining({ - accept: "application/json", - "content-type": "application/json; charset=utf-8", - }), - ); - - return true; - }; - - const matchGetUserRequest: fetchMock.MockMatcherFunction = ( - url, - options, - ) => { - expect(url).toEqual("https://api.github.com/user"); - expect(options.headers).toEqual( - expect.objectContaining({ - accept: "application/vnd.github.v3+json", - authorization: "token token123", - }), - ); - - return true; - }; - - const mock = fetchMock - .sandbox() - .postOnce(matchCreateTokenRequest, { - access_token: "token123", - scope: "", - token_type: "bearer", - }) - .getOnce(matchGetUserRequest, { - login: "octocat", - }); - - const octokit = new Octokit({ - authStrategy: createOAuthUserAuth, - auth: { - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - code: "code123", - }, - request: { - fetch: mock, - }, - }); - - // Exchanges the code for the user access token authentication on first request - // and caches the authentication for successive requests - const { - data: { login }, - } = await octokit.request("GET /user"); - expect(login).toEqual("octocat"); - }); -}); - -test("Sets clientId/clientSecret as Basic auth for /authentication/{clientId}/* requests", async () => { - const matchCheckTokenRequest: fetchMock.MockMatcherFunction = ( - url, - options, - ) => { - expect(url).toEqual( - "https://api.github.com/applications/1234567890abcdef1234/token", - ); - expect(options.headers).toEqual( - expect.objectContaining({ - authorization: - "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6MTIzNDU2Nzg5MGFiY2RlZjEyMzQ1Njc4OTBhYmNkZWYxMjM0NTY3OA==", - }), - ); - expect(JSON.parse(options.body as string)).toEqual({ - access_token: "token123", - }); - - return true; - }; - - const mock = fetchMock - .sandbox() - .postOnce(matchCheckTokenRequest, { ok: true }); - - const octokit = new Octokit({ - authStrategy: createOAuthUserAuth, - auth: { - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - code: "code123", - }, - request: { - fetch: mock, - }, - }); - - // Exchanges the code for the user access token authentication on first request - // and caches the authentication for successive requests - const { data } = await octokit.request( - "POST /applications/{client_id}/token", - { - client_id: "1234567890abcdef1234", - access_token: "token123", - }, - ); - - expect(data).toEqual({ ok: true }); -}); - -test("Sets no auth for OAuth Web flow requests", async () => { - const matchCreateTokenRequest: fetchMock.MockMatcherFunction = ( - url, - options, - ) => { - expect(url).toEqual("https://github.com/login/oauth/access_token"); - // @ts-ignore - expect(options.headers.authorization).toBeUndefined(); - - return true; - }; - - const mock = fetchMock - .sandbox() - .postOnce(matchCreateTokenRequest, { ok: true }); - - const octokit = new Octokit({ - authStrategy: createOAuthUserAuth, - auth: { - clientId: "1234567890abcdef1234", - clientSecret: "1234567890abcdef1234567890abcdef12345678", - code: "code123", - }, - request: { - fetch: mock, - }, - }); - - // Exchanges the code for the user access token authentication on first request - // and caches the authentication for successive requests - const { data } = await octokit.request( - "POST https://github.com/login/oauth/access_token", - { - client_id: "1234567890abcdef1234", - client_secret: "client_secret", - code: "code123", - }, - ); - - expect(data).toEqual({ ok: true }); -}); diff --git a/test/smoke.test.ts b/test/smoke.test.ts deleted file mode 100644 index bc53fb08b..000000000 --- a/test/smoke.test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { createOAuthUserAuth, requiresBasicAuth } from "../src/index.js"; - -describe("Smoke test", () => { - it("createOAuthUserAuth is a function", () => { - expect(createOAuthUserAuth).toBeInstanceOf(Function); - }); - - it("createOAuthUserAuth.VERSION is set", () => { - expect(createOAuthUserAuth.VERSION).toEqual("0.0.0-development"); - }); - - it("requiresBasicAuth is a function", () => { - expect(requiresBasicAuth).toBeInstanceOf(Function); - }); -}); diff --git a/test/standalone.test.ts b/test/standalone.test.ts deleted file mode 100644 index a8cc1f6eb..000000000 --- a/test/standalone.test.ts +++ /dev/null @@ -1,1202 +0,0 @@ -import { describe, expect, it, test, vi } from "vitest"; -import fetchMock from "fetch-mock"; -import MockDate from "mockdate"; -import { request } from "@octokit/request"; - -import { createOAuthUserAuth } from "../src/index.js"; - -describe("Exchange code from OAuth web flow", () => { - test("README example", async () => { - const mock = fetchMock.sandbox().postOnce( - "https://github.com/login/oauth/access_token", - { - access_token: "token123", - scope: "", - token_type: "bearer", - }, - { - headers: { - accept: "application/json", - "user-agent": "test", - "content-type": "application/json; charset=utf-8", - }, - body: { - client_id: "1234567890abcdef1234", - client_secret: "secret", - code: "code123", - redirect_uri: "https://acme-inc.com/login", - }, - }, - ); - - const auth = createOAuthUserAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "secret", - code: "code123", - redirectUrl: "https://acme-inc.com/login", - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication = await auth(); - - expect(authentication).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }); - }); - - test("GitHub App credentials", async () => { - const mock = fetchMock.sandbox().postOnce( - "https://github.com/login/oauth/access_token", - { - access_token: "token123", - scope: "", - token_type: "bearer", - }, - { - headers: { - accept: "application/json", - "user-agent": "test", - "content-type": "application/json; charset=utf-8", - }, - body: { - client_id: "lv1.1234567890abcdef", - client_secret: "secret", - code: "code123", - redirect_uri: "https://acme-inc.com/login", - }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - code: "code123", - redirectUrl: "https://acme-inc.com/login", - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication = await auth(); - - expect(authentication).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token123", - }); - }); - - test("GitHub App credentials with expiring tokens enabled", async () => { - const mock = fetchMock.sandbox().postOnce( - "https://github.com/login/oauth/access_token", - { - body: { - access_token: "token123", - scope: "", - token_type: "bearer", - expires_in: 28800, - refresh_token: "r1.token123", - refresh_token_expires_in: 15897600, - }, - headers: { - date: "Thu, 1 Jan 1970 00:00:00 GMT", - }, - }, - { - headers: { - accept: "application/json", - "user-agent": "test", - "content-type": "application/json; charset=utf-8", - }, - body: { - client_id: "lv1.1234567890abcdef", - client_secret: "secret", - code: "code123", - redirect_uri: "https://acme-inc.com/login", - }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - code: "code123", - redirectUrl: "https://acme-inc.com/login", - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - MockDate.set(0); - const authentication = await auth(); - - expect(authentication).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token123", - expiresAt: "1970-01-01T08:00:00.000Z", - refreshToken: "r1.token123", - refreshTokenExpiresAt: "1970-07-04T00:00:00.000Z", - }); - }); -}); - -describe("OAuth device flow", () => { - test("README example", async () => { - const mock = fetchMock - .sandbox() - - .postOnce( - "https://github.com/login/device/code", - { - device_code: "devicecode123", - user_code: "usercode123", - verification_uri: "https://github.com/login/device", - expires_in: 900, - // use low number because vi.useFakeTimers() & vi.runAllTimers() didn't work for me - interval: 0.005, - }, - { - headers: { - accept: "application/json", - "user-agent": "test", - "content-type": "application/json; charset=utf-8", - }, - body: { - client_id: "1234567890abcdef1234", - scope: "", - }, - }, - ) - .postOnce( - "https://github.com/login/oauth/access_token", - { - access_token: "token123", - scope: "", - }, - { - headers: { - accept: "application/json", - "user-agent": "test", - "content-type": "application/json; charset=utf-8", - }, - body: { - client_id: "1234567890abcdef1234", - device_code: "devicecode123", - grant_type: "urn:ietf:params:oauth:grant-type:device_code", - }, - overwriteRoutes: false, - }, - ); - - const onVerification = vi.fn(); - const auth = createOAuthUserAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "secret", - onVerification, - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication = await auth(); - - expect(authentication).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }); - - expect(onVerification).toHaveBeenCalledWith({ - device_code: "devicecode123", - expires_in: 900, - interval: 0.005, - user_code: "usercode123", - verification_uri: "https://github.com/login/device", - }); - }); -}); - -describe("Use existing authentication", () => { - test("README example", async () => { - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }); - - // will return the passed authentication - const authentication = await auth(); - - expect(authentication).toEqual({ - clientId: "1234567890abcdef1234", - clientSecret: "secret", - clientType: "oauth-app", - scopes: [], - token: "token123", - tokenType: "oauth", - type: "token", - }); - }); -}); - -test("Invalid strategy options", async () => { - // @ts-expect-error - const auth = createOAuthUserAuth({}); - - await expect(async () => await auth()).rejects.toThrow( - "[@octokit/auth-oauth-user] Invalid strategy options", - ); -}); - -test("Caches authentication for successive calls", async () => { - const mock = fetchMock.sandbox().postOnce( - "https://github.com/login/oauth/access_token", - { - access_token: "token123", - scope: "", - token_type: "bearer", - }, - { - headers: { - accept: "application/json", - "user-agent": "test", - "content-type": "application/json; charset=utf-8", - }, - body: { - client_id: "1234567890abcdef1234", - client_secret: "secret", - code: "code123", - }, - }, - ); - - const auth = createOAuthUserAuth({ - clientId: "1234567890abcdef1234", - clientSecret: "secret", - code: "code123", - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication = await auth(); - - expect(authentication).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }); - - const authentication2 = await auth(); - - expect(authentication).toEqual(authentication2); -}); - -describe("refreshing tokens", () => { - test("auto-refreshing for expiring tokens", async () => { - const mock = fetchMock.sandbox().postOnce( - (url, options) => { - expect(url).toEqual("https://github.com/login/oauth/access_token"); - expect(options.headers).toEqual( - expect.objectContaining({ - accept: "application/json", - "content-type": "application/json; charset=utf-8", - }), - ); - expect(JSON.parse(options.body as string)).toEqual({ - client_id: "lv1.1234567890abcdef", - client_secret: "secret", - refresh_token: "r1.token123", - grant_type: "refresh_token", - }); - - return true; - }, - { - body: { - access_token: "token456", - scope: "", - token_type: "bearer", - expires_in: 28800, - refresh_token: "r1.token456", - refresh_token_expires_in: 15897600, - }, - headers: { - date: "Thu, 1 Jan 1970 10:00:00 GMT", - }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token123", - expiresAt: "1970-01-01T08:00:00.000Z", - refreshToken: "r1.token123", - refreshTokenExpiresAt: "1970-07-04T00:00:00.000Z", - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - MockDate.set(0); - const authentication1 = await auth(); - - expect(authentication1).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token123", - expiresAt: "1970-01-01T08:00:00.000Z", - refreshToken: "r1.token123", - refreshTokenExpiresAt: "1970-07-04T00:00:00.000Z", - }); - - // not yet expired - MockDate.set("1970-01-01T05:00:00.000Z"); - const authentication2 = await auth(); - expect(authentication2).toEqual(authentication1); - - // expired - MockDate.set("1970-01-01T10:00:00.000Z"); - const authentication3 = await auth(); - - expect(authentication3).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token456", - expiresAt: "1970-01-01T18:00:00.000Z", - refreshToken: "r1.token456", - refreshTokenExpiresAt: "1970-07-04T10:00:00.000Z", - }); - - MockDate.reset(); - }); - - test('auth({ type: "refresh" })', async () => { - const mock = fetchMock.sandbox().postOnce( - (url, options) => { - expect(url).toEqual("https://github.com/login/oauth/access_token"); - expect(options.headers).toEqual( - expect.objectContaining({ - accept: "application/json", - "content-type": "application/json; charset=utf-8", - }), - ); - expect(JSON.parse(options.body as string)).toEqual({ - client_id: "lv1.1234567890abcdef", - client_secret: "secret", - refresh_token: "r1.token123", - grant_type: "refresh_token", - }); - - return true; - }, - { - body: { - access_token: "token456", - scope: "", - token_type: "bearer", - expires_in: 28800, - refresh_token: "r1.token456", - refresh_token_expires_in: 15897600, - }, - headers: { - date: "Thu, 1 Jan 1970 00:00:00 GMT", - }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token123", - expiresAt: "1970-01-01T08:00:00.000Z", - refreshToken: "r1.token123", - refreshTokenExpiresAt: "1970-07-04T00:00:00.000Z", - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - MockDate.set(0); - const authentication = await auth({ type: "refresh" }); - - expect(authentication).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token456", - expiresAt: "1970-01-01T08:00:00.000Z", - refreshToken: "r1.token456", - refreshTokenExpiresAt: "1970-07-04T00:00:00.000Z", - }); - - MockDate.reset(); - }); - - test('auth({ type: "refresh" }) with "onTokenCreated()" option', async () => { - const mock = fetchMock.sandbox().postOnce( - (url, options) => { - expect(url).toEqual("https://github.com/login/oauth/access_token"); - expect(options.headers).toEqual( - expect.objectContaining({ - accept: "application/json", - "content-type": "application/json; charset=utf-8", - }), - ); - expect(JSON.parse(options.body as string)).toEqual({ - client_id: "lv1.1234567890abcdef", - client_secret: "secret", - refresh_token: "r1.token123", - grant_type: "refresh_token", - }); - - return true; - }, - { - body: { - access_token: "token456", - scope: "", - token_type: "bearer", - expires_in: 28800, - refresh_token: "r1.token456", - refresh_token_expires_in: 15897600, - }, - headers: { - date: "Thu, 1 Jan 1970 00:00:00 GMT", - }, - }, - ); - - const expectedAuthenticationObject = { - type: "token", - tokenType: "oauth", - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token456", - expiresAt: "1970-01-01T08:00:00.000Z", - refreshToken: "r1.token456", - refreshTokenExpiresAt: "1970-07-04T00:00:00.000Z", - }; - - const auth = createOAuthUserAuth({ - clientType: "github-app", - clientId: "lv1.1234567890abcdef", - clientSecret: "secret", - token: "token123", - expiresAt: "1970-01-01T08:00:00.000Z", - refreshToken: "r1.token123", - refreshTokenExpiresAt: "1970-07-04T00:00:00.000Z", - onTokenCreated: (authentication, options) => { - expect(authentication).toStrictEqual(expectedAuthenticationObject); - expect(options).toStrictEqual({ type: "refresh" }); - }, - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - MockDate.set(0); - const authentication = await auth({ type: "refresh" }); - - expect(authentication).toEqual(expectedAuthenticationObject); - - expect.assertions(6); - - MockDate.reset(); - }); - - test('auth({ type: "refresh" }) with OAuth App token', async () => { - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }); - - // @ts-expect-error "refresh" is not permitted for OAuth Apps - await expect(async () => await auth({ type: "refresh" })).rejects.toThrow( - "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens", - ); - }); - - test('auth({ type: "refresh" }) without refresh token', async () => { - const auth = createOAuthUserAuth({ - clientType: "github-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - }); - - await expect(async () => await auth({ type: "refresh" })).rejects.toThrow( - "[@octokit/auth-oauth-user] Refresh token missing", - ); - }); -}); - -describe("auth({ type: 'get' })", () => { - it("is valid", async () => { - const mock = fetchMock.sandbox().postOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - { - scopes: [], - }, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication1 = await auth({ - type: "get", - }); - const authentication2 = await auth({ - type: "get", - }); - - expect(authentication1).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }); - expect(authentication1).toEqual(authentication2); - }); -}); - -describe("auth({ type: 'check' })", () => { - it("is valid", async () => { - const mock = fetchMock.sandbox().postOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - { - scopes: [], - }, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication = await auth({ - type: "check", - }); - - expect(authentication).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }); - }); - - it("calls 'onTokenCreated' if defined as auth option", async () => { - const mock = fetchMock.sandbox().postOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - { - scopes: [], - }, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const expectedAuthenticationObject = { - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - }; - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - onTokenCreated: (authentication, options) => { - expect(authentication).toStrictEqual(expectedAuthenticationObject); - expect(options).toStrictEqual({ type: "check" }); - }, - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication = await auth({ - type: "check", - }); - - expect(authentication).toEqual(expectedAuthenticationObject); - - // Assures onTokenCreated() has not been invoked - expect.assertions(1); - }); - - it("is not valid", async () => { - const mock = fetchMock - .sandbox() - .postOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - 404, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - await expect( - async () => - await auth({ - type: "check", - }), - ).rejects.toThrow("[@octokit/auth-oauth-user] Token is invalid"); - - // rejects without sending another request - await expect(async () => await auth()).rejects.toThrow( - "[@octokit/auth-oauth-user] Token is invalid", - ); - }); -}); - -describe("auth({ type: 'reset' })", () => { - it("uses new authentication after reset", async () => { - const mock = fetchMock - .sandbox() - .patchOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - { - token: "token456", - scopes: [], - }, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ) - .postOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - {}, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token456" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication1 = await auth({ - type: "reset", - }); - - expect(authentication1).toEqual({ - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token456", - scopes: [], - }); - - await auth({ - type: "check", - }); - }); - - it("calls 'onTokenCreated' if defined as auth option", async () => { - const mock = fetchMock - .sandbox() - .patchOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - { - token: "token456", - scopes: [], - }, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ) - .postOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - {}, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token456" }, - }, - ); - - const expectedAuthenticationObject = { - type: "token", - tokenType: "oauth", - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token456", - scopes: [], - }; - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - onTokenCreated: (authentication, options) => { - expect(authentication).toStrictEqual(expectedAuthenticationObject); - expect(options).toStrictEqual({ type: "reset" }); - }, - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - const authentication1 = await auth({ - type: "reset", - }); - - expect(authentication1).toEqual(expectedAuthenticationObject); - - expect.assertions(3); - }); - - it("reset fails due to invalid token", async () => { - const mock = fetchMock - .sandbox() - .patchOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - 404, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - await expect( - async () => - await auth({ - type: "reset", - }), - ).rejects.toThrow("[@octokit/auth-oauth-user] Token is invalid"); - }); -}); - -describe("auth({ type: 'delete' })", () => { - it("invalidates authentication for successive calls", async () => { - const mock = fetchMock - .sandbox() - .deleteOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - 204, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - await auth({ - type: "delete", - }); - - await expect( - async () => - await await auth({ - type: "check", - }), - ).rejects.toThrow("[@octokit/auth-oauth-user] Token is invalid"); - }); - - it("does not throw in case the token is already invalid", async () => { - const mock = fetchMock - .sandbox() - .deleteOnce( - "https://api.github.com/applications/1234567890abcdef1234/token", - 404, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - expect( - await auth({ - type: "delete", - }), - ).toEqual(expect.objectContaining({ invalid: true })); - }); -}); - -describe("auth({ type: 'deleteAuthorization' })", () => { - it("invalidates authentication for successive calls", async () => { - const mock = fetchMock - .sandbox() - .deleteOnce( - "https://api.github.com/applications/1234567890abcdef1234/grant", - 204, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - await auth({ - type: "deleteAuthorization", - }); - - await expect( - async () => - await await auth({ - type: "check", - }), - ).rejects.toThrow("[@octokit/auth-oauth-user] Token is invalid"); - }); - - it("does not throw in case the token is already invalid", async () => { - const mock = fetchMock - .sandbox() - .deleteOnce( - "https://api.github.com/applications/1234567890abcdef1234/grant", - 404, - { - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": "test", - authorization: "basic MTIzNDU2Nzg5MGFiY2RlZjEyMzQ6c2VjcmV0", - "content-type": "application/json; charset=utf-8", - }, - body: { access_token: "token123" }, - }, - ); - - const auth = createOAuthUserAuth({ - clientType: "oauth-app", - clientId: "1234567890abcdef1234", - clientSecret: "secret", - token: "token123", - scopes: [], - - // pass request mock for testing - request: request.defaults({ - headers: { - "user-agent": "test", - }, - request: { - fetch: mock, - }, - }), - }); - - expect( - await auth({ - type: "deleteAuthorization", - }), - ).toEqual(expect.objectContaining({ invalid: true })); - }); -}); diff --git a/test/tsconfig.test.json b/test/tsconfig.test.json deleted file mode 100644 index fe99a4e8e..000000000 --- a/test/tsconfig.test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "emitDeclarationOnly": false, - "noEmit": true - }, - "include": ["src/**/*"] -} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 8b0764699..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "@octokit/tsconfig", - "compilerOptions": { - "esModuleInterop": true, - "declaration": true, - "outDir": "pkg/dist-types", - "emitDeclarationOnly": true, - "sourceMap": true - }, - "include": [ - "src/**/*" - ] -} diff --git a/vite.config.js b/vite.config.js deleted file mode 100644 index 516c9dfe3..000000000 --- a/vite.config.js +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig } from "vite"; - -export default defineConfig({ - test: { - coverage: { - include: ["src/**/*.ts"], - reporter: ["html"], - thresholds: { - 100: true, - }, - }, - }, -});