diff --git a/.dockerignore b/.dockerignore index 9eb7cfdae1f5..a527010a1465 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,38 +1,67 @@ # Packages -node_modules/ +**/node_modules # Log files -logs/ -*.log -npm-debug.log* +**/logs +**/*.log +**/npm-debug.log* # Runtime data -pids -*.pid -*.seed +**/pids +**/*.pid +**/*.seed # Env -.env +**/.env # Dist -dist/ +**/dist/ +**/dist-docs/ # Miscellaneous -.tmp/ -.vscode/* -!.vscode/extensions.json -!.vscode/settings.json -.idea/ -.DS_Store -.turbo -tsconfig.tsbuildinfo +**/.tmp +**/.vscode +**/.idea +**/.DS_Store +**/.turbo +**/tsconfig.tsbuildinfo +**/coverage +**/__tests__ +**/out # yarn .pnp.* .yarn/* -!.yarn/cache !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions + +# Cache +**/.prettiercache +**/.eslintcache +**/.vercel + +# Docker specific +**/.cliff-jumperrc.json +**/api-extractor.json +**/api-extractor-docs.json +**/.eslintignore +**/.eslintrc.json +**/.lintstagedrc.js +**/.lintstagedrc.cjs +**/.lintstagedrc.json +**/.prettierignore +**/.prettierrc.js +**/.prettierrc.cjs +**/.prettierrc.json +**/cliff.toml +**/CHANGELOG.md +**/README.md +**/LICENSE +**/tsconfig.eslint.json +**/tsconfig.docs.json +**/docs/ +**/vitest.config.ts + diff --git a/.eslintrc.json b/.eslintrc.json index fe9f20cddfe4..e29c4c5bdcf3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,13 +2,10 @@ "root": true, "extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"], "parserOptions": { - "project": "./tsconfig.eslint.json" + "project": ["./tsconfig.eslint.json", "./apps/*/tsconfig.eslint.json", "./packages/*/tsconfig.eslint.json"] }, "rules": { "@typescript-eslint/consistent-type-definitions": ["error", "interface"] }, - "ignorePatterns": ["**/dist/*"], - "env": { - "jest": true - } + "ignorePatterns": ["**/dist/*"] } diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000000..8b89a5e7f159 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,28 @@ +# Learn how to add code owners here: +# https://help.github.com/en/articles/about-code-owners + +* @iCrawl + +/apps/guide/ @discordjs/website @discordjs/guide +/apps/guide/src/content/ @discordjs/guide +/apps/website/ @discordjs/website + +/packages/actions/ @discordjs/actions +/packages/api-extractor-utils/ @discordjs/api-extractor-utils +/packages/brokers/ @discordjs/brokers +/packages/builders/ @discordjs/builders +/packages/collection/ @discordjs/collection +/packages/core/ @discordjs/core +/packages/create-discord-bot/ @discordjs/guide +/packages/discord.js/ @discordjs/core +/packages/docgen/ @iCrawl +/packages/formatters/ @discordjs/formatters +/packages/next/ @discordjs/core +/packages/proxy/ @discordjs/proxy +/packages/proxy-container/ @discordjs/proxy +/packages/rest/ @discordjs/rest +/packages/scripts/ @discordjs/scripts +/packages/ui/ @discordjs/ui +/packages/util/ @discordjs/util +/packages/voice/ @discordjs/core +/packages/ws/ @discordjs/ws diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index fd96ed5026eb..d5f208a81e60 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -17,13 +17,32 @@ To get ready to work on the codebase, please do the following: 5. Run `yarn test` to run ESLint and ensure any JSDoc changes are valid 6. [Submit a pull request](https://github.com/discordjs/discord.js/compare) (Make sure you follow the [conventional commit format](https://github.com/discordjs/discord.js/blob/main/.github/COMMIT_CONVENTION.md)) +## Testing changes locally + +If you want to test changes you've made locally, you can do so by using `yarn link`. This will create a symlink to your local copy of the discord.js libraries. + +1. Create a new directory `mkdir discordjs-test` and move into it `cd discordjs-test` +2. Initialize a new yarn 3 project `yarn init -2` +3. Disable pnp `yarn config set nodeLinker node-modules` +4. Now link the local discord.js project you cloned earlier `yarn link -A {PATH_TO_DISCORDJS_REPO}` +5. Install packages you'd like to test locally `yarn add discord.js@latest`, `yarn add @discordjs/rest@latest`, etc. **Note: Make sure you use `latest` tag or else yarn will try to install the remote package from npm** +6. Import the package in your source code and test them out! + +### Working with TypeScript packages + +When testing local changes, you may notice you need to manually recompile TypeScript projects on every change in order to get the latest code changes to test locally. + +To avoid this you can use the `--watch` parameter in the package build script to automatically recompile the project when changes are detected. + +For example, to automatically recompile the `@discordjs/rest` project when changes are detected, run `yarn turbo run build --filter=@discordjs/rest -- --watch` in the root folder of where you cloned the discord.js repo. + ## Adding new packages If you'd like to create another package under the `@discordjs` organization run the following command: -```bash +```sh yarn create-package [package-description] ``` This will create new package directory under `packages/` with the required configuration files. You can -begin to make changes within the `src/` directory. +begin to make changes within the `src/` directory. It may also be required to update the CODEOWNERS file. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/01-package_bug_report.yml similarity index 53% rename from .github/ISSUE_TEMPLATE/bug_report.yml rename to .github/ISSUE_TEMPLATE/01-package_bug_report.yml index e356e097dd96..69096b255cef 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/01-package_bug_report.yml @@ -1,11 +1,13 @@ name: Bug report -description: Report incorrect or unexpected behavior of a package +description: Report an issue with discord.js or another package. labels: [bug, need repro] body: - type: markdown attributes: value: | - Use Discord for questions: https://discord.gg/djs + Thank you for filing an issue! If you are here to ask a question, use Discord instead: https://discord.gg/djs + + This issue form is for discord.js, including other packages. - type: dropdown id: package attributes: @@ -15,9 +17,15 @@ body: - brokers - builders - collection - - rest + - core + - create-discord-bot + - formatters + - next - proxy - proxy-container + - rest + - ui + - util - voice - ws validations: @@ -26,57 +34,44 @@ body: id: description attributes: label: Issue description - description: | - Describe the issue in as much detail as possible. - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files into it. + description: Describe the issue in as much detail as possible. placeholder: | Steps to reproduce with below code sample: - 1. do thing - 2. do thing in Discord client - 3. observe behavior - 4. see error logs below + 1. Do thing + 2. Do thing in Discord client + 3. Observe behavior + 4. See error logs below validations: required: true - type: textarea - id: codesample + id: code_sample attributes: label: Code sample - description: Include a reproducible, minimal code sample. This will be automatically formatted into code, so no need for backticks. + description: | + Your code sample should be: + 1. Minimal - Use as little code as possible that still produces the same problem (and is understandable) + 2. Complete - Provide all parts someone else needs to reproduce your problem + 3. Reproducible - Test the code you're about to provide to make sure it reproduces the problem + + This will be automatically formatted into code, so no need for backticks. render: typescript - placeholder: | - Your code sample should be... - ... Minimal - Use as little code as possible that still produces the same problem (and is understandable) - ... Complete - Provide all parts someone else needs to reproduce your problem - ... Reproducible - Test the code you're about to provide to make sure it reproduces the problem - - type: input - id: djs-version - attributes: - label: Package version - description: Which version of the package are you using? Run `npm list ` in your project directory and paste the output. - placeholder: We no longer support version 12 or earlier of discord.js - validations: - required: true - - type: input - id: node-version + - type: textarea + id: versions attributes: - label: Node.js version - description: | - Which version of Node.js are you using? Run `node --version` in your project directory and paste the output. - If you are using TypeScript, please include its version (`npm list typescript`) as well. - placeholder: Node.js version 16.9+ is required for version 14.0.0+ + label: Versions + description: List necessary versions here. This includes your package version, runtime version, operating system etc. + placeholder: | + - discord.js 14.9.0 (`npm ls discord.js` or another package) + - Node.js 16.9.0 (`node --version`) + - TypeScript 5.0.4 (`npm ls typescript` if you use it) + - macOS Ventura 13.3.1 validations: required: true - - type: input - id: os - attributes: - label: Operating system - description: Which OS does your application run on? - type: dropdown id: priority attributes: - label: Priority this issue should have - description: Please be realistic. If you need to elaborate on your reasoning, please use the Issue description field above. + label: Issue priority + description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above. options: - Low (slightly annoying) - Medium (should be fixed soon) @@ -87,12 +82,9 @@ body: id: partials attributes: label: Which partials do you have configured? - description: | - Check your Client constructor for the `partials` key. - - Tip: you can select multiple items + description: Check your `Client` constructor for the `partials` key. options: - - Not applicable (subpackage bug) + - Not applicable - No Partials - User - Channel @@ -108,16 +100,13 @@ body: id: intents attributes: label: Which gateway intents are you subscribing to? - description: | - Check your Client constructor options for the `intents` key. - - Tip: you can select multiple items + description: Check your `Client` constructor for the `intents` key. options: - - Not applicable (subpackage bug) + - Not applicable - No Intents - Guilds - GuildMembers - - GuildBans + - GuildModeration - GuildEmojisAndStickers - GuildIntegrations - GuildWebhooks @@ -132,11 +121,13 @@ body: - DirectMessageTyping - MessageContent - GuildScheduledEvents + - AutoModerationConfiguration + - AutoModerationExecution multiple: true validations: required: true - type: input - id: dev-release + id: dev_release attributes: label: I have tested this issue on a development release placeholder: d23280c (commit hash) diff --git a/.github/ISSUE_TEMPLATE/02-application_bug_report.yml b/.github/ISSUE_TEMPLATE/02-application_bug_report.yml new file mode 100644 index 000000000000..9fefce98d95f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-application_bug_report.yml @@ -0,0 +1,58 @@ +name: Websites bug report +description: Report an issue with the documentation or guide websites. +labels: [bug, need repro] +body: + - type: markdown + attributes: + value: | + Thank you for filing an issue! If you are here to ask a question, use Discord instead: https://discord.gg/djs + + This issue form is for our documentation and guide websites. + - type: dropdown + id: application + attributes: + label: Which application is this bug report for? + options: + - Documentation + - Guide + validations: + required: true + - type: textarea + id: description + attributes: + label: Issue description + description: Describe the issue in as much detail as possible. + validations: + required: true + - type: textarea + id: steps_to_reproduce + attributes: + label: Steps to Reproduce + description: What steps must be taken to reproduce this issue? + placeholder: | + 1. Visit a page + 2. Click a link + 3. ... + validations: + required: true + - type: textarea + id: versions + attributes: + label: Versions + description: List necessary versions here. This includes your browser, operating system etc. + placeholder: | + - Safari 16.4 (18615.1.26.11.23) + - macOS Ventura 13.3.1 + validations: + required: true + - type: dropdown + id: priority + attributes: + label: Issue priority + description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above. + options: + - Low (slightly annoying) + - Medium (should be fixed soon) + - High (immediate attention needed) + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/03-feature_request.yml similarity index 84% rename from .github/ISSUE_TEMPLATE/feature_request.yml rename to .github/ISSUE_TEMPLATE/03-feature_request.yml index c49dd9d2ae24..5c2d330be248 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/03-feature_request.yml @@ -9,16 +9,25 @@ body: We do not implement unreleased features. Use Discord for questions: https://discord.gg/djs - type: dropdown - id: package + id: application_or_package attributes: - label: Which package is the feature request for? + label: Which application or package is this feature request for? options: - discord.js + - Documentation + - Guide + - brokers - builders - collection - - rest + - core + - create-discord-bot + - formatters + - next - proxy - proxy-container + - rest + - ui + - util - voice - ws validations: @@ -44,7 +53,7 @@ body: label: Alternative solutions or implementations description: A clear and concise description of any alternative solutions or features you have considered. - type: textarea - id: additional-context + id: additional_context attributes: label: Other context description: Any other context, screenshots, or file uploads that help us understand your feature request. diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index e53c75f6b527..000000000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,8 +0,0 @@ -addReviewers: true -reviewers: - - iCrawl - - SpaceEEC - - kyranet - - vladfrangu -numberOfReviewers: 0 -runOnDraft: true diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml new file mode 100644 index 000000000000..ff7e027a8b09 --- /dev/null +++ b/.github/issue-labeler.yml @@ -0,0 +1,51 @@ +apps:guide: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nGuide\\n" +apps:website: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nDocumentation\\n" +packages:brokers: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nbrokers\\n" +packages:builders: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nbuilders\\n" +packages:collection: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\ncollection\\n" +packages:core: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\ncore\\n" +packages:create-discord-bot: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\ncreate-discord-bot\\n" +packages:discord.js: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\ndiscord.js\\n" +packages:formatters: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nformatters\\n" +packages:next: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nnext\\n" +packages:proxy: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nproxy\\n" +packages:proxy-container: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nproxy-container\\n" +packages:rest: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nrest\\n" +packages:ui: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\ui\\n" +packages:util: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\util\\n" +packages:voice: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nvoice\\n" +packages:ws: + - "### Which (application|package|application or package) is this (bug + report|feature request) for\\?\\n\\nws\\n" diff --git a/.github/labeler.yml b/.github/labeler.yml index 9424ed10655a..91c0c1e1fecf 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,7 +4,6 @@ apps:guide: apps:website: - apps/website/* - apps/website/**/* - packages:brokers: - packages/brokers/* - packages/brokers/**/* @@ -14,12 +13,24 @@ packages:builders: packages:collection: - packages/collection/* - packages/collection/**/* +packages:core: + - packages/core/* + - packages/core/**/* +packages:create-discord-bot: + - packages/create-discord-bot/* + - packages/create-discord-bot/**/* packages:discord.js: - packages/discord.js/* - packages/discord.js/**/* packages:docgen: - packages/docgen/* - packages/docgen/**/* +packages:formatters: + - packages/formatters/* + - packages/formatters/**/* +packages:next: + - packages/next/* + - packages/next/**/* packages:proxy: - packages/proxy/* - packages/proxy/**/* @@ -29,9 +40,9 @@ packages:proxy-container: packages:rest: - packages/rest/* - packages/rest/**/* -packages/ui: - - packages:ui/* - - packages:ui/**/* +packages:ui: + - packages/ui/* + - packages/ui/**/* packages:util: - packages/util/* - packages/util/**/* diff --git a/.github/labels.yml b/.github/labels.yml index 8bc0a7d3b3f9..c053d9e3983d 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,13 +1,15 @@ - name: api changes - color: '5663e9' + color: 5663e9 - name: api support - color: '5663e9' + color: 5663e9 - name: apps:guide color: fbca04 - name: apps:website color: fbca04 - name: backlog color: 7ef7ef +- name: backport + color: 88aabb - name: blocked color: fc1423 - name: bug @@ -20,10 +22,10 @@ color: 0075ca - name: dependencies color: 276bd1 +- name: discord + color: 5663e9 - name: discussion color: b6b1f9 -- name: discord - color: '5663e9' - name: documentation color: 0075ca - name: duplicate @@ -39,13 +41,13 @@ - name: has PR color: 4b1f8e - name: help wanted - color: '008672' -- name: interactions - color: 80c042 + color: 008672 - name: in progress color: ffccd7 - name: in review color: aed5fc +- name: interactions + color: 80c042 - name: invalid color: e4e669 - name: need repro @@ -56,10 +58,18 @@ color: fbca04 - name: packages:collection color: fbca04 +- name: packages:core + color: fbca04 +- name: packages:create-discord-bot + color: fbca04 - name: packages:discord.js color: fbca04 - name: packages:docgen color: fbca04 +- name: packages:formatters + color: fbca04 +- name: packages:next + color: fbca04 - name: packages:proxy color: fbca04 - name: packages:proxy-container diff --git a/.github/powered-by-workers.png b/.github/powered-by-workers.png new file mode 100644 index 000000000000..e9cbbbed6cb1 Binary files /dev/null and b/.github/powered-by-workers.png differ diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 29eadb2e05bd..c1cd2113b319 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -3,6 +3,8 @@ on: push: branches: - 'main' + paths: + - 'packages/*/src/**' tags: - '**' workflow_dispatch: @@ -22,7 +24,7 @@ concurrency: cancel-in-progress: true jobs: build: - name: Build documentation + name: Build & upload documentation runs-on: ubuntu-latest env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} @@ -34,10 +36,10 @@ jobs: with: ref: ${{ inputs.ref || '' }} - - name: Install node.js v16 + - name: Install node.js v18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install dependencies uses: ./packages/actions/src/yarnCache @@ -48,57 +50,6 @@ jobs: - name: Build docs run: yarn docs - - name: Upload docgen artifacts - uses: actions/upload-artifact@v3 - with: - name: docgen - path: packages/*/docs/docs.json - - - name: Upload api-extractor artifacts - uses: actions/upload-artifact@v3 - with: - name: api-extractor - path: packages/*/docs/docs.api.json - - upload: - name: Upload Documentation - needs: build - strategy: - max-parallel: 1 - fail-fast: false - matrix: - package: ['brokers', 'builders', 'collection', 'discord.js', 'proxy', 'rest', 'util', 'voice', 'ws'] - runs-on: ubuntu-latest - env: - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ secrets.TURBO_TEAM }} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install node.js v16 - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Install dependencies - uses: ./packages/actions/src/yarnCache - - - name: Build actions - run: yarn workspace @discordjs/actions build - - - name: Download docgen artifacts - uses: actions/download-artifact@v3 - with: - name: docgen - path: docs - - - name: Download api-extractor artifacts - uses: actions/download-artifact@v3 - with: - name: api-extractor - path: docs - - name: Checkout docs repository uses: actions/checkout@v3 with: @@ -111,34 +62,49 @@ jobs: id: extract-tag uses: ./packages/actions/src/formatTag with: - tag: ${{ env.GITHUB_REF_NAME }} + tag: ${{ github.ref_name }} + + - name: Upload documentation to database + if: ${{ github.ref_type == 'tag' }} + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + uses: ./packages/actions/src/uploadDocumentation + with: + package: ${{ steps.extract-tag.outputs.package }} + version: ${{ steps.extract-tag.outputs.semver }} - name: Move docs to correct directory - if: ${{ github.ref_type == 'tag' && matrix.package == steps.extract-tag.outputs.package }} + if: ${{ github.ref_type == 'tag' }} env: PACKAGE: ${{ steps.extract-tag.outputs.package }} SEMVER: ${{ steps.extract-tag.outputs.semver }} run: | - mkdir -p out/${PACKAGE} - if [[ $PACKAGE == "discord.js" ]]; then - mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${SEMVER}.json - fi - if [[ $PACKAGE != "discord.js" ]]; then - mv docs/${PACKAGE}/docs/docs.api.json out/${PACKAGE}/${SEMVER}.api.json + mkdir -p "out/${PACKAGE}" + if [[ "${PACKAGE}" == "discord.js" ]]; then + mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${SEMVER}.json" + else + mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${SEMVER}.api.json" fi - - name: Move docs to correct directory + - name: Upload documentation to database if: ${{ github.ref_type == 'branch' }} env: - PACKAGE: ${{ matrix.package }} + DATABASE_URL: ${{ secrets.DATABASE_URL }} + uses: ./packages/actions/src/uploadDocumentation + + - name: Move docs to correct directory + if: ${{ github.ref_type == 'branch' }} run: | - mkdir -p out/${PACKAGE} - if [[ $PACKAGE == "discord.js" ]]; then - mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${GITHUB_REF_NAME}.json - fi - if [[ $PACKAGE != "discord.js" ]]; then - mv docs/${PACKAGE}/docs/docs.api.json out/${PACKAGE}/${GITHUB_REF_NAME}.api.json - fi + declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "next" "formatters" "proxy" "rest" "util" "voice" "ws") + for PACKAGE in "${PACKAGES[@]}"; do + if [[ "${PACKAGE}" == "discord.js" ]]; then + mkdir -p "out/${PACKAGE}" + mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.json" + else + mkdir -p "out/${PACKAGE}" + mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.api.json" + fi + done - name: Commit and push run: | diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml new file mode 100644 index 000000000000..ed73cb52d04c --- /dev/null +++ b/.github/workflows/issue-triage.yml @@ -0,0 +1,14 @@ +name: 'Issue Labeler' +on: + issues: + types: [opened] +jobs: + issue-triage: + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v3.1 + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + configuration-path: .github/issue-labeler.yml + not-before: 2023-01-13T10:25:03.847Z + enable-versioned-regex: 0 diff --git a/.github/workflows/lighthouse-main.yml b/.github/workflows/lighthouse-main.yml new file mode 100644 index 000000000000..4c1e6c0899fa --- /dev/null +++ b/.github/workflows/lighthouse-main.yml @@ -0,0 +1,20 @@ +name: 'Lighthouse Audit (main)' +on: + workflow_dispatch: +jobs: + lighthouse_audit_main: + name: 'Lighthouse Audit (main)' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Audit production URLs with Lighthouse + id: lighthouse_audit + uses: treosh/lighthouse-ci-action@v9 + with: + urls: | + https://discordjs.dev + https://guide.discordjs.dev + uploadArtifacts: true + temporaryPublicStorage: true diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 000000000000..8651f25274d2 --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,88 @@ +name: 'Lighthouse Audit' +on: + issue_comment: + types: [created, edited] +jobs: + lighthouse_audit: + name: 'Lighthouse Audit' + if: ${{ github.event.issue.pull_request }} + runs-on: ubuntu-latest + steps: + - name: Get Vercel preview URL + id: get_preview_url + uses: actions/github-script@v6 + with: + script: | + const comment = context.payload.comment; + const regex = /https:\/\/[a-z0-9-]+\.vercel\.app/g; + const matches = comment.body.match(regex); + let previewUrl = ""; + if (matches && matches.length) { + previewUrl = matches[0]; + console.log('Preview url found:', previewUrl); + } + console.log("No preview url found."); + core.setOutput('vercel_preview_url', previewUrl); + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Add comment to PR + if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }} + id: loading_comment_to_pr + uses: marocchino/sticky-pull-request-comment@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + number: ${{ github.event.issue.number }} + header: lighthouse + message: | + Running Lighthouse audit... + + - name: Checkout repository + if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }} + uses: actions/checkout@v3 + + - name: Audit preview URL with Lighthouse + if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }} + id: lighthouse_audit + uses: treosh/lighthouse-ci-action@v9 + with: + urls: | + ${{ steps.get_preview_url.outputs.vercel_preview_url }} + uploadArtifacts: true + temporaryPublicStorage: true + + - name: Format lighthouse score + if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }} + id: format_lighthouse_score + uses: actions/github-script@v6 + with: + script: | + const result = ${{ steps.lighthouse_audit.outputs.manifest }}[0].summary + const links = ${{ steps.lighthouse_audit.outputs.links }} + const formatResult = (res) => Math.round((res * 100)) + Object.keys(result).forEach(key => result[key] = formatResult(result[key])) + const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴' + const comment = [ + `⚡️ [Lighthouse report](${Object.values(links)[0]}) for the changes in this PR:`, + '| Category | Score |', + '| --- | --- |', + `| ${score(result.performance)} Performance | ${result.performance} |`, + `| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`, + `| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`, + `| ${score(result.seo)} SEO | ${result.seo} |`, + `| ${score(result.pwa)} PWA | ${result.pwa} |`, + ' ', + `*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*` + ].join('\n') + core.setOutput("comment", comment); + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Add comment to PR + if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }} + id: comment_to_pr + uses: marocchino/sticky-pull-request-comment@v2 + with: + number: ${{ github.event.issue.number }} + header: lighthouse + message: | + ${{ steps.format_lighthouse_score.outputs.comment }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 000000000000..c7f038c9419b --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,19 @@ +name: Lock Ancient Issues +on: + schedule: + - cron: '0 16 * * *' + workflow_dispatch: +permissions: + issues: write +concurrency: + group: lock +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-inactive-days: 365 + issue-lock-reason: resolved + process-only: issues diff --git a/.github/workflows/npm-auto-deprecate.yml b/.github/workflows/npm-auto-deprecate.yml index c57e71e670b8..58e97296915e 100644 --- a/.github/workflows/npm-auto-deprecate.yml +++ b/.github/workflows/npm-auto-deprecate.yml @@ -12,15 +12,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Install node.js v16 + - name: Install node.js v18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install dependencies uses: ./packages/actions/src/yarnCache - name: Deprecate versions - run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/brokers @discordjs/builders @discordjs/collection discord.js @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice @discordjs/ws' + run: 'yarn npm-deprecate --name "*dev*" --package @discordjs/brokers @discordjs/builders @discordjs/collection @discordjs/core @discordjs/formatters discord.js @discordjs/next @discordjs/proxy @discordjs/rest @discordjs/util @discordjs/voice @discordjs/ws' env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml index 699df2f7dc96..7b41a5834dcd 100644 --- a/.github/workflows/pr-triage.yml +++ b/.github/workflows/pr-triage.yml @@ -11,7 +11,3 @@ jobs: with: repo-token: '${{ secrets.GITHUB_TOKEN }}' sync-labels: true - - - name: Automatically assign reviewers - if: github.event.action == 'opened' - uses: kentaro-m/auto-assign-action@v1.2.3 diff --git a/.github/workflows/publish-dev-docker.yml b/.github/workflows/publish-dev-docker.yml index 33e062448478..bafe823f7a57 100644 --- a/.github/workflows/publish-dev-docker.yml +++ b/.github/workflows/publish-dev-docker.yml @@ -12,14 +12,22 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Install node.js v18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + uses: ./packages/actions/src/yarnCache + + - name: Build dependencies + run: yarn build + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to DockerHub run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - - name: Build the image - run: docker build -t discordjs/proxy:latest -f packages/proxy-container/Dockerfile . - - - name: Push image to DockerHub - run: docker push discordjs/proxy:latest + - name: Build & push docker image + run: yarn docker build --buildkit @discordjs/proxy-container -t discordjs/proxy:latest --push diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 2630fe615d40..d51a38363d35 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -16,8 +16,14 @@ jobs: folder: 'builders' - package: '@discordjs/collection' folder: 'collection' + - package: '@discordjs/core' + folder: 'core' + - package: '@discordjs/formatters' + folder: 'formatters' - package: 'discord.js' folder: 'discord.js' + - package: '@discordjs/next' + folder: 'next' - package: '@discordjs/proxy' folder: 'proxy' - package: '@discordjs/rest' @@ -37,10 +43,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Install node.js v16 + - name: Install node.js v18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 registry-url: https://registry.npmjs.org/ - name: Install dependencies diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index e636b3118e60..4854fc3d3ccc 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -9,17 +9,22 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Install node.js v18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + uses: ./packages/actions/src/yarnCache + + - name: Build dependencies + run: yarn build + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to DockerHub run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - - name: Build docker image - run: docker build -t discordjs/proxy:latest -f packages/proxy-container/Dockerfile . - - - name: Tag image with major - run: docker tag discordjs/proxy discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json)) - - - name: Push image to DockerHub - run: docker push --all-tags discordjs/proxy + - name: Build & push docker image + run: yarn docker build --buildkit @discordjs/proxy-container -t discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json)) --push diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 000000000000..f25fd3dcead9 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,39 @@ +name: Publish Release +on: + release: + types: [released] +jobs: + npm-publish: + name: npm publish + runs-on: ubuntu-latest + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} + if: github.repository_owner == 'discordjs' + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install node.js v18 + uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + uses: ./packages/actions/src/yarnCache + + - name: Build dependencies + run: yarn build + + - name: Extract package and semver from tag + id: extract-tag + uses: ./packages/actions/src/formatTag + with: + tag: ${{ github.ref_name }} + + - name: Publish package + run: | + yarn workspace ${{ steps.extract-tag.outputs.subpackage == 'true' && '@discordjs/' || '' }}${{ steps.extract-tag.outputs.package }} npm publish + env: + YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 371758b99e0b..773ee0464fd0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,8 @@ on: push: pull_request: concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + # Group based on workflow name and PR if it exists, if no PR, let it run so carryforward flags work + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: tests: @@ -15,26 +16,48 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + fetch-depth: 0 - - name: Install node.js v16 + - name: Install node.js v18 uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install dependencies uses: ./packages/actions/src/yarnCache - - name: Build dependencies - run: yarn build + - name: Build dependencies (PR) + if: ${{ github.event_name != 'push' }} + run: yarn build --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" + + - name: Build dependencies (Push) + if: ${{ github.event_name == 'push' }} + run: yarn build --filter="...[HEAD^1]" + + - name: ESLint (PR) + if: ${{ github.event_name != 'push' }} + run: yarn lint --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" -- --format=compact + + - name: ESLint (Push) + if: ${{ github.event_name == 'push' }} + run: yarn lint --filter="...[HEAD^1]" -- --format=compact + + - name: Tests (PR) + if: ${{ github.event_name != 'push' }} + run: yarn test --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" - - name: ESLint - run: yarn lint -- --format=compact + - name: Tests (Push) + if: ${{ github.event_name == 'push' }} + run: yarn test --filter="...[HEAD^1]" - - name: Tests - run: yarn test + - name: Docs (PR) + if: ${{ github.event_name != 'push' }} + run: yarn docs --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" - - name: Docs - run: yarn docs + - name: Docs (Push) + if: ${{ github.event_name == 'push' }} + run: yarn docs --filter="...[HEAD^1]" - name: Upload Coverage if: github.repository_owner == 'discordjs' diff --git a/.gitignore b/.gitignore index e446a7a3d12e..ba9c3ed8cd73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,18 +15,20 @@ pids .env # Dist -dist/ +dist +dist-docs # Miscellaneous -.tmp/ -.vscode/* +.tmp +.vscode !.vscode/extensions.json !.vscode/settings.json -.idea/ +.idea .DS_Store .turbo tsconfig.tsbuildinfo -coverage/ +coverage +out # yarn .pnp.* @@ -39,4 +41,5 @@ coverage/ # Cache .prettiercache -.eslintcache \ No newline at end of file +.eslintcache +.vercel diff --git a/.husky/pre-commit b/.husky/pre-commit index 3509da9933eb..d399ecc2ae2f 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -yarn build && yarn lint-staged +yarn build:affected && yarn lint-staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 05211c915b71..4134de919281 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,5 +1,5 @@ { "*": "prettier --ignore-unknown --write", - "{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx,astro}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx,.astro --fix", + "{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --ext .mjs,.js,.cjs,.ts,.tsx --fix", "src/**.ts": "vitest related --run --config ../../vitest.config.ts" } diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000000..7c0127a97c98 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +CODEOWNERS diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b1c467403d4f..192cc66f4ead 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -9,7 +9,6 @@ "christian-kohler.npm-intellisense", "christian-kohler.path-intellisense", "antfu.unocss", - "astro-build.astro-vscode", "unifiedjs.vscode-mdx" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 90194ce052cc..3eeabcc7c546 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,6 @@ { "eslint.workingDirectories": [{ "pattern": "./apps/*" }, { "pattern": "./packages/*" }], - "eslint.validate": ["javascript", "javascriptreact", "astro", "typescript", "typescriptreact"], - "prettier.documentSelectors": ["**/*.astro"], + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "editor.codeActionsOnSave": { diff --git a/.yarn/patches/@microsoft-tsdoc-config-npm-0.16.1-81031b1bbf.patch b/.yarn/patches/@microsoft-tsdoc-config-npm-0.16.1-81031b1bbf.patch deleted file mode 100644 index 93fcf3291e71..000000000000 --- a/.yarn/patches/@microsoft-tsdoc-config-npm-0.16.1-81031b1bbf.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/lib/TSDocConfigFile.js b/lib/TSDocConfigFile.js -index caf3515d60fd386c5909db5a0aa8b4180b10d602..6fa4f1984b6ba6b3a7aecd05e54477ebf141af94 100644 ---- a/lib/TSDocConfigFile.js -+++ b/lib/TSDocConfigFile.js -@@ -31,8 +31,7 @@ const ajv_1 = __importDefault(require("ajv")); - const jju = __importStar(require("jju")); - const ajv = new ajv_1.default({ verbose: true }); - function initializeSchemaValidator() { -- const jsonSchemaPath = resolve.sync('@microsoft/tsdoc/schemas/tsdoc.schema.json', { basedir: __dirname }); -- const jsonSchemaContent = fs.readFileSync(jsonSchemaPath).toString(); -+ const jsonSchemaContent = "{\"title\":\"TSDoc Configuration\",\"description\":\"Describes the TSDoc configuration for a TypeScript project\",\"type\":\"object\",\"properties\":{\"$schema\":{\"description\":\"Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.\",\"type\":\"string\"},\"extends\":{\"description\":\"Optionally specifies one or more JSON config files that will be combined with this file. This provides a way for standard settings to be shared across multiple projects. Important: The \\\"extends\\\" paths are resolved using NodeJS module resolution, so a path to a local file MUST be prefixed with \\\"./\\\".\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"noStandardTags\":{\"description\":\"By default, the config file loader will predefine all of the standardized TSDoc tags. To disable this and start with a completely empty configuration, set \\\"noStandardTags\\\"=true.\",\"type\":\"boolean\"},\"tagDefinitions\":{\"description\":\"Additional tags to support when parsing documentation comments with TSDoc.\",\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/tsdocTagDefinition\"}},\"supportedHtmlElements\":{\"description\":\"The HTML element names that are supported in this configuration. Used in conjunction with the \\\"reportUnsupportedHtmlElements\\\" setting.\",\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9-]+$\"}},\"reportUnsupportedHtmlElements\":{\"description\":\"Whether an error should be reported when an unsupported HTML element is encountered in a doc comment. Defaults to \\\"true\\\" if the \\\"supportedHtmlElements\\\" field is present in this file, \\\"false\\\" if not.\",\"type\":\"boolean\"},\"supportForTags\":{\"description\":\"A collection of key/value pairs. The key is a TSDoc tag name (e.g. \\\"@myTag\\\") that must be defined in this configuration. The value is a boolean indicating whether the tag is supported. The TSDoc parser may report warnings when unsupported tags are encountered. If \\\"supportForTags\\\" is specified for at least one tag, then the \\\"reportUnsupportedTags\\\" validation check is enabled by default.\",\"type\":\"object\",\"patternProperties\":{\"@[a-zA-Z][a-zA-Z0-9]*$\":{\"type\":\"boolean\"}},\"additionalItems\":false}},\"required\":[\"$schema\"],\"additionalProperties\":false,\"definitions\":{\"tsdocTagDefinition\":{\"description\":\"Configuration for a custom supported TSDoc tag.\",\"type\":\"object\",\"properties\":{\"tagName\":{\"description\":\"Name of the custom tag. TSDoc tag names start with an at-sign (@) followed by ASCII letters using camelCase capitalization.\",\"type\":\"string\"},\"syntaxKind\":{\"description\":\"Syntax kind of the custom tag. \\\"inline\\\" means that this tag can appear inside other documentation sections (example: {@link}). \\\"block\\\" means that this tag starts a new documentation section (example: @remarks). \\\"modifier\\\" means that this tag's presence indicates an aspect of the associated API item (example: @internal).\",\"type\":\"string\",\"enum\":[\"inline\",\"block\",\"modifier\"]},\"allowMultiple\":{\"description\":\"If true, then this tag may appear multiple times in a doc comment. By default, a tag may only appear once.\",\"type\":\"boolean\"}},\"required\":[\"tagName\",\"syntaxKind\"],\"additionalProperties\":false}}}"; - const jsonSchema = jju.parse(jsonSchemaContent, { mode: 'cjson' }); - return ajv.compile(jsonSchema); - } diff --git a/.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch b/.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch new file mode 100644 index 000000000000..68c67170c8c0 --- /dev/null +++ b/.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch @@ -0,0 +1,14 @@ +diff --git a/lib/TSDocConfigFile.js b/lib/TSDocConfigFile.js +index caf3515d60fd386c5909db5a0aa8b4180b10d602..5f7cfed7611e3fe660b5265ff99c5da0beb7caec 100644 +--- a/lib/TSDocConfigFile.js ++++ b/lib/TSDocConfigFile.js +@@ -31,8 +31,7 @@ const ajv_1 = __importDefault(require("ajv")); + const jju = __importStar(require("jju")); + const ajv = new ajv_1.default({ verbose: true }); + function initializeSchemaValidator() { +- const jsonSchemaPath = resolve.sync('@microsoft/tsdoc/schemas/tsdoc.schema.json', { basedir: __dirname }); +- const jsonSchemaContent = fs.readFileSync(jsonSchemaPath).toString(); ++ const jsonSchemaContent = '{\"title\":\"TSDoc Configuration\",\"description\":\"Describes the TSDoc configuration for a TypeScript project\",\"type\":\"object\",\"properties\":{\"$schema\":{\"description\":\"Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.\",\"type\":\"string\"},\"extends\":{\"description\":\"Optionally specifies one or more JSON config files that will be combined with this file. This provides a way for standard settings to be shared across multiple projects. Important: The \\\"extends\\\" paths are resolved using NodeJS module resolution, so a path to a local file MUST be prefixed with \\\".\/\\\".\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"noStandardTags\":{\"description\":\"By default, the config file loader will predefine all of the standardized TSDoc tags. To disable this and start with a completely empty configuration, set \\\"noStandardTags\\\"=true.\",\"type\":\"boolean\"},\"tagDefinitions\":{\"description\":\"Additional tags to support when parsing documentation comments with TSDoc.\",\"type\":\"array\",\"items\":{\"$ref\":\"#\/definitions\/tsdocTagDefinition\"}},\"supportedHtmlElements\":{\"description\":\"The HTML element names that are supported in this configuration. Used in conjunction with the \\\"reportUnsupportedHtmlElements\\\" setting.\",\"type\":\"array\",\"items\":{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9-]+$\"}},\"reportUnsupportedHtmlElements\":{\"description\":\"Whether an error should be reported when an unsupported HTML element is encountered in a doc comment. Defaults to \\\"true\\\" if the \\\"supportedHtmlElements\\\" field is present in this file, \\\"false\\\" if not.\",\"type\":\"boolean\"},\"supportForTags\":{\"description\":\"A collection of key\/value pairs. The key is a TSDoc tag name (e.g. \\\"@myTag\\\") that must be defined in this configuration. The value is a boolean indicating whether the tag is supported. The TSDoc parser may report warnings when unsupported tags are encountered. If \\\"supportForTags\\\" is specified for at least one tag, then the \\\"reportUnsupportedTags\\\" validation check is enabled by default.\",\"type\":\"object\",\"patternProperties\":{\"@[a-zA-Z][a-zA-Z0-9]*$\":{\"type\":\"boolean\"}},\"additionalItems\":false}},\"required\":[\"$schema\"],\"additionalProperties\":false,\"definitions\":{\"tsdocTagDefinition\":{\"description\":\"Configuration for a custom supported TSDoc tag.\",\"type\":\"object\",\"properties\":{\"tagName\":{\"description\":\"Name of the custom tag. TSDoc tag names start with an at-sign (@) followed by ASCII letters using camelCase capitalization.\",\"type\":\"string\"},\"syntaxKind\":{\"description\":\"Syntax kind of the custom tag. \\\"inline\\\" means that this tag can appear inside other documentation sections (example: {@link}). \\\"block\\\" means that this tag starts a new documentation section (example: @remarks). \\\"modifier\\\" means that this tag\'s presence indicates an aspect of the associated API item (example: @internal).\",\"type\":\"string\",\"enum\":[\"inline\",\"block\",\"modifier\"]},\"allowMultiple\":{\"description\":\"If true, then this tag may appear multiple times in a doc comment. By default, a tag may only appear once.\",\"type\":\"boolean\"}},\"required\":[\"tagName\",\"syntaxKind\"],\"additionalProperties\":false}}}'; + const jsonSchema = jju.parse(jsonSchemaContent, { mode: 'cjson' }); + return ajv.compile(jsonSchema); + } diff --git a/.yarn/patches/tsup-npm-6.7.0-5093540b93.patch b/.yarn/patches/tsup-npm-6.7.0-5093540b93.patch new file mode 100644 index 000000000000..a95e0e9ae32c --- /dev/null +++ b/.yarn/patches/tsup-npm-6.7.0-5093540b93.patch @@ -0,0 +1,22 @@ +diff --git a/dist/index.js b/dist/index.js +index 9c71a74b4dd0280cb9480d43305f6b5ffbe91d8d..f67f125eebb770169ead49196a78e3211b5dd10a 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -1215,7 +1214,7 @@ var nodeProtocolPlugin = () => { + + // src/esbuild/external.ts + +-var NON_NODE_MODULE_RE = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/; ++var NON_NODE_MODULE_RE = /^[A-Z]:[\\\/]|^\.{0,2}[\/]|^\.{1,2}$/; + var externalPlugin = ({ + external, + noExternal, +@@ -1239,7 +1238,7 @@ var externalPlugin = ({ + if (_bundlerequire.match.call(void 0, args.path, external)) { + return { external: true }; + } +- if (NON_NODE_MODULE_RE.test(args.path)) { ++ if (!NON_NODE_MODULE_RE.test(args.path)) { + return { + path: args.path, + external: true diff --git a/.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch b/.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch new file mode 100644 index 000000000000..514e0bee6d25 --- /dev/null +++ b/.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch @@ -0,0 +1,18 @@ +diff --git a/package.json b/package.json +index fc35658a40f9ba3e3513c459ba9f4f6e1b3f59f5..bc35eda66f270c95ba52e721cb6976fd61622c58 100644 +--- a/package.json ++++ b/package.json +@@ -26,11 +26,13 @@ + }, + "exports": { + ".": { ++ "types": "./dist/index.d.ts", + "node": "./dist/index.js", + "default": "./browser/index.js" + }, + "./package.json": "./package.json", + "./util": { ++ "types": "./dist/util.d.ts", + "node": "./dist/util.js", + "default": "./browser/dist/util.js" + } diff --git a/.yarn/plugins/@yarnpkg/plugin-docker-build.cjs b/.yarn/plugins/@yarnpkg/plugin-docker-build.cjs new file mode 100644 index 000000000000..b77d09cbaf1f --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-docker-build.cjs @@ -0,0 +1,260 @@ +/* eslint-disable */ +module.exports = { + name: '@yarnpkg/plugin-docker-build', + factory: function (require) { + var plugin; + (() => { + 'use strict'; + var t = { + d: (e, o) => { + for (var r in o) t.o(o, r) && !t.o(e, r) && Object.defineProperty(e, r, { enumerable: !0, get: o[r] }); + }, + o: (t, e) => Object.prototype.hasOwnProperty.call(t, e), + r: (t) => { + 'undefined' != typeof Symbol && + Symbol.toStringTag && + Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }), + Object.defineProperty(t, '__esModule', { value: !0 }); + }, + }, + e = {}; + t.r(e), t.d(e, { default: () => u }); + const o = require('@yarnpkg/cli'), + r = require('clipanion'), + i = require('@yarnpkg/core'), + a = require('@yarnpkg/plugin-patch'), + n = require('@yarnpkg/fslib'); + const s = require('@yarnpkg/plugin-pack'); + async function c({ workspace: t, destination: e, report: o }) { + await s.packUtils.prepareForPack(t, { report: o }, async () => { + const r = await s.packUtils.genPackList(t), + a = i.Report.progressViaCounter(r.length), + c = o.reportProgress(a); + try { + for (const i of r) { + const r = n.ppath.join(t.cwd, i), + s = n.ppath.join(e, t.relativeCwd, i); + o.reportInfo(null, i), await n.xfs.copyPromise(s, r, { overwrite: !0 }), a.tick(); + } + } finally { + c.stop(); + } + }); + } + function p(t, e) { + const o = (0, n.toFilename)(e); + return n.ppath.isAbsolute(o) ? n.ppath.relative(t, o) : o; + } + const l = /^builtin<([^>]+)>$/; + var d = function (t, e, o, r) { + var i, + a = arguments.length, + n = a < 3 ? e : null === r ? (r = Object.getOwnPropertyDescriptor(e, o)) : r; + if ('object' == typeof Reflect && 'function' == typeof Reflect.decorate) n = Reflect.decorate(t, e, o, r); + else + for (var s = t.length - 1; s >= 0; s--) + (i = t[s]) && (n = (a < 3 ? i(n) : a > 3 ? i(e, o, n) : i(e, o)) || n); + return a > 3 && n && Object.defineProperty(e, o, n), n; + }; + class f extends o.BaseCommand { + constructor() { + super(...arguments), (this.args = []); + } + async execute() { + const t = await i.Configuration.find(this.context.cwd, this.context.plugins), + { project: e } = await i.Project.find(t, this.context.cwd), + o = e.getWorkspaceByIdent(i.structUtils.parseIdent(this.workspaceName)), + r = (function ({ + project: t, + workspaces: e, + production: o = !1, + scopes: r = o ? ['dependencies'] : i.Manifest.hardDependencies, + }) { + const a = new Set([...e]); + for (const e of a) + for (const o of r) { + const r = e.manifest.getForScope(o).values(); + for (const e of r) { + const o = t.tryWorkspaceByDescriptor(e); + o && a.add(o); + } + } + for (const e of t.workspaces) + a.has(e) + ? o && e.manifest.devDependencies.clear() + : (e.manifest.dependencies.clear(), + e.manifest.devDependencies.clear(), + e.manifest.peerDependencies.clear()); + return a; + })({ project: e, workspaces: [o], production: this.production }), + s = await (async function (t, e = 'Dockerfile') { + const o = (0, n.toFilename)(e); + if (n.ppath.isAbsolute(o)) return o; + const r = [n.ppath.join(t.cwd, o), n.ppath.join(t.project.cwd, o)]; + for (const t of r) if (await n.xfs.existsPromise(t)) return t; + throw new Error('Dockerfile is required'); + })(o, this.dockerFilePath), + d = await i.Cache.find(t); + return ( + await i.StreamReport.start( + { configuration: t, stdout: this.context.stdout, includeLogs: !this.context.quiet }, + async (t) => { + await t.startTimerPromise('Resolution Step', async () => { + await e.resolveEverything({ report: t, cache: d }); + }), + await t.startTimerPromise('Fetch Step', async () => { + await e.fetchEverything({ report: t, cache: d }); + }), + await n.xfs.mktempPromise(async (o) => { + const f = n.ppath.join(o, (0, n.toFilename)('manifests')), + u = n.ppath.join(o, (0, n.toFilename)('packs')); + await t.startTimerPromise('Copy files', async () => { + await (async function ({ destination: t, project: e, report: o }) { + const r = e.configuration.get('rcFilename'); + o.reportInfo(null, r), + await n.xfs.copyPromise(n.ppath.join(t, r), n.ppath.join(e.cwd, r), { overwrite: !0 }); + })({ destination: f, project: e, report: t }), + await (async function ({ destination: t, project: e, report: o }) { + const r = n.ppath.join((0, n.toFilename)('.yarn'), (0, n.toFilename)('plugins')); + o.reportInfo(null, r), + await n.xfs.copyPromise(n.ppath.join(t, r), n.ppath.join(e.cwd, r), { overwrite: !0 }); + })({ destination: f, project: e, report: t }), + await (async function ({ destination: t, project: e, report: o }) { + const r = e.configuration.get('yarnPath'), + i = n.ppath.relative(e.cwd, r), + a = n.ppath.join(t, i); + o.reportInfo(null, i), await n.xfs.copyPromise(a, r, { overwrite: !0 }); + })({ destination: f, project: e, report: t }), + await (async function ({ destination: t, workspaces: e, report: o }) { + for (const r of e) { + const e = n.ppath.join(r.relativeCwd, i.Manifest.fileName), + a = n.ppath.join(t, e), + s = {}; + r.manifest.exportTo(s), + o.reportInfo(null, e), + await n.xfs.mkdirpPromise(n.ppath.dirname(a)), + await n.xfs.writeJsonPromise(a, s); + } + })({ destination: f, workspaces: e.workspaces, report: t }), + await (async function ({ destination: t, report: e, project: o, parseDescriptor: r }) { + const a = new Set(); + for (const s of o.storedDescriptors.values()) { + const c = r( + i.structUtils.isVirtualDescriptor(s) ? i.structUtils.devirtualizeDescriptor(s) : s, + ); + if (!c) continue; + const { parentLocator: p, paths: d } = c; + for (const r of d) { + if (l.test(r)) continue; + if (n.ppath.isAbsolute(r)) continue; + const i = o.getWorkspaceByLocator(p), + s = n.ppath.join(i.relativeCwd, r); + if (a.has(s)) continue; + a.add(s); + const c = n.ppath.join(i.cwd, r), + d = n.ppath.join(t, s); + e.reportInfo(null, s), + await n.xfs.mkdirpPromise(n.ppath.dirname(d)), + await n.xfs.copyFilePromise(c, d); + } + } + })({ + destination: f, + report: t, + project: e, + parseDescriptor: (t) => { + if (t.range.startsWith('exec:')) { + const e = (function (t) { + const { params: e, selector: o } = i.structUtils.parseRange(t), + r = n.npath.toPortablePath(o); + return { + parentLocator: + e && 'string' == typeof e.locator ? i.structUtils.parseLocator(e.locator) : null, + path: r, + }; + })(t.range); + if (!e || !e.parentLocator) return; + return { parentLocator: e.parentLocator, paths: [e.path] }; + } + if (t.range.startsWith('patch:')) { + const { parentLocator: e, patchPaths: o } = a.patchUtils.parseDescriptor(t); + if (!e) return; + return { parentLocator: e, paths: o }; + } + }, + }), + await (async function ({ destination: t, project: e, cache: o, report: r }) { + for (const i of o.markedFiles) { + const o = n.ppath.relative(e.cwd, i); + (await n.xfs.existsPromise(i)) && + (r.reportInfo(null, o), await n.xfs.copyPromise(n.ppath.join(t, o), i)); + } + })({ destination: f, project: e, cache: d, report: t }), + await (async function ({ destination: t, project: e, report: o }) { + const r = (0, n.toFilename)(e.configuration.get('lockfileFilename')), + i = n.ppath.join(t, r); + o.reportInfo(null, r), + await n.xfs.mkdirpPromise(n.ppath.dirname(i)), + await n.xfs.writeFilePromise(i, e.generateLockfile()); + })({ destination: f, project: e, report: t }), + this.copyFiles && + this.copyFiles.length && + (await (async function ({ destination: t, files: e, dockerFilePath: o, report: r }) { + const i = n.ppath.dirname(o); + for (const o of e) { + const e = p(i, o), + a = n.ppath.join(i, e), + s = n.ppath.join(t, e); + r.reportInfo(null, e), await n.xfs.copyPromise(s, a); + } + })({ destination: f, files: this.copyFiles, dockerFilePath: s, report: t })); + }); + for (const e of r) { + const o = e.manifest.name ? i.structUtils.stringifyIdent(e.manifest.name) : ''; + await t.startTimerPromise('Pack workspace ' + o, async () => { + await c({ workspace: e, report: t, destination: u }); + }); + } + const h = this.buildKit ? ['buildx', 'build'] : ['build']; + await i.execUtils.pipevp('docker', [...h, ...this.args, '-f', s, '.'], { + cwd: o, + strict: !0, + stdin: this.context.stdin, + stdout: this.context.stdout, + stderr: this.context.stderr, + }); + }); + }, + ) + ).exitCode(); + } + } + (f.usage = r.Command.Usage({ + category: 'Docker-related commands', + description: 'Build a Docker image for a workspace', + details: + '\n This command will build a efficient Docker image which only contains necessary dependencies for the specified workspace.\n\n You have to create a Dockerfile in your workspace or your project. You can also specify the path to Dockerfile using the "-f, --file" option.\n\n Additional arguments can be passed to "docker build" directly, please check the Docker docs for more info: https://docs.docker.com/engine/reference/commandline/build/\n\n You can copy additional files or folders to a Docker image using the "--copy" option. This is useful for secret keys or configuration files. The files will be copied to "manifests" folder. The path can be either a path relative to the Dockerfile or an absolute path.\n ', + examples: [ + ['Build a Docker image for a workspace', 'yarn docker build @foo/bar'], + ['Pass additional arguments to docker build command', 'yarn docker build @foo/bar -t image-tag'], + [ + 'Copy additional files to a Docker image', + 'yarn docker build --copy secret.key --copy config.json @foo/bar', + ], + ['Install production dependencies only', 'yarn docker build --production @foo/bar'], + ['Build a Docker image using BuildKit', 'yarn docker build --buildkit @foo/bar'], + ], + })), + d([r.Command.String()], f.prototype, 'workspaceName', void 0), + d([r.Command.Proxy()], f.prototype, 'args', void 0), + d([r.Command.String('-f,--file')], f.prototype, 'dockerFilePath', void 0), + d([r.Command.Array('--copy')], f.prototype, 'copyFiles', void 0), + d([r.Command.Boolean('--production')], f.prototype, 'production', void 0), + d([r.Command.Boolean('--buildkit')], f.prototype, 'buildKit', void 0), + d([r.Command.Path('docker', 'build')], f.prototype, 'execute', null); + const u = { commands: [f] }; + plugin = e; + })(); + return plugin; + }, +}; diff --git a/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs index 911cd235e83c..4e89c7c352cb 100644 --- a/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs +++ b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs @@ -3,8 +3,8 @@ module.exports = { name: "@yarnpkg/plugin-workspace-tools", factory: function (require) { -var plugin=(()=>{var wr=Object.create,me=Object.defineProperty,Sr=Object.defineProperties,vr=Object.getOwnPropertyDescriptor,Hr=Object.getOwnPropertyDescriptors,$r=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,kr=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable;var rt=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))tt.call(t,r)&&rt(e,r,t[r]);if(et)for(var r of et(t))Tr.call(t,r)&&rt(e,r,t[r]);return e},Q=(e,t)=>Sr(e,Hr(t)),Lr=e=>me(e,"__esModule",{value:!0});var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Or=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},Nr=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $r(t))!tt.call(e,n)&&n!=="default"&&me(e,n,{get:()=>t[n],enumerable:!(r=vr(t,n))||r.enumerable});return e},X=e=>Nr(Lr(me(e!=null?wr(kr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var $e=K(te=>{"use strict";te.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;te.find=(e,t)=>e.nodes.find(r=>r.type===t);te.exceedsLimit=(e,t,r=1,n)=>n===!1||!te.isInteger(e)||!te.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;te.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];!n||(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};te.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0==0?(e.invalid=!0,!0):!1;te.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0==0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;te.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;te.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);te.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s{"use strict";var it=$e();at.exports=(e,t={})=>{let r=(n,s={})=>{let a=t.escapeInvalid&&it.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o="";if(n.value)return(a||i)&&it.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let h of n.nodes)o+=r(h);return o};return r(e)}});var ct=K((os,ot)=>{"use strict";ot.exports=function(e){return typeof e=="number"?e-e==0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var At=K((cs,ut)=>{"use strict";var lt=ct(),pe=(e,t,r)=>{if(lt(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(lt(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n=B({relaxZeros:!0},r);typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),a=String(n.shorthand),i=String(n.capture),o=String(n.wrap),h=e+":"+t+"="+s+a+i+o;if(pe.cache.hasOwnProperty(h))return pe.cache[h].result;let g=Math.min(e,t),f=Math.max(e,t);if(Math.abs(g-f)===1){let R=e+"|"+t;return n.capture?`(${R})`:n.wrap===!1?R:`(?:${R})`}let A=ft(e)||ft(t),p={min:e,max:t,a:g,b:f},k=[],y=[];if(A&&(p.isPadded=A,p.maxLen=String(p.max).length),g<0){let R=f<0?Math.abs(f):1;y=pt(R,Math.abs(g),p,n),g=p.a=0}return f>=0&&(k=pt(g,f,p,n)),p.negatives=y,p.positives=k,p.result=Ir(y,k,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&k.length+y.length>1&&(p.result=`(?:${p.result})`),pe.cache[h]=p,p.result};function Ir(e,t,r){let n=Pe(e,t,"-",!1,r)||[],s=Pe(t,e,"",!1,r)||[],a=Pe(e,t,"-?",!0,r)||[];return n.concat(a).concat(s).join("|")}function Mr(e,t){let r=1,n=1,s=ht(e,r),a=new Set([t]);for(;e<=s&&s<=t;)a.add(s),r+=1,s=ht(e,r);for(s=dt(t+1,n)-1;e1&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+gt(o.count),i=g+1;continue}r.isPadded&&(A=Gr(g,r,n)),f.string=A+f.pattern+gt(f.count),a.push(f),i=g+1,o=f}return a}function Pe(e,t,r,n,s){let a=[];for(let i of e){let{string:o}=i;!n&&!mt(t,"string",o)&&a.push(r+o),n&&mt(t,"string",o)&&a.push(r+o)}return a}function Pr(e,t){let r=[];for(let n=0;nt?1:t>e?-1:0}function mt(e,t,r){return e.some(n=>n[t]===r)}function ht(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function dt(e,t){return e-e%Math.pow(10,t)}function gt(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Dr(e,t,r){return`[${e}${t-e==1?"":"-"}${t}]`}function ft(e){return/^-?(0+)\d/.test(e)}function Gr(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}pe.cache={};pe.clearCache=()=>pe.cache={};ut.exports=pe});var Ge=K((us,Rt)=>{"use strict";var qr=require("util"),yt=At(),bt=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Kr=e=>t=>e===!0?Number(t):String(t),De=e=>typeof e=="number"||typeof e=="string"&&e!=="",Re=e=>Number.isInteger(+e),Ue=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Wr=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,jr=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},_t=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length{e.negatives.sort((i,o)=>io?1:0),e.positives.sort((i,o)=>io?1:0);let r=t.capture?"":"?:",n="",s="",a;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n&&s?a=`${n}|${s}`:a=n||s,t.wrap?`(${r}${a})`:a},Et=(e,t,r,n)=>{if(r)return yt(e,t,B({wrap:!1},n));let s=String.fromCharCode(e);if(e===t)return s;let a=String.fromCharCode(t);return`[${s}-${a}]`},xt=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return yt(e,t,r)},Ct=(...e)=>new RangeError("Invalid range arguments: "+qr.inspect(...e)),wt=(e,t,r)=>{if(r.strictRanges===!0)throw Ct([e,t]);return[]},Qr=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Xr=(e,t,r=1,n={})=>{let s=Number(e),a=Number(t);if(!Number.isInteger(s)||!Number.isInteger(a)){if(n.strictRanges===!0)throw Ct([e,t]);return[]}s===0&&(s=0),a===0&&(a=0);let i=s>a,o=String(e),h=String(t),g=String(r);r=Math.max(Math.abs(r),1);let f=Ue(o)||Ue(h)||Ue(g),A=f?Math.max(o.length,h.length,g.length):0,p=f===!1&&Wr(e,t,n)===!1,k=n.transform||Kr(p);if(n.toRegex&&r===1)return Et(_t(e,A),_t(t,A),!0,n);let y={negatives:[],positives:[]},R=T=>y[T<0?"negatives":"positives"].push(Math.abs(T)),_=[],x=0;for(;i?s>=a:s<=a;)n.toRegex===!0&&r>1?R(s):_.push(jr(k(s,x),A,p)),s=i?s-r:s+r,x++;return n.toRegex===!0?r>1?Fr(y,n):xt(_,null,B({wrap:!1},n)):_},Zr=(e,t,r=1,n={})=>{if(!Re(e)&&e.length>1||!Re(t)&&t.length>1)return wt(e,t,n);let s=n.transform||(p=>String.fromCharCode(p)),a=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),o=a>i,h=Math.min(a,i),g=Math.max(a,i);if(n.toRegex&&r===1)return Et(h,g,!1,n);let f=[],A=0;for(;o?a>=i:a<=i;)f.push(s(a,A)),a=o?a-r:a+r,A++;return n.toRegex===!0?xt(f,null,{wrap:!1,options:n}):f},Te=(e,t,r,n={})=>{if(t==null&&De(e))return[e];if(!De(e)||!De(t))return wt(e,t,n);if(typeof r=="function")return Te(e,t,1,{transform:r});if(bt(r))return Te(e,t,0,r);let s=B({},n);return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,Re(r)?Re(e)&&Re(t)?Xr(e,t,r,s):Zr(e,t,Math.max(Math.abs(r),1),s):r!=null&&!bt(r)?Qr(r,s):Te(e,t,1,r)};Rt.exports=Te});var Ht=K((ls,St)=>{"use strict";var Yr=Ge(),vt=$e(),zr=(e,t={})=>{let r=(n,s={})=>{let a=vt.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o=a===!0||i===!0,h=t.escapeInvalid===!0?"\\":"",g="";if(n.isOpen===!0||n.isClose===!0)return h+n.value;if(n.type==="open")return o?h+n.value:"(";if(n.type==="close")return o?h+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":o?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let f=vt.reduce(n.nodes),A=Yr(...f,Q(B({},t),{wrap:!1,toRegex:!0}));if(A.length!==0)return f.length>1&&A.length>1?`(${A})`:A}if(n.nodes)for(let f of n.nodes)g+=r(f,n);return g};return r(e)};St.exports=zr});var Tt=K((ps,$t)=>{"use strict";var Vr=Ge(),kt=ke(),he=$e(),fe=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?he.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let a of s)n.push(fe(a,t,r));else for(let a of t)r===!0&&typeof a=="string"&&(a=`{${a}}`),n.push(Array.isArray(a)?fe(s,a,r):s+a);return he.flatten(n)},Jr=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,a={})=>{s.queue=[];let i=a,o=a.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,o=i.queue;if(s.invalid||s.dollar){o.push(fe(o.pop(),kt(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){o.push(fe(o.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let A=he.reduce(s.nodes);if(he.exceedsLimit(...A,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=Vr(...A,t);p.length===0&&(p=kt(s,t)),o.push(fe(o.pop(),p)),s.nodes=[];return}let h=he.encloseBrace(s),g=s.queue,f=s;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,g=f.queue;for(let A=0;A{"use strict";Lt.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` -`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Pt=K((hs,Nt)=>{"use strict";var en=ke(),{MAX_LENGTH:It,CHAR_BACKSLASH:qe,CHAR_BACKTICK:tn,CHAR_COMMA:rn,CHAR_DOT:nn,CHAR_LEFT_PARENTHESES:sn,CHAR_RIGHT_PARENTHESES:an,CHAR_LEFT_CURLY_BRACE:on,CHAR_RIGHT_CURLY_BRACE:cn,CHAR_LEFT_SQUARE_BRACKET:Bt,CHAR_RIGHT_SQUARE_BRACKET:Mt,CHAR_DOUBLE_QUOTE:un,CHAR_SINGLE_QUOTE:ln,CHAR_NO_BREAK_SPACE:pn,CHAR_ZERO_WIDTH_NOBREAK_SPACE:fn}=Ot(),hn=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(It,r.maxLength):It;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},a=[s],i=s,o=s,h=0,g=e.length,f=0,A=0,p,k={},y=()=>e[f++],R=_=>{if(_.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&_.type==="text"){o.value+=_.value;return}return i.nodes.push(_),_.parent=i,_.prev=o,o=_,_};for(R({type:"bos"});f0){if(i.ranges>0){i.ranges=0;let _=i.nodes.shift();i.nodes=[_,{type:"text",value:en(i)}]}R({type:"comma",value:p}),i.commas++;continue}if(p===nn&&A>0&&i.commas===0){let _=i.nodes;if(A===0||_.length===0){R({type:"text",value:p});continue}if(o.type==="dot"){if(i.range=[],o.value+=p,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){_.pop();let x=_[_.length-1];x.value+=o.value+p,o=x,i.ranges--;continue}R({type:"dot",value:p});continue}R({type:"text",value:p})}do if(i=a.pop(),i.type!=="root"){i.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let _=a[a.length-1],x=_.nodes.indexOf(i);_.nodes.splice(x,1,...i.nodes)}while(a.length>0);return R({type:"eos"}),s};Nt.exports=hn});var Gt=K((ds,Dt)=>{"use strict";var Ut=ke(),dn=Ht(),gn=Tt(),mn=Pt(),V=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=V.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(V.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};V.parse=(e,t={})=>mn(e,t);V.stringify=(e,t={})=>typeof e=="string"?Ut(V.parse(e,t),t):Ut(e,t);V.compile=(e,t={})=>(typeof e=="string"&&(e=V.parse(e,t)),dn(e,t));V.expand=(e,t={})=>{typeof e=="string"&&(e=V.parse(e,t));let r=gn(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};V.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?V.compile(e,t):V.expand(e,t);Dt.exports=V});var ye=K((gs,qt)=>{"use strict";var An=require("path"),ie="\\\\/",Kt=`[^${ie}]`,ce="\\.",Rn="\\+",yn="\\?",Le="\\/",bn="(?=.)",Wt="[^/]",Ke=`(?:${Le}|$)`,jt=`(?:^|${Le})`,We=`${ce}{1,2}${Ke}`,_n=`(?!${ce})`,En=`(?!${jt}${We})`,xn=`(?!${ce}{0,1}${Ke})`,Cn=`(?!${We})`,wn=`[^.${Le}]`,Sn=`${Wt}*?`,Ft={DOT_LITERAL:ce,PLUS_LITERAL:Rn,QMARK_LITERAL:yn,SLASH_LITERAL:Le,ONE_CHAR:bn,QMARK:Wt,END_ANCHOR:Ke,DOTS_SLASH:We,NO_DOT:_n,NO_DOTS:En,NO_DOT_SLASH:xn,NO_DOTS_SLASH:Cn,QMARK_NO_DOT:wn,STAR:Sn,START_ANCHOR:jt},vn=Q(B({},Ft),{SLASH_LITERAL:`[${ie}]`,QMARK:Kt,STAR:`${Kt}*?`,DOTS_SLASH:`${ce}{1,2}(?:[${ie}]|$)`,NO_DOT:`(?!${ce})`,NO_DOTS:`(?!(?:^|[${ie}])${ce}{1,2}(?:[${ie}]|$))`,NO_DOT_SLASH:`(?!${ce}{0,1}(?:[${ie}]|$))`,NO_DOTS_SLASH:`(?!${ce}{1,2}(?:[${ie}]|$))`,QMARK_NO_DOT:`[^.${ie}]`,START_ANCHOR:`(?:^|[${ie}])`,END_ANCHOR:`(?:[${ie}]|$)`}),Hn={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};qt.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Hn,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:An.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?vn:Ft}}});var be=K(Z=>{"use strict";var $n=require("path"),kn=process.platform==="win32",{REGEX_BACKSLASH:Tn,REGEX_REMOVE_BACKSLASH:Ln,REGEX_SPECIAL_CHARS:On,REGEX_SPECIAL_CHARS_GLOBAL:Nn}=ye();Z.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Z.hasRegexChars=e=>On.test(e);Z.isRegexChar=e=>e.length===1&&Z.hasRegexChars(e);Z.escapeRegex=e=>e.replace(Nn,"\\$1");Z.toPosixSlashes=e=>e.replace(Tn,"/");Z.removeBackslashes=e=>e.replace(Ln,t=>t==="\\"?"":t);Z.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Z.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:kn===!0||$n.sep==="\\";Z.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Z.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Z.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Z.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",a=`${n}(?:${e})${s}`;return t.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}});var er=K((As,Qt)=>{"use strict";var Xt=be(),{CHAR_ASTERISK:je,CHAR_AT:In,CHAR_BACKWARD_SLASH:_e,CHAR_COMMA:Bn,CHAR_DOT:Fe,CHAR_EXCLAMATION_MARK:Qe,CHAR_FORWARD_SLASH:Zt,CHAR_LEFT_CURLY_BRACE:Xe,CHAR_LEFT_PARENTHESES:Ze,CHAR_LEFT_SQUARE_BRACKET:Mn,CHAR_PLUS:Pn,CHAR_QUESTION_MARK:Yt,CHAR_RIGHT_CURLY_BRACE:Dn,CHAR_RIGHT_PARENTHESES:zt,CHAR_RIGHT_SQUARE_BRACKET:Un}=ye(),Vt=e=>e===Zt||e===_e,Jt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?Infinity:1)},Gn=(e,t)=>{let r=t||{},n=e.length-1,s=r.parts===!0||r.scanToEnd===!0,a=[],i=[],o=[],h=e,g=-1,f=0,A=0,p=!1,k=!1,y=!1,R=!1,_=!1,x=!1,T=!1,O=!1,W=!1,G=!1,ne=0,E,b,C={value:"",depth:0,isGlob:!1},M=()=>g>=n,l=()=>h.charCodeAt(g+1),H=()=>(E=b,h.charCodeAt(++g));for(;g0&&(j=h.slice(0,f),h=h.slice(f),A-=f),w&&y===!0&&A>0?(w=h.slice(0,A),c=h.slice(A)):y===!0?(w="",c=h):w=h,w&&w!==""&&w!=="/"&&w!==h&&Vt(w.charCodeAt(w.length-1))&&(w=w.slice(0,-1)),r.unescape===!0&&(c&&(c=Xt.removeBackslashes(c)),w&&T===!0&&(w=Xt.removeBackslashes(w)));let u={prefix:j,input:e,start:f,base:w,glob:c,isBrace:p,isBracket:k,isGlob:y,isExtglob:R,isGlobstar:_,negated:O,negatedExtglob:W};if(r.tokens===!0&&(u.maxDepth=0,Vt(b)||i.push(C),u.tokens=i),r.parts===!0||r.tokens===!0){let I;for(let $=0;${"use strict";var Oe=ye(),J=be(),{MAX_LENGTH:Ne,POSIX_REGEX_SOURCE:qn,REGEX_NON_SPECIAL_CHARS:Kn,REGEX_SPECIAL_CHARS_BACKREF:Wn,REPLACEMENTS:rr}=Oe,jn=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(s=>J.escapeRegex(s)).join("..")}return r},de=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,nr=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rr[e]||e;let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let a={type:"bos",value:"",output:r.prepend||""},i=[a],o=r.capture?"":"?:",h=J.isWindows(t),g=Oe.globChars(h),f=Oe.extglobChars(g),{DOT_LITERAL:A,PLUS_LITERAL:p,SLASH_LITERAL:k,ONE_CHAR:y,DOTS_SLASH:R,NO_DOT:_,NO_DOT_SLASH:x,NO_DOTS_SLASH:T,QMARK:O,QMARK_NO_DOT:W,STAR:G,START_ANCHOR:ne}=g,E=m=>`(${o}(?:(?!${ne}${m.dot?R:A}).)*?)`,b=r.dot?"":_,C=r.dot?O:W,M=r.bash===!0?E(r):G;r.capture&&(M=`(${M})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let l={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=J.removePrefix(e,l),s=e.length;let H=[],w=[],j=[],c=a,u,I=()=>l.index===s-1,$=l.peek=(m=1)=>e[l.index+m],ee=l.advance=()=>e[++l.index]||"",se=()=>e.slice(l.index+1),z=(m="",L=0)=>{l.consumed+=m,l.index+=L},Ce=m=>{l.output+=m.output!=null?m.output:m.value,z(m.value)},xr=()=>{let m=1;for(;$()==="!"&&($(2)!=="("||$(3)==="?");)ee(),l.start++,m++;return m%2==0?!1:(l.negated=!0,l.start++,!0)},we=m=>{l[m]++,j.push(m)},ue=m=>{l[m]--,j.pop()},v=m=>{if(c.type==="globstar"){let L=l.braces>0&&(m.type==="comma"||m.type==="brace"),d=m.extglob===!0||H.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!L&&!d&&(l.output=l.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=M,l.output+=c.output)}if(H.length&&m.type!=="paren"&&(H[H.length-1].inner+=m.value),(m.value||m.output)&&Ce(m),c&&c.type==="text"&&m.type==="text"){c.value+=m.value,c.output=(c.output||"")+m.value;return}m.prev=c,i.push(m),c=m},Se=(m,L)=>{let d=Q(B({},f[L]),{conditions:1,inner:""});d.prev=c,d.parens=l.parens,d.output=l.output;let S=(r.capture?"(":"")+d.open;we("parens"),v({type:m,value:L,output:l.output?"":y}),v({type:"paren",extglob:!0,value:ee(),output:S}),H.push(d)},Cr=m=>{let L=m.close+(r.capture?")":""),d;if(m.type==="negate"){let S=M;m.inner&&m.inner.length>1&&m.inner.includes("/")&&(S=E(r)),(S!==M||I()||/^\)+$/.test(se()))&&(L=m.close=`)$))${S}`),m.inner.includes("*")&&(d=se())&&/^\.[^\\/.]+$/.test(d)&&(L=m.close=`)${d})${S})`),m.prev.type==="bos"&&(l.negatedExtglob=!0)}v({type:"paren",extglob:!0,value:u,output:L}),ue("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let m=!1,L=e.replace(Wn,(d,S,P,F,q,Me)=>F==="\\"?(m=!0,d):F==="?"?S?S+F+(q?O.repeat(q.length):""):Me===0?C+(q?O.repeat(q.length):""):O.repeat(P.length):F==="."?A.repeat(P.length):F==="*"?S?S+F+(q?M:""):M:S?d:`\\${d}`);return m===!0&&(r.unescape===!0?L=L.replace(/\\/g,""):L=L.replace(/\\+/g,d=>d.length%2==0?"\\\\":d?"\\":"")),L===e&&r.contains===!0?(l.output=e,l):(l.output=J.wrapOutput(L,l,t),l)}for(;!I();){if(u=ee(),u==="\0")continue;if(u==="\\"){let d=$();if(d==="/"&&r.bash!==!0||d==="."||d===";")continue;if(!d){u+="\\",v({type:"text",value:u});continue}let S=/^\\+/.exec(se()),P=0;if(S&&S[0].length>2&&(P=S[0].length,l.index+=P,P%2!=0&&(u+="\\")),r.unescape===!0?u=ee():u+=ee(),l.brackets===0){v({type:"text",value:u});continue}}if(l.brackets>0&&(u!=="]"||c.value==="["||c.value==="[^")){if(r.posix!==!1&&u===":"){let d=c.value.slice(1);if(d.includes("[")&&(c.posix=!0,d.includes(":"))){let S=c.value.lastIndexOf("["),P=c.value.slice(0,S),F=c.value.slice(S+2),q=qn[F];if(q){c.value=P+q,l.backtrack=!0,ee(),!a.output&&i.indexOf(c)===1&&(a.output=y);continue}}}(u==="["&&$()!==":"||u==="-"&&$()==="]")&&(u=`\\${u}`),u==="]"&&(c.value==="["||c.value==="[^")&&(u=`\\${u}`),r.posix===!0&&u==="!"&&c.value==="["&&(u="^"),c.value+=u,Ce({value:u});continue}if(l.quotes===1&&u!=='"'){u=J.escapeRegex(u),c.value+=u,Ce({value:u});continue}if(u==='"'){l.quotes=l.quotes===1?0:1,r.keepQuotes===!0&&v({type:"text",value:u});continue}if(u==="("){we("parens"),v({type:"paren",value:u});continue}if(u===")"){if(l.parens===0&&r.strictBrackets===!0)throw new SyntaxError(de("opening","("));let d=H[H.length-1];if(d&&l.parens===d.parens+1){Cr(H.pop());continue}v({type:"paren",value:u,output:l.parens?")":"\\)"}),ue("parens");continue}if(u==="["){if(r.nobracket===!0||!se().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));u=`\\${u}`}else we("brackets");v({type:"bracket",value:u});continue}if(u==="]"){if(r.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){v({type:"text",value:u,output:`\\${u}`});continue}if(l.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(de("opening","["));v({type:"text",value:u,output:`\\${u}`});continue}ue("brackets");let d=c.value.slice(1);if(c.posix!==!0&&d[0]==="^"&&!d.includes("/")&&(u=`/${u}`),c.value+=u,Ce({value:u}),r.literalBrackets===!1||J.hasRegexChars(d))continue;let S=J.escapeRegex(c.value);if(l.output=l.output.slice(0,-c.value.length),r.literalBrackets===!0){l.output+=S,c.value=S;continue}c.value=`(${o}${S}|${c.value})`,l.output+=c.value;continue}if(u==="{"&&r.nobrace!==!0){we("braces");let d={type:"brace",value:u,output:"(",outputIndex:l.output.length,tokensIndex:l.tokens.length};w.push(d),v(d);continue}if(u==="}"){let d=w[w.length-1];if(r.nobrace===!0||!d){v({type:"text",value:u,output:u});continue}let S=")";if(d.dots===!0){let P=i.slice(),F=[];for(let q=P.length-1;q>=0&&(i.pop(),P[q].type!=="brace");q--)P[q].type!=="dots"&&F.unshift(P[q].value);S=jn(F,r),l.backtrack=!0}if(d.comma!==!0&&d.dots!==!0){let P=l.output.slice(0,d.outputIndex),F=l.tokens.slice(d.tokensIndex);d.value=d.output="\\{",u=S="\\}",l.output=P;for(let q of F)l.output+=q.output||q.value}v({type:"brace",value:u,output:S}),ue("braces"),w.pop();continue}if(u==="|"){H.length>0&&H[H.length-1].conditions++,v({type:"text",value:u});continue}if(u===","){let d=u,S=w[w.length-1];S&&j[j.length-1]==="braces"&&(S.comma=!0,d="|"),v({type:"comma",value:u,output:d});continue}if(u==="/"){if(c.type==="dot"&&l.index===l.start+1){l.start=l.index+1,l.consumed="",l.output="",i.pop(),c=a;continue}v({type:"slash",value:u,output:k});continue}if(u==="."){if(l.braces>0&&c.type==="dot"){c.value==="."&&(c.output=A);let d=w[w.length-1];c.type="dots",c.output+=u,c.value+=u,d.dots=!0;continue}if(l.braces+l.parens===0&&c.type!=="bos"&&c.type!=="slash"){v({type:"text",value:u,output:A});continue}v({type:"dot",value:u,output:A});continue}if(u==="?"){if(!(c&&c.value==="(")&&r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("qmark",u);continue}if(c&&c.type==="paren"){let S=$(),P=u;if(S==="<"&&!J.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(c.value==="("&&!/[!=<:]/.test(S)||S==="<"&&!/<([!=]|\w+>)/.test(se()))&&(P=`\\${u}`),v({type:"text",value:u,output:P});continue}if(r.dot!==!0&&(c.type==="slash"||c.type==="bos")){v({type:"qmark",value:u,output:W});continue}v({type:"qmark",value:u,output:O});continue}if(u==="!"){if(r.noextglob!==!0&&$()==="("&&($(2)!=="?"||!/[!=<:]/.test($(3)))){Se("negate",u);continue}if(r.nonegate!==!0&&l.index===0){xr();continue}}if(u==="+"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("plus",u);continue}if(c&&c.value==="("||r.regex===!1){v({type:"plus",value:u,output:p});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||l.parens>0){v({type:"plus",value:u});continue}v({type:"plus",value:p});continue}if(u==="@"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){v({type:"at",extglob:!0,value:u,output:""});continue}v({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);let d=Kn.exec(se());d&&(u+=d[0],l.index+=d[0].length),v({type:"text",value:u});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=u,c.output=M,l.backtrack=!0,l.globstar=!0,z(u);continue}let m=se();if(r.noextglob!==!0&&/^\([^?]/.test(m)){Se("star",u);continue}if(c.type==="star"){if(r.noglobstar===!0){z(u);continue}let d=c.prev,S=d.prev,P=d.type==="slash"||d.type==="bos",F=S&&(S.type==="star"||S.type==="globstar");if(r.bash===!0&&(!P||m[0]&&m[0]!=="/")){v({type:"star",value:u,output:""});continue}let q=l.braces>0&&(d.type==="comma"||d.type==="brace"),Me=H.length&&(d.type==="pipe"||d.type==="paren");if(!P&&d.type!=="paren"&&!q&&!Me){v({type:"star",value:u,output:""});continue}for(;m.slice(0,3)==="/**";){let ve=e[l.index+4];if(ve&&ve!=="/")break;m=m.slice(3),z("/**",3)}if(d.type==="bos"&&I()){c.type="globstar",c.value+=u,c.output=E(r),l.output=c.output,l.globstar=!0,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&!F&&I()){l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=E(r)+(r.strictSlashes?")":"|$)"),c.value+=u,l.globstar=!0,l.output+=d.output+c.output,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&m[0]==="/"){let ve=m[1]!==void 0?"|$":"";l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=`${E(r)}${k}|${k}${ve})`,c.value+=u,l.output+=d.output+c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}if(d.type==="bos"&&m[0]==="/"){c.type="globstar",c.value+=u,c.output=`(?:^|${k}|${E(r)}${k})`,l.output=c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}l.output=l.output.slice(0,-c.output.length),c.type="globstar",c.output=E(r),c.value+=u,l.output+=c.output,l.globstar=!0,z(u);continue}let L={type:"star",value:u,output:M};if(r.bash===!0){L.output=".*?",(c.type==="bos"||c.type==="slash")&&(L.output=b+L.output),v(L);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&r.regex===!0){L.output=u,v(L);continue}(l.index===l.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(l.output+=x,c.output+=x):r.dot===!0?(l.output+=T,c.output+=T):(l.output+=b,c.output+=b),$()!=="*"&&(l.output+=y,c.output+=y)),v(L)}for(;l.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));l.output=J.escapeLast(l.output,"["),ue("brackets")}for(;l.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing",")"));l.output=J.escapeLast(l.output,"("),ue("parens")}for(;l.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","}"));l.output=J.escapeLast(l.output,"{"),ue("braces")}if(r.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&v({type:"maybe_slash",value:"",output:`${k}?`}),l.backtrack===!0){l.output="";for(let m of l.tokens)l.output+=m.output!=null?m.output:m.value,m.suffix&&(l.output+=m.suffix)}return l};nr.fastpaths=(e,t)=>{let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=rr[e]||e;let a=J.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:f,NO_DOTS:A,NO_DOTS_SLASH:p,STAR:k,START_ANCHOR:y}=Oe.globChars(a),R=r.dot?A:f,_=r.dot?p:f,x=r.capture?"":"?:",T={negated:!1,prefix:""},O=r.bash===!0?".*?":k;r.capture&&(O=`(${O})`);let W=b=>b.noglobstar===!0?O:`(${x}(?:(?!${y}${b.dot?g:i}).)*?)`,G=b=>{switch(b){case"*":return`${R}${h}${O}`;case".*":return`${i}${h}${O}`;case"*.*":return`${R}${O}${i}${h}${O}`;case"*/*":return`${R}${O}${o}${h}${_}${O}`;case"**":return R+W(r);case"**/*":return`(?:${R}${W(r)}${o})?${_}${h}${O}`;case"**/*.*":return`(?:${R}${W(r)}${o})?${_}${O}${i}${h}${O}`;case"**/.*":return`(?:${R}${W(r)}${o})?${i}${h}${O}`;default:{let C=/^(.*?)\.(\w+)$/.exec(b);if(!C)return;let M=G(C[1]);return M?M+i+C[2]:void 0}}},ne=J.removePrefix(e,T),E=G(ne);return E&&r.strictSlashes!==!0&&(E+=`${o}?`),E};tr.exports=nr});var ir=K((ys,ar)=>{"use strict";var Fn=require("path"),Qn=er(),Ye=sr(),ze=be(),Xn=ye(),Zn=e=>e&&typeof e=="object"&&!Array.isArray(e),D=(e,t,r=!1)=>{if(Array.isArray(e)){let f=e.map(p=>D(p,t,r));return p=>{for(let k of f){let y=k(p);if(y)return y}return!1}}let n=Zn(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},a=ze.isWindows(t),i=n?D.compileRe(e,t):D.makeRe(e,t,!1,!0),o=i.state;delete i.state;let h=()=>!1;if(s.ignore){let f=Q(B({},t),{ignore:null,onMatch:null,onResult:null});h=D(s.ignore,f,r)}let g=(f,A=!1)=>{let{isMatch:p,match:k,output:y}=D.test(f,i,t,{glob:e,posix:a}),R={glob:e,state:o,regex:i,posix:a,input:f,output:y,match:k,isMatch:p};return typeof s.onResult=="function"&&s.onResult(R),p===!1?(R.isMatch=!1,A?R:!1):h(f)?(typeof s.onIgnore=="function"&&s.onIgnore(R),R.isMatch=!1,A?R:!1):(typeof s.onMatch=="function"&&s.onMatch(R),A?R:!0)};return r&&(g.state=o),g};D.test=(e,t,r,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let a=r||{},i=a.format||(s?ze.toPosixSlashes:null),o=e===n,h=o&&i?i(e):e;return o===!1&&(h=i?i(e):e,o=h===n),(o===!1||a.capture===!0)&&(a.matchBase===!0||a.basename===!0?o=D.matchBase(e,t,r,s):o=t.exec(h)),{isMatch:Boolean(o),match:o,output:h}};D.matchBase=(e,t,r,n=ze.isWindows(r))=>(t instanceof RegExp?t:D.makeRe(t,r)).test(Fn.basename(e));D.isMatch=(e,t,r)=>D(t,r)(e);D.parse=(e,t)=>Array.isArray(e)?e.map(r=>D.parse(r,t)):Ye(e,Q(B({},t),{fastpaths:!1}));D.scan=(e,t)=>Qn(e,t);D.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let s=t||{},a=s.contains?"":"^",i=s.contains?"":"$",o=`${a}(?:${e.output})${i}`;e&&e.negated===!0&&(o=`^(?!${o}).*$`);let h=D.toRegex(o,t);return n===!0&&(h.state=e),h};D.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Ye.fastpaths(e,t)),s.output||(s=Ye(e,t)),D.compileRe(s,t,r,n)};D.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};D.constants=Xn;ar.exports=D});var cr=K((bs,or)=>{"use strict";or.exports=ir()});var hr=K((_s,ur)=>{"use strict";var lr=require("util"),pr=Gt(),oe=cr(),Ve=be(),fr=e=>e===""||e==="./",N=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,s=new Set,a=new Set,i=0,o=f=>{a.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f!n.has(f));if(r&&g.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(f=>f.replace(/\\/g,"")):t}return g};N.match=N;N.matcher=(e,t)=>oe(e,t);N.isMatch=(e,t,r)=>oe(t,r)(e);N.any=N.isMatch;N.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,s=[],a=o=>{r.onResult&&r.onResult(o),s.push(o.output)},i=N(e,t,Q(B({},r),{onResult:a}));for(let o of s)i.includes(o)||n.add(o);return[...n]};N.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>N.contains(e,n,r));if(typeof t=="string"){if(fr(e)||fr(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return N.isMatch(e,t,Q(B({},r),{contains:!0}))};N.matchKeys=(e,t,r)=>{if(!Ve.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=N(Object.keys(e),t,r),s={};for(let a of n)s[a]=e[a];return s};N.some=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(n.some(i=>a(i)))return!0}return!1};N.every=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(!n.every(i=>a(i)))return!1}return!0};N.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);return[].concat(t).every(n=>oe(n,r)(e))};N.capture=(e,t,r)=>{let n=Ve.isWindows(r),a=oe.makeRe(String(e),Q(B({},r),{capture:!0})).exec(n?Ve.toPosixSlashes(t):t);if(a)return a.slice(1).map(i=>i===void 0?"":i)};N.makeRe=(...e)=>oe.makeRe(...e);N.scan=(...e)=>oe.scan(...e);N.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let s of pr(String(n),t))r.push(oe.parse(s,t));return r};N.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:pr(e,t)};N.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return N.braces(e,Q(B({},t),{expand:!0}))};ur.exports=N});var gr=K((Es,dr)=>{"use strict";dr.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var Ar=K((xs,Je)=>{"use strict";var Yn=gr(),mr=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,n=()=>{r--,t.length>0&&t.shift()()},s=(o,h,...g)=>{r++;let f=Yn(o,...g);h(f),f.then(n,n)},a=(o,h,...g)=>{rnew Promise(g=>a(o,g,...h));return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length}}),i};Je.exports=mr;Je.exports.default=mr});var Vn={};Or(Vn,{default:()=>es});var He=X(require("@yarnpkg/cli")),ae=X(require("@yarnpkg/core")),nt=X(require("@yarnpkg/core")),le=X(require("clipanion")),Ae=class extends He.BaseCommand{constructor(){super(...arguments);this.json=le.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=le.Option.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=le.Option.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=le.Option.Rest()}async execute(){let t=await ae.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ae.Project.find(t,this.context.cwd),s=await ae.Cache.find(t);await r.restoreInstallState({restoreResolutions:!1});let a;if(this.all)a=new Set(r.workspaces);else if(this.workspaces.length===0){if(!n)throw new He.WorkspaceRequiredError(r.cwd,this.context.cwd);a=new Set([n])}else a=new Set(this.workspaces.map(o=>r.getWorkspaceByIdent(nt.structUtils.parseIdent(o))));for(let o of a)for(let h of this.production?["dependencies"]:ae.Manifest.hardDependencies)for(let g of o.manifest.getForScope(h).values()){let f=r.tryWorkspaceByDescriptor(g);f!==null&&a.add(f)}for(let o of r.workspaces)a.has(o)?this.production&&o.manifest.devDependencies.clear():(o.manifest.installConfig=o.manifest.installConfig||{},o.manifest.installConfig.selfReferences=!1,o.manifest.dependencies.clear(),o.manifest.devDependencies.clear(),o.manifest.peerDependencies.clear(),o.manifest.scripts.clear());return(await ae.StreamReport.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!0},async o=>{await r.install({cache:s,report:o,persistProject:!1})})).exitCode()}};Ae.paths=[["workspaces","focus"]],Ae.usage=le.Command.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});var st=Ae;var Ie=X(require("@yarnpkg/cli")),ge=X(require("@yarnpkg/core")),Ee=X(require("@yarnpkg/core")),Y=X(require("@yarnpkg/core")),Rr=X(require("@yarnpkg/plugin-git")),U=X(require("clipanion")),Be=X(hr()),yr=X(require("os")),br=X(Ar()),re=X(require("typanion")),xe=class extends Ie.BaseCommand{constructor(){super(...arguments);this.recursive=U.Option.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.from=U.Option.Array("--from",[],{description:"An array of glob pattern idents from which to base any recursion"});this.all=U.Option.Boolean("-A,--all",!1,{description:"Run the command on all workspaces of a project"});this.verbose=U.Option.Boolean("-v,--verbose",!1,{description:"Prefix each output line with the name of the originating workspace"});this.parallel=U.Option.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=U.Option.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=U.Option.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:re.isOneOf([re.isEnum(["unlimited"]),re.applyCascade(re.isNumber(),[re.isInteger(),re.isAtLeast(1)])])});this.topological=U.Option.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=U.Option.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=U.Option.Array("--include",[],{description:"An array of glob pattern idents; only matching workspaces will be traversed"});this.exclude=U.Option.Array("--exclude",[],{description:"An array of glob pattern idents; matching workspaces won't be traversed"});this.publicOnly=U.Option.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=U.Option.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.commandName=U.Option.String();this.args=U.Option.Proxy()}async execute(){let t=await ge.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ge.Project.find(t,this.context.cwd);if(!this.all&&!n)throw new Ie.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState();let s=this.cli.process([this.commandName,...this.args]),a=s.path.length===1&&s.path[0]==="run"&&typeof s.scriptName!="undefined"?s.scriptName:null;if(s.path.length===0)throw new U.UsageError("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let i=this.all?r.topLevelWorkspace:n,o=this.since?Array.from(await Rr.gitUtils.fetchChangedWorkspaces({ref:this.since,project:r})):[i,...this.from.length>0?i.getRecursiveWorkspaceChildren():[]],h=E=>Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.from),g=this.from.length>0?o.filter(h):o,f=new Set([...g,...g.map(E=>[...this.recursive?this.since?E.getRecursiveWorkspaceDependents():E.getRecursiveWorkspaceDependencies():E.getRecursiveWorkspaceChildren()]).flat()]),A=[],p=!1;if(a==null?void 0:a.includes(":")){for(let E of r.workspaces)if(E.manifest.scripts.has(a)&&(p=!p,p===!1))break}for(let E of f)a&&!E.manifest.scripts.has(a)&&!p&&!(await ge.scriptUtils.getWorkspaceAccessibleBinaries(E)).has(a)||a===process.env.npm_lifecycle_event&&E.cwd===n.cwd||this.include.length>0&&!Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.include)||this.exclude.length>0&&Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.exclude)||this.publicOnly&&E.manifest.private===!0||A.push(E);let k=this.parallel?this.jobs==="unlimited"?Infinity:Number(this.jobs)||Math.max(1,(0,yr.cpus)().length/2):1,y=k===1?!1:this.parallel,R=y?this.interlaced:!0,_=(0,br.default)(k),x=new Map,T=new Set,O=0,W=null,G=!1,ne=await Ee.StreamReport.start({configuration:t,stdout:this.context.stdout},async E=>{let b=async(C,{commandIndex:M})=>{if(G)return-1;!y&&this.verbose&&M>1&&E.reportSeparator();let l=zn(C,{configuration:t,verbose:this.verbose,commandIndex:M}),[H,w]=_r(E,{prefix:l,interlaced:R}),[j,c]=_r(E,{prefix:l,interlaced:R});try{this.verbose&&E.reportInfo(null,`${l} Process started`);let u=Date.now(),I=await this.cli.run([this.commandName,...this.args],{cwd:C.cwd,stdout:H,stderr:j})||0;H.end(),j.end(),await w,await c;let $=Date.now();if(this.verbose){let ee=t.get("enableTimers")?`, completed in ${Y.formatUtils.pretty(t,$-u,Y.formatUtils.Type.DURATION)}`:"";E.reportInfo(null,`${l} Process exited (exit code ${I})${ee}`)}return I===130&&(G=!0,W=I),I}catch(u){throw H.end(),j.end(),await w,await c,u}};for(let C of A)x.set(C.anchoredLocator.locatorHash,C);for(;x.size>0&&!E.hasErrors();){let C=[];for(let[H,w]of x){if(T.has(w.anchoredDescriptor.descriptorHash))continue;let j=!0;if(this.topological||this.topologicalDev){let c=this.topologicalDev?new Map([...w.manifest.dependencies,...w.manifest.devDependencies]):w.manifest.dependencies;for(let u of c.values()){let I=r.tryWorkspaceByDescriptor(u);if(j=I===null||!x.has(I.anchoredLocator.locatorHash),!j)break}}if(!!j&&(T.add(w.anchoredDescriptor.descriptorHash),C.push(_(async()=>{let c=await b(w,{commandIndex:++O});return x.delete(H),T.delete(w.anchoredDescriptor.descriptorHash),c})),!y))break}if(C.length===0){let H=Array.from(x.values()).map(w=>Y.structUtils.prettyLocator(t,w.anchoredLocator)).join(", ");E.reportError(Ee.MessageName.CYCLIC_DEPENDENCIES,`Dependency cycle detected (${H})`);return}let l=(await Promise.all(C)).find(H=>H!==0);W===null&&(W=typeof l!="undefined"?1:W),(this.topological||this.topologicalDev)&&typeof l!="undefined"&&E.reportError(Ee.MessageName.UNNAMED,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return W!==null?W:ne.exitCode()}};xe.paths=[["workspaces","foreach"]],xe.usage=U.Command.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project. By default yarn runs the command only on current and all its descendant workspaces.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n Adding the `-v,--verbose` flag will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]});var Er=xe;function _r(e,{prefix:t,interlaced:r}){let n=e.createStreamReporter(t),s=new Y.miscUtils.DefaultStream;s.pipe(n,{end:!1}),s.on("finish",()=>{n.end()});let a=new Promise(o=>{n.on("finish",()=>{o(s.active)})});if(r)return[s,a];let i=new Y.miscUtils.BufferStream;return i.pipe(s,{end:!1}),i.on("finish",()=>{s.end()}),[i,a]}function zn(e,{configuration:t,commandIndex:r,verbose:n}){if(!n)return null;let s=Y.structUtils.convertToIdent(e.locator),i=`[${Y.structUtils.stringifyIdent(s)}]:`,o=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],h=o[r%o.length];return Y.formatUtils.pretty(t,i,h)}var Jn={commands:[st,Er]},es=Jn;return Vn;})(); +var plugin=(()=>{var yr=Object.create;var we=Object.defineProperty;var _r=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var br=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty;var W=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var q=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Cr=(e,r)=>{for(var t in r)we(e,t,{get:r[t],enumerable:!0})},Je=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Er(r))!xr.call(e,s)&&s!==t&&we(e,s,{get:()=>r[s],enumerable:!(n=_r(r,s))||n.enumerable});return e};var Be=(e,r,t)=>(t=e!=null?yr(br(e)):{},Je(r||!e||!e.__esModule?we(t,"default",{value:e,enumerable:!0}):t,e)),wr=e=>Je(we({},"__esModule",{value:!0}),e);var ve=q(ee=>{"use strict";ee.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ee.find=(e,r)=>e.nodes.find(t=>t.type===r);ee.exceedsLimit=(e,r,t=1,n)=>n===!1||!ee.isInteger(e)||!ee.isInteger(r)?!1:(Number(r)-Number(e))/Number(t)>=n;ee.escapeNode=(e,r=0,t)=>{let n=e.nodes[r];!n||(t&&n.type===t||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};ee.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;ee.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;ee.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ee.reduce=e=>e.reduce((r,t)=>(t.type==="text"&&r.push(t.value),t.type==="range"&&(t.type="text"),r),[]);ee.flatten=(...e)=>{let r=[],t=n=>{for(let s=0;s{"use strict";var tt=ve();rt.exports=(e,r={})=>{let t=(n,s={})=>{let i=r.escapeInvalid&&tt.isInvalidBrace(s),a=n.invalid===!0&&r.escapeInvalid===!0,c="";if(n.value)return(i||a)&&tt.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let p of n.nodes)c+=t(p);return c};return t(e)}});var st=q((Vn,nt)=>{"use strict";nt.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var ht=q((Jn,pt)=>{"use strict";var at=st(),le=(e,r,t)=>{if(at(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(r===void 0||e===r)return String(e);if(at(r)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...t};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),i=String(n.shorthand),a=String(n.capture),c=String(n.wrap),p=e+":"+r+"="+s+i+a+c;if(le.cache.hasOwnProperty(p))return le.cache[p].result;let m=Math.min(e,r),h=Math.max(e,r);if(Math.abs(m-h)===1){let y=e+"|"+r;return n.capture?`(${y})`:n.wrap===!1?y:`(?:${y})`}let R=ft(e)||ft(r),f={min:e,max:r,a:m,b:h},$=[],_=[];if(R&&(f.isPadded=R,f.maxLen=String(f.max).length),m<0){let y=h<0?Math.abs(h):1;_=it(y,Math.abs(m),f,n),m=f.a=0}return h>=0&&($=it(m,h,f,n)),f.negatives=_,f.positives=$,f.result=Sr(_,$,n),n.capture===!0?f.result=`(${f.result})`:n.wrap!==!1&&$.length+_.length>1&&(f.result=`(?:${f.result})`),le.cache[p]=f,f.result};function Sr(e,r,t){let n=Pe(e,r,"-",!1,t)||[],s=Pe(r,e,"",!1,t)||[],i=Pe(e,r,"-?",!0,t)||[];return n.concat(i).concat(s).join("|")}function vr(e,r){let t=1,n=1,s=ut(e,t),i=new Set([r]);for(;e<=s&&s<=r;)i.add(s),t+=1,s=ut(e,t);for(s=ct(r+1,n)-1;e1&&c.count.pop(),c.count.push(h.count[0]),c.string=c.pattern+lt(c.count),a=m+1;continue}t.isPadded&&(R=Lr(m,t,n)),h.string=R+h.pattern+lt(h.count),i.push(h),a=m+1,c=h}return i}function Pe(e,r,t,n,s){let i=[];for(let a of e){let{string:c}=a;!n&&!ot(r,"string",c)&&i.push(t+c),n&&ot(r,"string",c)&&i.push(t+c)}return i}function $r(e,r){let t=[];for(let n=0;nr?1:r>e?-1:0}function ot(e,r,t){return e.some(n=>n[r]===t)}function ut(e,r){return Number(String(e).slice(0,-r)+"9".repeat(r))}function ct(e,r){return e-e%Math.pow(10,r)}function lt(e){let[r=0,t=""]=e;return t||r>1?`{${r+(t?","+t:"")}}`:""}function kr(e,r,t){return`[${e}${r-e===1?"":"-"}${r}]`}function ft(e){return/^-?(0+)\d/.test(e)}function Lr(e,r,t){if(!r.isPadded)return e;let n=Math.abs(r.maxLen-String(e).length),s=t.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}le.cache={};le.clearCache=()=>le.cache={};pt.exports=le});var Ue=q((es,Et)=>{"use strict";var Or=W("util"),At=ht(),dt=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Nr=e=>r=>e===!0?Number(r):String(r),Me=e=>typeof e=="number"||typeof e=="string"&&e!=="",Ae=e=>Number.isInteger(+e),De=e=>{let r=`${e}`,t=-1;if(r[0]==="-"&&(r=r.slice(1)),r==="0")return!1;for(;r[++t]==="0";);return t>0},Ir=(e,r,t)=>typeof e=="string"||typeof r=="string"?!0:t.stringify===!0,Br=(e,r,t)=>{if(r>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?r-1:r,"0")}return t===!1?String(e):e},gt=(e,r)=>{let t=e[0]==="-"?"-":"";for(t&&(e=e.slice(1),r--);e.length{e.negatives.sort((a,c)=>ac?1:0),e.positives.sort((a,c)=>ac?1:0);let t=r.capture?"":"?:",n="",s="",i;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(s=`-(${t}${e.negatives.join("|")})`),n&&s?i=`${n}|${s}`:i=n||s,r.wrap?`(${t}${i})`:i},mt=(e,r,t,n)=>{if(t)return At(e,r,{wrap:!1,...n});let s=String.fromCharCode(e);if(e===r)return s;let i=String.fromCharCode(r);return`[${s}-${i}]`},Rt=(e,r,t)=>{if(Array.isArray(e)){let n=t.wrap===!0,s=t.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return At(e,r,t)},yt=(...e)=>new RangeError("Invalid range arguments: "+Or.inspect(...e)),_t=(e,r,t)=>{if(t.strictRanges===!0)throw yt([e,r]);return[]},Mr=(e,r)=>{if(r.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Dr=(e,r,t=1,n={})=>{let s=Number(e),i=Number(r);if(!Number.isInteger(s)||!Number.isInteger(i)){if(n.strictRanges===!0)throw yt([e,r]);return[]}s===0&&(s=0),i===0&&(i=0);let a=s>i,c=String(e),p=String(r),m=String(t);t=Math.max(Math.abs(t),1);let h=De(c)||De(p)||De(m),R=h?Math.max(c.length,p.length,m.length):0,f=h===!1&&Ir(e,r,n)===!1,$=n.transform||Nr(f);if(n.toRegex&&t===1)return mt(gt(e,R),gt(r,R),!0,n);let _={negatives:[],positives:[]},y=T=>_[T<0?"negatives":"positives"].push(Math.abs(T)),E=[],S=0;for(;a?s>=i:s<=i;)n.toRegex===!0&&t>1?y(s):E.push(Br($(s,S),R,f)),s=a?s-t:s+t,S++;return n.toRegex===!0?t>1?Pr(_,n):Rt(E,null,{wrap:!1,...n}):E},Ur=(e,r,t=1,n={})=>{if(!Ae(e)&&e.length>1||!Ae(r)&&r.length>1)return _t(e,r,n);let s=n.transform||(f=>String.fromCharCode(f)),i=`${e}`.charCodeAt(0),a=`${r}`.charCodeAt(0),c=i>a,p=Math.min(i,a),m=Math.max(i,a);if(n.toRegex&&t===1)return mt(p,m,!1,n);let h=[],R=0;for(;c?i>=a:i<=a;)h.push(s(i,R)),i=c?i-t:i+t,R++;return n.toRegex===!0?Rt(h,null,{wrap:!1,options:n}):h},$e=(e,r,t,n={})=>{if(r==null&&Me(e))return[e];if(!Me(e)||!Me(r))return _t(e,r,n);if(typeof t=="function")return $e(e,r,1,{transform:t});if(dt(t))return $e(e,r,0,t);let s={...n};return s.capture===!0&&(s.wrap=!0),t=t||s.step||1,Ae(t)?Ae(e)&&Ae(r)?Dr(e,r,t,s):Ur(e,r,Math.max(Math.abs(t),1),s):t!=null&&!dt(t)?Mr(t,s):$e(e,r,1,t)};Et.exports=$e});var Ct=q((ts,xt)=>{"use strict";var Gr=Ue(),bt=ve(),qr=(e,r={})=>{let t=(n,s={})=>{let i=bt.isInvalidBrace(s),a=n.invalid===!0&&r.escapeInvalid===!0,c=i===!0||a===!0,p=r.escapeInvalid===!0?"\\":"",m="";if(n.isOpen===!0||n.isClose===!0)return p+n.value;if(n.type==="open")return c?p+n.value:"(";if(n.type==="close")return c?p+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":c?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let h=bt.reduce(n.nodes),R=Gr(...h,{...r,wrap:!1,toRegex:!0});if(R.length!==0)return h.length>1&&R.length>1?`(${R})`:R}if(n.nodes)for(let h of n.nodes)m+=t(h,n);return m};return t(e)};xt.exports=qr});var vt=q((rs,St)=>{"use strict";var Kr=Ue(),wt=He(),he=ve(),fe=(e="",r="",t=!1)=>{let n=[];if(e=[].concat(e),r=[].concat(r),!r.length)return e;if(!e.length)return t?he.flatten(r).map(s=>`{${s}}`):r;for(let s of e)if(Array.isArray(s))for(let i of s)n.push(fe(i,r,t));else for(let i of r)t===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?fe(s,i,t):s+i);return he.flatten(n)},Wr=(e,r={})=>{let t=r.rangeLimit===void 0?1e3:r.rangeLimit,n=(s,i={})=>{s.queue=[];let a=i,c=i.queue;for(;a.type!=="brace"&&a.type!=="root"&&a.parent;)a=a.parent,c=a.queue;if(s.invalid||s.dollar){c.push(fe(c.pop(),wt(s,r)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){c.push(fe(c.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let R=he.reduce(s.nodes);if(he.exceedsLimit(...R,r.step,t))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=Kr(...R,r);f.length===0&&(f=wt(s,r)),c.push(fe(c.pop(),f)),s.nodes=[];return}let p=he.encloseBrace(s),m=s.queue,h=s;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,m=h.queue;for(let R=0;R{"use strict";Ht.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` +`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Nt=q((ss,Ot)=>{"use strict";var jr=He(),{MAX_LENGTH:Tt,CHAR_BACKSLASH:Ge,CHAR_BACKTICK:Fr,CHAR_COMMA:Qr,CHAR_DOT:Xr,CHAR_LEFT_PARENTHESES:Zr,CHAR_RIGHT_PARENTHESES:Yr,CHAR_LEFT_CURLY_BRACE:zr,CHAR_RIGHT_CURLY_BRACE:Vr,CHAR_LEFT_SQUARE_BRACKET:kt,CHAR_RIGHT_SQUARE_BRACKET:Lt,CHAR_DOUBLE_QUOTE:Jr,CHAR_SINGLE_QUOTE:en,CHAR_NO_BREAK_SPACE:tn,CHAR_ZERO_WIDTH_NOBREAK_SPACE:rn}=$t(),nn=(e,r={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let t=r||{},n=typeof t.maxLength=="number"?Math.min(Tt,t.maxLength):Tt;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},i=[s],a=s,c=s,p=0,m=e.length,h=0,R=0,f,$={},_=()=>e[h++],y=E=>{if(E.type==="text"&&c.type==="dot"&&(c.type="text"),c&&c.type==="text"&&E.type==="text"){c.value+=E.value;return}return a.nodes.push(E),E.parent=a,E.prev=c,c=E,E};for(y({type:"bos"});h0){if(a.ranges>0){a.ranges=0;let E=a.nodes.shift();a.nodes=[E,{type:"text",value:jr(a)}]}y({type:"comma",value:f}),a.commas++;continue}if(f===Xr&&R>0&&a.commas===0){let E=a.nodes;if(R===0||E.length===0){y({type:"text",value:f});continue}if(c.type==="dot"){if(a.range=[],c.value+=f,c.type="range",a.nodes.length!==3&&a.nodes.length!==5){a.invalid=!0,a.ranges=0,c.type="text";continue}a.ranges++,a.args=[];continue}if(c.type==="range"){E.pop();let S=E[E.length-1];S.value+=c.value+f,c=S,a.ranges--;continue}y({type:"dot",value:f});continue}y({type:"text",value:f})}do if(a=i.pop(),a.type!=="root"){a.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let E=i[i.length-1],S=E.nodes.indexOf(a);E.nodes.splice(S,1,...a.nodes)}while(i.length>0);return y({type:"eos"}),s};Ot.exports=nn});var Pt=q((as,Bt)=>{"use strict";var It=He(),sn=Ct(),an=vt(),on=Nt(),Z=(e,r={})=>{let t=[];if(Array.isArray(e))for(let n of e){let s=Z.create(n,r);Array.isArray(s)?t.push(...s):t.push(s)}else t=[].concat(Z.create(e,r));return r&&r.expand===!0&&r.nodupes===!0&&(t=[...new Set(t)]),t};Z.parse=(e,r={})=>on(e,r);Z.stringify=(e,r={})=>It(typeof e=="string"?Z.parse(e,r):e,r);Z.compile=(e,r={})=>(typeof e=="string"&&(e=Z.parse(e,r)),sn(e,r));Z.expand=(e,r={})=>{typeof e=="string"&&(e=Z.parse(e,r));let t=an(e,r);return r.noempty===!0&&(t=t.filter(Boolean)),r.nodupes===!0&&(t=[...new Set(t)]),t};Z.create=(e,r={})=>e===""||e.length<3?[e]:r.expand!==!0?Z.compile(e,r):Z.expand(e,r);Bt.exports=Z});var me=q((is,qt)=>{"use strict";var un=W("path"),se="\\\\/",Mt=`[^${se}]`,ie="\\.",cn="\\+",ln="\\?",Te="\\/",fn="(?=.)",Dt="[^/]",qe=`(?:${Te}|$)`,Ut=`(?:^|${Te})`,Ke=`${ie}{1,2}${qe}`,pn=`(?!${ie})`,hn=`(?!${Ut}${Ke})`,dn=`(?!${ie}{0,1}${qe})`,gn=`(?!${Ke})`,An=`[^.${Te}]`,mn=`${Dt}*?`,Gt={DOT_LITERAL:ie,PLUS_LITERAL:cn,QMARK_LITERAL:ln,SLASH_LITERAL:Te,ONE_CHAR:fn,QMARK:Dt,END_ANCHOR:qe,DOTS_SLASH:Ke,NO_DOT:pn,NO_DOTS:hn,NO_DOT_SLASH:dn,NO_DOTS_SLASH:gn,QMARK_NO_DOT:An,STAR:mn,START_ANCHOR:Ut},Rn={...Gt,SLASH_LITERAL:`[${se}]`,QMARK:Mt,STAR:`${Mt}*?`,DOTS_SLASH:`${ie}{1,2}(?:[${se}]|$)`,NO_DOT:`(?!${ie})`,NO_DOTS:`(?!(?:^|[${se}])${ie}{1,2}(?:[${se}]|$))`,NO_DOT_SLASH:`(?!${ie}{0,1}(?:[${se}]|$))`,NO_DOTS_SLASH:`(?!${ie}{1,2}(?:[${se}]|$))`,QMARK_NO_DOT:`[^.${se}]`,START_ANCHOR:`(?:^|[${se}])`,END_ANCHOR:`(?:[${se}]|$)`},yn={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};qt.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:yn,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:un.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?Rn:Gt}}});var Re=q(Q=>{"use strict";var _n=W("path"),En=process.platform==="win32",{REGEX_BACKSLASH:bn,REGEX_REMOVE_BACKSLASH:xn,REGEX_SPECIAL_CHARS:Cn,REGEX_SPECIAL_CHARS_GLOBAL:wn}=me();Q.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Q.hasRegexChars=e=>Cn.test(e);Q.isRegexChar=e=>e.length===1&&Q.hasRegexChars(e);Q.escapeRegex=e=>e.replace(wn,"\\$1");Q.toPosixSlashes=e=>e.replace(bn,"/");Q.removeBackslashes=e=>e.replace(xn,r=>r==="\\"?"":r);Q.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Q.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:En===!0||_n.sep==="\\";Q.escapeLast=(e,r,t)=>{let n=e.lastIndexOf(r,t);return n===-1?e:e[n-1]==="\\"?Q.escapeLast(e,r,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Q.removePrefix=(e,r={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),r.prefix="./"),t};Q.wrapOutput=(e,r={},t={})=>{let n=t.contains?"":"^",s=t.contains?"":"$",i=`${n}(?:${e})${s}`;return r.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Yt=q((us,Zt)=>{"use strict";var Kt=Re(),{CHAR_ASTERISK:We,CHAR_AT:Sn,CHAR_BACKWARD_SLASH:ye,CHAR_COMMA:vn,CHAR_DOT:je,CHAR_EXCLAMATION_MARK:Fe,CHAR_FORWARD_SLASH:Xt,CHAR_LEFT_CURLY_BRACE:Qe,CHAR_LEFT_PARENTHESES:Xe,CHAR_LEFT_SQUARE_BRACKET:Hn,CHAR_PLUS:$n,CHAR_QUESTION_MARK:Wt,CHAR_RIGHT_CURLY_BRACE:Tn,CHAR_RIGHT_PARENTHESES:jt,CHAR_RIGHT_SQUARE_BRACKET:kn}=me(),Ft=e=>e===Xt||e===ye,Qt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},Ln=(e,r)=>{let t=r||{},n=e.length-1,s=t.parts===!0||t.scanToEnd===!0,i=[],a=[],c=[],p=e,m=-1,h=0,R=0,f=!1,$=!1,_=!1,y=!1,E=!1,S=!1,T=!1,L=!1,z=!1,I=!1,re=0,K,g,v={value:"",depth:0,isGlob:!1},k=()=>m>=n,l=()=>p.charCodeAt(m+1),H=()=>(K=g,p.charCodeAt(++m));for(;m0&&(B=p.slice(0,h),p=p.slice(h),R-=h),w&&_===!0&&R>0?(w=p.slice(0,R),o=p.slice(R)):_===!0?(w="",o=p):w=p,w&&w!==""&&w!=="/"&&w!==p&&Ft(w.charCodeAt(w.length-1))&&(w=w.slice(0,-1)),t.unescape===!0&&(o&&(o=Kt.removeBackslashes(o)),w&&T===!0&&(w=Kt.removeBackslashes(w)));let u={prefix:B,input:e,start:h,base:w,glob:o,isBrace:f,isBracket:$,isGlob:_,isExtglob:y,isGlobstar:E,negated:L,negatedExtglob:z};if(t.tokens===!0&&(u.maxDepth=0,Ft(g)||a.push(v),u.tokens=a),t.parts===!0||t.tokens===!0){let P;for(let b=0;b{"use strict";var ke=me(),Y=Re(),{MAX_LENGTH:Le,POSIX_REGEX_SOURCE:On,REGEX_NON_SPECIAL_CHARS:Nn,REGEX_SPECIAL_CHARS_BACKREF:In,REPLACEMENTS:zt}=ke,Bn=(e,r)=>{if(typeof r.expandRange=="function")return r.expandRange(...e,r);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(s=>Y.escapeRegex(s)).join("..")}return t},de=(e,r)=>`Missing ${e}: "${r}" - use "\\\\${r}" to match literal characters`,Vt=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=zt[e]||e;let t={...r},n=typeof t.maxLength=="number"?Math.min(Le,t.maxLength):Le,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let i={type:"bos",value:"",output:t.prepend||""},a=[i],c=t.capture?"":"?:",p=Y.isWindows(r),m=ke.globChars(p),h=ke.extglobChars(m),{DOT_LITERAL:R,PLUS_LITERAL:f,SLASH_LITERAL:$,ONE_CHAR:_,DOTS_SLASH:y,NO_DOT:E,NO_DOT_SLASH:S,NO_DOTS_SLASH:T,QMARK:L,QMARK_NO_DOT:z,STAR:I,START_ANCHOR:re}=m,K=A=>`(${c}(?:(?!${re}${A.dot?y:R}).)*?)`,g=t.dot?"":E,v=t.dot?L:z,k=t.bash===!0?K(t):I;t.capture&&(k=`(${k})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let l={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};e=Y.removePrefix(e,l),s=e.length;let H=[],w=[],B=[],o=i,u,P=()=>l.index===s-1,b=l.peek=(A=1)=>e[l.index+A],V=l.advance=()=>e[++l.index]||"",J=()=>e.slice(l.index+1),X=(A="",O=0)=>{l.consumed+=A,l.index+=O},Ee=A=>{l.output+=A.output!=null?A.output:A.value,X(A.value)},mr=()=>{let A=1;for(;b()==="!"&&(b(2)!=="("||b(3)==="?");)V(),l.start++,A++;return A%2===0?!1:(l.negated=!0,l.start++,!0)},be=A=>{l[A]++,B.push(A)},oe=A=>{l[A]--,B.pop()},C=A=>{if(o.type==="globstar"){let O=l.braces>0&&(A.type==="comma"||A.type==="brace"),d=A.extglob===!0||H.length&&(A.type==="pipe"||A.type==="paren");A.type!=="slash"&&A.type!=="paren"&&!O&&!d&&(l.output=l.output.slice(0,-o.output.length),o.type="star",o.value="*",o.output=k,l.output+=o.output)}if(H.length&&A.type!=="paren"&&(H[H.length-1].inner+=A.value),(A.value||A.output)&&Ee(A),o&&o.type==="text"&&A.type==="text"){o.value+=A.value,o.output=(o.output||"")+A.value;return}A.prev=o,a.push(A),o=A},xe=(A,O)=>{let d={...h[O],conditions:1,inner:""};d.prev=o,d.parens=l.parens,d.output=l.output;let x=(t.capture?"(":"")+d.open;be("parens"),C({type:A,value:O,output:l.output?"":_}),C({type:"paren",extglob:!0,value:V(),output:x}),H.push(d)},Rr=A=>{let O=A.close+(t.capture?")":""),d;if(A.type==="negate"){let x=k;A.inner&&A.inner.length>1&&A.inner.includes("/")&&(x=K(t)),(x!==k||P()||/^\)+$/.test(J()))&&(O=A.close=`)$))${x}`),A.inner.includes("*")&&(d=J())&&/^\.[^\\/.]+$/.test(d)&&(O=A.close=`)${d})${x})`),A.prev.type==="bos"&&(l.negatedExtglob=!0)}C({type:"paren",extglob:!0,value:u,output:O}),oe("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let A=!1,O=e.replace(In,(d,x,M,j,G,Ie)=>j==="\\"?(A=!0,d):j==="?"?x?x+j+(G?L.repeat(G.length):""):Ie===0?v+(G?L.repeat(G.length):""):L.repeat(M.length):j==="."?R.repeat(M.length):j==="*"?x?x+j+(G?k:""):k:x?d:`\\${d}`);return A===!0&&(t.unescape===!0?O=O.replace(/\\/g,""):O=O.replace(/\\+/g,d=>d.length%2===0?"\\\\":d?"\\":"")),O===e&&t.contains===!0?(l.output=e,l):(l.output=Y.wrapOutput(O,l,r),l)}for(;!P();){if(u=V(),u==="\0")continue;if(u==="\\"){let d=b();if(d==="/"&&t.bash!==!0||d==="."||d===";")continue;if(!d){u+="\\",C({type:"text",value:u});continue}let x=/^\\+/.exec(J()),M=0;if(x&&x[0].length>2&&(M=x[0].length,l.index+=M,M%2!==0&&(u+="\\")),t.unescape===!0?u=V():u+=V(),l.brackets===0){C({type:"text",value:u});continue}}if(l.brackets>0&&(u!=="]"||o.value==="["||o.value==="[^")){if(t.posix!==!1&&u===":"){let d=o.value.slice(1);if(d.includes("[")&&(o.posix=!0,d.includes(":"))){let x=o.value.lastIndexOf("["),M=o.value.slice(0,x),j=o.value.slice(x+2),G=On[j];if(G){o.value=M+G,l.backtrack=!0,V(),!i.output&&a.indexOf(o)===1&&(i.output=_);continue}}}(u==="["&&b()!==":"||u==="-"&&b()==="]")&&(u=`\\${u}`),u==="]"&&(o.value==="["||o.value==="[^")&&(u=`\\${u}`),t.posix===!0&&u==="!"&&o.value==="["&&(u="^"),o.value+=u,Ee({value:u});continue}if(l.quotes===1&&u!=='"'){u=Y.escapeRegex(u),o.value+=u,Ee({value:u});continue}if(u==='"'){l.quotes=l.quotes===1?0:1,t.keepQuotes===!0&&C({type:"text",value:u});continue}if(u==="("){be("parens"),C({type:"paren",value:u});continue}if(u===")"){if(l.parens===0&&t.strictBrackets===!0)throw new SyntaxError(de("opening","("));let d=H[H.length-1];if(d&&l.parens===d.parens+1){Rr(H.pop());continue}C({type:"paren",value:u,output:l.parens?")":"\\)"}),oe("parens");continue}if(u==="["){if(t.nobracket===!0||!J().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(de("closing","]"));u=`\\${u}`}else be("brackets");C({type:"bracket",value:u});continue}if(u==="]"){if(t.nobracket===!0||o&&o.type==="bracket"&&o.value.length===1){C({type:"text",value:u,output:`\\${u}`});continue}if(l.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(de("opening","["));C({type:"text",value:u,output:`\\${u}`});continue}oe("brackets");let d=o.value.slice(1);if(o.posix!==!0&&d[0]==="^"&&!d.includes("/")&&(u=`/${u}`),o.value+=u,Ee({value:u}),t.literalBrackets===!1||Y.hasRegexChars(d))continue;let x=Y.escapeRegex(o.value);if(l.output=l.output.slice(0,-o.value.length),t.literalBrackets===!0){l.output+=x,o.value=x;continue}o.value=`(${c}${x}|${o.value})`,l.output+=o.value;continue}if(u==="{"&&t.nobrace!==!0){be("braces");let d={type:"brace",value:u,output:"(",outputIndex:l.output.length,tokensIndex:l.tokens.length};w.push(d),C(d);continue}if(u==="}"){let d=w[w.length-1];if(t.nobrace===!0||!d){C({type:"text",value:u,output:u});continue}let x=")";if(d.dots===!0){let M=a.slice(),j=[];for(let G=M.length-1;G>=0&&(a.pop(),M[G].type!=="brace");G--)M[G].type!=="dots"&&j.unshift(M[G].value);x=Bn(j,t),l.backtrack=!0}if(d.comma!==!0&&d.dots!==!0){let M=l.output.slice(0,d.outputIndex),j=l.tokens.slice(d.tokensIndex);d.value=d.output="\\{",u=x="\\}",l.output=M;for(let G of j)l.output+=G.output||G.value}C({type:"brace",value:u,output:x}),oe("braces"),w.pop();continue}if(u==="|"){H.length>0&&H[H.length-1].conditions++,C({type:"text",value:u});continue}if(u===","){let d=u,x=w[w.length-1];x&&B[B.length-1]==="braces"&&(x.comma=!0,d="|"),C({type:"comma",value:u,output:d});continue}if(u==="/"){if(o.type==="dot"&&l.index===l.start+1){l.start=l.index+1,l.consumed="",l.output="",a.pop(),o=i;continue}C({type:"slash",value:u,output:$});continue}if(u==="."){if(l.braces>0&&o.type==="dot"){o.value==="."&&(o.output=R);let d=w[w.length-1];o.type="dots",o.output+=u,o.value+=u,d.dots=!0;continue}if(l.braces+l.parens===0&&o.type!=="bos"&&o.type!=="slash"){C({type:"text",value:u,output:R});continue}C({type:"dot",value:u,output:R});continue}if(u==="?"){if(!(o&&o.value==="(")&&t.noextglob!==!0&&b()==="("&&b(2)!=="?"){xe("qmark",u);continue}if(o&&o.type==="paren"){let x=b(),M=u;if(x==="<"&&!Y.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(o.value==="("&&!/[!=<:]/.test(x)||x==="<"&&!/<([!=]|\w+>)/.test(J()))&&(M=`\\${u}`),C({type:"text",value:u,output:M});continue}if(t.dot!==!0&&(o.type==="slash"||o.type==="bos")){C({type:"qmark",value:u,output:z});continue}C({type:"qmark",value:u,output:L});continue}if(u==="!"){if(t.noextglob!==!0&&b()==="("&&(b(2)!=="?"||!/[!=<:]/.test(b(3)))){xe("negate",u);continue}if(t.nonegate!==!0&&l.index===0){mr();continue}}if(u==="+"){if(t.noextglob!==!0&&b()==="("&&b(2)!=="?"){xe("plus",u);continue}if(o&&o.value==="("||t.regex===!1){C({type:"plus",value:u,output:f});continue}if(o&&(o.type==="bracket"||o.type==="paren"||o.type==="brace")||l.parens>0){C({type:"plus",value:u});continue}C({type:"plus",value:f});continue}if(u==="@"){if(t.noextglob!==!0&&b()==="("&&b(2)!=="?"){C({type:"at",extglob:!0,value:u,output:""});continue}C({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);let d=Nn.exec(J());d&&(u+=d[0],l.index+=d[0].length),C({type:"text",value:u});continue}if(o&&(o.type==="globstar"||o.star===!0)){o.type="star",o.star=!0,o.value+=u,o.output=k,l.backtrack=!0,l.globstar=!0,X(u);continue}let A=J();if(t.noextglob!==!0&&/^\([^?]/.test(A)){xe("star",u);continue}if(o.type==="star"){if(t.noglobstar===!0){X(u);continue}let d=o.prev,x=d.prev,M=d.type==="slash"||d.type==="bos",j=x&&(x.type==="star"||x.type==="globstar");if(t.bash===!0&&(!M||A[0]&&A[0]!=="/")){C({type:"star",value:u,output:""});continue}let G=l.braces>0&&(d.type==="comma"||d.type==="brace"),Ie=H.length&&(d.type==="pipe"||d.type==="paren");if(!M&&d.type!=="paren"&&!G&&!Ie){C({type:"star",value:u,output:""});continue}for(;A.slice(0,3)==="/**";){let Ce=e[l.index+4];if(Ce&&Ce!=="/")break;A=A.slice(3),X("/**",3)}if(d.type==="bos"&&P()){o.type="globstar",o.value+=u,o.output=K(t),l.output=o.output,l.globstar=!0,X(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&!j&&P()){l.output=l.output.slice(0,-(d.output+o.output).length),d.output=`(?:${d.output}`,o.type="globstar",o.output=K(t)+(t.strictSlashes?")":"|$)"),o.value+=u,l.globstar=!0,l.output+=d.output+o.output,X(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&A[0]==="/"){let Ce=A[1]!==void 0?"|$":"";l.output=l.output.slice(0,-(d.output+o.output).length),d.output=`(?:${d.output}`,o.type="globstar",o.output=`${K(t)}${$}|${$}${Ce})`,o.value+=u,l.output+=d.output+o.output,l.globstar=!0,X(u+V()),C({type:"slash",value:"/",output:""});continue}if(d.type==="bos"&&A[0]==="/"){o.type="globstar",o.value+=u,o.output=`(?:^|${$}|${K(t)}${$})`,l.output=o.output,l.globstar=!0,X(u+V()),C({type:"slash",value:"/",output:""});continue}l.output=l.output.slice(0,-o.output.length),o.type="globstar",o.output=K(t),o.value+=u,l.output+=o.output,l.globstar=!0,X(u);continue}let O={type:"star",value:u,output:k};if(t.bash===!0){O.output=".*?",(o.type==="bos"||o.type==="slash")&&(O.output=g+O.output),C(O);continue}if(o&&(o.type==="bracket"||o.type==="paren")&&t.regex===!0){O.output=u,C(O);continue}(l.index===l.start||o.type==="slash"||o.type==="dot")&&(o.type==="dot"?(l.output+=S,o.output+=S):t.dot===!0?(l.output+=T,o.output+=T):(l.output+=g,o.output+=g),b()!=="*"&&(l.output+=_,o.output+=_)),C(O)}for(;l.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(de("closing","]"));l.output=Y.escapeLast(l.output,"["),oe("brackets")}for(;l.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(de("closing",")"));l.output=Y.escapeLast(l.output,"("),oe("parens")}for(;l.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(de("closing","}"));l.output=Y.escapeLast(l.output,"{"),oe("braces")}if(t.strictSlashes!==!0&&(o.type==="star"||o.type==="bracket")&&C({type:"maybe_slash",value:"",output:`${$}?`}),l.backtrack===!0){l.output="";for(let A of l.tokens)l.output+=A.output!=null?A.output:A.value,A.suffix&&(l.output+=A.suffix)}return l};Vt.fastpaths=(e,r)=>{let t={...r},n=typeof t.maxLength=="number"?Math.min(Le,t.maxLength):Le,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=zt[e]||e;let i=Y.isWindows(r),{DOT_LITERAL:a,SLASH_LITERAL:c,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:h,NO_DOTS:R,NO_DOTS_SLASH:f,STAR:$,START_ANCHOR:_}=ke.globChars(i),y=t.dot?R:h,E=t.dot?f:h,S=t.capture?"":"?:",T={negated:!1,prefix:""},L=t.bash===!0?".*?":$;t.capture&&(L=`(${L})`);let z=g=>g.noglobstar===!0?L:`(${S}(?:(?!${_}${g.dot?m:a}).)*?)`,I=g=>{switch(g){case"*":return`${y}${p}${L}`;case".*":return`${a}${p}${L}`;case"*.*":return`${y}${L}${a}${p}${L}`;case"*/*":return`${y}${L}${c}${p}${E}${L}`;case"**":return y+z(t);case"**/*":return`(?:${y}${z(t)}${c})?${E}${p}${L}`;case"**/*.*":return`(?:${y}${z(t)}${c})?${E}${L}${a}${p}${L}`;case"**/.*":return`(?:${y}${z(t)}${c})?${a}${p}${L}`;default:{let v=/^(.*?)\.(\w+)$/.exec(g);if(!v)return;let k=I(v[1]);return k?k+a+v[2]:void 0}}},re=Y.removePrefix(e,T),K=I(re);return K&&t.strictSlashes!==!0&&(K+=`${c}?`),K};Jt.exports=Vt});var rr=q((ls,tr)=>{"use strict";var Pn=W("path"),Mn=Yt(),Ze=er(),Ye=Re(),Dn=me(),Un=e=>e&&typeof e=="object"&&!Array.isArray(e),D=(e,r,t=!1)=>{if(Array.isArray(e)){let h=e.map(f=>D(f,r,t));return f=>{for(let $ of h){let _=$(f);if(_)return _}return!1}}let n=Un(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=r||{},i=Ye.isWindows(r),a=n?D.compileRe(e,r):D.makeRe(e,r,!1,!0),c=a.state;delete a.state;let p=()=>!1;if(s.ignore){let h={...r,ignore:null,onMatch:null,onResult:null};p=D(s.ignore,h,t)}let m=(h,R=!1)=>{let{isMatch:f,match:$,output:_}=D.test(h,a,r,{glob:e,posix:i}),y={glob:e,state:c,regex:a,posix:i,input:h,output:_,match:$,isMatch:f};return typeof s.onResult=="function"&&s.onResult(y),f===!1?(y.isMatch=!1,R?y:!1):p(h)?(typeof s.onIgnore=="function"&&s.onIgnore(y),y.isMatch=!1,R?y:!1):(typeof s.onMatch=="function"&&s.onMatch(y),R?y:!0)};return t&&(m.state=c),m};D.test=(e,r,t,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=t||{},a=i.format||(s?Ye.toPosixSlashes:null),c=e===n,p=c&&a?a(e):e;return c===!1&&(p=a?a(e):e,c=p===n),(c===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?c=D.matchBase(e,r,t,s):c=r.exec(p)),{isMatch:Boolean(c),match:c,output:p}};D.matchBase=(e,r,t,n=Ye.isWindows(t))=>(r instanceof RegExp?r:D.makeRe(r,t)).test(Pn.basename(e));D.isMatch=(e,r,t)=>D(r,t)(e);D.parse=(e,r)=>Array.isArray(e)?e.map(t=>D.parse(t,r)):Ze(e,{...r,fastpaths:!1});D.scan=(e,r)=>Mn(e,r);D.compileRe=(e,r,t=!1,n=!1)=>{if(t===!0)return e.output;let s=r||{},i=s.contains?"":"^",a=s.contains?"":"$",c=`${i}(?:${e.output})${a}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let p=D.toRegex(c,r);return n===!0&&(p.state=e),p};D.makeRe=(e,r={},t=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return r.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Ze.fastpaths(e,r)),s.output||(s=Ze(e,r)),D.compileRe(s,r,t,n)};D.toRegex=(e,r)=>{try{let t=r||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(r&&r.debug===!0)throw t;return/$^/}};D.constants=Dn;tr.exports=D});var sr=q((fs,nr)=>{"use strict";nr.exports=rr()});var cr=q((ps,ur)=>{"use strict";var ir=W("util"),or=Pt(),ae=sr(),ze=Re(),ar=e=>e===""||e==="./",N=(e,r,t)=>{r=[].concat(r),e=[].concat(e);let n=new Set,s=new Set,i=new Set,a=0,c=h=>{i.add(h.output),t&&t.onResult&&t.onResult(h)};for(let h=0;h!n.has(h));if(t&&m.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${r.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?r.map(h=>h.replace(/\\/g,"")):r}return m};N.match=N;N.matcher=(e,r)=>ae(e,r);N.isMatch=(e,r,t)=>ae(r,t)(e);N.any=N.isMatch;N.not=(e,r,t={})=>{r=[].concat(r).map(String);let n=new Set,s=[],a=N(e,r,{...t,onResult:c=>{t.onResult&&t.onResult(c),s.push(c.output)}});for(let c of s)a.includes(c)||n.add(c);return[...n]};N.contains=(e,r,t)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${ir.inspect(e)}"`);if(Array.isArray(r))return r.some(n=>N.contains(e,n,t));if(typeof r=="string"){if(ar(e)||ar(r))return!1;if(e.includes(r)||e.startsWith("./")&&e.slice(2).includes(r))return!0}return N.isMatch(e,r,{...t,contains:!0})};N.matchKeys=(e,r,t)=>{if(!ze.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=N(Object.keys(e),r,t),s={};for(let i of n)s[i]=e[i];return s};N.some=(e,r,t)=>{let n=[].concat(e);for(let s of[].concat(r)){let i=ae(String(s),t);if(n.some(a=>i(a)))return!0}return!1};N.every=(e,r,t)=>{let n=[].concat(e);for(let s of[].concat(r)){let i=ae(String(s),t);if(!n.every(a=>i(a)))return!1}return!0};N.all=(e,r,t)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${ir.inspect(e)}"`);return[].concat(r).every(n=>ae(n,t)(e))};N.capture=(e,r,t)=>{let n=ze.isWindows(t),i=ae.makeRe(String(e),{...t,capture:!0}).exec(n?ze.toPosixSlashes(r):r);if(i)return i.slice(1).map(a=>a===void 0?"":a)};N.makeRe=(...e)=>ae.makeRe(...e);N.scan=(...e)=>ae.scan(...e);N.parse=(e,r)=>{let t=[];for(let n of[].concat(e||[]))for(let s of or(String(n),r))t.push(ae.parse(s,r));return t};N.braces=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a string");return r&&r.nobrace===!0||!/\{.*\}/.test(e)?[e]:or(e,r)};N.braceExpand=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a string");return N.braces(e,{...r,expand:!0})};ur.exports=N});var fr=q((hs,lr)=>{"use strict";lr.exports=(e,...r)=>new Promise(t=>{t(e(...r))})});var hr=q((ds,Ve)=>{"use strict";var Gn=fr(),pr=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let r=[],t=0,n=()=>{t--,r.length>0&&r.shift()()},s=(c,p,...m)=>{t++;let h=Gn(c,...m);p(h),h.then(n,n)},i=(c,p,...m)=>{tnew Promise(m=>i(c,m,...p));return Object.defineProperties(a,{activeCount:{get:()=>t},pendingCount:{get:()=>r.length}}),a};Ve.exports=pr;Ve.exports.default=pr});var jn={};Cr(jn,{default:()=>Wn});var Se=W("@yarnpkg/cli"),ne=W("@yarnpkg/core"),et=W("@yarnpkg/core"),ue=W("clipanion"),ce=class extends Se.BaseCommand{constructor(){super(...arguments);this.json=ue.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=ue.Option.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=ue.Option.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=ue.Option.Rest()}async execute(){let t=await ne.Configuration.find(this.context.cwd,this.context.plugins),{project:n,workspace:s}=await ne.Project.find(t,this.context.cwd),i=await ne.Cache.find(t);await n.restoreInstallState({restoreResolutions:!1});let a;if(this.all)a=new Set(n.workspaces);else if(this.workspaces.length===0){if(!s)throw new Se.WorkspaceRequiredError(n.cwd,this.context.cwd);a=new Set([s])}else a=new Set(this.workspaces.map(p=>n.getWorkspaceByIdent(et.structUtils.parseIdent(p))));for(let p of a)for(let m of this.production?["dependencies"]:ne.Manifest.hardDependencies)for(let h of p.manifest.getForScope(m).values()){let R=n.tryWorkspaceByDescriptor(h);R!==null&&a.add(R)}for(let p of n.workspaces)a.has(p)?this.production&&p.manifest.devDependencies.clear():(p.manifest.installConfig=p.manifest.installConfig||{},p.manifest.installConfig.selfReferences=!1,p.manifest.dependencies.clear(),p.manifest.devDependencies.clear(),p.manifest.peerDependencies.clear(),p.manifest.scripts.clear());return(await ne.StreamReport.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!0},async p=>{await n.install({cache:i,report:p,persistProject:!1})})).exitCode()}};ce.paths=[["workspaces","focus"]],ce.usage=ue.Command.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});var Ne=W("@yarnpkg/cli"),ge=W("@yarnpkg/core"),_e=W("@yarnpkg/core"),F=W("@yarnpkg/core"),gr=W("@yarnpkg/plugin-git"),U=W("clipanion"),Oe=Be(cr()),Ar=Be(hr()),te=Be(W("typanion")),pe=class extends Ne.BaseCommand{constructor(){super(...arguments);this.recursive=U.Option.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.from=U.Option.Array("--from",[],{description:"An array of glob pattern idents from which to base any recursion"});this.all=U.Option.Boolean("-A,--all",!1,{description:"Run the command on all workspaces of a project"});this.verbose=U.Option.Boolean("-v,--verbose",!1,{description:"Prefix each output line with the name of the originating workspace"});this.parallel=U.Option.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=U.Option.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=U.Option.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:te.isOneOf([te.isEnum(["unlimited"]),te.applyCascade(te.isNumber(),[te.isInteger(),te.isAtLeast(1)])])});this.topological=U.Option.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=U.Option.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=U.Option.Array("--include",[],{description:"An array of glob pattern idents; only matching workspaces will be traversed"});this.exclude=U.Option.Array("--exclude",[],{description:"An array of glob pattern idents; matching workspaces won't be traversed"});this.publicOnly=U.Option.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=U.Option.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.commandName=U.Option.String();this.args=U.Option.Proxy()}async execute(){let t=await ge.Configuration.find(this.context.cwd,this.context.plugins),{project:n,workspace:s}=await ge.Project.find(t,this.context.cwd);if(!this.all&&!s)throw new Ne.WorkspaceRequiredError(n.cwd,this.context.cwd);await n.restoreInstallState();let i=this.cli.process([this.commandName,...this.args]),a=i.path.length===1&&i.path[0]==="run"&&typeof i.scriptName<"u"?i.scriptName:null;if(i.path.length===0)throw new U.UsageError("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let c=this.all?n.topLevelWorkspace:s,p=this.since?Array.from(await gr.gitUtils.fetchChangedWorkspaces({ref:this.since,project:n})):[c,...this.from.length>0?c.getRecursiveWorkspaceChildren():[]],m=g=>Oe.default.isMatch(F.structUtils.stringifyIdent(g.locator),this.from),h=this.from.length>0?p.filter(m):p,R=new Set([...h,...h.map(g=>[...this.recursive?this.since?g.getRecursiveWorkspaceDependents():g.getRecursiveWorkspaceDependencies():g.getRecursiveWorkspaceChildren()]).flat()]),f=[],$=!1;if(a!=null&&a.includes(":")){for(let g of n.workspaces)if(g.manifest.scripts.has(a)&&($=!$,$===!1))break}for(let g of R)a&&!g.manifest.scripts.has(a)&&!$&&!(await ge.scriptUtils.getWorkspaceAccessibleBinaries(g)).has(a)||a===process.env.npm_lifecycle_event&&g.cwd===s.cwd||this.include.length>0&&!Oe.default.isMatch(F.structUtils.stringifyIdent(g.locator),this.include)||this.exclude.length>0&&Oe.default.isMatch(F.structUtils.stringifyIdent(g.locator),this.exclude)||this.publicOnly&&g.manifest.private===!0||f.push(g);let _=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(F.nodeUtils.availableParallelism()/2):1,y=_===1?!1:this.parallel,E=y?this.interlaced:!0,S=(0,Ar.default)(_),T=new Map,L=new Set,z=0,I=null,re=!1,K=await _e.StreamReport.start({configuration:t,stdout:this.context.stdout,includePrefix:!1},async g=>{let v=async(k,{commandIndex:l})=>{if(re)return-1;!y&&this.verbose&&l>1&&g.reportSeparator();let H=qn(k,{configuration:t,verbose:this.verbose,commandIndex:l}),[w,B]=dr(g,{prefix:H,interlaced:E}),[o,u]=dr(g,{prefix:H,interlaced:E});try{this.verbose&&g.reportInfo(null,`${H} Process started`);let P=Date.now(),b=await this.cli.run([this.commandName,...this.args],{cwd:k.cwd,stdout:w,stderr:o})||0;w.end(),o.end(),await B,await u;let V=Date.now();if(this.verbose){let J=t.get("enableTimers")?`, completed in ${F.formatUtils.pretty(t,V-P,F.formatUtils.Type.DURATION)}`:"";g.reportInfo(null,`${H} Process exited (exit code ${b})${J}`)}return b===130&&(re=!0,I=b),b}catch(P){throw w.end(),o.end(),await B,await u,P}};for(let k of f)T.set(k.anchoredLocator.locatorHash,k);for(;T.size>0&&!g.hasErrors();){let k=[];for(let[w,B]of T){if(L.has(B.anchoredDescriptor.descriptorHash))continue;let o=!0;if(this.topological||this.topologicalDev){let u=this.topologicalDev?new Map([...B.manifest.dependencies,...B.manifest.devDependencies]):B.manifest.dependencies;for(let P of u.values()){let b=n.tryWorkspaceByDescriptor(P);if(o=b===null||!T.has(b.anchoredLocator.locatorHash),!o)break}}if(!!o&&(L.add(B.anchoredDescriptor.descriptorHash),k.push(S(async()=>{let u=await v(B,{commandIndex:++z});return T.delete(w),L.delete(B.anchoredDescriptor.descriptorHash),u})),!y))break}if(k.length===0){let w=Array.from(T.values()).map(B=>F.structUtils.prettyLocator(t,B.anchoredLocator)).join(", ");g.reportError(_e.MessageName.CYCLIC_DEPENDENCIES,`Dependency cycle detected (${w})`);return}let H=(await Promise.all(k)).find(w=>w!==0);I===null&&(I=typeof H<"u"?1:I),(this.topological||this.topologicalDev)&&typeof H<"u"&&g.reportError(_e.MessageName.UNNAMED,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return I!==null?I:K.exitCode()}};pe.paths=[["workspaces","foreach"]],pe.usage=U.Command.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project. By default yarn runs the command only on current and all its descendant workspaces.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n Adding the `-v,--verbose` flag will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]});function dr(e,{prefix:r,interlaced:t}){let n=e.createStreamReporter(r),s=new F.miscUtils.DefaultStream;s.pipe(n,{end:!1}),s.on("finish",()=>{n.end()});let i=new Promise(c=>{n.on("finish",()=>{c(s.active)})});if(t)return[s,i];let a=new F.miscUtils.BufferStream;return a.pipe(s,{end:!1}),a.on("finish",()=>{s.end()}),[a,i]}function qn(e,{configuration:r,commandIndex:t,verbose:n}){if(!n)return null;let i=`[${F.structUtils.stringifyIdent(e.locator)}]:`,a=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],c=a[t%a.length];return F.formatUtils.pretty(r,i,c)}var Kn={commands:[ce,pe]},Wn=Kn;return wr(jn);})(); /*! * fill-range * diff --git a/.yarn/releases/yarn-3.2.4.cjs b/.yarn/releases/yarn-3.2.4.cjs deleted file mode 100644 index 38f17fd49ead..000000000000 --- a/.yarn/releases/yarn-3.2.4.cjs +++ /dev/null @@ -1,801 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable */ -//prettier-ignore -(()=>{var nfe=Object.create;var HS=Object.defineProperty;var sfe=Object.getOwnPropertyDescriptor;var ofe=Object.getOwnPropertyNames;var afe=Object.getPrototypeOf,Afe=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(var t in e)HS(r,t,{get:e[t],enumerable:!0})},lfe=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ofe(e))!Afe.call(r,n)&&n!==t&&HS(r,n,{get:()=>e[n],enumerable:!(i=sfe(e,n))||i.enumerable});return r};var ne=(r,e,t)=>(t=r!=null?nfe(afe(r)):{},lfe(e||!r||!r.__esModule?HS(t,"default",{value:r,enumerable:!0}):t,r));var ZU=y(($_e,_U)=>{_U.exports=XU;XU.sync=Dfe;var zU=J("fs");function Pfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{r1.exports=e1;e1.sync=kfe;var $U=J("fs");function e1(r,e,t){$U.stat(r,function(i,n){t(i,i?!1:t1(n,e))})}function kfe(r,e){return t1($U.statSync(r),e)}function t1(r,e){return r.isFile()&&Rfe(r,e)}function Rfe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var s1=y((rZe,n1)=>{var tZe=J("fs"),RI;process.platform==="win32"||global.TESTING_WINDOWS?RI=ZU():RI=i1();n1.exports=nv;nv.sync=Ffe;function nv(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){nv(r,e||{},function(s,o){s?n(s):i(o)})})}RI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function Ffe(r,e){try{return RI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var g1=y((iZe,u1)=>{var Xg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",o1=J("path"),Nfe=Xg?";":":",a1=s1(),A1=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),l1=(r,e)=>{let t=e.colon||Nfe,i=r.match(/\//)||Xg&&r.match(/\\/)?[""]:[...Xg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Xg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Xg?n.split(t):[""];return Xg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},c1=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=l1(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(A1(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=o1.join(h,r),m=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(m,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];a1(c+p,{pathExt:s},(m,w)=>{if(!m&&w)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Lfe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=l1(r,e),s=[];for(let o=0;o{"use strict";var f1=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};sv.exports=f1;sv.exports.default=f1});var m1=y((sZe,C1)=>{"use strict";var p1=J("path"),Tfe=g1(),Ofe=h1();function d1(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Tfe.sync(r.command,{path:t[Ofe({env:t})],pathExt:e?p1.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=p1.resolve(n?r.options.cwd:"",o)),o}function Mfe(r){return d1(r)||d1(r,!0)}C1.exports=Mfe});var E1=y((oZe,av)=>{"use strict";var ov=/([()\][%!^"`<>&|;, *?])/g;function Kfe(r){return r=r.replace(ov,"^$1"),r}function Ufe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(ov,"^$1"),e&&(r=r.replace(ov,"^$1")),r}av.exports.command=Kfe;av.exports.argument=Ufe});var y1=y((aZe,I1)=>{"use strict";I1.exports=/^#!(.*)/});var B1=y((AZe,w1)=>{"use strict";var Hfe=y1();w1.exports=(r="")=>{let e=r.match(Hfe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var b1=y((lZe,Q1)=>{"use strict";var Av=J("fs"),Gfe=B1();function Yfe(r){let t=Buffer.alloc(150),i;try{i=Av.openSync(r,"r"),Av.readSync(i,t,0,150,0),Av.closeSync(i)}catch{}return Gfe(t.toString())}Q1.exports=Yfe});var P1=y((cZe,x1)=>{"use strict";var jfe=J("path"),S1=m1(),v1=E1(),qfe=b1(),Jfe=process.platform==="win32",Wfe=/\.(?:com|exe)$/i,zfe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Vfe(r){r.file=S1(r);let e=r.file&&qfe(r.file);return e?(r.args.unshift(r.file),r.command=e,S1(r)):r.file}function Xfe(r){if(!Jfe)return r;let e=Vfe(r),t=!Wfe.test(e);if(r.options.forceShell||t){let i=zfe.test(e);r.command=jfe.normalize(r.command),r.command=v1.command(r.command),r.args=r.args.map(s=>v1.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function _fe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Xfe(i)}x1.exports=_fe});var R1=y((uZe,k1)=>{"use strict";var lv=process.platform==="win32";function cv(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Zfe(r,e){if(!lv)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=D1(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function D1(r,e){return lv&&r===1&&!e.file?cv(e.original,"spawn"):null}function $fe(r,e){return lv&&r===1&&!e.file?cv(e.original,"spawnSync"):null}k1.exports={hookChildProcess:Zfe,verifyENOENT:D1,verifyENOENTSync:$fe,notFoundError:cv}});var fv=y((gZe,_g)=>{"use strict";var F1=J("child_process"),uv=P1(),gv=R1();function N1(r,e,t){let i=uv(r,e,t),n=F1.spawn(i.command,i.args,i.options);return gv.hookChildProcess(n,i),n}function ehe(r,e,t){let i=uv(r,e,t),n=F1.spawnSync(i.command,i.args,i.options);return n.error=n.error||gv.verifyENOENTSync(n.status,i),n}_g.exports=N1;_g.exports.spawn=N1;_g.exports.sync=ehe;_g.exports._parse=uv;_g.exports._enoent=gv});var T1=y((fZe,L1)=>{"use strict";function the(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function cc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,cc)}the(cc,Error);cc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",te=de(">>",!1),me=">&",tt=de(">&",!1),Rt=">",It=de(">",!1),Kr="<<<",oi=de("<<<",!1),pi="<&",pr=de("<&",!1),di="<",ai=de("<",!1),Os=function(C){return{type:"argument",segments:[].concat(...C)}},dr=function(C){return C},Bi="$'",_n=de("$'",!1),ga="'",CA=de("'",!1),Dg=function(C){return[{type:"text",text:C}]},Zn='""',mA=de('""',!1),fa=function(){return{type:"text",text:""}},jp='"',EA=de('"',!1),IA=function(C){return C},wr=function(C){return{type:"arithmetic",arithmetic:C,quoted:!0}},zl=function(C){return{type:"shell",shell:C,quoted:!0}},kg=function(C){return{type:"variable",...C,quoted:!0}},mo=function(C){return{type:"text",text:C}},Rg=function(C){return{type:"arithmetic",arithmetic:C,quoted:!1}},qp=function(C){return{type:"shell",shell:C,quoted:!1}},Jp=function(C){return{type:"variable",...C,quoted:!1}},xr=function(C){return{type:"glob",pattern:C}},oe=/^[^']/,Eo=Ye(["'"],!0,!1),Dn=function(C){return C.join("")},Fg=/^[^$"]/,Qt=Ye(["$",'"'],!0,!1),Vl=`\\ -`,kn=de(`\\ -`,!1),$n=function(){return""},es="\\",ut=de("\\",!1),Io=/^[\\$"`]/,at=Ye(["\\","$",'"',"`"],!1,!1),ln=function(C){return C},S="\\a",Tt=de("\\a",!1),Ng=function(){return"a"},Xl="\\b",Wp=de("\\b",!1),zp=function(){return"\b"},Vp=/^[Ee]/,Xp=Ye(["E","e"],!1,!1),_p=function(){return"\x1B"},G="\\f",yt=de("\\f",!1),yA=function(){return"\f"},Wi="\\n",_l=de("\\n",!1),We=function(){return` -`},ha="\\r",Lg=de("\\r",!1),oI=function(){return"\r"},Zp="\\t",aI=de("\\t",!1),ar=function(){return" "},Rn="\\v",Zl=de("\\v",!1),$p=function(){return"\v"},Ms=/^[\\'"?]/,pa=Ye(["\\","'",'"',"?"],!1,!1),cn=function(C){return String.fromCharCode(parseInt(C,16))},De="\\x",Tg=de("\\x",!1),$l="\\u",Ks=de("\\u",!1),ec="\\U",wA=de("\\U",!1),Og=function(C){return String.fromCodePoint(parseInt(C,16))},Mg=/^[0-7]/,da=Ye([["0","7"]],!1,!1),Ca=/^[0-9a-fA-f]/,$e=Ye([["0","9"],["a","f"],["A","f"]],!1,!1),yo=rt(),BA="-",tc=de("-",!1),Us="+",rc=de("+",!1),AI=".",ed=de(".",!1),Kg=function(C,b,N){return{type:"number",value:(C==="-"?-1:1)*parseFloat(b.join("")+"."+N.join(""))}},td=function(C,b){return{type:"number",value:(C==="-"?-1:1)*parseInt(b.join(""))}},lI=function(C){return{type:"variable",...C}},ic=function(C){return{type:"variable",name:C}},cI=function(C){return C},Ug="*",QA=de("*",!1),Rr="/",uI=de("/",!1),Hs=function(C,b,N){return{type:b==="*"?"multiplication":"division",right:N}},Gs=function(C,b){return b.reduce((N,U)=>({left:N,...U}),C)},Hg=function(C,b,N){return{type:b==="+"?"addition":"subtraction",right:N}},bA="$((",R=de("$((",!1),q="))",pe=de("))",!1),Ne=function(C){return C},xe="$(",qe=de("$(",!1),dt=function(C){return C},Ft="${",Fn=de("${",!1),QS=":-",tU=de(":-",!1),rU=function(C,b){return{name:C,defaultValue:b}},bS=":-}",iU=de(":-}",!1),nU=function(C){return{name:C,defaultValue:[]}},SS=":+",sU=de(":+",!1),oU=function(C,b){return{name:C,alternativeValue:b}},vS=":+}",aU=de(":+}",!1),AU=function(C){return{name:C,alternativeValue:[]}},xS=function(C){return{name:C}},lU="$",cU=de("$",!1),uU=function(C){return e.isGlobPattern(C)},gU=function(C){return C},PS=/^[a-zA-Z0-9_]/,DS=Ye([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),kS=function(){return O()},RS=/^[$@*?#a-zA-Z0-9_\-]/,FS=Ye(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),fU=/^[(){}<>$|&; \t"']/,Gg=Ye(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),NS=/^[<>&; \t"']/,LS=Ye(["<",">","&",";"," "," ",'"',"'"],!1,!1),gI=/^[ \t]/,fI=Ye([" "," "],!1,!1),Q=0,Re=0,SA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function O(){return r.substring(Re,Q)}function X(){return Et(Re,Q)}function ee(C,b){throw b=b!==void 0?b:Et(Re,Q),Fi([At(C)],r.substring(Re,Q),b)}function ye(C,b){throw b=b!==void 0?b:Et(Re,Q),Nn(C,b)}function de(C,b){return{type:"literal",text:C,ignoreCase:b}}function Ye(C,b,N){return{type:"class",parts:C,inverted:b,ignoreCase:N}}function rt(){return{type:"any"}}function wt(){return{type:"end"}}function At(C){return{type:"other",description:C}}function et(C){var b=SA[C],N;if(b)return b;for(N=C-1;!SA[N];)N--;for(b=SA[N],b={line:b.line,column:b.column};Nd&&(d=Q,E=[]),E.push(C))}function Nn(C,b){return new cc(C,null,null,b)}function Fi(C,b,N){return new cc(cc.buildMessage(C,b),C,b,N)}function vA(){var C,b;return C=Q,b=Ur(),b===t&&(b=null),b!==t&&(Re=C,b=s(b)),C=b,C}function Ur(){var C,b,N,U,ce;if(C=Q,b=Hr(),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();N!==t?(U=ma(),U!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Re=C,b=o(b,U,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;if(C===t)if(C=Q,b=Hr(),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();N!==t?(U=ma(),U===t&&(U=null),U!==t?(Re=C,b=a(b,U),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;return C}function ts(){var C,b,N,U,ce;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(N=Ur(),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=l(N),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t;return C}function ma(){var C;return r.charCodeAt(Q)===59?(C=c,Q++):(C=t,I===0&&Be(u)),C===t&&(r.charCodeAt(Q)===38?(C=g,Q++):(C=t,I===0&&Be(f))),C}function Hr(){var C,b,N;return C=Q,b=hU(),b!==t?(N=Hge(),N===t&&(N=null),N!==t?(Re=C,b=h(b,N),C=b):(Q=C,C=t)):(Q=C,C=t),C}function Hge(){var C,b,N,U,ce,be,ft;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(N=Gge(),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Hr(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=C,b=p(N,ce),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;return C}function Gge(){var C;return r.substr(Q,2)===m?(C=m,Q+=2):(C=t,I===0&&Be(w)),C===t&&(r.substr(Q,2)===B?(C=B,Q+=2):(C=t,I===0&&Be(v))),C}function hU(){var C,b,N;return C=Q,b=qge(),b!==t?(N=Yge(),N===t&&(N=null),N!==t?(Re=C,b=D(b,N),C=b):(Q=C,C=t)):(Q=C,C=t),C}function Yge(){var C,b,N,U,ce,be,ft;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(N=jge(),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=hU(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=C,b=F(N,ce),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;return C}function jge(){var C;return r.substr(Q,2)===H?(C=H,Q+=2):(C=t,I===0&&Be(j)),C===t&&(r.charCodeAt(Q)===124?(C=$,Q++):(C=t,I===0&&Be(z))),C}function hI(){var C,b,N,U,ce,be;if(C=Q,b=SU(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Be(Z)),N!==t)if(U=CU(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(Re=C,b=A(b,U),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t;else Q=C,C=t;if(C===t)if(C=Q,b=SU(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Be(Z)),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=ae(b),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t;return C}function qge(){var C,b,N,U,ce,be,ft,Bt,Vr,Ci,rs;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(r.charCodeAt(Q)===40?(N=ue,Q++):(N=t,I===0&&Be(_)),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Ur(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();if(be!==t)if(r.charCodeAt(Q)===41?(ft=T,Q++):(ft=t,I===0&&Be(L)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=rd();Ci!==t;)Vr.push(Ci),Ci=rd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Re=C,b=ge(ce,Vr),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;if(C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t)if(r.charCodeAt(Q)===123?(N=we,Q++):(N=t,I===0&&Be(Le)),N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Ur(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();if(be!==t)if(r.charCodeAt(Q)===125?(ft=Pe,Q++):(ft=t,I===0&&Be(Te)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=rd();Ci!==t;)Vr.push(Ci),Ci=rd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Re=C,b=se(ce,Vr),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;else Q=C,C=t;if(C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t){for(N=[],U=hI();U!==t;)N.push(U),U=hI();if(N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t){if(ce=[],be=dU(),be!==t)for(;be!==t;)ce.push(be),be=dU();else ce=t;if(ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=C,b=Ae(N,ce),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t}else Q=C,C=t;if(C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t){if(N=[],U=hI(),U!==t)for(;U!==t;)N.push(U),U=hI();else N=t;if(N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=Qe(N),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t}}}return C}function pU(){var C,b,N,U,ce;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t){if(N=[],U=pI(),U!==t)for(;U!==t;)N.push(U),U=pI();else N=t;if(N!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=C,b=fe(N),C=b):(Q=C,C=t)}else Q=C,C=t}else Q=C,C=t;return C}function dU(){var C,b,N;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();if(b!==t?(N=rd(),N!==t?(Re=C,b=le(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t){for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();b!==t?(N=pI(),N!==t?(Re=C,b=le(N),C=b):(Q=C,C=t)):(Q=C,C=t)}return C}function rd(){var C,b,N,U,ce;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();return b!==t?(Ge.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(ie)),N===t&&(N=null),N!==t?(U=Jge(),U!==t?(ce=pI(),ce!==t?(Re=C,b=Y(N,U,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function Jge(){var C;return r.substr(Q,2)===he?(C=he,Q+=2):(C=t,I===0&&Be(te)),C===t&&(r.substr(Q,2)===me?(C=me,Q+=2):(C=t,I===0&&Be(tt)),C===t&&(r.charCodeAt(Q)===62?(C=Rt,Q++):(C=t,I===0&&Be(It)),C===t&&(r.substr(Q,3)===Kr?(C=Kr,Q+=3):(C=t,I===0&&Be(oi)),C===t&&(r.substr(Q,2)===pi?(C=pi,Q+=2):(C=t,I===0&&Be(pr)),C===t&&(r.charCodeAt(Q)===60?(C=di,Q++):(C=t,I===0&&Be(ai))))))),C}function pI(){var C,b,N;for(C=Q,b=[],N=Me();N!==t;)b.push(N),N=Me();return b!==t?(N=CU(),N!==t?(Re=C,b=le(N),C=b):(Q=C,C=t)):(Q=C,C=t),C}function CU(){var C,b,N;if(C=Q,b=[],N=mU(),N!==t)for(;N!==t;)b.push(N),N=mU();else b=t;return b!==t&&(Re=C,b=Os(b)),C=b,C}function mU(){var C,b;return C=Q,b=Wge(),b!==t&&(Re=C,b=dr(b)),C=b,C===t&&(C=Q,b=zge(),b!==t&&(Re=C,b=dr(b)),C=b,C===t&&(C=Q,b=Vge(),b!==t&&(Re=C,b=dr(b)),C=b,C===t&&(C=Q,b=Xge(),b!==t&&(Re=C,b=dr(b)),C=b))),C}function Wge(){var C,b,N,U;return C=Q,r.substr(Q,2)===Bi?(b=Bi,Q+=2):(b=t,I===0&&Be(_n)),b!==t?(N=$ge(),N!==t?(r.charCodeAt(Q)===39?(U=ga,Q++):(U=t,I===0&&Be(CA)),U!==t?(Re=C,b=Dg(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function zge(){var C,b,N,U;return C=Q,r.charCodeAt(Q)===39?(b=ga,Q++):(b=t,I===0&&Be(CA)),b!==t?(N=_ge(),N!==t?(r.charCodeAt(Q)===39?(U=ga,Q++):(U=t,I===0&&Be(CA)),U!==t?(Re=C,b=Dg(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function Vge(){var C,b,N,U;if(C=Q,r.substr(Q,2)===Zn?(b=Zn,Q+=2):(b=t,I===0&&Be(mA)),b!==t&&(Re=C,b=fa()),C=b,C===t)if(C=Q,r.charCodeAt(Q)===34?(b=jp,Q++):(b=t,I===0&&Be(EA)),b!==t){for(N=[],U=EU();U!==t;)N.push(U),U=EU();N!==t?(r.charCodeAt(Q)===34?(U=jp,Q++):(U=t,I===0&&Be(EA)),U!==t?(Re=C,b=IA(N),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;return C}function Xge(){var C,b,N;if(C=Q,b=[],N=IU(),N!==t)for(;N!==t;)b.push(N),N=IU();else b=t;return b!==t&&(Re=C,b=IA(b)),C=b,C}function EU(){var C,b;return C=Q,b=QU(),b!==t&&(Re=C,b=wr(b)),C=b,C===t&&(C=Q,b=bU(),b!==t&&(Re=C,b=zl(b)),C=b,C===t&&(C=Q,b=KS(),b!==t&&(Re=C,b=kg(b)),C=b,C===t&&(C=Q,b=Zge(),b!==t&&(Re=C,b=mo(b)),C=b))),C}function IU(){var C,b;return C=Q,b=QU(),b!==t&&(Re=C,b=Rg(b)),C=b,C===t&&(C=Q,b=bU(),b!==t&&(Re=C,b=qp(b)),C=b,C===t&&(C=Q,b=KS(),b!==t&&(Re=C,b=Jp(b)),C=b,C===t&&(C=Q,b=rfe(),b!==t&&(Re=C,b=xr(b)),C=b,C===t&&(C=Q,b=tfe(),b!==t&&(Re=C,b=mo(b)),C=b)))),C}function _ge(){var C,b,N;for(C=Q,b=[],oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo));N!==t;)b.push(N),oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo));return b!==t&&(Re=C,b=Dn(b)),C=b,C}function Zge(){var C,b,N;if(C=Q,b=[],N=yU(),N===t&&(Fg.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Qt))),N!==t)for(;N!==t;)b.push(N),N=yU(),N===t&&(Fg.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Qt)));else b=t;return b!==t&&(Re=C,b=Dn(b)),C=b,C}function yU(){var C,b,N;return C=Q,r.substr(Q,2)===Vl?(b=Vl,Q+=2):(b=t,I===0&&Be(kn)),b!==t&&(Re=C,b=$n()),C=b,C===t&&(C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Io.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(at)),N!==t?(Re=C,b=ln(N),C=b):(Q=C,C=t)):(Q=C,C=t)),C}function $ge(){var C,b,N;for(C=Q,b=[],N=wU(),N===t&&(oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo)));N!==t;)b.push(N),N=wU(),N===t&&(oe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Eo)));return b!==t&&(Re=C,b=Dn(b)),C=b,C}function wU(){var C,b,N;return C=Q,r.substr(Q,2)===S?(b=S,Q+=2):(b=t,I===0&&Be(Tt)),b!==t&&(Re=C,b=Ng()),C=b,C===t&&(C=Q,r.substr(Q,2)===Xl?(b=Xl,Q+=2):(b=t,I===0&&Be(Wp)),b!==t&&(Re=C,b=zp()),C=b,C===t&&(C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Vp.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(Xp)),N!==t?(Re=C,b=_p(),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===G?(b=G,Q+=2):(b=t,I===0&&Be(yt)),b!==t&&(Re=C,b=yA()),C=b,C===t&&(C=Q,r.substr(Q,2)===Wi?(b=Wi,Q+=2):(b=t,I===0&&Be(_l)),b!==t&&(Re=C,b=We()),C=b,C===t&&(C=Q,r.substr(Q,2)===ha?(b=ha,Q+=2):(b=t,I===0&&Be(Lg)),b!==t&&(Re=C,b=oI()),C=b,C===t&&(C=Q,r.substr(Q,2)===Zp?(b=Zp,Q+=2):(b=t,I===0&&Be(aI)),b!==t&&(Re=C,b=ar()),C=b,C===t&&(C=Q,r.substr(Q,2)===Rn?(b=Rn,Q+=2):(b=t,I===0&&Be(Zl)),b!==t&&(Re=C,b=$p()),C=b,C===t&&(C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Ms.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(pa)),N!==t?(Re=C,b=ln(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=efe()))))))))),C}function efe(){var C,b,N,U,ce,be,ft,Bt,Vr,Ci,rs,US;return C=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(N=TS(),N!==t?(Re=C,b=cn(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===De?(b=De,Q+=2):(b=t,I===0&&Be(Tg)),b!==t?(N=Q,U=Q,ce=TS(),ce!==t?(be=Ln(),be!==t?(ce=[ce,be],U=ce):(Q=U,U=t)):(Q=U,U=t),U===t&&(U=TS()),U!==t?N=r.substring(N,Q):N=U,N!==t?(Re=C,b=cn(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===$l?(b=$l,Q+=2):(b=t,I===0&&Be(Ks)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(be=Ln(),be!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(ce=[ce,be,ft,Bt],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Re=C,b=cn(N),C=b):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===ec?(b=ec,Q+=2):(b=t,I===0&&Be(wA)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(be=Ln(),be!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(Vr=Ln(),Vr!==t?(Ci=Ln(),Ci!==t?(rs=Ln(),rs!==t?(US=Ln(),US!==t?(ce=[ce,be,ft,Bt,Vr,Ci,rs,US],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Re=C,b=Og(N),C=b):(Q=C,C=t)):(Q=C,C=t)))),C}function TS(){var C;return Mg.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be(da)),C}function Ln(){var C;return Ca.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be($e)),C}function tfe(){var C,b,N,U,ce;if(C=Q,b=[],N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Be(ut)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=vU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t)),N!==t)for(;N!==t;)b.push(N),N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Be(ut)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=vU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t));else b=t;return b!==t&&(Re=C,b=Dn(b)),C=b,C}function OS(){var C,b,N,U,ce,be;if(C=Q,r.charCodeAt(Q)===45?(b=BA,Q++):(b=t,I===0&&Be(tc)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Be(rc))),b===t&&(b=null),b!==t){if(N=[],Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie)),U!==t)for(;U!==t;)N.push(U),Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie));else N=t;if(N!==t)if(r.charCodeAt(Q)===46?(U=AI,Q++):(U=t,I===0&&Be(ed)),U!==t){if(ce=[],Ge.test(r.charAt(Q))?(be=r.charAt(Q),Q++):(be=t,I===0&&Be(ie)),be!==t)for(;be!==t;)ce.push(be),Ge.test(r.charAt(Q))?(be=r.charAt(Q),Q++):(be=t,I===0&&Be(ie));else ce=t;ce!==t?(Re=C,b=Kg(b,N,ce),C=b):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;if(C===t){if(C=Q,r.charCodeAt(Q)===45?(b=BA,Q++):(b=t,I===0&&Be(tc)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Be(rc))),b===t&&(b=null),b!==t){if(N=[],Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie)),U!==t)for(;U!==t;)N.push(U),Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie));else N=t;N!==t?(Re=C,b=td(b,N),C=b):(Q=C,C=t)}else Q=C,C=t;if(C===t&&(C=Q,b=KS(),b!==t&&(Re=C,b=lI(b)),C=b,C===t&&(C=Q,b=nc(),b!==t&&(Re=C,b=ic(b)),C=b,C===t)))if(C=Q,r.charCodeAt(Q)===40?(b=ue,Q++):(b=t,I===0&&Be(_)),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();if(N!==t)if(U=BU(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(r.charCodeAt(Q)===41?(be=T,Q++):(be=t,I===0&&Be(L)),be!==t?(Re=C,b=cI(U),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t}return C}function MS(){var C,b,N,U,ce,be,ft,Bt;if(C=Q,b=OS(),b!==t){for(N=[],U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===42?(be=Ug,Q++):(be=t,I===0&&Be(QA)),be===t&&(r.charCodeAt(Q)===47?(be=Rr,Q++):(be=t,I===0&&Be(uI))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=OS(),Bt!==t?(Re=U,ce=Hs(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===42?(be=Ug,Q++):(be=t,I===0&&Be(QA)),be===t&&(r.charCodeAt(Q)===47?(be=Rr,Q++):(be=t,I===0&&Be(uI))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=OS(),Bt!==t?(Re=U,ce=Hs(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Re=C,b=Gs(b,N),C=b):(Q=C,C=t)}else Q=C,C=t;return C}function BU(){var C,b,N,U,ce,be,ft,Bt;if(C=Q,b=MS(),b!==t){for(N=[],U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===43?(be=Us,Q++):(be=t,I===0&&Be(rc)),be===t&&(r.charCodeAt(Q)===45?(be=BA,Q++):(be=t,I===0&&Be(tc))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=MS(),Bt!==t?(Re=U,ce=Hg(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===43?(be=Us,Q++):(be=t,I===0&&Be(rc)),be===t&&(r.charCodeAt(Q)===45?(be=BA,Q++):(be=t,I===0&&Be(tc))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=MS(),Bt!==t?(Re=U,ce=Hg(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Re=C,b=Gs(b,N),C=b):(Q=C,C=t)}else Q=C,C=t;return C}function QU(){var C,b,N,U,ce,be;if(C=Q,r.substr(Q,3)===bA?(b=bA,Q+=3):(b=t,I===0&&Be(R)),b!==t){for(N=[],U=Me();U!==t;)N.push(U),U=Me();if(N!==t)if(U=BU(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(r.substr(Q,2)===q?(be=q,Q+=2):(be=t,I===0&&Be(pe)),be!==t?(Re=C,b=Ne(U),C=b):(Q=C,C=t)):(Q=C,C=t)}else Q=C,C=t;else Q=C,C=t}else Q=C,C=t;return C}function bU(){var C,b,N,U;return C=Q,r.substr(Q,2)===xe?(b=xe,Q+=2):(b=t,I===0&&Be(qe)),b!==t?(N=Ur(),N!==t?(r.charCodeAt(Q)===41?(U=T,Q++):(U=t,I===0&&Be(L)),U!==t?(Re=C,b=dt(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C}function KS(){var C,b,N,U,ce,be;return C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,2)===QS?(U=QS,Q+=2):(U=t,I===0&&Be(tU)),U!==t?(ce=pU(),ce!==t?(r.charCodeAt(Q)===125?(be=Pe,Q++):(be=t,I===0&&Be(Te)),be!==t?(Re=C,b=rU(N,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,3)===bS?(U=bS,Q+=3):(U=t,I===0&&Be(iU)),U!==t?(Re=C,b=nU(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,2)===SS?(U=SS,Q+=2):(U=t,I===0&&Be(sU)),U!==t?(ce=pU(),ce!==t?(r.charCodeAt(Q)===125?(be=Pe,Q++):(be=t,I===0&&Be(Te)),be!==t?(Re=C,b=oU(N,ce),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.substr(Q,3)===vS?(U=vS,Q+=3):(U=t,I===0&&Be(aU)),U!==t?(Re=C,b=AU(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Fn)),b!==t?(N=nc(),N!==t?(r.charCodeAt(Q)===125?(U=Pe,Q++):(U=t,I===0&&Be(Te)),U!==t?(Re=C,b=xS(N),C=b):(Q=C,C=t)):(Q=C,C=t)):(Q=C,C=t),C===t&&(C=Q,r.charCodeAt(Q)===36?(b=lU,Q++):(b=t,I===0&&Be(cU)),b!==t?(N=nc(),N!==t?(Re=C,b=xS(N),C=b):(Q=C,C=t)):(Q=C,C=t)))))),C}function rfe(){var C,b,N;return C=Q,b=ife(),b!==t?(Re=Q,N=uU(b),N?N=void 0:N=t,N!==t?(Re=C,b=gU(b),C=b):(Q=C,C=t)):(Q=C,C=t),C}function ife(){var C,b,N,U,ce;if(C=Q,b=[],N=Q,U=Q,I++,ce=xU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N!==t)for(;N!==t;)b.push(N),N=Q,U=Q,I++,ce=xU(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(yo)),ce!==t?(Re=N,U=ln(ce),N=U):(Q=N,N=t)):(Q=N,N=t);else b=t;return b!==t&&(Re=C,b=Dn(b)),C=b,C}function SU(){var C,b,N;if(C=Q,b=[],PS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(DS)),N!==t)for(;N!==t;)b.push(N),PS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(DS));else b=t;return b!==t&&(Re=C,b=kS()),C=b,C}function nc(){var C,b,N;if(C=Q,b=[],RS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(FS)),N!==t)for(;N!==t;)b.push(N),RS.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Be(FS));else b=t;return b!==t&&(Re=C,b=kS()),C=b,C}function vU(){var C;return fU.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be(Gg)),C}function xU(){var C;return NS.test(r.charAt(Q))?(C=r.charAt(Q),Q++):(C=t,I===0&&Be(LS)),C}function Me(){var C,b;if(C=[],gI.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Be(fI)),b!==t)for(;b!==t;)C.push(b),gI.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Be(fI));else C=t;return C}if(k=n(),k!==t&&Q===r.length)return k;throw k!==t&&Q{"use strict";function ihe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function gc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gc)}ihe(gc,Error);gc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ie))}function Te(ie,Y){return new gc(ie,null,null,Y)}function se(ie,Y,he){return new gc(gc.buildMessage(ie,Y),ie,Y,he)}function Ae(){var ie,Y,he,te;return ie=v,Y=Qe(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Pe(o)),he!==t?(te=Qe(),te!==t?(D=ie,Y=a(Y,te),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=Qe(),Y!==t&&(D=ie,Y=l(Y)),ie=Y),ie}function Qe(){var ie,Y,he,te;return ie=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Pe(u)),he!==t?(te=Ge(),te!==t?(D=ie,Y=g(Y,te),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=fe(),Y!==t&&(D=ie,Y=f(Y)),ie=Y),ie}function fe(){var ie,Y,he,te,me;return ie=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Pe(u)),Y!==t?(he=le(),he!==t?(r.charCodeAt(v)===47?(te=s,v++):(te=t,$===0&&Pe(o)),te!==t?(me=le(),me!==t?(D=ie,Y=h(),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=le(),Y!==t&&(D=ie,Y=h()),ie=Y),ie}function le(){var ie,Y,he;if(ie=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(m)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(m));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}function Ge(){var ie,Y,he;if(ie=v,Y=[],w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B)),he!==t)for(;he!==t;)Y.push(he),w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}if(z=n(),z!==t&&v===r.length)return z;throw z!==t&&v{"use strict";function H1(r){return typeof r>"u"||r===null}function she(r){return typeof r=="object"&&r!==null}function ohe(r){return Array.isArray(r)?r:H1(r)?[]:[r]}function ahe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function dd(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}dd.prototype=Object.create(Error.prototype);dd.prototype.constructor=dd;dd.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};G1.exports=dd});var q1=y((kZe,j1)=>{"use strict";var Y1=hc();function Ev(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}Ev.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r -\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),Y1.repeat(" ",e)+i+a+s+` -`+Y1.repeat(" ",e+this.position-n+i.length)+"^"};Ev.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: -`+t)),i};j1.exports=Ev});var Ai=y((RZe,W1)=>{"use strict";var J1=ef(),che=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],uhe=["scalar","sequence","mapping"];function ghe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function fhe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(che.indexOf(t)===-1)throw new J1('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=ghe(e.styleAliases||null),uhe.indexOf(this.kind)===-1)throw new J1('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}W1.exports=fhe});var pc=y((FZe,V1)=>{"use strict";var z1=hc(),KI=ef(),hhe=Ai();function Iv(r,e,t){var i=[];return r.include.forEach(function(n){t=Iv(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function phe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var dhe=Ai();X1.exports=new dhe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var $1=y((LZe,Z1)=>{"use strict";var Che=Ai();Z1.exports=new Che("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var t2=y((TZe,e2)=>{"use strict";var mhe=Ai();e2.exports=new mhe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var UI=y((OZe,r2)=>{"use strict";var Ehe=pc();r2.exports=new Ehe({explicit:[_1(),$1(),t2()]})});var n2=y((MZe,i2)=>{"use strict";var Ihe=Ai();function yhe(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function whe(){return null}function Bhe(r){return r===null}i2.exports=new Ihe("tag:yaml.org,2002:null",{kind:"scalar",resolve:yhe,construct:whe,predicate:Bhe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var o2=y((KZe,s2)=>{"use strict";var Qhe=Ai();function bhe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function She(r){return r==="true"||r==="True"||r==="TRUE"}function vhe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}s2.exports=new Qhe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:bhe,construct:She,predicate:vhe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var A2=y((UZe,a2)=>{"use strict";var xhe=hc(),Phe=Ai();function Dhe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function khe(r){return 48<=r&&r<=55}function Rhe(r){return 48<=r&&r<=57}function Fhe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var u2=y((HZe,c2)=>{"use strict";var l2=hc(),The=Ai(),Ohe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Mhe(r){return!(r===null||!Ohe.test(r)||r[r.length-1]==="_")}function Khe(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var Uhe=/^[-+]?[0-9]+e/;function Hhe(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(l2.isNegativeZero(r))return"-0.0";return t=r.toString(10),Uhe.test(t)?t.replace("e",".e"):t}function Ghe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||l2.isNegativeZero(r))}c2.exports=new The("tag:yaml.org,2002:float",{kind:"scalar",resolve:Mhe,construct:Khe,predicate:Ghe,represent:Hhe,defaultStyle:"lowercase"})});var yv=y((GZe,g2)=>{"use strict";var Yhe=pc();g2.exports=new Yhe({include:[UI()],implicit:[n2(),o2(),A2(),u2()]})});var wv=y((YZe,f2)=>{"use strict";var jhe=pc();f2.exports=new jhe({include:[yv()]})});var C2=y((jZe,d2)=>{"use strict";var qhe=Ai(),h2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),p2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Jhe(r){return r===null?!1:h2.exec(r)!==null||p2.exec(r)!==null}function Whe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=h2.exec(r),e===null&&(e=p2.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function zhe(r){return r.toISOString()}d2.exports=new qhe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Jhe,construct:Whe,instanceOf:Date,represent:zhe})});var E2=y((qZe,m2)=>{"use strict";var Vhe=Ai();function Xhe(r){return r==="<<"||r===null}m2.exports=new Vhe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Xhe})});var w2=y((JZe,y2)=>{"use strict";var dc;try{I2=J,dc=I2("buffer").Buffer}catch{}var I2,_he=Ai(),Bv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function Zhe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=Bv;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function $he(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=Bv,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),dc?dc.from?dc.from(a):new dc(a):a}function epe(r){var e="",t=0,i,n,s=r.length,o=Bv;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function tpe(r){return dc&&dc.isBuffer(r)}y2.exports=new _he("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Zhe,construct:$he,predicate:tpe,represent:epe})});var Q2=y((WZe,B2)=>{"use strict";var rpe=Ai(),ipe=Object.prototype.hasOwnProperty,npe=Object.prototype.toString;function spe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var ape=Ai(),Ape=Object.prototype.toString;function lpe(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var upe=Ai(),gpe=Object.prototype.hasOwnProperty;function fpe(r){if(r===null)return!0;var e,t=r;for(e in t)if(gpe.call(t,e)&&t[e]!==null)return!1;return!0}function hpe(r){return r!==null?r:{}}v2.exports=new upe("tag:yaml.org,2002:set",{kind:"mapping",resolve:fpe,construct:hpe})});var rf=y((XZe,P2)=>{"use strict";var ppe=pc();P2.exports=new ppe({include:[wv()],implicit:[C2(),E2()],explicit:[w2(),Q2(),S2(),x2()]})});var k2=y((_Ze,D2)=>{"use strict";var dpe=Ai();function Cpe(){return!0}function mpe(){}function Epe(){return""}function Ipe(r){return typeof r>"u"}D2.exports=new dpe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Cpe,construct:mpe,predicate:Ipe,represent:Epe})});var F2=y((ZZe,R2)=>{"use strict";var ype=Ai();function wpe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function Bpe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Qpe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function bpe(r){return Object.prototype.toString.call(r)==="[object RegExp]"}R2.exports=new ype("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:wpe,construct:Bpe,predicate:bpe,represent:Qpe})});var T2=y(($Ze,L2)=>{"use strict";var HI;try{N2=J,HI=N2("esprima")}catch{typeof window<"u"&&(HI=window.esprima)}var N2,Spe=Ai();function vpe(r){if(r===null)return!1;try{var e="("+r+")",t=HI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function xpe(r){var e="("+r+")",t=HI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function Ppe(r){return r.toString()}function Dpe(r){return Object.prototype.toString.call(r)==="[object Function]"}L2.exports=new Spe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:vpe,construct:xpe,predicate:Dpe,represent:Ppe})});var Cd=y((e$e,M2)=>{"use strict";var O2=pc();M2.exports=O2.DEFAULT=new O2({include:[rf()],explicit:[k2(),F2(),T2()]})});var iH=y((t$e,md)=>{"use strict";var wa=hc(),q2=ef(),kpe=q1(),J2=rf(),Rpe=Cd(),RA=Object.prototype.hasOwnProperty,GI=1,W2=2,z2=3,YI=4,Qv=1,Fpe=2,K2=3,Npe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Lpe=/[\x85\u2028\u2029]/,Tpe=/[,\[\]\{\}]/,V2=/^(?:!|!!|![a-z\-]+!)$/i,X2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function U2(r){return Object.prototype.toString.call(r)}function bo(r){return r===10||r===13}function mc(r){return r===9||r===32}function fn(r){return r===9||r===32||r===10||r===13}function nf(r){return r===44||r===91||r===93||r===123||r===125}function Ope(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function Mpe(r){return r===120?2:r===117?4:r===85?8:0}function Kpe(r){return 48<=r&&r<=57?r-48:-1}function H2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` -`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function Upe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var _2=new Array(256),Z2=new Array(256);for(Cc=0;Cc<256;Cc++)_2[Cc]=H2(Cc)?1:0,Z2[Cc]=H2(Cc);var Cc;function Hpe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||Rpe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function $2(r,e){return new q2(e,new kpe(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function gt(r,e){throw $2(r,e)}function jI(r,e){r.onWarning&&r.onWarning.call(null,$2(r,e))}var G2={YAML:function(e,t,i){var n,s,o;e.version!==null&>(e,"duplication of %YAML directive"),i.length!==1&>(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&>(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&>(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&jI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&>(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],V2.test(n)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),RA.call(e.tagMap,n)&>(e,'there is a previously declared suffix for "'+n+'" tag handle'),X2.test(s)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function kA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=wa.repeat(` -`,e-1))}function Gpe(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||nf(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&nf(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&nf(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&qI(r)||t&&nf(h))break;if(bo(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,_r(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(kA(r,s,o,!1),Sv(r,r.line-l),s=o=r.position,a=!1),mc(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return kA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function Ype(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(kA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else bo(t)?(kA(r,i,n,!0),Sv(r,_r(r,!1,e)),i=n=r.position):r.position===r.lineStart&&qI(r)?gt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);gt(r,"unexpected end of the stream within a single quoted scalar")}function jpe(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return kA(r,t,r.position,!0),r.position++,!0;if(a===92){if(kA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),bo(a))_r(r,!1,e);else if(a<256&&_2[a])r.result+=Z2[a],r.position++;else if((o=Mpe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=Ope(a))>=0?s=(s<<4)+o:gt(r,"expected hexadecimal character");r.result+=Upe(s),r.position++}else gt(r,"unknown escape sequence");t=i=r.position}else bo(a)?(kA(r,t,i,!0),Sv(r,_r(r,!1,e)),t=i=r.position):r.position===r.lineStart&&qI(r)?gt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}gt(r,"unexpected end of the stream within a double quoted scalar")}function qpe(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,m,w;if(w=r.input.charCodeAt(r.position),w===91)l=93,g=!1,s=[];else if(w===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),w=r.input.charCodeAt(++r.position);w!==0;){if(_r(r,!0,e),w=r.input.charCodeAt(r.position),w===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||gt(r,"missed comma between flow collection entries"),p=h=m=null,c=u=!1,w===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,_r(r,!0,e))),i=r.line,of(r,e,GI,!1,!0),p=r.tag,h=r.result,_r(r,!0,e),w=r.input.charCodeAt(r.position),(u||r.line===i)&&w===58&&(c=!0,w=r.input.charCodeAt(++r.position),_r(r,!0,e),of(r,e,GI,!1,!0),m=r.result),g?sf(r,s,f,p,h,m):c?s.push(sf(r,null,f,p,h,m)):s.push(h),_r(r,!0,e),w=r.input.charCodeAt(r.position),w===44?(t=!0,w=r.input.charCodeAt(++r.position)):t=!1}gt(r,"unexpected end of the stream within a flow collection")}function Jpe(r,e){var t,i,n=Qv,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)Qv===n?n=g===43?K2:Fpe:gt(r,"repeat of a chomping mode identifier");else if((u=Kpe(g))>=0)u===0?gt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(mc(g)){do g=r.input.charCodeAt(++r.position);while(mc(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!bo(g)&&g!==0)}for(;g!==0;){for(bv(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),bo(g)){l++;continue}if(r.lineIndente)&&l!==0)gt(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(of(r,e,YI,!0,n)&&(p?f=r.result:h=r.result),p||(sf(r,c,u,g,f,h,s,o),g=f=h=null),_r(r,!0,-1),w=r.input.charCodeAt(r.position)),r.lineIndent>e&&w!==0)gt(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):gt(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):gt(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function _pe(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(_r(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&>(r,"directive name must not be less than one character in length");o!==0;){for(;mc(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!bo(o));break}if(bo(o))break;for(t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&bv(r),RA.call(G2,i)?G2[i](r,i,n):jI(r,'unknown document directive "'+i+'"')}if(_r(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,_r(r,!0,-1)):s&>(r,"directives end mark is expected"),of(r,r.lineIndent-1,YI,!1,!0),_r(r,!0,-1),r.checkLineBreaks&&Lpe.test(r.input.slice(e,r.position))&&jI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&qI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,_r(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=eH(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),tH(r,e,wa.extend({schema:J2},t))}function $pe(r,e){return rH(r,wa.extend({schema:J2},e))}md.exports.loadAll=tH;md.exports.load=rH;md.exports.safeLoadAll=Zpe;md.exports.safeLoad=$pe});var SH=y((r$e,Dv)=>{"use strict";var Id=hc(),yd=ef(),ede=Cd(),tde=rf(),uH=Object.prototype.toString,gH=Object.prototype.hasOwnProperty,rde=9,Ed=10,ide=13,nde=32,sde=33,ode=34,fH=35,ade=37,Ade=38,lde=39,cde=42,hH=44,ude=45,pH=58,gde=61,fde=62,hde=63,pde=64,dH=91,CH=93,dde=96,mH=123,Cde=124,EH=125,Li={};Li[0]="\\0";Li[7]="\\a";Li[8]="\\b";Li[9]="\\t";Li[10]="\\n";Li[11]="\\v";Li[12]="\\f";Li[13]="\\r";Li[27]="\\e";Li[34]='\\"';Li[92]="\\\\";Li[133]="\\N";Li[160]="\\_";Li[8232]="\\L";Li[8233]="\\P";var mde=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Ede(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&oH(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!af(o))return JI;a=s>0?r.charCodeAt(s-1):null,f=f&&oH(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?yH:wH:t>9&&IH(r)?JI:c?QH:BH}function bde(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&mde.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return yde(r,l)}switch(Qde(e,o,r.indent,s,a)){case yH:return e;case wH:return"'"+e.replace(/'/g,"''")+"'";case BH:return"|"+aH(e,r.indent)+AH(sH(e,n));case QH:return">"+aH(e,r.indent)+AH(sH(Sde(e,s),n));case JI:return'"'+vde(e,s)+'"';default:throw new yd("impossible error: invalid scalar style")}}()}function aH(r,e){var t=IH(r)?String(e):"",i=r[r.length-1]===` -`,n=i&&(r[r.length-2]===` -`||r===` -`),s=n?"+":i?"":"-";return t+s+` -`}function AH(r){return r[r.length-1]===` -`?r.slice(0,-1):r}function Sde(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` -`);return c=c!==-1?c:r.length,t.lastIndex=c,lH(r.slice(0,c),e)}(),n=r[0]===` -`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` -`:"")+lH(l,e),n=s}return i}function lH(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` -`+r.slice(n,s),n=s+1),o=a;return l+=` -`,r.length-n>e&&o>n?l+=r.slice(n,o)+` -`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function vde(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=nH((t-55296)*1024+i-56320+65536),s++;continue}n=Li[t],e+=!n&&af(t)?r[s]:n||nH(t)}return e}function xde(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Ec(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function kde(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new yd("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&Ed===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=vv(r,e)),Ec(r,e+1,u,!0,g)&&(r.dump&&Ed===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function cH(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function Ec(r,e,t,i,n,s){r.tag=null,r.dump=t,cH(r,t,!1)||cH(r,t,!0);var o=uH.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(kde(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Dde(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(Pde(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(xde(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&bde(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new yd("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function Rde(r,e){var t=[],i=[],n,s;for(xv(r,t,i),n=0,s=i.length;n{"use strict";var WI=iH(),vH=SH();function zI(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Nr.exports.Type=Ai();Nr.exports.Schema=pc();Nr.exports.FAILSAFE_SCHEMA=UI();Nr.exports.JSON_SCHEMA=yv();Nr.exports.CORE_SCHEMA=wv();Nr.exports.DEFAULT_SAFE_SCHEMA=rf();Nr.exports.DEFAULT_FULL_SCHEMA=Cd();Nr.exports.load=WI.load;Nr.exports.loadAll=WI.loadAll;Nr.exports.safeLoad=WI.safeLoad;Nr.exports.safeLoadAll=WI.safeLoadAll;Nr.exports.dump=vH.dump;Nr.exports.safeDump=vH.safeDump;Nr.exports.YAMLException=ef();Nr.exports.MINIMAL_SCHEMA=UI();Nr.exports.SAFE_SCHEMA=rf();Nr.exports.DEFAULT_SCHEMA=Cd();Nr.exports.scan=zI("scan");Nr.exports.parse=zI("parse");Nr.exports.compose=zI("compose");Nr.exports.addConstructor=zI("addConstructor")});var DH=y((n$e,PH)=>{"use strict";var Nde=xH();PH.exports=Nde});var RH=y((s$e,kH)=>{"use strict";function Lde(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ic(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ic)}Lde(Ic,Error);Ic.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ne]:pe})))},H=function(R){return R},j=function(R){return R},$=Ms("correct indentation"),z=" ",W=ar(" ",!1),Z=function(R){return R.length===bA*Hg},A=function(R){return R.length===(bA+1)*Hg},ae=function(){return bA++,!0},ue=function(){return bA--,!0},_=function(){return Lg()},T=Ms("pseudostring"),L=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ge=Rn(["\r",` -`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),we=/^[^\r\n\t ,\][{}:#"']/,Le=Rn(["\r",` -`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Pe=function(){return Lg().replace(/^ *| *$/g,"")},Te="--",se=ar("--",!1),Ae=/^[a-zA-Z\/0-9]/,Qe=Rn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,le=Rn(["\r",` -`," "," ",":",","],!0,!1),Ge="null",ie=ar("null",!1),Y=function(){return null},he="true",te=ar("true",!1),me=function(){return!0},tt="false",Rt=ar("false",!1),It=function(){return!1},Kr=Ms("string"),oi='"',pi=ar('"',!1),pr=function(){return""},di=function(R){return R},ai=function(R){return R.join("")},Os=/^[^"\\\0-\x1F\x7F]/,dr=Rn(['"',"\\",["\0",""],"\x7F"],!0,!1),Bi='\\"',_n=ar('\\"',!1),ga=function(){return'"'},CA="\\\\",Dg=ar("\\\\",!1),Zn=function(){return"\\"},mA="\\/",fa=ar("\\/",!1),jp=function(){return"/"},EA="\\b",IA=ar("\\b",!1),wr=function(){return"\b"},zl="\\f",kg=ar("\\f",!1),mo=function(){return"\f"},Rg="\\n",qp=ar("\\n",!1),Jp=function(){return` -`},xr="\\r",oe=ar("\\r",!1),Eo=function(){return"\r"},Dn="\\t",Fg=ar("\\t",!1),Qt=function(){return" "},Vl="\\u",kn=ar("\\u",!1),$n=function(R,q,pe,Ne){return String.fromCharCode(parseInt(`0x${R}${q}${pe}${Ne}`))},es=/^[0-9a-fA-F]/,ut=Rn([["0","9"],["a","f"],["A","F"]],!1,!1),Io=Ms("blank space"),at=/^[ \t]/,ln=Rn([" "," "],!1,!1),S=Ms("white space"),Tt=/^[ \t\n\r]/,Ng=Rn([" "," ",` -`,"\r"],!1,!1),Xl=`\r -`,Wp=ar(`\r -`,!1),zp=` -`,Vp=ar(` -`,!1),Xp="\r",_p=ar("\r",!1),G=0,yt=0,yA=[{line:1,column:1}],Wi=0,_l=[],We=0,ha;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function Lg(){return r.substring(yt,G)}function oI(){return cn(yt,G)}function Zp(R,q){throw q=q!==void 0?q:cn(yt,G),$l([Ms(R)],r.substring(yt,G),q)}function aI(R,q){throw q=q!==void 0?q:cn(yt,G),Tg(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Rn(R,q,pe){return{type:"class",parts:R,inverted:q,ignoreCase:pe}}function Zl(){return{type:"any"}}function $p(){return{type:"end"}}function Ms(R){return{type:"other",description:R}}function pa(R){var q=yA[R],pe;if(q)return q;for(pe=R-1;!yA[pe];)pe--;for(q=yA[pe],q={line:q.line,column:q.column};peWi&&(Wi=G,_l=[]),_l.push(R))}function Tg(R,q){return new Ic(R,null,null,q)}function $l(R,q,pe){return new Ic(Ic.buildMessage(R,q),R,q,pe)}function Ks(){var R;return R=Og(),R}function ec(){var R,q,pe;for(R=G,q=[],pe=wA();pe!==t;)q.push(pe),pe=wA();return q!==t&&(yt=R,q=s(q)),R=q,R}function wA(){var R,q,pe,Ne,xe;return R=G,q=Ca(),q!==t?(r.charCodeAt(G)===45?(pe=o,G++):(pe=t,We===0&&De(a)),pe!==t?(Ne=Rr(),Ne!==t?(xe=da(),xe!==t?(yt=R,q=l(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function Og(){var R,q,pe;for(R=G,q=[],pe=Mg();pe!==t;)q.push(pe),pe=Mg();return q!==t&&(yt=R,q=c(q)),R=q,R}function Mg(){var R,q,pe,Ne,xe,qe,dt,Ft,Fn;if(R=G,q=Rr(),q===t&&(q=null),q!==t){if(pe=G,r.charCodeAt(G)===35?(Ne=u,G++):(Ne=t,We===0&&De(g)),Ne!==t){if(xe=[],qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&De(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t),qe!==t)for(;qe!==t;)xe.push(qe),qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&De(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t);else xe=t;xe!==t?(Ne=[Ne,xe],pe=Ne):(G=pe,pe=t)}else G=pe,pe=t;if(pe===t&&(pe=null),pe!==t){if(Ne=[],xe=Hs(),xe!==t)for(;xe!==t;)Ne.push(xe),xe=Hs();else Ne=t;Ne!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=Ca(),q!==t?(pe=tc(),pe!==t?(Ne=Rr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&De(m)),xe!==t?(qe=Rr(),qe===t&&(qe=null),qe!==t?(dt=da(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Ca(),q!==t?(pe=Us(),pe!==t?(Ne=Rr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&De(m)),xe!==t?(qe=Rr(),qe===t&&(qe=null),qe!==t?(dt=da(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=Ca(),q!==t)if(pe=Us(),pe!==t)if(Ne=Rr(),Ne!==t)if(xe=AI(),xe!==t){if(qe=[],dt=Hs(),dt!==t)for(;dt!==t;)qe.push(dt),dt=Hs();else qe=t;qe!==t?(yt=R,q=w(pe,xe),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=Ca(),q!==t)if(pe=Us(),pe!==t){if(Ne=[],xe=G,qe=Rr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&De(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Fn=Us(),Fn!==t?(yt=xe,qe=D(pe,Fn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t),xe!==t)for(;xe!==t;)Ne.push(xe),xe=G,qe=Rr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&De(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Fn=Us(),Fn!==t?(yt=xe,qe=D(pe,Fn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t);else Ne=t;Ne!==t?(xe=Rr(),xe===t&&(xe=null),xe!==t?(r.charCodeAt(G)===58?(qe=p,G++):(qe=t,We===0&&De(m)),qe!==t?(dt=Rr(),dt===t&&(dt=null),dt!==t?(Ft=da(),Ft!==t?(yt=R,q=F(pe,Ne,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function da(){var R,q,pe,Ne,xe,qe,dt;if(R=G,q=G,We++,pe=G,Ne=Gs(),Ne!==t?(xe=$e(),xe!==t?(r.charCodeAt(G)===45?(qe=o,G++):(qe=t,We===0&&De(a)),qe!==t?(dt=Rr(),dt!==t?(Ne=[Ne,xe,qe,dt],pe=Ne):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t),We--,pe!==t?(G=q,q=void 0):q=t,q!==t?(pe=Hs(),pe!==t?(Ne=yo(),Ne!==t?(xe=ec(),xe!==t?(qe=BA(),qe!==t?(yt=R,q=H(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Gs(),q!==t?(pe=yo(),pe!==t?(Ne=Og(),Ne!==t?(xe=BA(),xe!==t?(yt=R,q=H(Ne),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=rc(),q!==t){if(pe=[],Ne=Hs(),Ne!==t)for(;Ne!==t;)pe.push(Ne),Ne=Hs();else pe=t;pe!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function Ca(){var R,q,pe;for(We++,R=G,q=[],r.charCodeAt(G)===32?(pe=z,G++):(pe=t,We===0&&De(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=z,G++):(pe=t,We===0&&De(W));return q!==t?(yt=G,pe=Z(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),We--,R===t&&(q=t,We===0&&De($)),R}function $e(){var R,q,pe;for(R=G,q=[],r.charCodeAt(G)===32?(pe=z,G++):(pe=t,We===0&&De(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=z,G++):(pe=t,We===0&&De(W));return q!==t?(yt=G,pe=A(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),R}function yo(){var R;return yt=G,R=ae(),R?R=void 0:R=t,R}function BA(){var R;return yt=G,R=ue(),R?R=void 0:R=t,R}function tc(){var R;return R=ic(),R===t&&(R=ed()),R}function Us(){var R,q,pe;if(R=ic(),R===t){if(R=G,q=[],pe=Kg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Kg();else q=t;q!==t&&(yt=R,q=_()),R=q}return R}function rc(){var R;return R=td(),R===t&&(R=lI(),R===t&&(R=ic(),R===t&&(R=ed()))),R}function AI(){var R;return R=td(),R===t&&(R=ic(),R===t&&(R=Kg())),R}function ed(){var R,q,pe,Ne,xe,qe;if(We++,R=G,L.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(ge)),q!==t){for(pe=[],Ne=G,xe=Rr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&De(Le)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Rr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&De(Le)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;return We--,R===t&&(q=t,We===0&&De(T)),R}function Kg(){var R,q,pe,Ne,xe;if(R=G,r.substr(G,2)===Te?(q=Te,G+=2):(q=t,We===0&&De(se)),q===t&&(q=null),q!==t)if(Ae.test(r.charAt(G))?(pe=r.charAt(G),G++):(pe=t,We===0&&De(Qe)),pe!==t){for(Ne=[],fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&De(le));xe!==t;)Ne.push(xe),fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&De(le));Ne!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function td(){var R,q;return R=G,r.substr(G,4)===Ge?(q=Ge,G+=4):(q=t,We===0&&De(ie)),q!==t&&(yt=R,q=Y()),R=q,R}function lI(){var R,q;return R=G,r.substr(G,4)===he?(q=he,G+=4):(q=t,We===0&&De(te)),q!==t&&(yt=R,q=me()),R=q,R===t&&(R=G,r.substr(G,5)===tt?(q=tt,G+=5):(q=t,We===0&&De(Rt)),q!==t&&(yt=R,q=It()),R=q),R}function ic(){var R,q,pe,Ne;return We++,R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&De(pi)),q!==t?(r.charCodeAt(G)===34?(pe=oi,G++):(pe=t,We===0&&De(pi)),pe!==t?(yt=R,q=pr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&De(pi)),q!==t?(pe=cI(),pe!==t?(r.charCodeAt(G)===34?(Ne=oi,G++):(Ne=t,We===0&&De(pi)),Ne!==t?(yt=R,q=di(pe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),We--,R===t&&(q=t,We===0&&De(Kr)),R}function cI(){var R,q,pe;if(R=G,q=[],pe=Ug(),pe!==t)for(;pe!==t;)q.push(pe),pe=Ug();else q=t;return q!==t&&(yt=R,q=ai(q)),R=q,R}function Ug(){var R,q,pe,Ne,xe,qe;return Os.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&De(dr)),R===t&&(R=G,r.substr(G,2)===Bi?(q=Bi,G+=2):(q=t,We===0&&De(_n)),q!==t&&(yt=R,q=ga()),R=q,R===t&&(R=G,r.substr(G,2)===CA?(q=CA,G+=2):(q=t,We===0&&De(Dg)),q!==t&&(yt=R,q=Zn()),R=q,R===t&&(R=G,r.substr(G,2)===mA?(q=mA,G+=2):(q=t,We===0&&De(fa)),q!==t&&(yt=R,q=jp()),R=q,R===t&&(R=G,r.substr(G,2)===EA?(q=EA,G+=2):(q=t,We===0&&De(IA)),q!==t&&(yt=R,q=wr()),R=q,R===t&&(R=G,r.substr(G,2)===zl?(q=zl,G+=2):(q=t,We===0&&De(kg)),q!==t&&(yt=R,q=mo()),R=q,R===t&&(R=G,r.substr(G,2)===Rg?(q=Rg,G+=2):(q=t,We===0&&De(qp)),q!==t&&(yt=R,q=Jp()),R=q,R===t&&(R=G,r.substr(G,2)===xr?(q=xr,G+=2):(q=t,We===0&&De(oe)),q!==t&&(yt=R,q=Eo()),R=q,R===t&&(R=G,r.substr(G,2)===Dn?(q=Dn,G+=2):(q=t,We===0&&De(Fg)),q!==t&&(yt=R,q=Qt()),R=q,R===t&&(R=G,r.substr(G,2)===Vl?(q=Vl,G+=2):(q=t,We===0&&De(kn)),q!==t?(pe=QA(),pe!==t?(Ne=QA(),Ne!==t?(xe=QA(),xe!==t?(qe=QA(),qe!==t?(yt=R,q=$n(pe,Ne,xe,qe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function QA(){var R;return es.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&De(ut)),R}function Rr(){var R,q;if(We++,R=[],at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(ln)),q!==t)for(;q!==t;)R.push(q),at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(ln));else R=t;return We--,R===t&&(q=t,We===0&&De(Io)),R}function uI(){var R,q;if(We++,R=[],Tt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(Ng)),q!==t)for(;q!==t;)R.push(q),Tt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(Ng));else R=t;return We--,R===t&&(q=t,We===0&&De(S)),R}function Hs(){var R,q,pe,Ne,xe,qe;if(R=G,q=Gs(),q!==t){for(pe=[],Ne=G,xe=Rr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Rr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(q=[q,pe],R=q):(G=R,R=t)}else G=R,R=t;return R}function Gs(){var R;return r.substr(G,2)===Xl?(R=Xl,G+=2):(R=t,We===0&&De(Wp)),R===t&&(r.charCodeAt(G)===10?(R=zp,G++):(R=t,We===0&&De(Vp)),R===t&&(r.charCodeAt(G)===13?(R=Xp,G++):(R=t,We===0&&De(_p)))),R}let Hg=2,bA=0;if(ha=n(),ha!==t&&G===r.length)return ha;throw ha!==t&&G{"use strict";var Hde=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=Hde(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};Rv.exports=OH;Rv.exports.default=OH});var KH=y((u$e,Gde)=>{Gde.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var yc=y(On=>{"use strict";var HH=KH(),So=process.env;Object.defineProperty(On,"_vendors",{value:HH.map(function(r){return r.constant})});On.name=null;On.isPR=null;HH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return UH(i)});if(On[r.constant]=t,t)switch(On.name=r.name,typeof r.pr){case"string":On.isPR=!!So[r.pr];break;case"object":"env"in r.pr?On.isPR=r.pr.env in So&&So[r.pr.env]!==r.pr.ne:"any"in r.pr?On.isPR=r.pr.any.some(function(i){return!!So[i]}):On.isPR=UH(r.pr);break;default:On.isPR=null}});On.isCI=!!(So.CI||So.CONTINUOUS_INTEGRATION||So.BUILD_NUMBER||So.RUN_ID||On.name);function UH(r){return typeof r=="string"?!!So[r]:Object.keys(r).every(function(e){return So[e]===r[e]})}});var _I=y(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});var Yde=0,jde=1,qde=2,Jde="",Wde="\0",zde=-1,Vde=/^(-h|--help)(?:=([0-9]+))?$/,Xde=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,_de=/^-[a-zA-Z]{2,}$/,Zde=/^([^=]+)=([\s\S]*)$/,$de=process.env.DEBUG_CLI==="1";Mn.BATCH_REGEX=_de;Mn.BINDING_REGEX=Zde;Mn.DEBUG=$de;Mn.END_OF_INPUT=Wde;Mn.HELP_COMMAND_INDEX=zde;Mn.HELP_REGEX=Vde;Mn.NODE_ERRORED=qde;Mn.NODE_INITIAL=Yde;Mn.NODE_SUCCESS=jde;Mn.OPTION_REGEX=Xde;Mn.START_OF_INPUT=Jde});var ZI=y(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var eCe=_I(),Fv=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},Nv=class extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(i=>i.reason!==null&&i.reason===t[0].reason)){let[{reason:i}]=this.candidates;this.message=`${i} - -${this.candidates.map(({usage:n})=>`$ ${n}`).join(` -`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean: - -$ ${i} -${Tv(e)}`}else this.message=`Command not found; did you mean one of: - -${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Tv(e)}`}},Lv=class extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: - -${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Tv(e)}`}},Tv=r=>`While running ${r.filter(e=>e!==eCe.END_OF_INPUT).map(e=>{let t=JSON.stringify(e);return e.match(/\s/)||e.length===0||t!==`"${e}"`?t:e}).join(" ")}`;Bd.AmbiguousSyntaxError=Lv;Bd.UnknownSyntaxError=Nv;Bd.UsageError=Fv});var Qa=y(FA=>{"use strict";Object.defineProperty(FA,"__esModule",{value:!0});var GH=ZI(),YH=Symbol("clipanion/isOption");function tCe(r){return{...r,[YH]:!0}}function rCe(r,e){return typeof r>"u"?[r,e]:typeof r=="object"&&r!==null&&!Array.isArray(r)?[void 0,r]:[r,e]}function Ov(r,e=!1){let t=r.replace(/^\.: /,"");return e&&(t=t[0].toLowerCase()+t.slice(1)),t}function jH(r,e){return e.length===1?new GH.UsageError(`${r}: ${Ov(e[0],!0)}`):new GH.UsageError(`${r}: -${e.map(t=>` -- ${Ov(t)}`).join("")}`)}function iCe(r,e,t){if(typeof t>"u")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!t(e,{errors:i,coercions:n,coercion:s}))throw jH(`Invalid value for ${r}`,i);for(let[,a]of n)a();return e}FA.applyValidator=iCe;FA.cleanValidationError=Ov;FA.formatError=jH;FA.isOptionSymbol=YH;FA.makeCommandOption=tCe;FA.rerouteArguments=rCe});var ns=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var qH=/^[a-zA-Z_][a-zA-Z0-9_]*$/,JH=/^#[0-9a-f]{6}$/i,WH=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,zH=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,VH=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Mv=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,XH=r=>()=>r;function bt({test:r}){return XH(r)()}function Zr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function NA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:qH.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function wc(r,e){return t=>{let i=r[e];return r[e]=t,wc(r,e).bind(null,i)}}function _H(r,e){return t=>{r[e]=t}}function $I(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}var ZH=()=>bt({test:(r,e)=>!0});function nCe(r){return bt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Zr(r)})`):!0})}var sCe=()=>bt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Zr(r)})`):!0});function oCe(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return bt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Zr(i)})`)})}var aCe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),ACe=()=>bt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=aCe.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Zr(r)})`)}return!0}}),lCe=()=>bt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Zr(r)})`)}return!0}}),cCe=()=>bt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&Mv.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Zr(r)})`)}return!0}}),uCe=(r,{delimiter:e}={})=>bt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Zr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=$H(r.length);return bt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Zr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;abt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Zr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return bt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Zr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:NA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:NA(n,l),coercion:wc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:NA(n,l)}),`Extraneous property (got ${Zr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:_H(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},pCe=r=>bt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Zr(e)})`)}),dCe=(r,{exclusive:e=!1}={})=>bt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),CCe=(r,e)=>bt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?wc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),mCe=r=>bt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),ECe=r=>bt({test:(e,t)=>e===null?!0:r(e,t)}),ICe=r=>bt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),yCe=r=>bt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),$H=r=>bt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),wCe=({map:r}={})=>bt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sbt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),QCe=()=>bt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),bCe=r=>bt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),SCe=r=>bt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),vCe=(r,e)=>bt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),xCe=(r,e)=>bt({test:(t,i)=>t>=r&&tbt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),DCe=r=>bt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Zr(e)})`)}),kCe=()=>bt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),RCe=()=>bt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),FCe=()=>bt({test:(r,e)=>VH.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Zr(r)})`)}),NCe=()=>bt({test:(r,e)=>Mv.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Zr(r)})`)}),LCe=({alpha:r=!1})=>bt({test:(e,t)=>(r?JH.test(e):WH.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Zr(e)})`)}),TCe=()=>bt({test:(r,e)=>zH.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Zr(r)})`)}),OCe=(r=ZH())=>bt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Zr(e)})`)}return r(i,t)}}),MCe=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${$I(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},KCe=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${$I(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},UCe=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(st.KeyRelationship||(st.KeyRelationship={}));var HCe={[st.KeyRelationship.Forbids]:{expect:!1,message:"forbids using"},[st.KeyRelationship.Requires]:{expect:!0,message:"requires using"}},GCe=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=HCe[e];return bt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${$I(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})};st.applyCascade=CCe;st.base64RegExp=zH;st.colorStringAlphaRegExp=WH;st.colorStringRegExp=JH;st.computeKey=NA;st.getPrintable=Zr;st.hasExactLength=$H;st.hasForbiddenKeys=KCe;st.hasKeyRelationship=GCe;st.hasMaxLength=yCe;st.hasMinLength=ICe;st.hasMutuallyExclusiveKeys=UCe;st.hasRequiredKeys=MCe;st.hasUniqueItems=wCe;st.isArray=uCe;st.isAtLeast=bCe;st.isAtMost=SCe;st.isBase64=TCe;st.isBoolean=ACe;st.isDate=cCe;st.isDict=fCe;st.isEnum=oCe;st.isHexColor=LCe;st.isISO8601=NCe;st.isInExclusiveRange=xCe;st.isInInclusiveRange=vCe;st.isInstanceOf=pCe;st.isInteger=PCe;st.isJSON=OCe;st.isLiteral=nCe;st.isLowerCase=kCe;st.isNegative=BCe;st.isNullable=ECe;st.isNumber=lCe;st.isObject=hCe;st.isOneOf=dCe;st.isOptional=mCe;st.isPositive=QCe;st.isString=sCe;st.isTuple=gCe;st.isUUID4=FCe;st.isUnknown=ZH;st.isUpperCase=RCe;st.iso8601RegExp=Mv;st.makeCoercionFn=wc;st.makeSetter=_H;st.makeTrait=XH;st.makeValidator=bt;st.matchesRegExp=DCe;st.plural=$I;st.pushError=pt;st.simpleKeyRegExp=qH;st.uuid4RegExp=VH});var Bc=y(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});var eG=Qa();function YCe(r){if(r&&r.__esModule)return r;var e=Object.create(null);return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}var Qd=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let t=this.constructor.schema;if(Array.isArray(t)){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(function(){return YCe(ns())}),a=o(n(s()),t),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw eG.formatError("Invalid option schema",l);for(let[,g]of c)g()}else if(t!=null)throw new Error("Invalid command schema");let i=await this.execute();return typeof i<"u"?i:0}};Qd.isOption=eG.isOptionSymbol;Qd.Default=[];Kv.Command=Qd});var Hv=y(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var tG=80,Uv=Array(tG).fill("\u2501");for(let r=0;r<=24;++r)Uv[Uv.length-r]=`\x1B[38;5;${232+r}m\u2501`;var jCe={header:r=>`\x1B[1m\u2501\u2501\u2501 ${r}${r.length`\x1B[1m${r}\x1B[22m`,error:r=>`\x1B[31m\x1B[1m${r}\x1B[22m\x1B[39m`,code:r=>`\x1B[36m${r}\x1B[39m`},qCe={header:r=>r,bold:r=>r,error:r=>r,code:r=>r};function JCe(r){let e=r.split(` -`),t=e.filter(n=>n.match(/\S/)),i=t.length>0?t.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(` -`)}function WCe(r,{format:e,paragraphs:t}){return r=r.replace(/\r\n?/g,` -`),r=JCe(r),r=r.replace(/^\n+|\n+$/g,""),r=r.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 - -`),r=r.replace(/\n(\n)?\n*/g,"$1"),t&&(r=r.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(` -`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(` -`)}).join(` - -`)),r=r.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),r=r.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),r?`${r} -`:""}bd.formatMarkdownish=WCe;bd.richFormat=jCe;bd.textFormat=qCe});var ny=y(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});var lt=_I(),ry=ZI();function Vi(r){lt.DEBUG&&console.log(r)}var rG={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:lt.HELP_COMMAND_INDEX};function Gv(){return{nodes:[Ti(),Ti(),Ti()]}}function iG(r){let e=Gv(),t=[],i=e.nodes.length;for(let n of r){t.push(i);for(let s=0;s{if(e.has(i))return;e.add(i);let n=r.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)t(a);for(let[,{to:o}]of n.dynamics)t(o);for(let{to:o}of n.shortcuts)t(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=r.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};t(lt.NODE_INITIAL)}function sG(r,{prefix:e=""}={}){if(lt.DEBUG){Vi(`${e}Nodes are:`);for(let t=0;tl!==lt.NODE_ERRORED).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===lt.NODE_ERRORED))throw new ry.UnknownSyntaxError(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=oG(a)}if(i.length>0){Vi(" Results:");for(let s of i)Vi(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else Vi(" No results");return i}function zCe(r,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(r.statics,lt.END_OF_INPUT)){for(let{to:t}of r.statics[lt.END_OF_INPUT])if(t===lt.NODE_SUCCESS)return!0}return!1}function VCe(r,e,t){let i=t&&e.length>0?[""]:[],n=Yv(r,e,t),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let m=r.nodes[p],w=Object.keys(m.statics);for(let B of Object.keys(m.statics)){let v=w[0];for(let{to:D,reducer:F}of m.statics[v])F==="pushPath"&&(u||l.push(v),g.push(D))}}u=!1}let f=JSON.stringify(l);o.has(f)||(s.push(l),o.add(f))};for(let{node:l,state:c}of n){if(c.remainder!==null){a([c.remainder],l);continue}let u=r.nodes[l],g=zCe(u,c);for(let[f,h]of Object.entries(u.statics))(g&&f!==lt.END_OF_INPUT||!f.startsWith("-")&&h.some(({reducer:p})=>p==="pushPath"))&&a([...i,f],l);if(!!g)for(let[f,{to:h}]of u.dynamics){if(h===lt.NODE_ERRORED)continue;let p=uG(f,c);if(p!==null)for(let m of p)a([...i,m],l)}}return[...s].sort()}function XCe(r,e){let t=Yv(r,[...e,lt.END_OF_INPUT]);return aG(e,t.map(({state:i})=>i))}function oG(r){let e=0;for(let{state:t}of r)t.path.length>e&&(e=t.path.length);return r.filter(({state:t})=>t.path.length===e)}function aG(r,e){let t=e.filter(g=>g.selectedIndex!==null);if(t.length===0)throw new Error;let i=t.filter(g=>g.requiredOptions.every(f=>f.some(h=>g.options.find(p=>p.name===h))));if(i.length===0)throw new ry.UnknownSyntaxError(r,t.map(g=>({usage:g.candidateUsage,reason:null})));let n=0;for(let g of i)g.path.length>n&&(n=g.path.length);let s=i.filter(g=>g.path.length===n),o=g=>g.positionals.filter(({extra:f})=>!f).length+g.options.length,a=s.map(g=>({state:g,positionalCount:o(g)})),l=0;for(let{positionalCount:g}of a)g>l&&(l=g);let c=a.filter(({positionalCount:g})=>g===l).map(({state:g})=>g),u=AG(c);if(u.length>1)throw new ry.AmbiguousSyntaxError(r,u.map(g=>g.candidateUsage));return u[0]}function AG(r){let e=[],t=[];for(let i of r)i.selectedIndex===lt.HELP_COMMAND_INDEX?t.push(i):e.push(i);return t.length>0&&e.push({...rG,path:lG(...t.map(i=>i.path)),options:t.reduce((i,n)=>i.concat(n.options),[])}),e}function lG(r,e,...t){return e===void 0?Array.from(r):lG(r.filter((i,n)=>i===e[n]),...t)}function Ti(){return{dynamics:[],shortcuts:[],statics:{}}}function jv(r){return r===lt.NODE_SUCCESS||r===lt.NODE_ERRORED}function ey(r,e=0){return{to:jv(r.to)?r.to:r.to>2?r.to+e-2:r.to+e,reducer:r.reducer}}function cG(r,e=0){let t=Ti();for(let[i,n]of r.dynamics)t.dynamics.push([i,ey(n,e)]);for(let i of r.shortcuts)t.shortcuts.push(ey(i,e));for(let[i,n]of Object.entries(r.statics))t.statics[i]=n.map(s=>ey(s,e));return t}function Ei(r,e,t,i,n){r.nodes[e].dynamics.push([t,{to:i,reducer:n}])}function Qc(r,e,t,i){r.nodes[e].shortcuts.push({to:t,reducer:i})}function vo(r,e,t,i,n){(Object.prototype.hasOwnProperty.call(r.nodes[e].statics,t)?r.nodes[e].statics[t]:r.nodes[e].statics[t]=[]).push({to:i,reducer:n})}function Sd(r,e,t,i){if(Array.isArray(e)){let[n,...s]=e;return r[n](t,i,...s)}else return r[e](t,i)}function uG(r,e){let t=Array.isArray(r)?vd[r[0]]:vd[r];if(typeof t.suggest>"u")return null;let i=Array.isArray(r)?r.slice(1):[];return t.suggest(e,...i)}var vd={always:()=>!0,isOptionLike:(r,e)=>!r.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(r,e)=>r.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(r,e,t,i)=>!r.ignoreOptions&&e===t,isBatchOption:(r,e,t)=>!r.ignoreOptions&<.BATCH_REGEX.test(e)&&[...e.slice(1)].every(i=>t.includes(`-${i}`)),isBoundOption:(r,e,t,i)=>{let n=e.match(lt.BINDING_REGEX);return!r.ignoreOptions&&!!n&<.OPTION_REGEX.test(n[1])&&t.includes(n[1])&&i.filter(s=>s.names.includes(n[1])).every(s=>s.allowBinding)},isNegatedOption:(r,e,t)=>!r.ignoreOptions&&e===`--no-${t.slice(2)}`,isHelp:(r,e)=>!r.ignoreOptions&<.HELP_REGEX.test(e),isUnsupportedOption:(r,e,t)=>!r.ignoreOptions&&e.startsWith("-")&<.OPTION_REGEX.test(e)&&!t.includes(e),isInvalidOption:(r,e)=>!r.ignoreOptions&&e.startsWith("-")&&!lt.OPTION_REGEX.test(e)};vd.isOption.suggest=(r,e,t=!0)=>t?null:[e];var ty={setCandidateState:(r,e,t)=>({...r,...t}),setSelectedIndex:(r,e,t)=>({...r,selectedIndex:t}),pushBatch:(r,e)=>({...r,options:r.options.concat([...e.slice(1)].map(t=>({name:`-${t}`,value:!0})))}),pushBound:(r,e)=>{let[,t,i]=e.match(lt.BINDING_REGEX);return{...r,options:r.options.concat({name:t,value:i})}},pushPath:(r,e)=>({...r,path:r.path.concat(e)}),pushPositional:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!1})}),pushExtra:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:xo})}),pushTrue:(r,e,t=e)=>({...r,options:r.options.concat({name:e,value:!0})}),pushFalse:(r,e,t=e)=>({...r,options:r.options.concat({name:t,value:!1})}),pushUndefined:(r,e)=>({...r,options:r.options.concat({name:e,value:void 0})}),pushStringValue:(r,e)=>{var t;let i={...r,options:[...r.options]},n=r.options[r.options.length-1];return n.value=((t=n.value)!==null&&t!==void 0?t:[]).concat([e]),i},setStringValue:(r,e)=>{let t={...r,options:[...r.options]},i=r.options[r.options.length-1];return i.value=e,t},inhibateOptions:r=>({...r,ignoreOptions:!0}),useHelp:(r,e,t)=>{let[,,i]=e.match(lt.HELP_REGEX);return typeof i<"u"?{...r,options:[{name:"-c",value:String(t)},{name:"-i",value:i}]}:{...r,options:[{name:"-c",value:String(t)}]}},setError:(r,e,t)=>e===lt.END_OF_INPUT?{...r,errorMessage:`${t}.`}:{...r,errorMessage:`${t} ("${e}").`},setOptionArityError:(r,e)=>{let t=r.options[r.options.length-1];return{...r,errorMessage:`Not enough arguments to option ${t.name}.`}}},xo=Symbol(),iy=class{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:i=this.arity.extra,proxy:n=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:i,proxy:n})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===xo)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!t&&this.arity.extra!==xo?this.arity.extra.push(e):this.arity.extra!==xo&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===xo)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let i=0;i1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(i))throw new Error(`The arity must be an integer, got ${i}`);if(i<0)throw new Error(`The arity must be positive, got ${i}`);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:i,hidden:n,required:s,allowBinding:o})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){let i=[this.cliOpts.binaryName],n=[];if(this.paths.length>0&&i.push(...this.paths[0]),e){for(let{names:o,arity:a,hidden:l,description:c,required:u}of this.options){if(l)continue;let g=[];for(let h=0;h`:`[${f}]`)}i.push(...this.arity.leading.map(o=>`<${o}>`)),this.arity.extra===xo?i.push("..."):i.push(...this.arity.extra.map(o=>`[${o}]`)),i.push(...this.arity.trailing.map(o=>`<${o}>`))}return{usage:i.join(" "),options:n}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=Gv(),t=lt.NODE_INITIAL,i=this.usage().usage,n=this.options.filter(a=>a.required).map(a=>a.names);t=ss(e,Ti()),vo(e,lt.NODE_INITIAL,lt.START_OF_INPUT,t,["setCandidateState",{candidateUsage:i,requiredOptions:n}]);let s=this.arity.proxy?"always":"isNotOptionLike",o=this.paths.length>0?this.paths:[[]];for(let a of o){let l=t;if(a.length>0){let f=ss(e,Ti());Qc(e,l,f),this.registerOptions(e,f),l=f}for(let f=0;f0||!this.arity.proxy){let f=ss(e,Ti());Ei(e,l,"isHelp",f,["useHelp",this.cliIndex]),vo(e,f,lt.END_OF_INPUT,lt.NODE_SUCCESS,["setSelectedIndex",lt.HELP_COMMAND_INDEX]),this.registerOptions(e,l)}this.arity.leading.length>0&&vo(e,l,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let c=l;for(let f=0;f0||f+1!==this.arity.leading.length)&&vo(e,h,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]),Ei(e,c,"isNotOptionLike",h,"pushPositional"),c=h}let u=c;if(this.arity.extra===xo||this.arity.extra.length>0){let f=ss(e,Ti());if(Qc(e,c,f),this.arity.extra===xo){let h=ss(e,Ti());this.arity.proxy||this.registerOptions(e,h),Ei(e,c,s,h,"pushExtraNoLimits"),Ei(e,h,s,h,"pushExtraNoLimits"),Qc(e,h,f)}else for(let h=0;h0&&vo(e,u,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let g=u;for(let f=0;fo.length>s.length?o:s,"");if(i.arity===0)for(let s of i.names)Ei(e,t,["isOption",s,i.hidden||s!==n],t,"pushTrue"),s.startsWith("--")&&!s.startsWith("--no-")&&Ei(e,t,["isNegatedOption",s],t,["pushFalse",s]);else{let s=ss(e,Ti());for(let o of i.names)Ei(e,t,["isOption",o,i.hidden||o!==n],s,"pushUndefined");for(let o=0;o=0&&eXCe(i,n),suggest:(n,s)=>VCe(i,n,s)}}};Ar.CliBuilder=xd;Ar.CommandBuilder=iy;Ar.NoLimits=xo;Ar.aggregateHelpStates=AG;Ar.cloneNode=cG;Ar.cloneTransition=ey;Ar.debug=Vi;Ar.debugMachine=sG;Ar.execute=Sd;Ar.injectNode=ss;Ar.isTerminalNode=jv;Ar.makeAnyOfMachine=iG;Ar.makeNode=Ti;Ar.makeStateMachine=Gv;Ar.reducers=ty;Ar.registerDynamic=Ei;Ar.registerShortcut=Qc;Ar.registerStatic=vo;Ar.runMachineInternal=Yv;Ar.selectBestState=aG;Ar.simplifyMachine=nG;Ar.suggest=uG;Ar.tests=vd;Ar.trimSmallerBranches=oG});var gG=y(qv=>{"use strict";Object.defineProperty(qv,"__esModule",{value:!0});var _Ce=Bc(),Pd=class extends _Ce.Command{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){let i=new Pd(t);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: -`),this.context.stdout.write(` -`);let t=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${t++}. `.padStart(5)}));this.context.stdout.write(` -`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. -`)}}};qv.HelpCommand=Pd});var mG=y(Jv=>{"use strict";Object.defineProperty(Jv,"__esModule",{value:!0});var ZCe=_I(),fG=Bc(),$Ce=J("tty"),eme=ny(),hn=Hv(),tme=gG();function rme(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var hG=rme($Ce),pG=Symbol("clipanion/errorCommand");function ime(){return process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}var LA=class{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:i,enableCapture:n=!1,enableColors:s}={}){this.registrations=new Map,this.builder=new eme.CliBuilder({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=i,this.enableCapture=n,this.enableColors=s}static from(e,t={}){let i=new LA(t);for(let n of e)i.register(n);return i}register(e){var t;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[fG.Command.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(t=e.paths)!==null&&t!==void 0?t:n.paths;if(typeof a<"u")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:t,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case ZCe.HELP_COMMAND_INDEX:return tme.HelpCommand.from(n,t);default:{let{commandClass:s}=t[n.selectedIndex],o=this.registrations.get(s);if(typeof o>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[pG]=a,l}}break}}async run(e,t){var i;let n,s={...LA.defaultContext,...t},o=(i=this.enableColors)!==null&&i!==void 0?i:s.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e)}catch(c){return s.stdout.write(this.error(c,{colored:o})),1}if(n.help)return s.stdout.write(this.usage(n,{colored:o,detailed:!0})),0;n.context=s,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(c,u)=>this.error(c,u),format:c=>this.format(c),process:c=>this.process(c),run:(c,u)=>this.run(c,{...s,...u}),usage:(c,u)=>this.usage(c,u)};let a=this.enableCapture?nme(s):CG,l;try{l=await a(()=>n.validateAndExecute().catch(c=>n.catch(c).then(()=>0)))}catch(c){return s.stdout.write(this.error(c,{colored:o,command:n})),1}return l}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){let{suggest:i}=this.builder.compile();return i(e,t)}definitions({colored:e=!1}={}){let t=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage>"u")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category<"u"?hn.formatMarkdownish(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description<"u"?hn.formatMarkdownish(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details<"u"?hn.formatMarkdownish(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples<"u"?i.usage.examples.map(([f,h])=>[hn.formatMarkdownish(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return t}usage(e=null,{colored:t,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage<"u";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof fG.Command?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=hn.formatMarkdownish(l,{format:this.format(t),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=` -`),(c!==""||u.length>0)&&(a+=`${this.format(t).header("Usage")} -`,a+=` -`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(t).bold(n)}${g} -`,f.length>0){a+=` -`,a+=`${hn.richFormat.header("Options")} -`;let h=f.reduce((p,m)=>Math.max(p,m.definition.length),0);a+=` -`;for(let{definition:p,description:m}of f)a+=` ${this.format(t).bold(p.padEnd(h))} ${hn.formatMarkdownish(m,{format:this.format(t),paragraphs:!1})}`}if(c!==""&&(a+=` -`,a+=`${this.format(t).header("Details")} -`,a+=` -`,a+=hn.formatMarkdownish(c,{format:this.format(t),paragraphs:!0})),u.length>0){a+=` -`,a+=`${this.format(t).header("Examples")} -`;for(let[h,p]of u)a+=` -`,a+=hn.formatMarkdownish(h,{format:this.format(t),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(t).bold(n)}`).replace(/\$0/g,this.binaryName)} -`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(t).bold(n)}${l} -`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage>"u")continue;let p=typeof f.usage.category<"u"?hn.formatMarkdownish(f.usage.category,{format:this.format(t),paragraphs:!1}):null,m=l.get(p);typeof m>"u"&&l.set(p,m=[]);let{usage:w}=this.getUsageByIndex(h);m.push({commandClass:f,usage:w})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel<"u",g=typeof this.binaryVersion<"u";u||g?(u&&g?a+=`${this.format(t).header(`${this.binaryLabel} - ${this.binaryVersion}`)} - -`:u?a+=`${this.format(t).header(`${this.binaryLabel}`)} -`:a+=`${this.format(t).header(`${this.binaryVersion}`)} -`,a+=` ${this.format(t).bold(n)}${this.binaryName} -`):a+=`${this.format(t).bold(n)}${this.binaryName} -`;for(let f of c){let h=l.get(f).slice().sort((m,w)=>m.usage.localeCompare(w.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=` -`,a+=`${this.format(t).header(`${p}`)} -`;for(let{commandClass:m,usage:w}of h){let B=m.usage.description||"undocumented";a+=` -`,a+=` ${this.format(t).bold(w)} -`,a+=` ${hn.formatMarkdownish(B,{format:this.format(t),paragraphs:!1})}`}}a+=` -`,a+=hn.formatMarkdownish("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(t),paragraphs:!0})}return a}error(e,t){var i,{colored:n,command:s=(i=e[pG])!==null&&i!==void 0?i:null}=t===void 0?{}:t;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message} -`;let l=e.clipanion;return typeof l<"u"?l.type==="usage"&&(o+=` -`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")} -`),o}format(e){var t;return((t=e!=null?e:this.enableColors)!==null&&t!==void 0?t:LA.defaultContext.colorDepth>1)?hn.richFormat:hn.textFormat}getUsageByRegistration(e,t){let i=this.registrations.get(e);if(typeof i>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}};LA.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:"getColorDepth"in hG.default.WriteStream.prototype?hG.default.WriteStream.prototype.getColorDepth():ime()};var dG;function nme(r){let e=dG;if(typeof e>"u"){if(r.stdout===process.stdout&&r.stderr===process.stderr)return CG;let{AsyncLocalStorage:t}=J("async_hooks");e=dG=new t;let i=process.stdout._write;process.stdout._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?i.call(this,s,o,a):l.stdout.write(s,o,a)};let n=process.stderr._write;process.stderr._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?n.call(this,s,o,a):l.stderr.write(s,o,a)}}return t=>e.run(r,t)}function CG(r){return r()}Jv.Cli=LA});var EG=y(Wv=>{"use strict";Object.defineProperty(Wv,"__esModule",{value:!0});var sme=Bc(),sy=class extends sme.Command{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} -`)}};sy.paths=[["--clipanion=definitions"]];Wv.DefinitionsCommand=sy});var IG=y(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});var ome=Bc(),oy=class extends ome.Command{async execute(){this.context.stdout.write(this.cli.usage())}};oy.paths=[["-h"],["--help"]];zv.HelpCommand=oy});var yG=y(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var ame=Bc(),ay=class extends ame.Command{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} -`)}};ay.paths=[["-v"],["--version"]];Vv.VersionCommand=ay});var wG=y(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});var Ame=EG(),lme=IG(),cme=yG();Dd.DefinitionsCommand=Ame.DefinitionsCommand;Dd.HelpCommand=lme.HelpCommand;Dd.VersionCommand=cme.VersionCommand});var QG=y(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var BG=Qa();function ume(r,e,t){let[i,n]=BG.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return BG.makeCommandOption({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i<"u"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}Xv.Array=ume});var SG=y(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var bG=Qa();function gme(r,e,t){let[i,n]=bG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return bG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}_v.Boolean=gme});var xG=y(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var vG=Qa();function fme(r,e,t){let[i,n]=vG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return vG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}Zv.Counter=fme});var PG=y($v=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var hme=Qa();function pme(r={}){return hme.makeCommandOption({definition(e,t){var i;e.addProxy({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){return i.positionals.map(({value:n})=>n)}})}$v.Proxy=pme});var DG=y(ex=>{"use strict";Object.defineProperty(ex,"__esModule",{value:!0});var dme=Qa(),Cme=ny();function mme(r={}){return dme.makeCommandOption({definition(e,t){var i;e.addRest({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){let n=o=>{let a=i.positionals[o];return a.extra===Cme.NoLimits||a.extra===!1&&oo)}})}ex.Rest=mme});var kG=y(tx=>{"use strict";Object.defineProperty(tx,"__esModule",{value:!0});var kd=Qa(),Eme=ny();function Ime(r,e,t){let[i,n]=kd.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return kd.makeCommandOption({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?kd.applyValidator(g!=null?g:c,f,n.validator):f}})}function yme(r={}){let{required:e=!0}=r;return kd.makeCommandOption({definition(t,i){var n;t.addPositional({name:(n=r.name)!==null&&n!==void 0?n:i,required:r.required})},transformer(t,i,n){var s;for(let o=0;o{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var Af=Qa(),Bme=QG(),Qme=SG(),bme=xG(),Sme=PG(),vme=DG(),xme=kG();pn.applyValidator=Af.applyValidator;pn.cleanValidationError=Af.cleanValidationError;pn.formatError=Af.formatError;pn.isOptionSymbol=Af.isOptionSymbol;pn.makeCommandOption=Af.makeCommandOption;pn.rerouteArguments=Af.rerouteArguments;pn.Array=Bme.Array;pn.Boolean=Qme.Boolean;pn.Counter=bme.Counter;pn.Proxy=Sme.Proxy;pn.Rest=vme.Rest;pn.String=xme.String});var Xe=y(TA=>{"use strict";Object.defineProperty(TA,"__esModule",{value:!0});var Pme=ZI(),Dme=Bc(),kme=Hv(),Rme=mG(),Fme=wG(),Nme=RG();TA.UsageError=Pme.UsageError;TA.Command=Dme.Command;TA.formatMarkdownish=kme.formatMarkdownish;TA.Cli=Rme.Cli;TA.Builtins=Fme;TA.Option=Nme});var NG=y((N$e,FG)=>{"use strict";FG.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var lf=y((L$e,rx)=>{"use strict";var Lme=NG(),LG=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=Lme(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};rx.exports=LG;rx.exports.default=LG});var Rd=y((O$e,TG)=>{var Tme="2.0.0",Ome=Number.MAX_SAFE_INTEGER||9007199254740991,Mme=16;TG.exports={SEMVER_SPEC_VERSION:Tme,MAX_LENGTH:256,MAX_SAFE_INTEGER:Ome,MAX_SAFE_COMPONENT_LENGTH:Mme}});var Fd=y((M$e,OG)=>{var Kme=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};OG.exports=Kme});var bc=y((MA,MG)=>{var{MAX_SAFE_COMPONENT_LENGTH:ix}=Rd(),Ume=Fd();MA=MG.exports={};var Hme=MA.re=[],_e=MA.src=[],Ze=MA.t={},Gme=0,St=(r,e,t)=>{let i=Gme++;Ume(i,e),Ze[r]=i,_e[i]=e,Hme[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${_e[Ze.NUMERICIDENTIFIER]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${_e[Ze.NUMERICIDENTIFIERLOOSE]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${_e[Ze.PRERELEASEIDENTIFIER]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${_e[Ze.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${_e[Ze.BUILDIDENTIFIER]}(?:\\.${_e[Ze.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${_e[Ze.MAINVERSION]}${_e[Ze.PRERELEASE]}?${_e[Ze.BUILD]}?`);St("FULL",`^${_e[Ze.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${_e[Ze.MAINVERSIONLOOSE]}${_e[Ze.PRERELEASELOOSE]}?${_e[Ze.BUILD]}?`);St("LOOSE",`^${_e[Ze.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${_e[Ze.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${_e[Ze.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:${_e[Ze.PRERELEASE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:${_e[Ze.PRERELEASELOOSE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${ix}})(?:\\.(\\d{1,${ix}}))?(?:\\.(\\d{1,${ix}}))?(?:$|[^\\d])`);St("COERCERTL",_e[Ze.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${_e[Ze.LONETILDE]}\\s+`,!0);MA.tildeTrimReplace="$1~";St("TILDE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${_e[Ze.LONECARET]}\\s+`,!0);MA.caretTrimReplace="$1^";St("CARET",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]}|${_e[Ze.XRANGEPLAIN]})`,!0);MA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${_e[Ze.XRANGEPLAIN]})\\s+-\\s+(${_e[Ze.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${_e[Ze.XRANGEPLAINLOOSE]})\\s+-\\s+(${_e[Ze.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var Nd=y((K$e,KG)=>{var Yme=["includePrerelease","loose","rtl"],jme=r=>r?typeof r!="object"?{loose:!0}:Yme.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};KG.exports=jme});var ly=y((U$e,GG)=>{var UG=/^[0-9]+$/,HG=(r,e)=>{let t=UG.test(r),i=UG.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rHG(e,r);GG.exports={compareIdentifiers:HG,rcompareIdentifiers:qme}});var Oi=y((H$e,JG)=>{var cy=Fd(),{MAX_LENGTH:YG,MAX_SAFE_INTEGER:uy}=Rd(),{re:jG,t:qG}=bc(),Jme=Nd(),{compareIdentifiers:Ld}=ly(),Kn=class{constructor(e,t){if(t=Jme(t),e instanceof Kn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>YG)throw new TypeError(`version is longer than ${YG} characters`);cy("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?jG[qG.LOOSE]:jG[qG.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>uy||this.major<0)throw new TypeError("Invalid major version");if(this.minor>uy||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>uy||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};JG.exports=Kn});var Sc=y((G$e,XG)=>{var{MAX_LENGTH:Wme}=Rd(),{re:WG,t:zG}=bc(),VG=Oi(),zme=Nd(),Vme=(r,e)=>{if(e=zme(e),r instanceof VG)return r;if(typeof r!="string"||r.length>Wme||!(e.loose?WG[zG.LOOSE]:WG[zG.FULL]).test(r))return null;try{return new VG(r,e)}catch{return null}};XG.exports=Vme});var ZG=y((Y$e,_G)=>{var Xme=Sc(),_me=(r,e)=>{let t=Xme(r,e);return t?t.version:null};_G.exports=_me});var eY=y((j$e,$G)=>{var Zme=Sc(),$me=(r,e)=>{let t=Zme(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};$G.exports=$me});var rY=y((q$e,tY)=>{var eEe=Oi(),tEe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new eEe(r,t).inc(e,i).version}catch{return null}};tY.exports=tEe});var os=y((J$e,nY)=>{var iY=Oi(),rEe=(r,e,t)=>new iY(r,t).compare(new iY(e,t));nY.exports=rEe});var gy=y((W$e,sY)=>{var iEe=os(),nEe=(r,e,t)=>iEe(r,e,t)===0;sY.exports=nEe});var AY=y((z$e,aY)=>{var oY=Sc(),sEe=gy(),oEe=(r,e)=>{if(sEe(r,e))return null;{let t=oY(r),i=oY(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};aY.exports=oEe});var cY=y((V$e,lY)=>{var aEe=Oi(),AEe=(r,e)=>new aEe(r,e).major;lY.exports=AEe});var gY=y((X$e,uY)=>{var lEe=Oi(),cEe=(r,e)=>new lEe(r,e).minor;uY.exports=cEe});var hY=y((_$e,fY)=>{var uEe=Oi(),gEe=(r,e)=>new uEe(r,e).patch;fY.exports=gEe});var dY=y((Z$e,pY)=>{var fEe=Sc(),hEe=(r,e)=>{let t=fEe(r,e);return t&&t.prerelease.length?t.prerelease:null};pY.exports=hEe});var mY=y(($$e,CY)=>{var pEe=os(),dEe=(r,e,t)=>pEe(e,r,t);CY.exports=dEe});var IY=y((eet,EY)=>{var CEe=os(),mEe=(r,e)=>CEe(r,e,!0);EY.exports=mEe});var fy=y((tet,wY)=>{var yY=Oi(),EEe=(r,e,t)=>{let i=new yY(r,t),n=new yY(e,t);return i.compare(n)||i.compareBuild(n)};wY.exports=EEe});var QY=y((ret,BY)=>{var IEe=fy(),yEe=(r,e)=>r.sort((t,i)=>IEe(t,i,e));BY.exports=yEe});var SY=y((iet,bY)=>{var wEe=fy(),BEe=(r,e)=>r.sort((t,i)=>wEe(i,t,e));bY.exports=BEe});var Td=y((net,vY)=>{var QEe=os(),bEe=(r,e,t)=>QEe(r,e,t)>0;vY.exports=bEe});var hy=y((set,xY)=>{var SEe=os(),vEe=(r,e,t)=>SEe(r,e,t)<0;xY.exports=vEe});var nx=y((oet,PY)=>{var xEe=os(),PEe=(r,e,t)=>xEe(r,e,t)!==0;PY.exports=PEe});var py=y((aet,DY)=>{var DEe=os(),kEe=(r,e,t)=>DEe(r,e,t)>=0;DY.exports=kEe});var dy=y((Aet,kY)=>{var REe=os(),FEe=(r,e,t)=>REe(r,e,t)<=0;kY.exports=FEe});var sx=y((cet,RY)=>{var NEe=gy(),LEe=nx(),TEe=Td(),OEe=py(),MEe=hy(),KEe=dy(),UEe=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return NEe(r,t,i);case"!=":return LEe(r,t,i);case">":return TEe(r,t,i);case">=":return OEe(r,t,i);case"<":return MEe(r,t,i);case"<=":return KEe(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};RY.exports=UEe});var NY=y((uet,FY)=>{var HEe=Oi(),GEe=Sc(),{re:Cy,t:my}=bc(),YEe=(r,e)=>{if(r instanceof HEe)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Cy[my.COERCE]);else{let i;for(;(i=Cy[my.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Cy[my.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Cy[my.COERCERTL].lastIndex=-1}return t===null?null:GEe(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};FY.exports=YEe});var TY=y((get,LY)=>{"use strict";LY.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Od=y((fet,OY)=>{"use strict";OY.exports=Ht;Ht.Node=vc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var WEe=Od(),xc=Symbol("max"),Sa=Symbol("length"),cf=Symbol("lengthCalculator"),Kd=Symbol("allowStale"),Pc=Symbol("maxAge"),ba=Symbol("dispose"),MY=Symbol("noDisposeOnSet"),Ii=Symbol("lruList"),zs=Symbol("cache"),UY=Symbol("updateAgeOnGet"),ox=()=>1,Ax=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[xc]=e.max||1/0,i=e.length||ox;if(this[cf]=typeof i!="function"?ox:i,this[Kd]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Pc]=e.maxAge||0,this[ba]=e.dispose,this[MY]=e.noDisposeOnSet||!1,this[UY]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[xc]=e||1/0,Md(this)}get max(){return this[xc]}set allowStale(e){this[Kd]=!!e}get allowStale(){return this[Kd]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Pc]=e,Md(this)}get maxAge(){return this[Pc]}set lengthCalculator(e){typeof e!="function"&&(e=ox),e!==this[cf]&&(this[cf]=e,this[Sa]=0,this[Ii].forEach(t=>{t.length=this[cf](t.value,t.key),this[Sa]+=t.length})),Md(this)}get lengthCalculator(){return this[cf]}get length(){return this[Sa]}get itemCount(){return this[Ii].length}rforEach(e,t){t=t||this;for(let i=this[Ii].tail;i!==null;){let n=i.prev;KY(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[Ii].head;i!==null;){let n=i.next;KY(this,e,i,t),i=n}}keys(){return this[Ii].toArray().map(e=>e.key)}values(){return this[Ii].toArray().map(e=>e.value)}reset(){this[ba]&&this[Ii]&&this[Ii].length&&this[Ii].forEach(e=>this[ba](e.key,e.value)),this[zs]=new Map,this[Ii]=new WEe,this[Sa]=0}dump(){return this[Ii].map(e=>Ey(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ii]}set(e,t,i){if(i=i||this[Pc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[cf](t,e);if(this[zs].has(e)){if(s>this[xc])return uf(this,this[zs].get(e)),!1;let l=this[zs].get(e).value;return this[ba]&&(this[MY]||this[ba](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[Sa]+=s-l.length,l.length=s,this.get(e),Md(this),!0}let o=new lx(e,t,s,n,i);return o.length>this[xc]?(this[ba]&&this[ba](e,t),!1):(this[Sa]+=o.length,this[Ii].unshift(o),this[zs].set(e,this[Ii].head),Md(this),!0)}has(e){if(!this[zs].has(e))return!1;let t=this[zs].get(e).value;return!Ey(this,t)}get(e){return ax(this,e,!0)}peek(e){return ax(this,e,!1)}pop(){let e=this[Ii].tail;return e?(uf(this,e),e.value):null}del(e){uf(this,this[zs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[zs].forEach((e,t)=>ax(this,t,!1))}},ax=(r,e,t)=>{let i=r[zs].get(e);if(i){let n=i.value;if(Ey(r,n)){if(uf(r,i),!r[Kd])return}else t&&(r[UY]&&(i.value.now=Date.now()),r[Ii].unshiftNode(i));return n.value}},Ey=(r,e)=>{if(!e||!e.maxAge&&!r[Pc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Pc]&&t>r[Pc]},Md=r=>{if(r[Sa]>r[xc])for(let e=r[Ii].tail;r[Sa]>r[xc]&&e!==null;){let t=e.prev;uf(r,e),e=t}},uf=(r,e)=>{if(e){let t=e.value;r[ba]&&r[ba](t.key,t.value),r[Sa]-=t.length,r[zs].delete(t.key),r[Ii].removeNode(e)}},lx=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},KY=(r,e,t,i)=>{let n=t.value;Ey(r,n)&&(uf(r,t),r[Kd]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};HY.exports=Ax});var as=y((pet,JY)=>{var Dc=class{constructor(e,t){if(t=VEe(t),e instanceof Dc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Dc(e.raw,t);if(e instanceof cx)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!jY(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&eIe(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=YY.get(i);if(n)return n;let s=this.options.loose,o=s?Mi[bi.HYPHENRANGELOOSE]:Mi[bi.HYPHENRANGE];e=e.replace(o,cIe(this.options.includePrerelease)),jr("hyphen replace",e),e=e.replace(Mi[bi.COMPARATORTRIM],_Ee),jr("comparator trim",e,Mi[bi.COMPARATORTRIM]),e=e.replace(Mi[bi.TILDETRIM],ZEe),e=e.replace(Mi[bi.CARETTRIM],$Ee),e=e.split(/\s+/).join(" ");let a=s?Mi[bi.COMPARATORLOOSE]:Mi[bi.COMPARATOR],l=e.split(" ").map(f=>tIe(f,this.options)).join(" ").split(/\s+/).map(f=>lIe(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new cx(f,this.options)),c=l.length,u=new Map;for(let f of l){if(jY(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return YY.set(i,g),g}intersects(e,t){if(!(e instanceof Dc))throw new TypeError("a Range is required");return this.set.some(i=>qY(i,t)&&e.set.some(n=>qY(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new XEe(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",eIe=r=>r.value==="",qY=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},tIe=(r,e)=>(jr("comp",r,e),r=nIe(r,e),jr("caret",r),r=rIe(r,e),jr("tildes",r),r=oIe(r,e),jr("xrange",r),r=AIe(r,e),jr("stars",r),r),Xi=r=>!r||r.toLowerCase()==="x"||r==="*",rIe=(r,e)=>r.trim().split(/\s+/).map(t=>iIe(t,e)).join(" "),iIe=(r,e)=>{let t=e.loose?Mi[bi.TILDELOOSE]:Mi[bi.TILDE];return r.replace(t,(i,n,s,o,a)=>{jr("tilde",r,i,n,s,o,a);let l;return Xi(n)?l="":Xi(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Xi(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(jr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,jr("tilde return",l),l})},nIe=(r,e)=>r.trim().split(/\s+/).map(t=>sIe(t,e)).join(" "),sIe=(r,e)=>{jr("caret",r,e);let t=e.loose?Mi[bi.CARETLOOSE]:Mi[bi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{jr("caret",r,n,s,o,a,l);let c;return Xi(s)?c="":Xi(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Xi(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(jr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(jr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),jr("caret return",c),c})},oIe=(r,e)=>(jr("replaceXRanges",r,e),r.split(/\s+/).map(t=>aIe(t,e)).join(" ")),aIe=(r,e)=>{r=r.trim();let t=e.loose?Mi[bi.XRANGELOOSE]:Mi[bi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{jr("xRange",r,i,n,s,o,a,l);let c=Xi(s),u=c||Xi(o),g=u||Xi(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),jr("xRange return",i),i})},AIe=(r,e)=>(jr("replaceStars",r,e),r.trim().replace(Mi[bi.STAR],"")),lIe=(r,e)=>(jr("replaceGTE0",r,e),r.trim().replace(Mi[e.includePrerelease?bi.GTE0PRE:bi.GTE0],"")),cIe=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>(Xi(i)?t="":Xi(n)?t=`>=${i}.0.0${r?"-0":""}`:Xi(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Xi(c)?l="":Xi(u)?l=`<${+c+1}.0.0-0`:Xi(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),uIe=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Ud=y((det,_Y)=>{var Hd=Symbol("SemVer ANY"),gf=class{static get ANY(){return Hd}constructor(e,t){if(t=gIe(t),e instanceof gf){if(e.loose===!!t.loose)return e;e=e.value}gx("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Hd?this.value="":this.value=this.operator+this.semver.version,gx("comp",this)}parse(e){let t=this.options.loose?WY[zY.COMPARATORLOOSE]:WY[zY.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new VY(i[2],this.options.loose):this.semver=Hd}toString(){return this.value}test(e){if(gx("Comparator.test",e,this.options.loose),this.semver===Hd||e===Hd)return!0;if(typeof e=="string")try{e=new VY(e,this.options)}catch{return!1}return ux(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof gf))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new XY(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new XY(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=ux(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=ux(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};_Y.exports=gf;var gIe=Nd(),{re:WY,t:zY}=bc(),ux=sx(),gx=Fd(),VY=Oi(),XY=as()});var Gd=y((Cet,ZY)=>{var fIe=as(),hIe=(r,e,t)=>{try{e=new fIe(e,t)}catch{return!1}return e.test(r)};ZY.exports=hIe});var ej=y((met,$Y)=>{var pIe=as(),dIe=(r,e)=>new pIe(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));$Y.exports=dIe});var rj=y((Eet,tj)=>{var CIe=Oi(),mIe=as(),EIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new mIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new CIe(i,t))}),i};tj.exports=EIe});var nj=y((Iet,ij)=>{var IIe=Oi(),yIe=as(),wIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new yIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new IIe(i,t))}),i};ij.exports=wIe});var aj=y((yet,oj)=>{var fx=Oi(),BIe=as(),sj=Td(),QIe=(r,e)=>{r=new BIe(r,e);let t=new fx("0.0.0");if(r.test(t)||(t=new fx("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new fx(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||sj(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||sj(t,s))&&(t=s)}return t&&r.test(t)?t:null};oj.exports=QIe});var lj=y((wet,Aj)=>{var bIe=as(),SIe=(r,e)=>{try{return new bIe(r,e).range||"*"}catch{return null}};Aj.exports=SIe});var Iy=y((Bet,fj)=>{var vIe=Oi(),gj=Ud(),{ANY:xIe}=gj,PIe=as(),DIe=Gd(),cj=Td(),uj=hy(),kIe=dy(),RIe=py(),FIe=(r,e,t,i)=>{r=new vIe(r,i),e=new PIe(e,i);let n,s,o,a,l;switch(t){case">":n=cj,s=kIe,o=uj,a=">",l=">=";break;case"<":n=uj,s=RIe,o=cj,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(DIe(r,e,i))return!1;for(let c=0;c{h.semver===xIe&&(h=new gj(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};fj.exports=FIe});var pj=y((Qet,hj)=>{var NIe=Iy(),LIe=(r,e,t)=>NIe(r,e,">",t);hj.exports=LIe});var Cj=y((bet,dj)=>{var TIe=Iy(),OIe=(r,e,t)=>TIe(r,e,"<",t);dj.exports=OIe});var Ij=y((vet,Ej)=>{var mj=as(),MIe=(r,e,t)=>(r=new mj(r,t),e=new mj(e,t),r.intersects(e));Ej.exports=MIe});var wj=y((xet,yj)=>{var KIe=Gd(),UIe=os();yj.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>UIe(u,g,t));for(let u of o)KIe(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var Bj=as(),yy=Ud(),{ANY:hx}=yy,Yd=Gd(),px=os(),HIe=(r,e,t={})=>{if(r===e)return!0;r=new Bj(r,t),e=new Bj(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=GIe(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},GIe=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===hx){if(e.length===1&&e[0].semver===hx)return!0;t.includePrerelease?r=[new yy(">=0.0.0-0")]:r=[new yy(">=0.0.0")]}if(e.length===1&&e[0].semver===hx){if(t.includePrerelease)return!0;e=[new yy(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=Qj(n,h,t):h.operator==="<"||h.operator==="<="?s=bj(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=px(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!Yd(h,String(n),t)||s&&!Yd(h,String(s),t))return null;for(let p of e)if(!Yd(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=Qj(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!Yd(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=bj(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!Yd(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},Qj=(r,e,t)=>{if(!r)return e;let i=px(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},bj=(r,e,t)=>{if(!r)return e;let i=px(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};Sj.exports=HIe});var $r=y((Det,xj)=>{var dx=bc();xj.exports={re:dx.re,src:dx.src,tokens:dx.t,SEMVER_SPEC_VERSION:Rd().SEMVER_SPEC_VERSION,SemVer:Oi(),compareIdentifiers:ly().compareIdentifiers,rcompareIdentifiers:ly().rcompareIdentifiers,parse:Sc(),valid:ZG(),clean:eY(),inc:rY(),diff:AY(),major:cY(),minor:gY(),patch:hY(),prerelease:dY(),compare:os(),rcompare:mY(),compareLoose:IY(),compareBuild:fy(),sort:QY(),rsort:SY(),gt:Td(),lt:hy(),eq:gy(),neq:nx(),gte:py(),lte:dy(),cmp:sx(),coerce:NY(),Comparator:Ud(),Range:as(),satisfies:Gd(),toComparators:ej(),maxSatisfying:rj(),minSatisfying:nj(),minVersion:aj(),validRange:lj(),outside:Iy(),gtr:pj(),ltr:Cj(),intersects:Ij(),simplifyRange:wj(),subset:vj()}});var Cx=y(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0});wy.VERSION=void 0;wy.VERSION="9.1.0"});var Gt=y((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof By=="object"&&By.exports?By.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:Pj,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var m=this.disjunction();this.consumeChar("/");for(var w={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(w,"global");break;case"i":o(w,"ignoreCase");break;case"m":o(w,"multiLine");break;case"u":o(w,"unicode");break;case"y":o(w,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:w,value:m,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],m=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(m)}},r.prototype.alternative=function(){for(var p=[],m=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(m)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var m;switch(this.popChar()){case"=":m="Lookahead";break;case"!":m="NegativeLookahead";break}a(m);var w=this.disjunction();return this.consumeChar(")"),{type:m,value:w,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var m,w=this.idx;switch(this.popChar()){case"*":m={atLeast:0,atMost:1/0};break;case"+":m={atLeast:1,atMost:1/0};break;case"?":m={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":m={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),m={atLeast:B,atMost:v}):m={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&m===void 0)return;a(m);break}if(!(p===!0&&m===void 0))return a(m),this.peekChar(0)==="?"?(this.consumeChar("?"),m.greedy=!1):m.greedy=!0,m.type="Quantifier",m.loc=this.loc(w),m},r.prototype.atom=function(){var p,m=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(m),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` -`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,m=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,m=!0;break;case"s":p=f;break;case"S":p=f,m=!0;break;case"w":p=g;break;case"W":p=g,m=!0;break}return a(p),{type:"Set",value:p,complement:m}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` -`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var m=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:m}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],m=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),m=!0);this.isClassAtom();){var w=this.classAtom(),B=w.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,m){p.length!==void 0?p.forEach(function(w){m.push(w)}):m.push(p)}function o(p,m){if(p[m]===!0)throw"duplicate flag "+m;p[m]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` -`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var m in p){var w=p[m];p.hasOwnProperty(m)&&(w.type!==void 0?this.visit(w):Array.isArray(w)&&w.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var Sy=y(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.clearRegExpParserCache=ff.getRegExpAst=void 0;var YIe=Qy(),by={},jIe=new YIe.RegExpParser;function qIe(r){var e=r.toString();if(by.hasOwnProperty(e))return by[e];var t=jIe.pattern(e);return by[e]=t,t}ff.getRegExpAst=qIe;function JIe(){by={}}ff.clearRegExpParserCache=JIe});var Nj=y(dn=>{"use strict";var WIe=dn&&dn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dn,"__esModule",{value:!0});dn.canMatchCharCode=dn.firstCharOptimizedIndices=dn.getOptimizedStartCodesIndices=dn.failedOptimizationPrefixMsg=void 0;var kj=Qy(),As=Gt(),Rj=Sy(),va=Ex(),Fj="Complement Sets are not supported for first char optimization";dn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: -`;function zIe(r,e){e===void 0&&(e=!1);try{var t=(0,Rj.getRegExpAst)(r),i=xy(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===Fj)e&&(0,As.PRINT_WARNING)(""+dn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > -`)+` Complement Sets cannot be automatically optimized. - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,As.PRINT_ERROR)(dn.failedOptimizationPrefixMsg+` -`+(" Failed parsing: < "+r.toString()+` > -`)+(" Using the regexp-to-ast library version: "+kj.VERSION+` -`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}dn.getOptimizedStartCodesIndices=zIe;function xy(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=va.minOptimizationVal)for(var f=u.from>=va.minOptimizationVal?u.from:va.minOptimizationVal,h=u.to,p=(0,va.charCodeToOptimizedIndex)(f),m=(0,va.charCodeToOptimizedIndex)(h),w=p;w<=m;w++)e[w]=w}}});break;case"Group":xy(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&mx(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,As.values)(e)}dn.firstCharOptimizedIndices=xy;function vy(r,e,t){var i=(0,va.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&VIe(r,e)}function VIe(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,va.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,va.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function Dj(r,e){return(0,As.find)(r.value,function(t){if(typeof t=="number")return(0,As.contains)(e,t);var i=t;return(0,As.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function mx(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,As.isArray)(r.value)?(0,As.every)(r.value,mx):mx(r.value):!1}var XIe=function(r){WIe(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,As.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?Dj(t,this.targetCharCodes)===void 0&&(this.found=!0):Dj(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(kj.BaseRegExpVisitor);function _Ie(r,e){if(e instanceof RegExp){var t=(0,Rj.getRegExpAst)(e),i=new XIe(r);return i.visit(t),i.found}else return(0,As.find)(e,function(n){return(0,As.contains)(r,n.charCodeAt(0))})!==void 0}dn.canMatchCharCode=_Ie});var Ex=y(Je=>{"use strict";var Lj=Je&&Je.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Je,"__esModule",{value:!0});Je.charCodeToOptimizedIndex=Je.minOptimizationVal=Je.buildLineBreakIssueMessage=Je.LineTerminatorOptimizedTester=Je.isShortPattern=Je.isCustomPattern=Je.cloneEmptyGroups=Je.performWarningRuntimeChecks=Je.performRuntimeChecks=Je.addStickyFlag=Je.addStartOfInput=Je.findUnreachablePatterns=Je.findModesThatDoNotExist=Je.findInvalidGroupType=Je.findDuplicatePatterns=Je.findUnsupportedFlags=Je.findStartOfInputAnchor=Je.findEmptyMatchRegExps=Je.findEndOfInputAnchor=Je.findInvalidPatterns=Je.findMissingPatterns=Je.validatePatterns=Je.analyzeTokenTypes=Je.enableSticky=Je.disableSticky=Je.SUPPORT_STICKY=Je.MODES=Je.DEFAULT_MODE=void 0;var Tj=Qy(),ir=jd(),Se=Gt(),hf=Nj(),Oj=Sy(),Po="PATTERN";Je.DEFAULT_MODE="defaultMode";Je.MODES="modes";Je.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function ZIe(){Je.SUPPORT_STICKY=!1}Je.disableSticky=ZIe;function $Ie(){Je.SUPPORT_STICKY=!0}Je.enableSticky=$Ie;function eye(r,e){e=(0,Se.defaults)(e,{useSticky:Je.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){cye()});var i;t("Reject Lexer.NA",function(){i=(0,Se.reject)(r,function(v){return v[Po]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,Se.map)(i,function(v){var D=v[Po];if((0,Se.isRegExp)(D)){var F=D.source;return F.length===1&&F!=="^"&&F!=="$"&&F!=="."&&!D.ignoreCase?F:F.length===2&&F[0]==="\\"&&!(0,Se.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],F[1])?F[1]:e.useSticky?wx(D):yx(D)}else{if((0,Se.isFunction)(D))return n=!0,{exec:D};if((0,Se.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?wx(j):yx(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,Se.map)(i,function(v){return v.tokenTypeIdx}),a=(0,Se.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,Se.isString)(D))return D;if((0,Se.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,Se.map)(i,function(v){var D=v.LONGER_ALT;if(D){var F=(0,Se.isArray)(D)?(0,Se.map)(D,function(H){return(0,Se.indexOf)(i,H)}):[(0,Se.indexOf)(i,D)];return F}}),c=(0,Se.map)(i,function(v){return v.PUSH_MODE}),u=(0,Se.map)(i,function(v){return(0,Se.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=_j(e.lineTerminatorCharacters);g=(0,Se.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,Se.map)(i,function(D){if((0,Se.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(Vj(D,v)===!1)return(0,hf.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,m;t("Misc Mapping #2",function(){f=(0,Se.map)(i,Qx),h=(0,Se.map)(s,zj),p=(0,Se.reduce)(i,function(v,D){var F=D.GROUP;return(0,Se.isString)(F)&&F!==ir.Lexer.SKIPPED&&(v[F]=[]),v},{}),m=(0,Se.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var w=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,Se.reduce)(i,function(v,D,F){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Bx(H);Ix(v,j,m[F])}else if((0,Se.isArray)(D.START_CHARS_HINT)){var $;(0,Se.forEach)(D.START_CHARS_HINT,function(W){var Z=typeof W=="string"?W.charCodeAt(0):W,A=Bx(Z);$!==A&&($=A,Ix(v,A,m[F]))})}else if((0,Se.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)w=!1,e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+hf.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. -`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. - This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var z=(0,hf.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,Se.isEmpty)(z)&&(w=!1),(0,Se.forEach)(z,function(W){Ix(v,W,m[F])})}else e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+hf.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. -`)+` This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),w=!1;return v},[])}),t("ArrayPacking",function(){B=(0,Se.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:m,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:w}}Je.analyzeTokenTypes=eye;function tye(r,e){var t=[],i=Mj(r);t=t.concat(i.errors);var n=Kj(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(rye(s)),t=t.concat(qj(s)),t=t.concat(Jj(s,e)),t=t.concat(Wj(s)),t}Je.validatePatterns=tye;function rye(r){var e=[],t=(0,Se.filter)(r,function(i){return(0,Se.isRegExp)(i[Po])});return e=e.concat(Uj(t)),e=e.concat(Gj(t)),e=e.concat(Yj(t)),e=e.concat(jj(t)),e=e.concat(Hj(t)),e}function Mj(r){var e=(0,Se.filter)(r,function(n){return!(0,Se.has)(n,Po)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findMissingPatterns=Mj;function Kj(r){var e=(0,Se.filter)(r,function(n){var s=n[Po];return!(0,Se.isRegExp)(s)&&!(0,Se.isFunction)(s)&&!(0,Se.has)(s,"exec")&&!(0,Se.isString)(s)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findInvalidPatterns=Kj;var iye=/[^\\][\$]/;function Uj(r){var e=function(n){Lj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(Tj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Po];try{var o=(0,Oj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return iye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findEndOfInputAnchor=Uj;function Hj(r){var e=(0,Se.filter)(r,function(i){var n=i[Po];return n.test("")}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Je.findEmptyMatchRegExps=Hj;var nye=/[^\\[][\^]|^\^/;function Gj(r){var e=function(n){Lj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(Tj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Po];try{var o=(0,Oj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return nye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findStartOfInputAnchor=Gj;function Yj(r){var e=(0,Se.filter)(r,function(i){var n=i[Po];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Je.findUnsupportedFlags=Yj;function jj(r){var e=[],t=(0,Se.map)(r,function(s){return(0,Se.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Se.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,Se.compact)(t);var i=(0,Se.filter)(t,function(s){return s.length>1}),n=(0,Se.map)(i,function(s){var o=(0,Se.map)(s,function(l){return l.name}),a=(0,Se.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Je.findDuplicatePatterns=jj;function qj(r){var e=(0,Se.filter)(r,function(i){if(!(0,Se.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,Se.isString)(n)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Je.findInvalidGroupType=qj;function Jj(r,e){var t=(0,Se.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,Se.contains)(e,n.PUSH_MODE)}),i=(0,Se.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Je.findModesThatDoNotExist=Jj;function Wj(r){var e=[],t=(0,Se.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,Se.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Se.isRegExp)(o)&&oye(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Se.forEach)(r,function(i,n){(0,Se.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Je.findUnreachablePatterns=Wj;function sye(r,e){if((0,Se.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,Se.isFunction)(e))return e(r,0,[],{});if((0,Se.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function oye(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Se.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function yx(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Je.addStartOfInput=yx;function wx(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Je.addStickyFlag=wx;function aye(r,e,t){var i=[];return(0,Se.has)(r,Je.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.DEFAULT_MODE+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Se.has)(r,Je.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.MODES+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Se.has)(r,Je.MODES)&&(0,Se.has)(r,Je.DEFAULT_MODE)&&!(0,Se.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Je.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Se.has)(r,Je.MODES)&&(0,Se.forEach)(r.modes,function(n,s){(0,Se.forEach)(n,function(o,a){(0,Se.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> -`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Je.performRuntimeChecks=aye;function Aye(r,e,t){var i=[],n=!1,s=(0,Se.compact)((0,Se.flatten)((0,Se.mapValues)(r.modes,function(l){return l}))),o=(0,Se.reject)(s,function(l){return l[Po]===ir.Lexer.NA}),a=_j(t);return e&&(0,Se.forEach)(o,function(l){var c=Vj(l,a);if(c!==!1){var u=Xj(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,Se.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,hf.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. - This Lexer has been defined to track line and column information, - But none of the Token Types can be identified as matching a line terminator. - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Je.performWarningRuntimeChecks=Aye;function lye(r){var e={},t=(0,Se.keys)(r);return(0,Se.forEach)(t,function(i){var n=r[i];if((0,Se.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Je.cloneEmptyGroups=lye;function Qx(r){var e=r.PATTERN;if((0,Se.isRegExp)(e))return!1;if((0,Se.isFunction)(e))return!0;if((0,Se.has)(e,"exec"))return!0;if((0,Se.isString)(e))return!1;throw Error("non exhaustive match")}Je.isCustomPattern=Qx;function zj(r){return(0,Se.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Je.isShortPattern=zj;Je.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type -`)+(" Root cause: "+e.errMsg+`. -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. -`+(" The problem is in the <"+r.name+`> Token Type -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Je.buildLineBreakIssueMessage=Xj;function _j(r){var e=(0,Se.map)(r,function(t){return(0,Se.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function Ix(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Je.minOptimizationVal=256;var Py=[];function Bx(r){return r255?255+~~(r/255):r}}});var pf=y(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var ei=Gt();function uye(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=uye;function gye(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=gye;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function fye(r){var e=Zj(r);$j(e),tq(e),eq(e),(0,ei.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=fye;function Zj(r){for(var e=(0,ei.cloneArr)(r),t=r,i=!0;i;){t=(0,ei.compact)((0,ei.flatten)((0,ei.map)(t,function(s){return s.CATEGORIES})));var n=(0,ei.difference)(t,e);e=e.concat(n),(0,ei.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=Zj;function $j(r){(0,ei.forEach)(r,function(e){rq(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),bx(e)&&!(0,ei.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),bx(e)||(e.CATEGORIES=[]),iq(e)||(e.categoryMatches=[]),nq(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=$j;function eq(r){(0,ei.forEach)(r,function(e){e.categoryMatches=[],(0,ei.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=eq;function tq(r){(0,ei.forEach)(r,function(e){Sx([],e)})}Nt.assignCategoriesMapProp=tq;function Sx(r,e){(0,ei.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,ei.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,ei.contains)(i,t)||Sx(i,t)})}Nt.singleAssignCategoriesToksMap=Sx;function rq(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=rq;function bx(r){return(0,ei.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=bx;function iq(r){return(0,ei.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=iq;function nq(r){return(0,ei.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=nq;function hye(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.isTokenType=hye});var vx=y(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});Dy.defaultLexerErrorProvider=void 0;Dy.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var jd=y(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.Lexer=kc.LexerDefinitionErrorType=void 0;var Vs=Ex(),nr=Gt(),pye=pf(),dye=vx(),Cye=Sy(),mye;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(mye=kc.LexerDefinitionErrorType||(kc.LexerDefinitionErrorType={}));var qd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:dye.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(qd);var Eye=function(){function r(e,t){var i=this;if(t===void 0&&(t=qd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(qd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===qd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=Vs.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===qd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[Vs.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[Vs.DEFAULT_MODE]=Vs.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,Vs.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,pye.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,Vs.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- -`);throw new Error(`Errors detected in definition of Lexer: -`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(Vs.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. - Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,Cye.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- -`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,m,w,B,v,D,F=e,H=F.length,j=0,$=0,z=this.hasCustom?0:Math.floor(e.length/10),W=new Array(z),Z=[],A=this.trackStartLines?1:void 0,ae=this.trackStartLines?1:void 0,ue=(0,Vs.cloneEmptyGroups)(this.emptyGroups),_=this.trackStartLines,T=this.config.lineTerminatorsPattern,L=0,ge=[],we=[],Le=[],Pe=[];Object.freeze(Pe);var Te=void 0;function se(){return ge}function Ae(dr){var Bi=(0,Vs.charCodeToOptimizedIndex)(dr),_n=we[Bi];return _n===void 0?Pe:_n}var Qe=function(dr){if(Le.length===1&&dr.tokenType.PUSH_MODE===void 0){var Bi=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(dr);Z.push({offset:dr.startOffset,line:dr.startLine!==void 0?dr.startLine:void 0,column:dr.startColumn!==void 0?dr.startColumn:void 0,length:dr.image.length,message:Bi})}else{Le.pop();var _n=(0,nr.last)(Le);ge=i.patternIdxToConfig[_n],we=i.charCodeToPatternIdxToConfig[_n],L=ge.length;var ga=i.canModeBeOptimized[_n]&&i.config.safeMode===!1;we&&ga?Te=Ae:Te=se}};function fe(dr){Le.push(dr),we=this.charCodeToPatternIdxToConfig[dr],ge=this.patternIdxToConfig[dr],L=ge.length,L=ge.length;var Bi=this.canModeBeOptimized[dr]&&this.config.safeMode===!1;we&&Bi?Te=Ae:Te=se}fe.call(this,t);for(var le;jc.length){c=a,u=g,le=tt;break}}}break}}if(c!==null){if(f=c.length,h=le.group,h!==void 0&&(p=le.tokenTypeIdx,m=this.createTokenInstance(c,j,p,le.tokenType,A,ae,f),this.handlePayload(m,u),h===!1?$=this.addToken(W,$,m):ue[h].push(m)),e=this.chopInput(e,f),j=j+f,ae=this.computeNewColumn(ae,f),_===!0&&le.canLineTerminator===!0){var It=0,Kr=void 0,oi=void 0;T.lastIndex=0;do Kr=T.test(c),Kr===!0&&(oi=T.lastIndex-1,It++);while(Kr===!0);It!==0&&(A=A+It,ae=f-oi,this.updateTokenEndLineColumnLocation(m,h,oi,It,A,ae,f))}this.handleModes(le,Qe,fe,m)}else{for(var pi=j,pr=A,di=ae,ai=!1;!ai&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();kc.Lexer=Eye});var KA=y(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.tokenMatcher=Si.createTokenInstance=Si.EOF=Si.createToken=Si.hasTokenLabel=Si.tokenName=Si.tokenLabel=void 0;var Xs=Gt(),Iye=jd(),xx=pf();function yye(r){return fq(r)?r.LABEL:r.name}Si.tokenLabel=yye;function wye(r){return r.name}Si.tokenName=wye;function fq(r){return(0,Xs.isString)(r.LABEL)&&r.LABEL!==""}Si.hasTokenLabel=fq;var Bye="parent",sq="categories",oq="label",aq="group",Aq="push_mode",lq="pop_mode",cq="longer_alt",uq="line_breaks",gq="start_chars_hint";function hq(r){return Qye(r)}Si.createToken=hq;function Qye(r){var e=r.pattern,t={};if(t.name=r.name,(0,Xs.isUndefined)(e)||(t.PATTERN=e),(0,Xs.has)(r,Bye))throw`The parent property is no longer supported. -See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Xs.has)(r,sq)&&(t.CATEGORIES=r[sq]),(0,xx.augmentTokenTypes)([t]),(0,Xs.has)(r,oq)&&(t.LABEL=r[oq]),(0,Xs.has)(r,aq)&&(t.GROUP=r[aq]),(0,Xs.has)(r,lq)&&(t.POP_MODE=r[lq]),(0,Xs.has)(r,Aq)&&(t.PUSH_MODE=r[Aq]),(0,Xs.has)(r,cq)&&(t.LONGER_ALT=r[cq]),(0,Xs.has)(r,uq)&&(t.LINE_BREAKS=r[uq]),(0,Xs.has)(r,gq)&&(t.START_CHARS_HINT=r[gq]),t}Si.EOF=hq({name:"EOF",pattern:Iye.Lexer.NA});(0,xx.augmentTokenTypes)([Si.EOF]);function bye(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Si.createTokenInstance=bye;function Sye(r,e){return(0,xx.tokenStructuredMatcher)(r,e)}Si.tokenMatcher=Sye});var Cn=y(Wt=>{"use strict";var xa=Wt&&Wt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.serializeProduction=Wt.serializeGrammar=Wt.Terminal=Wt.Alternation=Wt.RepetitionWithSeparator=Wt.Repetition=Wt.RepetitionMandatoryWithSeparator=Wt.RepetitionMandatory=Wt.Option=Wt.Alternative=Wt.Rule=Wt.NonTerminal=Wt.AbstractProduction=void 0;var lr=Gt(),vye=KA(),Do=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,lr.forEach)(this.definition,function(t){t.accept(e)})},r}();Wt.AbstractProduction=Do;var pq=function(r){xa(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(Do);Wt.NonTerminal=pq;var dq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(Do);Wt.Rule=dq;var Cq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(Do);Wt.Alternative=Cq;var mq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(Do);Wt.Option=mq;var Eq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(Do);Wt.RepetitionMandatory=Eq;var Iq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(Do);Wt.RepetitionMandatoryWithSeparator=Iq;var yq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(Do);Wt.Repetition=yq;var wq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(Do);Wt.RepetitionWithSeparator=wq;var Bq=function(r){xa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(Do);Wt.Alternation=Bq;var ky=function(){function r(e){this.idx=1,(0,lr.assign)(this,(0,lr.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();Wt.Terminal=ky;function xye(r){return(0,lr.map)(r,Jd)}Wt.serializeGrammar=xye;function Jd(r){function e(s){return(0,lr.map)(s,Jd)}if(r instanceof pq){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,lr.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof Cq)return{type:"Alternative",definition:e(r.definition)};if(r instanceof mq)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof Eq)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof Iq)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:Jd(new ky({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof wq)return{type:"RepetitionWithSeparator",idx:r.idx,separator:Jd(new ky({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof yq)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Bq)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof ky){var i={type:"Terminal",name:r.terminalType.name,label:(0,vye.tokenLabel)(r.terminalType),idx:r.idx};(0,lr.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,lr.isRegExp)(n)?n.source:n),i}else{if(r instanceof dq)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}Wt.serializeProduction=Jd});var Fy=y(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});Ry.RestWalker=void 0;var Px=Gt(),mn=Cn(),Pye=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Px.forEach)(e.definition,function(n,s){var o=(0,Px.drop)(e.definition,s+1);if(n instanceof mn.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof mn.Terminal)i.walkTerminal(n,o,t);else if(n instanceof mn.Alternative)i.walkFlat(n,o,t);else if(n instanceof mn.Option)i.walkOption(n,o,t);else if(n instanceof mn.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof mn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof mn.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof mn.Repetition)i.walkMany(n,o,t);else if(n instanceof mn.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Qq(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Qq(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Px.forEach)(e.definition,function(o){var a=new mn.Alternative({definition:[o]});n.walk(a,s)})},r}();Ry.RestWalker=Pye;function Qq(r,e,t){var i=[new mn.Option({definition:[new mn.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var df=y(Ny=>{"use strict";Object.defineProperty(Ny,"__esModule",{value:!0});Ny.GAstVisitor=void 0;var ko=Cn(),Dye=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case ko.NonTerminal:return this.visitNonTerminal(t);case ko.Alternative:return this.visitAlternative(t);case ko.Option:return this.visitOption(t);case ko.RepetitionMandatory:return this.visitRepetitionMandatory(t);case ko.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case ko.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case ko.Repetition:return this.visitRepetition(t);case ko.Alternation:return this.visitAlternation(t);case ko.Terminal:return this.visitTerminal(t);case ko.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();Ny.GAstVisitor=Dye});var zd=y(Ki=>{"use strict";var kye=Ki&&Ki.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.collectMethods=Ki.DslMethodsCollectorVisitor=Ki.getProductionDslName=Ki.isBranchingProd=Ki.isOptionalProd=Ki.isSequenceProd=void 0;var Wd=Gt(),Br=Cn(),Rye=df();function Fye(r){return r instanceof Br.Alternative||r instanceof Br.Option||r instanceof Br.Repetition||r instanceof Br.RepetitionMandatory||r instanceof Br.RepetitionMandatoryWithSeparator||r instanceof Br.RepetitionWithSeparator||r instanceof Br.Terminal||r instanceof Br.Rule}Ki.isSequenceProd=Fye;function Dx(r,e){e===void 0&&(e=[]);var t=r instanceof Br.Option||r instanceof Br.Repetition||r instanceof Br.RepetitionWithSeparator;return t?!0:r instanceof Br.Alternation?(0,Wd.some)(r.definition,function(i){return Dx(i,e)}):r instanceof Br.NonTerminal&&(0,Wd.contains)(e,r)?!1:r instanceof Br.AbstractProduction?(r instanceof Br.NonTerminal&&e.push(r),(0,Wd.every)(r.definition,function(i){return Dx(i,e)})):!1}Ki.isOptionalProd=Dx;function Nye(r){return r instanceof Br.Alternation}Ki.isBranchingProd=Nye;function Lye(r){if(r instanceof Br.NonTerminal)return"SUBRULE";if(r instanceof Br.Option)return"OPTION";if(r instanceof Br.Alternation)return"OR";if(r instanceof Br.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof Br.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof Br.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof Br.Repetition)return"MANY";if(r instanceof Br.Terminal)return"CONSUME";throw Error("non exhaustive match")}Ki.getProductionDslName=Lye;var bq=function(r){kye(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Wd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Wd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(Rye.GAstVisitor);Ki.DslMethodsCollectorVisitor=bq;var Ly=new bq;function Tye(r){Ly.reset(),r.accept(Ly);var e=Ly.dslMethods;return Ly.reset(),e}Ki.collectMethods=Tye});var Rx=y(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.firstForTerminal=Ro.firstForBranching=Ro.firstForSequence=Ro.first=void 0;var Ty=Gt(),Sq=Cn(),kx=zd();function Oy(r){if(r instanceof Sq.NonTerminal)return Oy(r.referencedRule);if(r instanceof Sq.Terminal)return Pq(r);if((0,kx.isSequenceProd)(r))return vq(r);if((0,kx.isBranchingProd)(r))return xq(r);throw Error("non exhaustive match")}Ro.first=Oy;function vq(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,kx.isOptionalProd)(s),e=e.concat(Oy(s)),i=i+1,n=t.length>i;return(0,Ty.uniq)(e)}Ro.firstForSequence=vq;function xq(r){var e=(0,Ty.map)(r.definition,function(t){return Oy(t)});return(0,Ty.uniq)((0,Ty.flatten)(e))}Ro.firstForBranching=xq;function Pq(r){return[r.terminalType]}Ro.firstForTerminal=Pq});var Fx=y(My=>{"use strict";Object.defineProperty(My,"__esModule",{value:!0});My.IN=void 0;My.IN="_~IN~_"});var Nq=y(ls=>{"use strict";var Oye=ls&&ls.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(ls,"__esModule",{value:!0});ls.buildInProdFollowPrefix=ls.buildBetweenProdsFollowPrefix=ls.computeAllProdsFollows=ls.ResyncFollowsWalker=void 0;var Mye=Fy(),Kye=Rx(),Dq=Gt(),kq=Fx(),Uye=Cn(),Rq=function(r){Oye(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=Fq(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new Uye.Alternative({definition:o}),l=(0,Kye.first)(a);this.follows[s]=l},e}(Mye.RestWalker);ls.ResyncFollowsWalker=Rq;function Hye(r){var e={};return(0,Dq.forEach)(r,function(t){var i=new Rq(t).startWalking();(0,Dq.assign)(e,i)}),e}ls.computeAllProdsFollows=Hye;function Fq(r,e){return r.name+e+kq.IN}ls.buildBetweenProdsFollowPrefix=Fq;function Gye(r){var e=r.terminalType.name;return e+r.idx+kq.IN}ls.buildInProdFollowPrefix=Gye});var Vd=y(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.defaultGrammarValidatorErrorProvider=Pa.defaultGrammarResolverErrorProvider=Pa.defaultParserErrorProvider=void 0;var Cf=KA(),Yye=Gt(),_s=Gt(),Nx=Cn(),Lq=zd();Pa.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,Cf.hasTokenLabel)(e),o=s?"--> "+(0,Cf.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,_s.first)(t).image,l=` -but found: '`+a+"'";if(n)return o+n+l;var c=(0,_s.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,_s.map)(c,function(h){return"["+(0,_s.map)(h,function(p){return(0,Cf.tokenLabel)(p)}).join(", ")+"]"}),g=(0,_s.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: -`+g.join(` -`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,_s.first)(t).image,a=` -but found: '`+o+"'";if(i)return s+i+a;var l=(0,_s.map)(e,function(u){return"["+(0,_s.map)(u,function(g){return(0,Cf.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: - `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(Pa.defaultParserErrorProvider);Pa.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+r.name+"<-";return t}};Pa.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Nx.Terminal?u.terminalType.name:u instanceof Nx.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,_s.first)(e),s=n.idx,o=(0,Lq.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` - appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. - For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES - `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` -`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. -`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. -`)+`To resolve this make sure each Terminal and Non-Terminal names are unique -This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,Cf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix -`+("in inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,Cf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,Lq.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. -This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. -`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: -`+(" inside <"+r.topLevelRule.name+`> Rule. - has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=Yye.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. -`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) -`)+(`without consuming any Tokens. The grammar path that causes this is: - `+i+` -`)+` To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Nx.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Mq=y(UA=>{"use strict";var jye=UA&&UA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(UA,"__esModule",{value:!0});UA.GastRefResolverVisitor=UA.resolveGrammar=void 0;var qye=Un(),Tq=Gt(),Jye=df();function Wye(r,e){var t=new Oq(r,e);return t.resolveRefs(),t.errors}UA.resolveGrammar=Wye;var Oq=function(r){jye(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,Tq.forEach)((0,Tq.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:qye.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(Jye.GAstVisitor);UA.GastRefResolverVisitor=Oq});var _d=y(Lr=>{"use strict";var Rc=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.nextPossibleTokensAfter=Lr.possiblePathsFrom=Lr.NextTerminalAfterAtLeastOneSepWalker=Lr.NextTerminalAfterAtLeastOneWalker=Lr.NextTerminalAfterManySepWalker=Lr.NextTerminalAfterManyWalker=Lr.AbstractNextTerminalAfterProductionWalker=Lr.NextAfterTokenWalker=Lr.AbstractNextPossibleTokensWalker=void 0;var Kq=Fy(),Kt=Gt(),zye=Rx(),Dt=Cn(),Uq=function(r){Rc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Kt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Kt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Kt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(Kq.RestWalker);Lr.AbstractNextPossibleTokensWalker=Uq;var Vye=function(r){Rc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new Dt.Alternative({definition:s});this.possibleTokTypes=(0,zye.first)(o),this.found=!0}},e}(Uq);Lr.NextAfterTokenWalker=Vye;var Xd=function(r){Rc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(Kq.RestWalker);Lr.AbstractNextTerminalAfterProductionWalker=Xd;var Xye=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Xd);Lr.NextTerminalAfterManyWalker=Xye;var _ye=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Xd);Lr.NextTerminalAfterManySepWalker=_ye;var Zye=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Xd);Lr.NextTerminalAfterAtLeastOneWalker=Zye;var $ye=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Xd);Lr.NextTerminalAfterAtLeastOneSepWalker=$ye;function Hq(r,e,t){t===void 0&&(t=[]),t=(0,Kt.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Kt.drop)(r,n+1))}function o(c){var u=Hq(s(c),e,t);return i.concat(u)}for(;t.length=0;ue--){var _=B.definition[ue],T={idx:p,def:_.definition.concat((0,Kt.drop)(h)),ruleStack:m,occurrenceStack:w};g.push(T),g.push(o)}else if(B instanceof Dt.Alternative)g.push({idx:p,def:B.definition.concat((0,Kt.drop)(h)),ruleStack:m,occurrenceStack:w});else if(B instanceof Dt.Rule)g.push(twe(B,p,m,w));else throw Error("non exhaustive match")}}return u}Lr.nextPossibleTokensAfter=ewe;function twe(r,e,t,i){var n=(0,Kt.cloneArr)(t);n.push(r.name);var s=(0,Kt.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var Zd=y(_t=>{"use strict";var jq=_t&&_t.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(_t,"__esModule",{value:!0});_t.areTokenCategoriesNotUsed=_t.isStrictPrefixOfPath=_t.containsPath=_t.getLookaheadPathsForOptionalProd=_t.getLookaheadPathsForOr=_t.lookAheadSequenceFromAlternatives=_t.buildSingleAlternativeLookaheadFunction=_t.buildAlternativesLookAheadFunc=_t.buildLookaheadFuncForOptionalProd=_t.buildLookaheadFuncForOr=_t.getProdType=_t.PROD_TYPE=void 0;var sr=Gt(),Gq=_d(),rwe=Fy(),Ky=pf(),HA=Cn(),iwe=df(),li;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(li=_t.PROD_TYPE||(_t.PROD_TYPE={}));function nwe(r){if(r instanceof HA.Option)return li.OPTION;if(r instanceof HA.Repetition)return li.REPETITION;if(r instanceof HA.RepetitionMandatory)return li.REPETITION_MANDATORY;if(r instanceof HA.RepetitionMandatoryWithSeparator)return li.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof HA.RepetitionWithSeparator)return li.REPETITION_WITH_SEPARATOR;if(r instanceof HA.Alternation)return li.ALTERNATION;throw Error("non exhaustive match")}_t.getProdType=nwe;function swe(r,e,t,i,n,s){var o=Jq(r,e,t),a=Ox(o)?Ky.tokenStructuredMatcherNoCategories:Ky.tokenStructuredMatcher;return s(o,i,a,n)}_t.buildLookaheadFuncForOr=swe;function owe(r,e,t,i,n,s){var o=Wq(r,e,n,t),a=Ox(o)?Ky.tokenStructuredMatcherNoCategories:Ky.tokenStructuredMatcher;return s(o[0],a,i)}_t.buildLookaheadFuncForOptionalProd=owe;function awe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Mx=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.checkPrefixAlternativesAmbiguities=zt.validateSomeNonEmptyLookaheadPath=zt.validateTooManyAlts=zt.RepetionCollector=zt.validateAmbiguousAlternationAlternatives=zt.validateEmptyOrAlternative=zt.getFirstNoneTerminal=zt.validateNoLeftRecursion=zt.validateRuleIsOverridden=zt.validateRuleDoesNotAlreadyExist=zt.OccurrenceValidationCollector=zt.identifyProductionForDuplicates=zt.validateGrammar=void 0;var er=Gt(),Qr=Gt(),Fo=Un(),Kx=zd(),mf=Zd(),gwe=_d(),Zs=Cn(),Ux=df();function fwe(r,e,t,i,n){var s=er.map(r,function(h){return hwe(h,i)}),o=er.map(r,function(h){return Hx(h,h,i)}),a=[],l=[],c=[];(0,Qr.every)(o,Qr.isEmpty)&&(a=(0,Qr.map)(r,function(h){return $q(h,i)}),l=(0,Qr.map)(r,function(h){return eJ(h,e,i)}),c=iJ(r,e,i));var u=Cwe(r,t,i),g=(0,Qr.map)(r,function(h){return rJ(h,i)}),f=(0,Qr.map)(r,function(h){return Zq(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}zt.validateGrammar=fwe;function hwe(r,e){var t=new _q;r.accept(t);var i=t.allProductions,n=er.groupBy(i,Vq),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,Kx.getProductionDslName)(l),g={message:c,type:Fo.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=Xq(l);return f&&(g.parameter=f),g});return o}function Vq(r){return(0,Kx.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+Xq(r)}zt.identifyProductionForDuplicates=Vq;function Xq(r){return r instanceof Zs.Terminal?r.terminalType.name:r instanceof Zs.NonTerminal?r.nonTerminalName:""}var _q=function(r){Mx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(Ux.GAstVisitor);zt.OccurrenceValidationCollector=_q;function Zq(r,e,t,i){var n=[],s=(0,Qr.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:Fo.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}zt.validateRuleDoesNotAlreadyExist=Zq;function pwe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:Fo.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}zt.validateRuleIsOverridden=pwe;function Hx(r,e,t,i){i===void 0&&(i=[]);var n=[],s=$d(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:Fo.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),Hx(r,u,t,g)});return n.concat(er.flatten(c))}zt.validateNoLeftRecursion=Hx;function $d(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof Zs.NonTerminal)e.push(t.referencedRule);else if(t instanceof Zs.Alternative||t instanceof Zs.Option||t instanceof Zs.RepetitionMandatory||t instanceof Zs.RepetitionMandatoryWithSeparator||t instanceof Zs.RepetitionWithSeparator||t instanceof Zs.Repetition)e=e.concat($d(t.definition));else if(t instanceof Zs.Alternation)e=er.flatten(er.map(t.definition,function(o){return $d(o.definition)}));else if(!(t instanceof Zs.Terminal))throw Error("non exhaustive match");var i=(0,Kx.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat($d(s))}else return e}zt.getFirstNoneTerminal=$d;var Gx=function(r){Mx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(Ux.GAstVisitor);function $q(r,e){var t=new Gx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,gwe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:Fo.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}zt.validateEmptyOrAlternative=$q;function eJ(r,e,t){var i=new Gx;r.accept(i);var n=i.alternations;n=(0,Qr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,mf.getLookaheadPathsForOr)(l,r,c,a),g=dwe(u,a,r,t),f=nJ(u,a,r,t);return o.concat(g,f)},[]);return s}zt.validateAmbiguousAlternationAlternatives=eJ;var tJ=function(r){Mx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(Ux.GAstVisitor);zt.RepetionCollector=tJ;function rJ(r,e){var t=new Gx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:Fo.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}zt.validateTooManyAlts=rJ;function iJ(r,e,t){var i=[];return(0,Qr.forEach)(r,function(n){var s=new tJ;n.accept(s);var o=s.allProductions;(0,Qr.forEach)(o,function(a){var l=(0,mf.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,mf.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,Qr.isEmpty)((0,Qr.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:Fo.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}zt.validateSomeNonEmptyLookaheadPath=iJ;function dwe(r,e,t,i){var n=[],s=(0,Qr.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,Qr.forEach)(l,function(u){var g=[c];(0,Qr.forEach)(r,function(f,h){c!==h&&(0,mf.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,mf.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,Qr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:Fo.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function nJ(r,e,t,i){var n=[],s=(0,Qr.reduce)(r,function(o,a,l){var c=(0,Qr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,Qr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,Qr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.validateGrammar=Ef.resolveGrammar=void 0;var jx=Gt(),mwe=Mq(),Ewe=Yx(),sJ=Vd();function Iwe(r){r=(0,jx.defaults)(r,{errMsgProvider:sJ.defaultGrammarResolverErrorProvider});var e={};return(0,jx.forEach)(r.rules,function(t){e[t.name]=t}),(0,mwe.resolveGrammar)(e,r.errMsgProvider)}Ef.resolveGrammar=Iwe;function ywe(r){return r=(0,jx.defaults)(r,{errMsgProvider:sJ.defaultGrammarValidatorErrorProvider}),(0,Ewe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}Ef.validateGrammar=ywe});var If=y(En=>{"use strict";var eC=En&&En.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(En,"__esModule",{value:!0});En.EarlyExitException=En.NotAllInputParsedException=En.NoViableAltException=En.MismatchedTokenException=En.isRecognitionException=void 0;var wwe=Gt(),aJ="MismatchedTokenException",AJ="NoViableAltException",lJ="EarlyExitException",cJ="NotAllInputParsedException",uJ=[aJ,AJ,lJ,cJ];Object.freeze(uJ);function Bwe(r){return(0,wwe.contains)(uJ,r.name)}En.isRecognitionException=Bwe;var Uy=function(r){eC(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),Qwe=function(r){eC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=aJ,s}return e}(Uy);En.MismatchedTokenException=Qwe;var bwe=function(r){eC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=AJ,s}return e}(Uy);En.NoViableAltException=bwe;var Swe=function(r){eC(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=cJ,n}return e}(Uy);En.NotAllInputParsedException=Swe;var vwe=function(r){eC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=lJ,s}return e}(Uy);En.EarlyExitException=vwe});var Jx=y(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.attemptInRepetitionRecovery=Ui.Recoverable=Ui.InRuleRecoveryException=Ui.IN_RULE_RECOVERY_EXCEPTION=Ui.EOF_FOLLOW_KEY=void 0;var Hy=KA(),cs=Gt(),xwe=If(),Pwe=Fx(),Dwe=Un();Ui.EOF_FOLLOW_KEY={};Ui.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function qx(r){this.name=Ui.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ui.InRuleRecoveryException=qx;qx.prototype=Error.prototype;var kwe=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,cs.has)(e,"recoveryEnabled")?e.recoveryEnabled:Dwe.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=gJ)},r.prototype.getTokenToInsert=function(e){var t=(0,Hy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),m=new xwe.MismatchedTokenException(p,u,s.LA(0));m.resyncedTokens=(0,cs.dropRight)(l),s.SAVE_ERROR(m)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new qx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,cs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,cs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,cs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,cs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ui.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,cs.map)(t,function(n,s){return s===0?Ui.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,cs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,cs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ui.EOF_FOLLOW_KEY)return[Hy.EOF];var t=e.ruleName+e.idxInCallingRule+Pwe.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,Hy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,cs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,cs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,cs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ui.Recoverable=kwe;function gJ(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=Hy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ui.attemptInRepetitionRecovery=gJ});var Gy=y(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.getKeyForAutomaticLookahead=qt.AT_LEAST_ONE_SEP_IDX=qt.MANY_SEP_IDX=qt.AT_LEAST_ONE_IDX=qt.MANY_IDX=qt.OPTION_IDX=qt.OR_IDX=qt.BITS_FOR_ALT_IDX=qt.BITS_FOR_RULE_IDX=qt.BITS_FOR_OCCURRENCE_IDX=qt.BITS_FOR_METHOD_TYPE=void 0;qt.BITS_FOR_METHOD_TYPE=4;qt.BITS_FOR_OCCURRENCE_IDX=8;qt.BITS_FOR_RULE_IDX=12;qt.BITS_FOR_ALT_IDX=8;qt.OR_IDX=1<{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});Yy.LooksAhead=void 0;var Da=Zd(),$s=Gt(),fJ=Un(),ka=Gy(),Fc=zd(),Fwe=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,$s.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:fJ.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,$s.has)(e,"maxLookahead")?e.maxLookahead:fJ.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,$s.isES2015MapSupported)()?new Map:[],(0,$s.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,$s.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Fc.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,$s.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Fc.getProductionDslName)(g)+f,function(){var h=(0,Da.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,ka.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],ka.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,$s.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,ka.MANY_IDX,Da.PROD_TYPE.REPETITION,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,ka.OPTION_IDX,Da.PROD_TYPE.OPTION,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,ka.AT_LEAST_ONE_IDX,Da.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,ka.AT_LEAST_ONE_SEP_IDX,Da.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,ka.MANY_SEP_IDX,Da.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Fc.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,Da.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,ka.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,Da.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,Da.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,ka.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();Yy.LooksAhead=Fwe});var pJ=y(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.addNoneTerminalToCst=No.addTerminalToCst=No.setNodeLocationFull=No.setNodeLocationOnlyOffset=void 0;function Nwe(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(GA,"__esModule",{value:!0});GA.defineNameProp=GA.functionName=GA.classNameFromInstance=void 0;var Mwe=Gt();function Kwe(r){return CJ(r.constructor)}GA.classNameFromInstance=Kwe;var dJ="name";function CJ(r){var e=r.name;return e||"anonymous"}GA.functionName=CJ;function Uwe(r,e){var t=Object.getOwnPropertyDescriptor(r,dJ);return(0,Mwe.isUndefined)(t)||t.configurable?(Object.defineProperty(r,dJ,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}GA.defineNameProp=Uwe});var wJ=y(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.validateRedundantMethods=vi.validateMissingCstMethods=vi.validateVisitor=vi.CstVisitorDefinitionError=vi.createBaseVisitorConstructorWithDefaults=vi.createBaseSemanticVisitorConstructor=vi.defaultVisit=void 0;var us=Gt(),tC=Wx();function mJ(r,e){for(var t=(0,us.keys)(r),i=t.length,n=0;n: - `+(""+s.join(` - -`).replace(/\n/g,` - `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}vi.createBaseSemanticVisitorConstructor=Hwe;function Gwe(r,e,t){var i=function(){};(0,tC.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,us.forEach)(e,function(s){n[s]=mJ}),i.prototype=n,i.prototype.constructor=i,i}vi.createBaseVisitorConstructorWithDefaults=Gwe;var zx;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(zx=vi.CstVisitorDefinitionError||(vi.CstVisitorDefinitionError={}));function EJ(r,e){var t=IJ(r,e),i=yJ(r,e);return t.concat(i)}vi.validateVisitor=EJ;function IJ(r,e){var t=(0,us.map)(e,function(i){if(!(0,us.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,tC.functionName)(r.constructor)+" CST Visitor.",type:zx.MISSING_METHOD,methodName:i}});return(0,us.compact)(t)}vi.validateMissingCstMethods=IJ;var Ywe=["constructor","visit","validateVisitor"];function yJ(r,e){var t=[];for(var i in r)(0,us.isFunction)(r[i])&&!(0,us.contains)(Ywe,i)&&!(0,us.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,tC.functionName)(r.constructor)+` CST Visitor -There is no Grammar Rule corresponding to this method's name. -`,type:zx.REDUNDANT_METHOD,methodName:i});return t}vi.validateRedundantMethods=yJ});var QJ=y(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});jy.TreeBuilder=void 0;var yf=pJ(),ti=Gt(),BJ=wJ(),jwe=Un(),qwe=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,ti.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:jwe.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ti.NOOP,this.cstFinallyStateUpdate=ti.NOOP,this.cstPostTerminal=ti.NOOP,this.cstPostNonTerminal=ti.NOOP,this.cstPostRule=ti.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yf.setNodeLocationFull,this.setNodeLocationFromNode=yf.setNodeLocationFull,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=yf.setNodeLocationOnlyOffset,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=ti.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,yf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,yf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,ti.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,BJ.createBaseSemanticVisitorConstructor)(this.className,(0,ti.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,ti.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,BJ.createBaseVisitorConstructorWithDefaults)(this.className,(0,ti.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();jy.TreeBuilder=qwe});var SJ=y(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});qy.LexerAdapter=void 0;var bJ=Un(),Jwe=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):bJ.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?bJ.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();qy.LexerAdapter=Jwe});var xJ=y(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});Jy.RecognizerApi=void 0;var vJ=Gt(),Wwe=If(),Vx=Un(),zwe=Vd(),Vwe=Yx(),Xwe=Cn(),_we=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Vx.DEFAULT_RULE_CONFIG),(0,vJ.contains)(this.definedRulesNames,e)){var n=zwe.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Vx.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Vx.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,Vwe.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,Wwe.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,Xwe.serializeGrammar)((0,vJ.values)(this.gastProductionsCache))},r}();Jy.RecognizerApi=_we});var RJ=y(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.RecognizerEngine=void 0;var Dr=Gt(),Hn=Gy(),Wy=If(),PJ=Zd(),wf=_d(),DJ=Un(),Zwe=Jx(),kJ=KA(),rC=pf(),$we=Wx(),eBe=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,$we.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=rC.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,Dr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if((0,Dr.isArray)(e)){if((0,Dr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. - Note that the first argument for the parser constructor - is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if((0,Dr.isArray)(e))this.tokensMap=(0,Dr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Dr.has)(e,"modes")&&(0,Dr.every)((0,Dr.flatten)((0,Dr.values)(e.modes)),rC.isTokenType)){var i=(0,Dr.flatten)((0,Dr.values)(e.modes)),n=(0,Dr.uniq)(i);this.tokensMap=(0,Dr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Dr.isObject)(e))this.tokensMap=(0,Dr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=kJ.EOF;var s=(0,Dr.every)((0,Dr.values)(e),function(o){return(0,Dr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?rC.tokenStructuredMatcherNoCategories:rC.tokenStructuredMatcher,(0,rC.augmentTokenTypes)((0,Dr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,Dr.has)(i,"resyncEnabled")?i.resyncEnabled:DJ.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,Dr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:DJ.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(Hn.OR_IDX,t),n=(0,Dr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Wy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,Wy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Wy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===Zwe.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,Dr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),kJ.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();zy.RecognizerEngine=eBe});var NJ=y(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});Vy.ErrorHandler=void 0;var Xx=If(),_x=Gt(),FJ=Zd(),tBe=Un(),rBe=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,_x.has)(e,"errorMessageProvider")?e.errorMessageProvider:tBe.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,Xx.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,_x.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,_x.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,FJ.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new Xx.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,FJ.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Xx.NoViableAltException(c,this.LA(1),l))},r}();Vy.ErrorHandler=rBe});var OJ=y(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.ContentAssist=void 0;var LJ=_d(),TJ=Gt(),iBe=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,TJ.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,LJ.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,TJ.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new LJ.NextAfterTokenWalker(n,e).startWalking();return s},r}();Xy.ContentAssist=iBe});var qJ=y($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.GastRecorder=void 0;var In=Gt(),Lo=Cn(),nBe=jd(),HJ=pf(),GJ=KA(),sBe=Un(),oBe=Gy(),Zy={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Zy);var MJ=!0,KJ=Math.pow(2,oBe.BITS_FOR_OCCURRENCE_IDX)-1,YJ=(0,GJ.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:nBe.Lexer.NA});(0,HJ.augmentTokenTypes)([YJ]);var jJ=(0,GJ.createTokenInstance)(YJ,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(jJ);var aBe={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},ABe=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return sBe.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new Lo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` - This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return iC.call(this,Lo.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){iC.call(this,Lo.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){iC.call(this,Lo.RepetitionMandatoryWithSeparator,t,e,MJ)},r.prototype.manyInternalRecord=function(e,t){iC.call(this,Lo.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){iC.call(this,Lo.RepetitionWithSeparator,t,e,MJ)},r.prototype.orInternalRecord=function(e,t){return lBe.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(_y(t),!e||(0,In.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=e.ruleName,a=new Lo.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?aBe:Zy},r.prototype.consumeInternalRecord=function(e,t,i){if(_y(t),!(0,HJ.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=new Lo.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),jJ},r}();$y.GastRecorder=ABe;function iC(r,e,t,i){i===void 0&&(i=!1),_y(t);var n=(0,In.peek)(this.recordingProdStack),s=(0,In.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,In.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),Zy}function lBe(r,e){var t=this;_y(e);var i=(0,In.peek)(this.recordingProdStack),n=(0,In.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new Lo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,In.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,In.some)(s,function(l){return(0,In.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,In.forEach)(s,function(l){var c=new Lo.Alternative({definition:[]});o.definition.push(c),(0,In.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,In.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),Zy}function UJ(r){return r===0?"":""+r}function _y(r){if(r<0||r>KJ){var e=new Error("Invalid DSL Method idx value: <"+r+`> - `+("Idx value must be a none negative value smaller than "+(KJ+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var WJ=y(ew=>{"use strict";Object.defineProperty(ew,"__esModule",{value:!0});ew.PerformanceTracer=void 0;var JJ=Gt(),cBe=Un(),uBe=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,JJ.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=cBe.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,JJ.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();ew.PerformanceTracer=uBe});var zJ=y(tw=>{"use strict";Object.defineProperty(tw,"__esModule",{value:!0});tw.applyMixins=void 0;function gBe(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}tw.applyMixins=gBe});var Un=y(Cr=>{"use strict";var _J=Cr&&Cr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.EmbeddedActionsParser=Cr.CstParser=Cr.Parser=Cr.EMPTY_ALT=Cr.ParserDefinitionErrorType=Cr.DEFAULT_RULE_CONFIG=Cr.DEFAULT_PARSER_CONFIG=Cr.END_OF_FILE=void 0;var _i=Gt(),fBe=Nq(),VJ=KA(),ZJ=Vd(),XJ=oJ(),hBe=Jx(),pBe=hJ(),dBe=QJ(),CBe=SJ(),mBe=xJ(),EBe=RJ(),IBe=NJ(),yBe=OJ(),wBe=qJ(),BBe=WJ(),QBe=zJ();Cr.END_OF_FILE=(0,VJ.createTokenInstance)(VJ.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Cr.END_OF_FILE);Cr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ZJ.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});Cr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var bBe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(bBe=Cr.ParserDefinitionErrorType||(Cr.ParserDefinitionErrorType={}));function SBe(r){return r===void 0&&(r=void 0),function(){return r}}Cr.EMPTY_ALT=SBe;var rw=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,_i.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. - Please use the flag on the relevant DSL method instead. - See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=(0,_i.has)(t,"skipValidations")?t.skipValidations:Cr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,_i.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,_i.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,XJ.resolveGrammar)({rules:(0,_i.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,_i.isEmpty)(n)&&e.skipValidations===!1){var s=(0,XJ.validateGrammar)({rules:(0,_i.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,_i.values)(e.tokensMap),errMsgProvider:ZJ.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,_i.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,fBe.computeAllProdsFollows)((0,_i.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,_i.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,_i.isEmpty)(e.definitionErrors))throw t=(0,_i.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: - `+t.join(` -------------------------------- -`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();Cr.Parser=rw;(0,QBe.applyMixins)(rw,[hBe.Recoverable,pBe.LooksAhead,dBe.TreeBuilder,CBe.LexerAdapter,EBe.RecognizerEngine,mBe.RecognizerApi,IBe.ErrorHandler,yBe.ContentAssist,wBe.GastRecorder,BBe.PerformanceTracer]);var vBe=function(r){_J(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(rw);Cr.CstParser=vBe;var xBe=function(r){_J(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(rw);Cr.EmbeddedActionsParser=xBe});var eW=y(iw=>{"use strict";Object.defineProperty(iw,"__esModule",{value:!0});iw.createSyntaxDiagramsCode=void 0;var $J=Cx();function PBe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+$J.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+$J.VERSION+"/diagrams/diagrams.css":s,a=` - - - - - -`,l=` - -`,c=` - - - -
- -
-
-
- -
Test
-
diff --git a/apps/guide/src/components/ThemeSwitcher.tsx b/apps/guide/src/components/ThemeSwitcher.tsx new file mode 100644 index 000000000000..38acea06884b --- /dev/null +++ b/apps/guide/src/components/ThemeSwitcher.tsx @@ -0,0 +1,20 @@ +'use client'; + +import { VscColorMode } from '@react-icons/all-files/vsc/VscColorMode'; +import { Button } from 'ariakit/button'; +import { useTheme } from 'next-themes'; + +export default function ThemeSwitcher() { + const { resolvedTheme, setTheme } = useTheme(); + const toggleTheme = () => setTheme(resolvedTheme === 'light' ? 'dark' : 'light'); + + return ( + + ); +} diff --git a/apps/guide/src/pages/index.mdx b/apps/guide/src/content/01-home/01-introduction.mdx similarity index 98% rename from apps/guide/src/pages/index.mdx rename to apps/guide/src/content/01-home/01-introduction.mdx index 0024e9fa9220..1ace8bc41bcf 100644 --- a/apps/guide/src/pages/index.mdx +++ b/apps/guide/src/content/01-home/01-introduction.mdx @@ -1,5 +1,4 @@ --- -layout: '../layouts/SidebarLayout.astro' title: Introduction category: Home --- diff --git a/apps/guide/src/pages/whats-new.mdx b/apps/guide/src/content/01-home/02-whats-new.mdx similarity index 58% rename from apps/guide/src/pages/whats-new.mdx rename to apps/guide/src/content/01-home/02-whats-new.mdx index b0d7373f14cd..0cb3555fbb7e 100644 --- a/apps/guide/src/pages/whats-new.mdx +++ b/apps/guide/src/content/01-home/02-whats-new.mdx @@ -1,25 +1,21 @@ --- -layout: '../layouts/SidebarLayout.astro' title: What's new category: Home --- -import { CH } from '@code-hike/mdx/components'; -import { DiscordMessages, DiscordMessage } from '@discordjs/ui'; - # What's new + Remember that you can always [fork the repository](https://github.com/discordjs/discord.js/fork) and [make a pull + request](https://github.com/discordjs/discord.js/pulls) if you want to add anything to the guide yourself! + + +We'll also get into some of the more advanced features this guide does below. + +## Components + +Throughout the guide, you'll see some components from the _`@discordjs/ui`_ package: + +- _`Alert`_ +- _`Section`_ +- _`DiscordMessages`_, _`DiscordMessage`_, and _`DiscordMessageEmbed`_ + +Check the source of this page to see them in action! + +### Alert + +This component may take a _`title`_ and a _`type`_ of _`'danger' | 'info' | 'success' | 'warning'`_. + +This uses _`title="Alert" type="info"`_: + + + Use these appropriately! + + +### Section + +
+Well, hello there! + +Whenever some text does not need to be in the main body, you can put it here. + +- _`title`_: The title that'll appear. +- _`padding`_: Adds padding. + - _`dense`_: When _`padding`_ is specified, _`dense`_ could make it appear, well, dense. +- _`defaultClosed`_ Whether the section is closed by default. This one was. +- _`background`_ Adds background to the content. +- _`gutter`_: This adds a very small appealing space between the expansion of the section and its content. + +
+ +### DiscordMessages, DiscordMessage, and DiscordMessageEmbed + + + + A _`DiscordMessage`_ must be within _`DiscordMessages`_. + + + It's much better to see the source code of this page to replicate and learn! + + + This message depicts the use of embeds. + <> + + This is a description. You can put a description here. It must be descriptive! + + + Multiple embeds! + + + + + Interactions are supported! I definitely used a command. + + + Display colors are supported as well! + + + +## Code blocks + +We use [Code Hike](https://codehike.org). Here are some example code blocks, which should be easy to grasp and learn upon reading the source code of this page: + + + +```ts +const HELLO = 'hello' as const; +console.log(HELLO); +// "ts" is the language of the code block. +``` + + + + + +```ts fileName +const FILE_NAME = 'fileName' as const; +if (FILE_NAME.includes(' ')) throw new Error('Spaces cannot be used in file names.'); +``` + +```ts anotherFileName +const FILE_NAME_2 = 'anotherFileName' as const; +// Putting code blocks together makes them appear in tabs, just like in your editor. +``` + +--- + +```ts requiredName +const FILE_NAME_3 = 'requiredName' as const; +if (!FILE_NAME) throw new Error('There must be a file name to use panels!'); +// The --- divider was used to create a panel. +``` + + + +For more information, be sure to check out the [documentation](https://codehike.org/docs/ch-code). diff --git a/apps/guide/src/content/02-installations-and-preparations/01-installing-node-discordjs.mdx b/apps/guide/src/content/02-installations-and-preparations/01-installing-node-discordjs.mdx new file mode 100644 index 000000000000..b35c3700cc64 --- /dev/null +++ b/apps/guide/src/content/02-installations-and-preparations/01-installing-node-discordjs.mdx @@ -0,0 +1,102 @@ +--- +title: Installing Node.js and discord.js +category: Installations and preparations +--- + +# Installing Node.js and discord.js + +## Installing Node.js + +To use discord.js, you'll need to install [Node.js](https://nodejs.org/). discord.js v14 requires Node v16.9.0 or higher. + + + To check if you already have Node installed on your machine \(e.g., if you're using a VPS\), run _`node -v`_ in your + terminal. If it outputs _`v16.9.0`_ or higher, then you're good to go! Otherwise, continue reading. + + +On Windows, it's as simple as installing any other program. Download the latest version from [the Node.js website](https://nodejs.org/), open the downloaded file, and follow the steps from the installer. + +On macOS, either: + +- Download the latest version from [the Node.js website](https://nodejs.org/), open the package installer, and follow the instructions +- Use a package manager like [Homebrew](https://brew.sh/) with the command _`brew install node`_ + +On Linux, you can consult [this page](https://nodejs.org/en/download/package-manager/) to determine how you should install Node. Native package managers often default to outdated versions of Node, so make sure you follow the recommended approach for your chosen Linux distribution carefully. + +## Preparing the essentials + +To use discord.js, you'll need to install it via npm \(Node's package manager\). npm comes with every Node installation, so you don't have to worry about installing that. However, before you install anything, you should set up a new project folder. + +Navigate to a suitable place on your machine and create a new folder named _`discord-bot`_ (or whatever you want). Next you'll need to open your terminal. + +### Opening the terminal + + + If you use [Visual Studio Code](https://code.visualstudio.com/), you can press Ctrl + ` (backtick) to open + its integrated terminal. + + +On Windows, either: + +- Shift + Right-click inside your project directory and choose the "Open command window here" option +- Press Win + R and run _`cmd.exe`_, and then _`cd`_ into your project directory + +On macOS, either: + +- Open Launchpad or Spotlight and search for "Terminal" +- In your "Applications" folder, under "Utilities", open the Terminal app + +On Linux, you can quickly open the terminal with Ctrl + Alt + T. + +With the terminal open, run the _`node -v`_ command to make sure you've successfully installed Node.js. If it outputs _`v16.9.0`_ or higher, great! + +### Initiating a project folder + + + +```sh npm +npm init; npm pkg set type="module" +``` + +```sh yarn +yarn init +# You must go into your package.json file and add "type": "module" +``` + +```sh pnpm +pnpm init; pnpm pkg set type="module" +``` + + + +This is the next command you'll be running. This command creates a _`package.json`_ file for you, which will keep track of the dependencies your project uses, as well as other info. + +This command will ask you a sequence of questions–you should fill them out as you see fit. If you're not sure of something or want to skip it as a whole, leave it blank and press enter. Setting the package type as _`module`_ tells Node that you'll be writing this project using ESM \(ECMAScript modules\), supporting the latest JavaScript syntax and features. + +Once you're done with that, you're ready to install discord.js! + +## Installing discord.js + +Now that you've installed Node.js and know how to open your console and run commands, you can finally install discord.js! Run the following command in your terminal: + + + +```sh npm +npm install discord.js +``` + +```sh yarn +yarn add discord.js +``` + +```sh pnpm +pnpm add discord.js +``` + + + +And that's it! With all the necessities installed, you're almost ready to start coding your bot. + +## Installing a linter + +While you are coding, it's possible to run into numerous syntax errors or code in an inconsistent style. You should [install a linter](./setting-up-a-linter) to ease these troubles. While code editors generally can point out syntax errors, linters coerce your code into a specific style as defined by the configuration. While this is not required, it is advised. diff --git a/apps/guide/src/content/02-installations-and-preparations/02-setting-up-a-linter.mdx b/apps/guide/src/content/02-installations-and-preparations/02-setting-up-a-linter.mdx new file mode 100644 index 000000000000..4ad884c5d160 --- /dev/null +++ b/apps/guide/src/content/02-installations-and-preparations/02-setting-up-a-linter.mdx @@ -0,0 +1,6 @@ +--- +title: Setting up a linter +category: Installations and preparations +--- + +TODO: Rewrite. Placeholder page for ordering. diff --git a/apps/guide/src/content/02-installations-and-preparations/03-setting-up-a-bot-application.mdx b/apps/guide/src/content/02-installations-and-preparations/03-setting-up-a-bot-application.mdx new file mode 100644 index 000000000000..2a581cec30c8 --- /dev/null +++ b/apps/guide/src/content/02-installations-and-preparations/03-setting-up-a-bot-application.mdx @@ -0,0 +1,61 @@ +--- +title: Setting up a bot application +category: Installations and preparations +--- + +# Setting up a bot application + +## Creating your bot + +Now that you've installed Node, discord.js, and hopefully a linter, you're almost ready to start coding! The next step you need to take is setting up an actual Discord bot application via Discord's website. + +It's effortless to create one. The steps you need to take are as follows: + +1. Open the [Discord developer portal](https://discord.com/developers/applications) and log into your account. +2. Click on the "New Application" button. +3. Enter a name and confirm the pop-up window by clicking the "Create" button. + +You should see a page like this: + +![Successfully created application](/assets/create-app.png) + +You can edit your application's name, description, and avatar here. Once you've saved your changes, move on by selecting the "Bot" tab in the left pane. + +## Your bot's token + + + This section is critical, so pay close attention. It explains what your bot token is, as well as the security aspects + of it. + + +On the bot tab, you'll see a section like this: + +![Bot application](/assets/bot-user.png) + +In this panel, you can give your bot a snazzy avatar, set its username, and make it public or private. Your bot's token will be revealed when you press the "Reset Token" button and confirm. When we ask you to paste your bot's token somewhere, this is the value that you need to put in. If you happen to lose your bot's token at some point, you need to come back to this page and reset your bot's token again which will reveal the new token, invalidating all old ones. + +### What is a token, anyway? + +A token is essentially your bot's password; it's what your bot uses to login to Discord. With that said, **it is vital that you do not ever share this token with anybody, purposely or accidentally**. If someone does manage to get a hold of your bot's token, they can use your bot as if it were theirs—this means they can perform malicious acts with it. + +Tokens look like this: _`NzkyNzE1NDU0MTk2MDg4ODQy.X-hvzA.Ovy4MCQywSkoMRRclStW4xAYK7I`_ (don't worry, we immediately reset this token before even posting it here!). If it's any shorter and looks more like this: _`kxbsDRU5UfAaiO7ar9GFMHSlmTwYaIYn`_, you copied your client secret instead. Make sure to copy the token if you want your bot to work! + +### Token leak scenario + +Let's imagine that you have a bot on over 1,000 servers, and it took you many, many months of coding and patience to get it on that amount. Your bot's token gets leaked somewhere, and now someone else has it. That person can: + +- Spam every server your bot is on; +- DM spam as many users as possible; +- Delete as many channels as possible; +- Kick or ban as many server members as possible; +- Make your bot leave all of the servers it has joined; + +All that and much, much more. Sounds pretty terrible, right? So make sure to keep your bot's token as safe as possible! + +In the [configuration files](../creating-your-bot/configuration-files) page of the guide, we cover how to safely store your bot's token in a configuration file. + + + If your bot token has been compromised by committing it to a public repository, posting it in discord.js support etc. + or otherwise see your bot's token in danger, return to this page and press "Reset Token". This will invalidate all old + tokens belonging to your bot. Keep in mind that you will need to update your bot's token where you used it before. + diff --git a/apps/guide/src/content/02-installations-and-preparations/04-adding-your-bot-to-servers.mdx b/apps/guide/src/content/02-installations-and-preparations/04-adding-your-bot-to-servers.mdx new file mode 100644 index 000000000000..c5144ed1305c --- /dev/null +++ b/apps/guide/src/content/02-installations-and-preparations/04-adding-your-bot-to-servers.mdx @@ -0,0 +1,52 @@ +--- +title: Adding your bot to servers +category: Installations and preparations +--- + +# Adding your bot to servers + +After you [set up a bot application](./setting-up-a-bot-application), you'll notice that it's not in any servers yet. So how does that work? + +Before you're able to see your bot in your own (or other) servers, you'll need to add it by creating and using a unique invite link using your bot application's client id. + +## Bot invite links + +The basic version of one such link looks like this: + + + +``` +https://discord.com/api/oauth2/authorize?client_id=123456789012345678&permissions=0&scope=bot%20applications.commands +``` + + + +The structure of the URL is quite simple: + +- _`https://discord.com/api/oauth2/authorize`_ is Discord's standard structure for authorizing an OAuth2 application (such as your bot application) for entry to a Discord server. +- _`client_id=...`_ is to specify _which_ application you want to authorize. You'll need to replace this part with your client's id to create a valid invite link. +- _`permissions=...`_ describes the permissions that your bot will request to be granted by default upon joining the server you are adding it to. +- _`scope=bot%20applications.commands`_ specifies that you want to add this application as a Discord bot, with the ability to create slash commands. + + + If you get an error message saying "Bot requires a code grant", head over to your application's settings and disable + the "Require OAuth2 Code Grant" option. You shouldn't enable this option unless you know why you need to. + + +## Creating and using your invite link + +To create an invite link, head back to the [My Apps](https://discord.com/developers/applications/me) page under the "Applications" section, click on your bot application, and open the OAuth2 page. + +In the sidebar, you'll find the OAuth2 URL generator. Select the _`bot`_ and _`applications.commands`_ options. Once you select the _`bot`_ option, a list of permissions will appear, allowing you to configure the permissions your bot needs. + +Grab the link via the "Copy" button and enter it in your browser. You should see something like this (with your bot's username and avatar): + +![Bot Authorization page](/assets/bot-auth-page.png) + +Choose the server you want to add it to and click "Authorize". Do note that you'll need the "Manage Server" permission on a server to add your bot there. This should then present you a nice confirmation message: + +![Bot authorized](/assets/bot-authorized.png) + +Congratulations! You've successfully added your bot to your Discord server. It should show up in your server's member list somewhat like this: + +![Bot in server's member list](/assets/bot-in-memberlist.png) diff --git a/apps/guide/src/content/03-creating-your-bot/01-configuration-files.mdx b/apps/guide/src/content/03-creating-your-bot/01-configuration-files.mdx new file mode 100644 index 000000000000..8f0f0ca9d906 --- /dev/null +++ b/apps/guide/src/content/03-creating-your-bot/01-configuration-files.mdx @@ -0,0 +1,132 @@ +--- +title: Configuration files +category: Creating your bot +--- + +# Configuration files + +Once you [add your bot to a server](../installations-and-preparations/adding-your-bot-to-servers), the next step is to start coding and get it online! Let's start by creating a config file to prepare the necessary values your client will need. + +As explained in the ["What is a token, anyway?"](../installations-and-preparations/setting-up-a-bot-application.md#what-is-a-token-anyway) section, your token is essentially your bot's password, and you should protect it as best as possible. This can be done through a _`config.json`_ file or by using environment variables. + +Open your application in the [Discord Developer Portal](https://discord.com/developers/applications) and go to the "Bot" page to copy your token. + +## Using config.json + +Storing data in a _`config.json`_ file is a common way of keeping your sensitive values safe. Create a _`config.json`_ file in your project directory and paste in your token. You can access your token inside other files by importing this file. + + + +```json config.json +{ + "token": "your-token-goes-here" +} +``` + +```js index.js +import config from './config.json' assert { type: 'json' }; + +console.log(config.token); +``` + + + + + If you're using Git, you should not commit this file and should [ignore it via `.gitignore`](#git-and-gitignore). + + +## Using environment variables + +Environment variables are special values for your environment (e.g., terminal session, Docker container, or environment variable file). You can pass these values into your code's scope so that you can use them. + +One way to pass in environment variables is via the command line interface. When starting your app, instead of _`node index.js`_, use _`TOKEN=your-token-goes-here node index.js`_. You can repeat this pattern to expose other values as well. + +You can access the set values in your code via the _`process.env`_ global variable, accessible in any file. Note that values passed this way will always be strings and that you might need to parse them to a number, if using them to do calculations. + + + +```sh Shell +A=123 B=456 DISCORD_TOKEN=your-token-goes-here node index.js +``` + +```js index.js +console.log(process.env.A); +console.log(process.env.B); +console.log(process.env.DISCORD_TOKEN); +``` + + + +### Using dotenv + +Another common approach is storing these values in a _`.env`_ file. This spares you from always copying your token into the command line. Each line in a _`.env`_ file should hold a _`KEY=value`_ pair. + +You can use the [`dotenv` package](https://www.npmjs.com/package/dotenv) for this. Once installed, require and use the package to load your _`.env`_ file and attach the variables to _`process.env`_: + + + +```sh npm +npm install dotenv +``` + +```sh yarn +yarn add dotenv +``` + +```sh pnpm +pnpm add dotenv +``` + + + + + +```sh .env +A=123 +B=456 +DISCORD_TOKEN=your-token-goes-here +``` + +```js index.js +import { config } from 'dotenv'; + +config(); + +console.log(process.env.A); +console.log(process.env.B); +console.log(process.env.DISCORD_TOKEN); +``` + + + + + If you're using Git, you should not commit this file and should [ignore it via `.gitignore`](#git-and-gitignore). + + + +While we generally do not recommend using online editors as hosting solutions, but rather invest in a proper virtual private server, these services do offer ways to keep your credentials safe as well! Please see the respective service's documentation and help articles for more information on how to keep sensitive values safe: + +- Glitch: [Storing secrets in .env](https://glitch.happyfox.com/kb/article/18) +- Heroku: [Configuration variables](https://devcenter.heroku.com/articles/config-vars) +- Replit: [Secrets and environment variables](https://docs.replit.com/repls/secrets-environment-variables) + + + +## Git and .gitignore + +Git is a fantastic tool to keep track of your code changes and allows you to upload progress to services like [GitHub](https://github.com/), [GitLab](https://about.gitlab.com/), or [Bitbucket](https://bitbucket.org/product). While this is super useful to share code with other developers, it also bears the risk of uploading your configuration files with sensitive values! + +You can specify files that Git should ignore in its versioning systems with a*`.gitignore`* file. Create a _`.gitignore`_ file in your project directory and add the names of the files and folders you want to ignore: + +``` +node_modules +.env +config.json +``` + + + Aside from keeping credentials safe, _`node_modules`_ should be included here. Since this directory can be restored based on the entries in your _`package.json`_ and _`package-lock.json`_ files by running _`npm install`_, it does not need to be included in Git. + + You can specify quite intricate patterns in _`.gitignore`_ files, check out the [Git documentation on `.gitignore`](https://git-scm.com/docs/gitignore) for more information! + + diff --git a/apps/guide/src/content/03-creating-your-bot/02-creating-the-main-file.mdx b/apps/guide/src/content/03-creating-your-bot/02-creating-the-main-file.mdx new file mode 100644 index 000000000000..3942fa3d4d4a --- /dev/null +++ b/apps/guide/src/content/03-creating-your-bot/02-creating-the-main-file.mdx @@ -0,0 +1,60 @@ +--- +title: Creating the main file +category: Creating your bot +--- + +# Creating the main file + + + This page assumes you've already prepared the [configuration files](./configuration-files) from the previous page. + We're using the _`config.json`_ approach, however feel free to substitute your own! + + +Open your code editor and create a new file. We suggest that you save the file as _`index.js`_, but you may name it whatever you wish. + +Here's the base code to get you started: + + + +```js +// Require the necessary discord.js classes +import { Client, Events, GatewayIntentBits } from 'discord.js'; +import config from './config.json' assert { type: 'json' }; + +// Create a new client instance +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); + +// When the client is ready, run this code (only once) +// We use 'c' for the event parameter to keep it separate from the already defined 'client' +client.once(Events.ClientReady, (c) => { + console.log(`Ready! Logged in as ${c.user.tag}`); +}); + +// Log in to Discord with your client's token +client.login(config.token); +``` + + + +This is how you create a client instance for your Discord bot and log in to Discord. The _`GatewayIntentBits.Guilds`_ intents option is necessary for the discord.js client to work as you expect it to, as it ensures that the caches for guilds, channels, and roles are populated and available for internal use. + + + The term "guild" is used by the Discord API and in discord.js to refer to a Discord server. + + +Intents also define which events Discord should send to your bot, and you may wish to enable more than just the minimum. You can read more about the other intents on the [Intents topic](../popular-topics/intents). + +## Running your application + +Open your terminal and run _`node index.js`_ to start the process. If you see "Ready!" after a few seconds, you're good to go! The next step is to start adding [slash commands](./adding-commands) to develop your bot's functionality. + + +You can open your _`package.json`_ file and edit the _`"main": "index.js"`_ field to point to your main file. You can then run _`node .`_ in your terminal to start the process! + +After closing the process with _`Ctrl + C`_, you can press the up arrow on your keyboard to bring up the latest commands you've run. Pressing up and then enter after closing the process is a quick way to start it up again. + + + +#### Resulting code + + diff --git a/apps/guide/src/content/03-creating-your-bot/03-adding-commands.mdx b/apps/guide/src/content/03-creating-your-bot/03-adding-commands.mdx new file mode 100644 index 000000000000..ea1993153763 --- /dev/null +++ b/apps/guide/src/content/03-creating-your-bot/03-adding-commands.mdx @@ -0,0 +1,163 @@ +--- +title: Adding commands +category: Creating your bot +--- + +# Creating slash commands + +Discord allows developers to register [slash commands](https://discord.com/developers/docs/interactions/application-commands), which provide users a first-class way of interacting directly with your application. + +Slash commands provide a huge number of benefits over manual message parsing, including: + +- Integration with the Discord client interface. +- Automatic command detection and parsing of the associated options/arguments. +- Typed argument inputs for command options, e.g. "String", "User", or "Role". +- Validated or dynamic choices for command options. +- In-channel private responses (ephemeral messages). +- Pop-up form-style inputs for capturing additional information. + +...and many more! + + + For fully functional slash commands, there are three important pieces of code that need to be written. They are: + + 1. The individual command files, containing their definitions and functionality. + 2. The [command handler](command-handling.html), which dynamically reads the files and executes the commands. + 3. The [command deployment script](command-deployment.html), to register your slash commands with Discord so they appear in the interface. + + These steps can be done in any order, but **all are required** before the commands are fully functional. + + On this page, you'll complete Step 1. Make sure to also complete the other pages linked above! + + + +## Before you continue + +Assuming you've followed the guide so far, your project directory should look something like this: + +```:no-line-numbers +discord-bot/ +├── node_modules +├── config.json +├── index.js +├── package-lock.json +└── package.json +``` + +## Individual command files + +Create a new folder named _`commands`_, which is where you'll store all of your command files. + +At a minimum, the definition of a slash command must have a name and a description. Slash command names must be between 1-32 characters and contain no capital letters, spaces, or symbols other than _`-`_ and _`_`_. Using the builder, a simple _`ping`\_ command definition would look like this: + + + +```js +/** @type {import('discord.js').RESTPostAPIApplicationCommandsJSONBody} */ +export const data = { + name: 'ping', + description: 'Replies with Pong!', +}; +``` + + + +A slash command also requires a function to run when the command is used, to respond to the interaction. Using an interaction response method confirms to Discord that your bot successfully received the interaction, and has responded to the user. Discord enforces this to ensure that all slash commands provide a good user experience (UX). Failing to respond will cause Discord to show that the command failed, even if your bot is performing other actions as a result. + +The simplest way to acknowledge and respond to an interaction is the _`interaction.reply()`_ method. Other methods of replying are covered on the [Response methods](../slash-commands/response-methods) page later in this section. + + + +```js +/** @param {import('discord.js').CommandInteraction} interaction */ +export async function execute(interaction) { + await interaction.reply('Pong!'); +} +``` + + + + + [`@type`](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#type) and + [`@param`](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#param-and-returns) tags allow you + to annotate your code with type information. The tags are not required for your code to run but provide autocomplete + and type information for fields and parameters, which can majorly improve your developer experience when working with + them. + + +Put these two together by creating a `commands/ping.js` file for your first command. Inside this file, you're going to define and export two items. + +- The `data` property, which will provide the command definition shown above for registering to Discord. +- The `execute` method, which will contain the functionality to run from our event handler when the command is used. + +The _`export`_ keyword ensures these values can be imported and read by other files; namely the command loader and command deployment scripts mentioned earlier. + + + +```js commands/ping.js +/** @type {import('discord.js').RESTPostAPIApplicationCommandsJSONBody} */ +export const data = { + name: 'ping', + description: 'Replies with Pong!', +}; + +/** @param {import('discord.js').CommandInteraction} interaction */ +export async function execute(interaction) { + await interaction.reply('Pong!'); +} +``` + + + + + [`module.exports`](https://nodejs.org/api/modules.html#modules_module_exports) is how you export data in Node.js so that you can [`require()`](https://nodejs.org/api/modules.html#modules_require_id) it in other files. + + If you need to access your client instance from inside a command file, you can access it via `interaction.client`. If you need to access external files, packages, etc., you should `require()` them at the top of the file. + + + +That's it for your basic ping command. Below are examples of two more commands we're going to build upon throughout the guide, so create two more files for these before you continue reading. + + + +```js commands/user.js +/** @type {import('discord.js').RESTPostAPIApplicationCommandsJSONBody} */ +export const data = { + name: 'user', + description: 'Provides information about the user.', +}; + +/** @param {import('discord.js').CommandInteraction} interaction */ +export async function execute(interaction) { + // interaction.user is the object representing the User who ran the command + // interaction.member is the GuildMember object, which represents the user in the specific guild + await interaction.reply( + `This command was run by ${interaction.user.username}, who joined on ${interaction.member.joinedAt}.`, + ); +} +``` + +```js commands/server.js +/** @type {import('discord.js').RESTPostAPIApplicationCommandsJSONBody} */ +export const data = { + name: 'server', + description: 'Provides information about the server.', +}; + +/** @param {import('discord.js').CommandInteraction} interaction */ +export async function execute(interaction) { + // interaction.guild is the object representing the Guild in which the command was run + await interaction.reply(`This server is ${interaction.guild.name} and has + ${interaction.guild.memberCount} members.`); +} +``` + + + +#### Next steps + +You can implement additional commands by creating additional files in the _`commands`_ folder, but these three are the ones we're going to use for the examples as we go on. For now let's move on to the code you'll need for command handling, to load the files and respond to incoming interactions. + +#### Resulting code + + diff --git a/apps/guide/src/content/03-creating-your-bot/04-handling-command-interactions.mdx b/apps/guide/src/content/03-creating-your-bot/04-handling-command-interactions.mdx new file mode 100644 index 000000000000..300451cc1a3c --- /dev/null +++ b/apps/guide/src/content/03-creating-your-bot/04-handling-command-interactions.mdx @@ -0,0 +1,297 @@ +--- +title: Handling command interactions +category: Creating your bot +--- + +# Command handling + +Unless your bot project is small, it's not a very good idea to have a single file with a giant _`if`_/_`else if`_ chain for commands. If you want to implement features into your bot and make your development process a lot less painful, you'll want to implement a command handler. Let's get started on that! + + + For fully functional slash commands, there are three important pieces of code that need to be written. They are: + + 1. The [individual command files](slash-commands), containing their definitions and functionality. + 2. The command handler, which dynamically reads the files and executes the commands. + 3. The [command deployment script](command-deployment), to register your slash commands with Discord so they appear in the interface. + + These steps can be done in any order, but **all are required** before the commands are fully functional. + + This page details how to complete **Step 2**. Make sure to also complete the other pages linked above! + + + +## Loading command files + +Now that your command files have been created, your bot needs to load these files on startup. + +In your _`index.js`_ file, make these additions to the base template: + + + +```js JavaScript mark=1:4,9 +import { readdir } from 'node:fs/promises'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { Client, Collection, Events, GatewayIntentBits } from 'discord.js'; +import config from './config.json' assert { type: 'json' }; + +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); + +const commands = new Collection(); + +client.once(Events.ClientReady, () => { + console.log('Ready!'); +}); +``` + +```ts TypeScript mark=1:11,16:21 +import { readdir } from 'node:fs/promises'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { + Client, + Collection, + Events, + GatewayIntentBits, + type RESTPostAPIChatInputApplicationCommandsJSONBody, + type ChatInputCommandInteraction, +} from 'discord.js'; +import config from './config.json'; + +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); + +interface CommandModule { + data: RESTPostAPIChatInputApplicationCommandsJSONBody; + execute(interaction: ChatInputCommandInteraction): Promise; +} + +const commands = new Collection(); + +client.once(Events.ClientReady, () => { + console.log('Ready!'); +}); +``` + + + + + - The [`fs`](https://nodejs.org/api/fs.html) module is Node's native file system module. _`readdir`_ is used to read + the _`commands`_ directory and identify our command files. - The [`path`](https://nodejs.org/api/path.html) module is + Node's native path utility module. _`join`_ helps construct paths to access files and directories. One of the + advantages of _`path.join`_ is that it automatically detects the operating system and uses the appropriate joiners. - + The [`url`](https://nodejs.org/api/url.html) module provides utilities for URL resolution and parsing. + _`fileURLToPath`_ ensuring a cross-platform valid absolute path string. + - The{' '} + class extends JavaScript's native + [_`Map`_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) class, and includes + more extensive, useful functionality. _`Collection`_ is used to store and efficiently retrieve commands for execution. + + + +Next, using the modules imported above, dynamically retrieve your command files with a few more additions to the _`index.js`_ file: + + + +```js JavaScript focus=3:15 +const commands = new Collection(); + +const commandsPath = fileURLToPath(new URL('commands', import.meta.url)); +const commandFiles = await readdir(commandsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + +for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + // Set a new item in the Collection with the key as the command name and the value as the exported module + if ('data' in command && 'execute' in command) { + commands.set(command.data.name, command); + } else { + console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + } +} +``` + +```ts TypeScript focus=3:15 +const commands = new Collection(); + +const commandsPath = fileURLToPath(new URL('commands', import.meta.url)); +const commandFiles = await readdir(commandsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + +for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + // Set a new item in the Collection with the key as the command name and the value as the exported module + if ('data' in command && 'execute' in command) { + commands.set(command.data.name, command); + } else { + console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + } +} +``` + + + +First, [url.fileURLToPath()](https://nodejs.org/api/url.html) helps to construct a path to the _`commands`_ directory. The [fs.readdir()](https://nodejs.org/api/fs.html#fspromisesreaddirpath-options) method then reads the path to the directory and returns a Promise which resolves to an array of all the file names it contains, currently _`['ping.js', 'server.js', 'user.js']`_. To ensure only command files get processed, _`Array.filter()`_ removes any non-JavaScript files from the array. + +With the correct files identified, the last step is to loop over the array and dynamically set each command into the _`commands`_ Collection. For each file being loaded, check that it has at least the _`data`_ and _`execute`_ properties. This helps to prevent errors resulting from loading empty, unfinished or otherwise incorrect command files while you're still developing. + +## Receiving command interactions + +Every slash command is an _`interaction`_, so to respond to a command, you need to create a listener for the event that will execute code when your application receives an interaction. Place the code below in the _`index.js`_ file you created earlier. + + + +```js +client.on(Events.InteractionCreate, (interaction) => { + console.log(interaction); +}); +``` + + + +Not every interaction is a slash command (e.g. _`MessageComponent`_ interactions). Make sure to only handle slash commands in this function by making use of the method to exit the handler if another type is encountered. This method also provides type guarding for TypeScript users, narrowing the type from _`BaseInteraction`_ to . + + + +```js focus=2 +client.on(Events.InteractionCreate, (interaction) => { + if (!interaction.isChatInputCommand()) return; + console.log(interaction); +}); +``` + + + +## Executing commands + +When your bot receives a event, the interaction object contains all the information you need to dynamically retrieve and execute your commands! + +Let's take a look at the _`ping`_ command again. Note the _`execute()`_ function that will reply to the interaction with "Pong!". + + + +```js +export const data = { + name: 'ping', + description: 'Replies with Pong!', +}; + +export async function execute(interaction) { + await interaction.reply('Pong!'); +} +``` + + + +First, you need to get the matching command from the _`commands`_ Collection based on the _`interaction.commandName`_. If no matching command is found, log an error to the console and ignore the event. + +With the right command identified, all that's left to do is call the command's _`.execute()`_ method and pass in the _`interaction`_ variable as its argument. Note that the event listener has been made _`async`_, allowing Promises to be awaited. In case something goes wrong and the Promise rejects, catch and log any error to the console. + + + +```js focus=4:20 +// focus[37:42] +client.on(Events.InteractionCreate, async (interaction) => { + if (!interaction.isChatInputCommand()) return; + + const command = commands.get(interaction.commandName); + + if (!command) { + console.error(`No command matching ${interaction.commandName} was found.`); + return; + } + + try { + await command.execute(interaction); + } catch (error) { + console.error(error); + if (interaction.replied || interaction.deferred) { + await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true }); + } else { + await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true }); + } + } +}); +``` + + + +## Command categories + +So far, all of your command files are in a single _`commands`_ folder. This is fine at first, but as your project grows, the number of files in the _`commands`_ folder will too. Keeping track of that many files can be a little tough. To make this a little easier, you can categorize your commands and put them in subfolders inside the _`commands`_ folder. You will have to make a few changes to your existing code in _`index.js`_ for this to work out. + +If you've been following along, your project structure should look something like this: + +![Project structure before sorting](/assets/before-sorting.png) + +After moving your commands into subfolders, it will look something like this: + +![Project structure after sorting](/assets/after-sorting.png) + + + Make sure you put every command file you have inside one of the new subfolders. Leaving a command file directly under + the _`commands`_ folder will create problems. + + +It is not necessary to name your subfolders exactly like we have named them here. You can create any number of subfolders and name them whatever you want. Although, it is a good practice to name them according to the type of commands stored inside them. + +Back in your _`index.js`_ file, where the code to [dynamically read command files](#loading-command-files) is, use the same pattern to read the subfolder directories, and then require each command inside them. + + + +```js JavaScript focus=3:7,19 +const commands = new Collection(); + +const foldersPath = fileURLToPath(new URL('commands', import.meta.url)); +const commandFolders = await readdir(foldersPath); + +for (const folder of commandFolders) { + const commandsPath = join(foldersPath, folder); + const commandFiles = await readdir(commandsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + // Set a new item in the Collection with the key as the command name and the value as the exported module + if ('data' in command && 'execute' in command) { + commands.set(command.data.name, command); + } else { + console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + } + } +} +``` + +```ts Typescript mark=3:7,19 +const commands = new Collection(); + +const foldersPath = fileURLToPath(new URL('commands', import.meta.url)); +const commandFolders = await readdir(foldersPath); + +for (const folder of commandFolders) { + const commandsPath = join(foldersPath, folder); + const commandFiles = await readdir(commandsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + // Set a new item in the Collection with the key as the command name and the value as the exported module + if ('data' in command && 'execute' in command) { + commands.set(command.data.name, command); + } else { + console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + } + } +} +``` + + + +That's it! When creating new files for commands, make sure you create them inside one of the subfolders (or a new one) in the _`commands`_ folder. + +#### Next steps + +Your command files are now loaded into your bot, and the event listener is prepared and ready to respond. In the next section, we cover the final step - a command deployment script you'll need to register your commands so they appear in the Discord client. + +#### Resulting code + + + +It also includes some bonus commands! diff --git a/apps/guide/src/content/03-creating-your-bot/05-registering-slash-commands.mdx b/apps/guide/src/content/03-creating-your-bot/05-registering-slash-commands.mdx new file mode 100644 index 000000000000..c7c7448818b2 --- /dev/null +++ b/apps/guide/src/content/03-creating-your-bot/05-registering-slash-commands.mdx @@ -0,0 +1,155 @@ +--- +title: Registering slash commands +category: Creating your bot +--- + +# Registering slash commands + + + For fully functional slash commands, you need three important pieces of code: + + 1. The [individual command files](slash-commands), containing their definitions and functionality. + 2. The [command handler](command-handling), which dynamically reads the files and executes the commands. + 3. The command deployment script, to register your slash commands with Discord so they appear in the interface. + + These steps can be done in any order, but **all are required** before the commands are fully functional. + + This page details how to complete **Step 3**. Make sure to also complete the other pages linked above! + + + +## Command registration + +Slash commands can be registered in two ways; in one specific guild, or for every guild the bot is in. We're going to look at single-guild registration first, as this is a good way to develop and test your commands before a global deployment. + +Your application will need the _`applications.commands`_ scope authorized in a guild for any of its slash commands to appear, and to be able to register them in a specific guild without error. + +Slash commands only need to be registered once, and updated when the definition (description, options etc) is changed. As there is a daily limit on command creations, it's not necessary nor desirable to connect a whole client to the gateway or do this on every _`ClientReady`_ event. As such, a standalone script using the lighter REST manager is preferred. + +This script is intended to be run separately, only when you need to make changes to your slash command **definitions** - you're free to modify parts such as the execute function as much as you like without redeployment. + +### Guild commands + +Create a _`deploy-commands.js`_ file in your project directory. This file will be used to register and update the slash commands for your bot application. + +Add two more properties to your _`config.json`_ file, which we'll need in the deployment script: + +- _`clientId`_: Your application's client id ([Discord Developer Portal](https://discord.com/developers/applications) > "General Information" > application id) +- _`guildId`_: Your development server's id ([Enable developer mode](https://support.discord.com/hc/en-us/articles/206346498) > Right-click the server title > "Copy Server ID") + + + +```json +{ + "token": "your-token-goes-here", + "clientId": "your-application-id-goes-here", + "guildId": "your-server-id-goes-here" +} +``` + + + +With these defined, you can use the deployment script below: + + + +```js deploy-commands.js +import { REST, Routes } from 'discord.js'; +import { readdir } from 'node:fs/promises'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import config from './config.json' assert { type: 'json' }; + +const { clientId, guildId, token } = config; + +const commands = []; + +// Grab all the command files from the commands directory you created earlier +const foldersPath = fileURLToPath(new URL('commands', import.meta.url)); +const commandFolders = await readdir(foldersPath); + +for (const folder of commandFolders) { + // Grab all the command files from the commands directory you created earlier + const commandsPath = join(foldersPath, folder); + const commandFiles = await readdir(commandsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment + for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + if ('data' in command && 'execute' in command) { + commands.push(command.data.toJSON()); + } else { + console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + } + } +} + +// Construct and prepare an instance of the REST module +const rest = new REST().setToken(token); + +try { + console.log(`Started refreshing ${commands.length} application (/) commands.`); + + // The put method is used to fully refresh all commands in the guild with the current set + const data = await rest.put(Routes.applicationGuildCommands(clientId, guildId), { body: commands }); + + console.log(`Successfully reloaded ${data.length} application (/) commands.`); +} catch (error) { + // And of course, make sure you catch and log any errors! + console.error(error); +} +``` + + + +Once you fill in these values, run _`node deploy-commands.js`_ in your project directory to register your commands to the guild specified. If you see the success message, check for the commands in the server by typing _`/`_! If all goes well, you should be able to run them and see your bot's response in Discord! + +### Global commands + +Global application commands will be available in all the guilds your application has the _`applications.commands`_ scope authorized in, and in direct messages by default. + +To deploy global commands, you can use the same script from the [guild commands](#guild-commands) section and simply adjust the route in the script to _`.applicationCommands(clientId)`_ + +Test + + + +```js focus=5 +try { + console.log(`Started refreshing ${commands.length} application (/) commands.`); + + // The put method is used to fully refresh all commands in the guild with the current set + const data = await rest.put(Routes.applicationCommands(clientId), { body: commands }); + + console.log(`Successfully reloaded ${data.length} application (/) commands.`); +} catch (error) { + // And of course, make sure you catch and log any errors! + console.error(error); +} +``` + + + +### Where to deploy + + + Guild-based deployment of commands is best suited for development and testing in your own personal server. Once you're satisfied that it's ready, deploy the command globally to publish it to all guilds that your bot is in. + + You may wish to have a separate application and token in the Discord Dev Portal for your dev application, to avoid duplication between your guild-based commands and the global deployment. + + + +#### Further reading + +You've successfully sent a response to a slash command! However, this is only the most basic of command event and response functionality. Much more is available to enhance the user experience including: + +- applying this same dynamic, modular handling approach to events with an [Event handler](./event-handling). +- utilising the different [Response methods](../slash-commands/response-methods) that can be used for slash commands. +- expanding on these examples with additional validated option types in [Advanced command creation](../slash-commands/advanced-creation). +- adding formatted [Embeds](../popular-topics/embeds) to your responses. +- enhancing the command functionality with [Buttons](../interactions/buttons) and [Select Menus](../interactions/select-menus). +- prompting the user for more information with [Modals](../interactions/modals). + +#### Resulting code + + diff --git a/apps/guide/src/content/03-creating-your-bot/06-event-handling.mdx b/apps/guide/src/content/03-creating-your-bot/06-event-handling.mdx new file mode 100644 index 000000000000..935319d1211a --- /dev/null +++ b/apps/guide/src/content/03-creating-your-bot/06-event-handling.mdx @@ -0,0 +1,219 @@ +--- +title: Event handling +category: Creating your bot +--- + +# Event handling + +Node.js uses an event-driven architecture, making it possible to execute code when a specific event occurs. The discord.js library takes full advantage of this. You can visit the documentation to see the full list of events. + + + This page assumes you've followed the guide up to this point, and created your _`index.js`_ and individual slash + commands according to those pages. + + +At this point, your `index.js` file has code for loading commands, and listeners for two events: `ClientReady` and `InteractionCreate`. + + + +```js Commands +const commands = new Collection(); + +const foldersPath = fileURLToPath(new URL('commands', import.meta.url)); +const commandFolders = await readdir(foldersPath); + +for (const folder of commandFolders) { + const commandsPath = join(foldersPath, folder); + const commandFiles = await readdir(commandsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + // Set a new item in the Collection with the key as the command name and the value as the exported module + if ('data' in command && 'execute' in command) { + commands.set(command.data.name, command); + } else { + console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + } + } +} +``` + +```js ClientReady +client.once(Events.ClientReady, (c) => { + console.log(`Ready! Logged in as ${c.user.tag}`); +}); +``` + +```js InteractionCreate +client.on(Events.InteractionCreate, async (interaction) => { + if (!interaction.isChatInputCommand()) return; + + const command = commands.get(interaction.commandName); + + if (!command) { + console.error(`No command matching ${interaction.commandName} was found.`); + return; + } + + try { + await command.execute(interaction); + } catch (error) { + console.error(`Error executing ${interaction.commandName}`); + console.error(error); + } +}); +``` + + + +Currently, all of this code is in the _`index.js`_ file. emits once when the _`Client`_ becomes ready for use, and emits whenever an interaction is received. +Moving the event listener code into individual files is simple, and we'll be taking a similar approach to the [command handler](./handling-command-interactions). + +## Individual event files + +Your project directory should look something like this: + +``` +discord-bot/ +├── commands/ +├── node_modules/ +├── config.json +├── deploy-commands.js +├── index.js +├── package-lock.json +└── package.json +``` + +Create an _`events`_ folder in the same directory. You can then move the code from your event listeners in _`index.js`_ to separate files: _`events/ready.js`_ and _`events/interactionCreate.js`_. The _`InteractionCreate`_ event is responsible for command handling, so the command loading code will move here too. + + + +```js events/interactionCreate.js +import { readdir } from 'node:fs/promises'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { Collection, Events } from 'discord.js'; + +const commands = new Collection(); + +const foldersPath = fileURLToPath(new URL('commands', import.meta.url)); +const commandFolders = await readdir(foldersPath); + +for (const folder of commandFolders) { + const commandsPath = join(foldersPath, folder); + const commandFiles = await readdir(commandsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + for (const file of commandFiles) { + const filePath = join(commandsPath, file); + const command = await import(filePath); + // Set a new item in the Collection with the key as the command name and the value as the exported module + if ('data' in command && 'execute' in command) { + commands.set(command.data.name, command); + } else { + console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + } + } +} + +export const data = { + name: Events.InteractionCreate, +}; + +export async function execute(interaction) { + if (!interaction.isChatInputCommand()) return; + + const command = commands.get(interaction.commandName); + + if (!command) { + console.error(`No command matching ${interaction.commandName} was found.`); + return; + } + + try { + await command.execute(interaction); + } catch (error) { + console.error(`Error executing ${interaction.commandName}`); + console.error(error); + } +} +``` + +```js events/ready.js +import { Events } from 'discord.js'; + +export const data = { + name: Events.ClientReady, + once = true, +}; +export async function execute(client) { + console.log(`Ready! Logged in as ${client.user.tag}`); +} +``` + +```js index.js +import { readdir } from 'node:fs/promises'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { Client, GatewayIntentBits } from 'discord.js'; +import config from './config.json' assert { type: 'json' }; + +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); + +client.login(config.token); +``` + + + +The _`name`_ property states which event this file is for, and the _`once`_ property holds a boolean value that specifies if the event should run only once. You don't need to specify this in _`interactionCreate.js`_ as the default behavior will be to run on every event instance. The _`execute`_ function holds your event logic, which will be called by the event handler whenever the event emits. + +## Reading event files + +Next, let's write the code for dynamically retrieving all the event files in the _`events`_ folder. We'll be taking a similar approach to our [command handler](./handling-command-interactions). Place the new code highlighted below in your _`index.js`_. + +_`fs.readdir()`_ combined with _`array.filter()`_ returns an array of all the file names in the given directory and filters for only _`.js`_ files, i.e. _`['ready.js', 'interactionCreate.js']`_. + + + +```js focus=9:20 +import { readdir } from 'node:fs/promises'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { Client, GatewayIntentBits } from 'discord.js'; +import config from './config.json' assert { type: 'json' }; + +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); + +const eventsPath = fileURLToPath(new URL('events', import.meta.url)); +const eventFiles = await readdir(eventsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + +for (const file of eventFiles) { + const filePath = join(eventsPath, file); + const event = await import(filePath); + if (event.data.once) { + client.once(event.data.name, (...args) => event.execute(...args)); + } else { + client.on(event.data.name, (...args) => event.execute(...args)); + } +} + +client.login(config.token); +``` + + + +You'll notice the code looks very similar to the command loading above it - read the files in the events folder and load each one individually. + +The class in discord.js extends the [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) class. Therefore, the _`client`_ object exposes the [`.on()`](https://nodejs.org/api/events.html#events_emitter_on_eventname_listener) and [`.once()`](https://nodejs.org/api/events.html#events_emitter_once_eventname_listener) methods that you can use to register event listeners. These methods take two arguments: the event name and a callback function. These are defined in your separate event files as _`name`_ and _`execute`_. + +The callback function passed takes argument(s) returned by its respective event, collects them in an _`args`_ array using the _`...`_ [rest parameter syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters), then calls _`event.execute()`_ while passing in the _`args`_ array using the _`...`_ [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax). They are used here because different events in discord.js have different numbers of arguments. The rest parameter collects these variable number of arguments into a single array, and the spread syntax then takes these elements and passes them to the _`execute`_ function. + +After this, listening for other events is as easy as creating a new file in the _`events`_ folder. The event handler will automatically retrieve and register it whenever you restart your bot. + + + In most cases, you can access your _`client`_ instance in other files by obtaining it from one of the other discord.js + structures, e.g. _`interaction.client`_ in the _`InteractionCreate`_ event. You do not need to manually pass it to + your events. + + +## Resulting code + + diff --git a/apps/guide/src/content/04-popular-topics/01-frequently-asked-questions.mdx b/apps/guide/src/content/04-popular-topics/01-frequently-asked-questions.mdx new file mode 100644 index 000000000000..0f8c0d13958f --- /dev/null +++ b/apps/guide/src/content/04-popular-topics/01-frequently-asked-questions.mdx @@ -0,0 +1,496 @@ +--- +title: Frequently asked questions +category: Popular topics +--- + +# Frequently asked questions + +## Legend + +- _`client`_ is a placeholder for the object: + _`const client = new Client({ intents: [GatewayIntentBits.Guilds] });`_. + +- _`interaction`_ is a placeholder for the : + _`client.on(Events.InteractionCreate, interaction => { ... });`_. + +- _`guild`_ is a placeholder for the object: + _`interaction.guild`_ or _`client.guilds.cache.get('id')`_ + +- _`voiceChannel`_ is a placeholder for the : + _`interaction.member.voice.channel`_. + +For a more detailed explanation of the notations commonly used in this guide, the docs, and the support server, see [here](/additional-info/notation.md). + +## Administrative + +### How do I ban a user? + + + +```js +const user = interaction.options.getUser('target'); +await guild.members.ban(user); +``` + + + +### How do I unban a user? + + + +```js +const user = interaction.options.getUser('target'); +await guild.members.unban(user); +``` + + + + + Discord validates and resolves user ids for users not on the server in user slash command options. To retrieve and use + the full structure from the resulting interaction, you can use the{' '} + method. + + +### How do I kick a guild member? + + + +```js +const member = interaction.options.getMember('target'); +await member.kick(); +``` + + + +### How do I timeout a guild member? + + + +```js +const member = interaction.options.getMember('target'); +await member.timeout(60_000); // Timeout for one minute +``` + + + + + Timeout durations are measured by the millisecond. The maximum timeout duration you can set is 28 days. To remove a + timeout set on a member, pass _`null`_ instead of a timeout duration. + + +### How do I add a role to a guild member? + + + +```js +const role = interaction.options.getRole('role'); +const member = interaction.options.getMember('target'); +await member.roles.add(role); +``` + + + +### How do I check if a guild member has a specific role? + + + +```js +const role = interaction.options.getRole('role'); +const member = interaction.options.getMember('target'); + +if (member.roles.cache.has(role.id) { + // ... +} +``` + + + +### How do I limit a command to a single user? + + + +```js +if (interaction.user.id === 'id') { + // ... +} +``` + + + +## Bot Configuration and Utility + +### How do I set my bot's username? + + + +```js +await client.user.setUsername('username'); +``` + + + +### How do I set my bot's avatar? + + + +```js +await client.user.setAvatar('URL or path'); +``` + + + +### How do I set my playing status? + + + +```js +client.user.setActivity('activity'); +``` + + + +### How do I set my status to "Watching/Listening to/Competing in ..."? + + + +```js +import { ActivityType } from 'discord.js'; + +client.user.setActivity('activity', { type: ActivityType.Watching }); +client.user.setActivity('activity', { type: ActivityType.Listening }); +client.user.setActivity('activity', { type: ActivityType.Competing }); +``` + + + + + If you would like to set your activity upon startup, you can use the{' '} + object to set the appropriate + . + + +### How do I make my bot display online/idle/dnd/invisible? + + + +```js +client.user.setStatus('online'); +client.user.setStatus('idle'); +client.user.setStatus('dnd'); +client.user.setStatus('invisible'); +``` + + + +### How do I set both status and activity in one go? + + + +```js +client.user.setPresence({ activities: [{ name: 'activity' }], status: 'idle' }); +``` + + + +## Miscellaneous + +### How do I send a message to a specific channel? + + + +```js +const channel = client.channels.cache.get('id'); +await channel.send('content'); +``` + + + +### How do I create a post in a forum channel? + + + Currently, the only way to get tag ids is programmatically through{' '} + . + + + + +```js +const channel = client.channels.cache.get('id'); + +await channel.threads.create({ + name: 'Post name', + message: { content: 'Message content' }, + appliedTags: ['tagId', 'anotherTagId'], +}); +``` + + + +### How do I DM a specific user? + + + +```js +await client.users.send('id', 'content'); +``` + + + + + If you want to send a direct message to the user who sent the interaction, you can use _`interaction.user.send()`_. + + +### How do I mention a specific user in a message? + + + +```js +const user = interaction.options.getUser('target'); +await interaction.reply(`Hi, ${user}.`); +await interaction.followUp(`Hi, <@${user.id}>.`); +``` + + + + + Mentions in embeds may resolve correctly in embed titles, descriptions and field values but will never notify the + user. Other areas do not support mentions at all. + + +### How do I control which users and/or roles are mentioned in a message? + +Controlling which mentions will send a ping is done via the _`allowedMentions`_ option, which replaces _`disableMentions`_. + +This can be set as a default in , and controlled per-message sent by your bot. + + + +```js +new Client({ allowedMentions: { parse: ['users', 'roles'] } }); +``` + + + +Even more control can be achieved by listing specific _`users`_ or _`roles`_ to be mentioned by id, e.g.: + + + +```js +await channel.send({ + content: '<@123456789012345678> <@987654321098765432> <@&102938475665748392>', + allowedMentions: { users: ['123456789012345678'], roles: ['102938475665748392'] }, +}); +``` + + + +### How do I prompt the user for additional input? + + + +```js +await interaction.reply('Please enter more input.'); +const filter = (m) => interaction.user.id === m.author.id; + +try { + const messages = await interaction.channel.awaitMessages({ filter, time: 60000, max: 1, errors: ['time'] }); + await interaction.followUp(`You've entered: ${messages.first().content}`); +} catch { + await interaction.followUp('You did not enter any input!'); +} +``` + + + + + If you want to learn more about this syntax or other types of collectors, check out [this dedicated guide page for + collectors](/popular-topics/collectors.md)! + + +### How do I block a user from using my bot? + + + +```js +const blockedUsers = ['id1', 'id2']; + +client.on(Events.InteractionCreate, (interaction) => { + if (blockedUsers.includes(interaction.user.id)) return; +}); +``` + + + + + You do not need to have a constant local variable like _`blockedUsers`_ above. If you have a database system that you + use to store ids of blocked users, you can query the database instead. + + + + +```js +client.on(Events.InteractionCreate, async (interaction) => { + const blockedUsers = await database.query('SELECT user_id FROM blocked_users;'); + if (blockedUsers.includes(interaction.user.id)) return; +}); +``` + + + +Note that this is just a showcase of how you could do such a check. + +### How do I react to the message my bot sent? + + + +```js +const sentMessage = await interaction.channel.send('My message to react to.'); +// Unicode emoji +await sentMessage.react('👍'); + +// Custom emoji +await sentMessage.react('123456789012345678'); +await sentMessage.react(''); +await sentMessage.react(''); +await sentMessage.react('emoji:123456789012345678'); +await sentMessage.react('a:emoji:123456789012345678'); +``` + + + + + If you want to learn more about reactions, check out [this dedicated guide on + reactions](/popular-topics/reactions.md)! + + +### How do I restart my bot with a command? + + + +```js +process.exit(); +``` + + + + + _`process.exit()`_ will only kill your Node process, but when using [PM2](https://pm2.keymetrics.io/), it will restart + the process whenever it gets killed. You can read our guide on PM2 [here](/improving-dev-environment/pm2.md). + + +### What is the difference between a User and a GuildMember? + +A User represents a global Discord user, and a GuildMember represents a Discord user on a specific server. That means only GuildMembers can have permissions, roles, and nicknames, for example, because all of these things are server-bound information that could be different on each server that the user is in. + +### How do I find all online members of a guild? + + + +```js +// First use guild.members.fetch to make sure all members are cached +const fetchedMembers = await guild.members.fetch({ withPresences: true }); +const totalOnline = fetchedMembers.filter((member) => member.presence?.status === 'online'); +// Now you have a collection with all online member objects in the totalOnline variable +console.log(`There are currently ${totalOnline.size} members online in this guild!`); +``` + + + + + This only works correctly if you have the _`GuildPresences`_ intent enabled for your application and client. If you + want to learn more about intents, check out [this dedicated guide on intents](/popular-topics/intents.md)! + + +### How do I check which role was added/removed and for which member? + + + +```js +// Start by declaring a guildMemberUpdate listener +// This code should be placed outside of any other listener callbacks to prevent listener nesting +client.on(Events.GuildMemberUpdate, (oldMember, newMember) => { + // If the role(s) are present on the old member object but no longer on the new one (i.e role(s) were removed) + const removedRoles = oldMember.roles.cache.filter((role) => !newMember.roles.cache.has(role.id)); + + if (removedRoles.size > 0) { + console.log(`The roles ${removedRoles.map((r) => r.name)} were removed from ${oldMember.displayName}.`); + } + + // If the role(s) are present on the new member object but are not on the old one (i.e role(s) were added) + const addedRoles = newMember.roles.cache.filter((role) => !oldMember.roles.cache.has(role.id)); + + if (addedRoles.size > 0) { + console.log(`The roles ${addedRoles.map((r) => r.name)} were added to ${oldMember.displayName}.`); + } +}); +``` + + + +### How do I check the bot's ping? + +There are two common measurements for bot pings. The first, **websocket heartbeat**, is the average interval of a regularly sent signal indicating the healthy operation of the websocket connection the library receives events over: + + + +```js +await interaction.reply(`Websocket heartbeat: ${client.ws.ping}ms.`); +``` + + + + + If you're using [sharding](/sharding/), a specific shard's heartbeat can be found on the WebSocketShard instance, + accessible at _`client.ws.shards.get(id).ping`_. + + +The second, **Roundtrip Latency**, describes the amount of time a full API roundtrip (from the creation of the command message to the creation of the response message) takes. You then edit the response to the respective value to avoid needing to send yet another message: + + + +```js +const sent = await interaction.reply({ content: 'Pinging...', fetchReply: true }); +await interaction.editReply(`Roundtrip latency: ${sent.createdTimestamp - interaction.createdTimestamp}ms`); +``` + + + +### Why do some emojis behave weirdly? + +If you've tried using [the usual method of retrieving unicode emojis](./reactions.md#unicode-emojis), you may have noticed that some characters don't provide the expected results. Here's a short snippet that'll help with that issue. You can toss this into a file of its own and use it anywhere you need! Alternatively feel free to simply copy-paste the characters from below: + + + +```js index.js +import { emojiCharacters } from './emojiCharacters.js'; + +console.log(emojiCharacters.a); // 🇦 +console.log(emojiCharacters[10]); // 🔟 +console.log(emojiCharacters['!']); // ❗ +``` + +{/* prettier-ignore */} +```js emojiCharacters.js +export const emojiCharacters = { + a: '🇦', b: '🇧', c: '🇨', d: '🇩', + e: '🇪', f: '🇫', g: '🇬', h: '🇭', + i: '🇮', j: '🇯', k: '🇰', l: '🇱', + m: '🇲', n: '🇳', o: '🇴', p: '🇵', + q: '🇶', r: '🇷', s: '🇸', t: '🇹', + u: '🇺', v: '🇻', w: '🇼', x: '🇽', + y: '🇾', z: '🇿', 0: '0️⃣', 1: '1️⃣', + 2: '2️⃣', 3: '3️⃣', 4: '4️⃣', 5: '5️⃣', + 6: '6️⃣', 7: '7️⃣', 8: '8️⃣', 9: '9️⃣', + 10: '🔟', '#': '#️⃣', '*': '*️⃣', + '!': '❗', '?': '❓', +}; +``` + + + + +You can use the ⌃ Control ⌘ Command Space keyboard shortcut to open up an emoji picker that can be used for quick, easy access to all the Unicode emojis available to you. + +On Windows, the shortcut is .. + + diff --git a/apps/guide/src/content/04-popular-topics/02-audit-logs.mdx b/apps/guide/src/content/04-popular-topics/02-audit-logs.mdx new file mode 100644 index 000000000000..44f4e9c644c4 --- /dev/null +++ b/apps/guide/src/content/04-popular-topics/02-audit-logs.mdx @@ -0,0 +1,165 @@ +--- +title: Audit logs +category: Popular topics +--- + +# Audit logs + +## A Quick Background + +Audit logs are an excellent moderation tool offered by Discord to know what happened in a server and usually by whom. Making use of audit logs requires the _`ViewAuditLog`_ permission. Audit logs may be fetched on a server, or they may be received via the gateway event which requires the _`GuildModeration`_ intent. + +There are quite a few cases where you may use audit logs. This guide will limit itself to the most common use cases. Feel free to consult the [relevant Discord API page](https://discord.com/developers/docs/resources/audit-log) for more information. + +Keep in mind that these examples explore a straightforward case and are by no means exhaustive. Their purpose is to teach you how audit logs work, and expansion of these examples is likely needed to suit your specific use case. + +## Fetching Audit Logs + +Let's start by glancing at the method and how to work with it. Like many discord.js methods, it returns a [Promise](../additional-info/understanding-async-await) containing the object. This object has one property, _`entries`_, which holds a [Collection](../additional-info/collections) of objects, and consequently, the information you want to retrieve. + +Here is the most basic fetch to look at some entries. + + + +```js +const fetchedLogs = await guild.fetchAuditLogs(); +const firstEntry = fetchedLogs.entries.first(); +``` + + + +Simple, right? Now, let's look at utilizing its options: + + + +```js +import { AuditLogEvent } from 'discord.js'; + +const fetchedLogs = await guild.fetchAuditLogs({ + type: AuditLogEvent.InviteCreate, + limit: 1, +}); + +const firstEntry = fetchedLogs.entries.first(); +``` + + + +This will return the first entry where an invite was created. You used _`limit: 1`_ here to specify only one entry. + +## Receiving Audit Logs + +Audit logs may be received via the gateway event . +This is the best way to receive audit logs if you want to monitor them. As soon as an audit log entry is created, +your application will receive an instance of this event. A common use case is to find out _who_ did the action that +caused the audit log event to happen. + +### Who deleted a message? + +One of the most common use cases for audit logs is understanding who deleted a message in a Discord server. If a user deleted another user's message, you can find out who did that as soon as you receive the corresponding audit log event. + + + Messages deleted by their author or bots (excluding bulk deletes) do not generate audit log entries. + + + + +```js JavaScript +import { AuditLogEvent, Events } from 'discord.js'; + +client.on(Events.GuildAuditLogEntryCreate, async (auditLog) => { + // Define your variables. + // The extra information here will be the channel. + const { action, extra: channel, executorId, targetId } = auditLog; + + // Check only for deleted messages. + if (action !== AuditLogEvent.MessageDelete) return; + + // Ensure the executor is cached. + const executor = await client.users.fetch(executorId); + + // Ensure the author whose message was deleted is cached. + const target = await client.users.fetch(targetId); + + // Log the output. + console.log(`A message by ${target.tag} was deleted by ${executor.tag} in ${channel}.`); +}); +``` + +```ts TypeScript +import { AuditLogEvent, Events } from 'discord.js'; + +client.on(Events.GuildAuditLogEntryCreate, async (auditLog) => { + // Define your variables. + // The extra information here will be the channel. + const { action, extra: channel, executorId, targetId } = auditLog; + + // Check only for deleted messages. + if (action !== AuditLogEvent.MessageDelete) return; + + // Ensure the executor is cached. The id definitely exists. + const executor = await client.users.fetch(executorId!); + + // Ensure the author whose message was deleted is cached. The id definitely exists. + const target = await client.users.fetch(targetId!); + + // Log the output. + console.log(`A message by ${target.tag} was deleted by ${executor.tag} in ${channel}.`); +}); +``` + + + +With this, you now have a very simple logger telling you who deleted a message authored by another person. + +### Who kicked a user? + +This is very similar to the example above. + + + +```js JavaScript +import { AuditLogEvent, Events } from 'discord.js'; + +client.on(Events.GuildAuditLogEntryCreate, async (auditLog) => { + // Define your variables. + const { action, executorId, targetId } = auditLog; + + // Check only for kicked users. + if (action !== AuditLogEvent.MemberKick) return; + + // Ensure the executor is cached. + const executor = await client.users.fetch(executorId); + + // Ensure the kicked guild member is cached. + const kickedUser = await client.users.fetch(targetId); + + // Now you can log the output! + console.log(`${kickedUser.tag} was kicked by ${executor.tag}.`); +}); +``` + +```ts TypeScript +import { AuditLogEvent, Events } from 'discord.js'; + +client.on(Events.GuildAuditLogEntryCreate, async (auditLog) => { + // Define your variables. + const { action, executorId, targetId } = auditLog; + + // Check only for kicked users. + if (action !== AuditLogEvent.MemberKick) return; + + // Ensure the executor is cached. The id definitely exists. + const executor = await client.users.fetch(executorId!); + + // Ensure the kicked guild member is cached. The id definitely exists. + const kickedUser = await client.users.fetch(targetId!); + + // Now you can log the output! + console.log(`${kickedUser.tag} was kicked by ${executor.tag}.`); +}); +``` + + + +If you want to check who banned a user, it's the same example as above except the _`action`_ should be . You can check the rest of the possible actions on this page. diff --git a/apps/guide/src/content/04-popular-topics/03-collectors.mdx b/apps/guide/src/content/04-popular-topics/03-collectors.mdx new file mode 100644 index 000000000000..598d1bb60f5f --- /dev/null +++ b/apps/guide/src/content/04-popular-topics/03-collectors.mdx @@ -0,0 +1,223 @@ +--- +title: Collectors +category: Popular topics +--- + +# Collectors + +## Message collectors + +{/* prettier-ignore */} +Collectors are useful to enable your bot to obtain _additional_ input after the first command was sent. An example would be initiating a quiz, where the bot will "await" a correct response from somebody. + +### Basic message collector + +Let's take a look at a basic message collector: + + + +```js +const collectorFilter = (message) => message.content.includes('discord'); +const collector = interaction.channel.createMessageCollector({ filter: collectorFilter, time: 15_000 }); + +collector.on('collect', (message) => { + console.log(`Collected ${message.content}`); +}); + +collector.on('end', (collected) => { + console.log(`Collected ${collected.size} messages`); +}); +``` + + + +You can provide a _`filter`_ key to the object parameter of . The value to this key should be a function that returns a boolean value to indicate if this message should be collected or not. To check for multiple conditions in your filter you can connect them using [logical operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#logical_operators). If you don't provide a filter all messages in the channel the collector was started on will be collected. + +Note that the above example uses [implicit return](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#function_body) for the filter function and passes it to the options object using the [object property shorthand](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#property_definitions) notation. + +If a message passes through the filter, it will trigger the event for the _`collector`_ you've created. This message is then passed into the event listener as _`collected`_ and the provided function is executed. In the above example, you simply log the message. Once the collector finishes collecting based on the provided end conditions the event emits. + +You can control when a collector ends by supplying additional option keys when creating a collector: + +- _`time`_: Amount of time in milliseconds the collector should run for +- _`max`_: Number of messages to successfully pass the filter +- _`maxProcessed`_: Number of messages encountered (no matter the filter result) + +The benefit of using an event-based collector over _`awaitMessages()`_ (its promise-based counterpart) is that you can do something directly after each message is collected, rather than just after the collector ended. You can also stop the collector manually by calling . + +### Await messages + +Using can be easier if you understand [Promises](../additional-info/understanding-async-await), and it allows you to have cleaner code overall. It is essentially identical to , except promisified. However, the drawback of using this method is that you cannot do things before the Promise is resolved or rejected, either by an error or completion. However, it should do for most purposes, such as awaiting the correct response in a quiz. Instead of taking their example, let's set up a basic quiz command using the _`.awaitMessages()`_ feature. + +First, you'll need some questions and answers to choose from, so here's a basic set: + + + +```json +[ + { + "question": "What color is the sky?", + "answers": ["blue"] + }, + { + "question": "How many letters are there in the alphabet?", + "answers": ["26", "twenty-six", "twenty six", "twentysix"] + } +] +``` + + + +The provided set allows for responder error with an array of answers permitted. Ideally, it would be best to place this in a JSON file, which you can call _`quiz.json`_ for simplicity. + + + +```js +import quiz from './quiz.json' assert { type: 'json' }; + +// ... + +const item = quiz[Math.floor(Math.random() * quiz.length)]; + +const collectorFilter = (response) => { + return item.answers.some((answer) => answer.toLowerCase() === response.content.toLowerCase()); +}; + +await interaction.reply({ content: item.question }); + +try { + const collected = await interaction.channel.awaitMessages({ + filter: collectorFilter, + max: 1, + time: 30_000, + errors: ['time'], + }); + + await interaction.followUp(`${collected.first().author} got the correct answer!`); +} catch { + await interaction.followUp('Looks like nobody got the answer this time.'); +} +``` + + + + + If you don't understand how _`.some()`_ works, you can read about it in more detail + [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some). + + +In this filter, you iterate through the answers to find what you want. You would like to ignore the case because simple typos can happen, so you convert each answer to its lowercase form and check if it's equal to the response in lowercase form as well. In the options section, you only want to allow one answer to pass through, hence the _`max: 1`_ setting. + +The filter looks for messages that match one of the answers in the array of possible answers to pass through the collector. The _`max`_ option (the second parameter) specifies that only a maximum of one message can go through the filter successfully before the Promise successfully resolves. The _`errors`_ section specifies that time will cause it to error out, which will cause the Promise to reject if one correct answer is not received within the time limit of one minute. As you can see, there is no _`collect`_ event, so you are limited in that regard. + +## Reaction collectors + +### Basic reaction collector + +These work quite similarly to message collectors, except that you apply them on a message rather than a channel. This example uses the method. The filter will check for the 👍 emoji–in the default skin tone specifically, so be wary of that. It will also check that the person who reacted shares the same id as the author of the original message that the collector was assigned to. + +```js +const collectorFilter = (reaction, user) => { + return reaction.emoji.name === '👍' && user.id === message.author.id; +}; + +const collector = message.createReactionCollector({ filter: collectorFilter, time: 15_000 }); + +collector.on('collect', (reaction, user) => { + console.log(`Collected ${reaction.emoji.name} from ${user.tag}`); +}); + +collector.on('end', (collected) => { + console.log(`Collected ${collected.size} items`); +}); +``` + +### Await reactions + + works almost the same as a reaction collector, +except it is Promise-based. The same differences apply as with channel collectors. + +```js +const collectorFilter = (reaction, user) => { + return reaction.emoji.name === '👍' && user.id === message.author.id; +}; + +try { + const collected = await message.awaitReactions({ filter: collectorFilter, max: 1, time: 60_000, errors: ['time'] }); + console.log(collected.size); +} catch (collected) { + console.log(`After a minute, the user did not react.`); +} +``` + +## Interaction collectors + +The third type of collector allows you to collect interactions; such as when users activate a slash command or click on a button in a message. + +### Basic message component collector + +Collecting interactions from message components works similarly to reaction collectors. In the following example, you will check that the interaction came from a button, and that the user clicking the button is the same user that initiated the command. + +One important difference to note with interaction collectors is that Discord expects a response to _all_ interactions within 3 seconds - even ones that you don't want to collect. For this reason, you may wish to _`.deferUpdate()`_ all interactions in your filter, or not use a filter at all and handle this behavior in the _`collect`_ event. + +```js +import { ComponentType } from 'discord.js'; + +const collector = message.createMessageComponentCollector({ componentType: ComponentType.Button, time: 15_000 }); + +collector.on('collect', (i) => { + if (i.user.id === interaction.user.id) { + await i.reply(`${i.user.id} clicked on the ${i.customId} button.`); + } else { + await i.reply({ content: `These buttons aren't for you!`, ephemeral: true }); + } +}); + +collector.on('end', (collected) => { + console.log(`Collected ${collected.size} interactions.`); +}); +``` + +### Await message component + +As before, this works similarly to the message component collector, except it is Promise-based. + +Unlike other Promise-based collectors, this method will only ever collect one interaction that passes the filter. If no interactions are collected before the time runs out, the Promise will reject. This behavior aligns with Discord's requirement that actions should immediately receive a response. In this example, you will use _`.deferUpdate()`_ on all interactions in the filter. + +```js +import { ComponentType } from 'discord.js'; + +const collectorFilter = (i) => { + i.deferUpdate(); + return i.user.id === interaction.user.id; +}; + +try { + const interaction = await message.awaitMessageComponent({ + filter: collectorFilter, + componentType: ComponentType.StringSelect, + time: 60_000, + }); + + await interaction.editReply(`You selected ${interaction.values.join(', ')}!`); +} catch (error) { + console.log('No interactions were collected.'); +} +``` + +### Await modal submit + +If you want to wait for the submission of a modal within the context of another command or button execution, you may find the promisified collector useful. + +As Discord does not inform you if the user dismisses the modal, supplying a maximum _`time`_ to wait for is crucial: + +```js +try { + const interaction = await initialInteraction.awaitModalSubmit({ time: 60_000, filter }); + await interaction.editReply('Thank you for your submission!'); +} catch (error) { + console.log('No modal submit interaction was collected'); +} +``` + +For more information on working with modals, see the [modals section of this guide](../interactions/modals). diff --git a/apps/guide/src/content/04-popular-topics/04-formatters.mdx b/apps/guide/src/content/04-popular-topics/04-formatters.mdx new file mode 100644 index 000000000000..3af5ab818321 --- /dev/null +++ b/apps/guide/src/content/04-popular-topics/04-formatters.mdx @@ -0,0 +1,95 @@ +--- +title: Formatters +category: Popular topics +--- + +# Formatters + +discord.js provides the package which contains a variety of utilities you can use when writing your Discord bot. + +## Basic Markdown + +These functions format strings into all the different markdown styles supported by Discord. + + + +```js +import { bold, italic, strikethrough, underscore, spoiler, quote, blockQuote } from 'discord.js'; + +const string = 'Hello!'; +const boldString = bold(string); +const italicString = italic(string); +const strikethroughString = strikethrough(string); +const underscoreString = underscore(string); +const spoilerString = spoiler(string); +const quoteString = quote(string); +const blockquoteString = blockQuote(string); +``` + + + +## Links + +There are also two functions to format hyperlinks. _`hyperlink()`_ will format the URL into a masked markdown link, and _`hideLinkEmbed()`_ will wrap the URL in _`<>`_, preventing it from embedding. + + + +```js +import { hyperlink, hideLinkEmbed } from 'discord.js'; + +const url = 'https://discord.js.org/'; +const link = hyperlink('discord.js', url); +const hiddenEmbed = hideLinkEmbed(url); +``` + + + +## Code blocks + +You can use _`inlineCode()`_ and _`codeBlock()`_ to turn a string into an inline code block or a regular code block with or without syntax highlighting. + + + +```js +import { inlineCode, codeBlock } from 'discord.js'; + +const jsString = 'const value = true;'; +const inline = inlineCode(jsString); +const codeblock = codeBlock(jsString); +const highlighted = codeBlock('js', jsString); +``` + + + +## Timestamps + +With _`time()`_, you can format Unix timestamps and dates into a Discord time string. + + + +```js +import { time, TimestampStyles } from 'discord.js'; + +const date = new Date(); +const timeString = time(date); +const relative = time(date, TimestampStyles.RelativeTime); +``` + + + +## Mentions + +_`userMention()`_, _`channelMention()`_, and _`roleMention()`_ all exist to format Snowflakes into mentions. + + + +```js +import { channelMention, roleMention, userMention } from 'discord.js'; + +const id = '123456789012345678'; +const channel = channelMention(id); +const role = roleMention(id); +const user = userMention(id); +``` + + diff --git a/apps/guide/src/content/04-popular-topics/05-threads.mdx b/apps/guide/src/content/04-popular-topics/05-threads.mdx new file mode 100644 index 000000000000..5557b42f6035 --- /dev/null +++ b/apps/guide/src/content/04-popular-topics/05-threads.mdx @@ -0,0 +1,202 @@ +--- +title: Threads +category: Popular topics +--- + +# Threads + +Threads can be thought of as temporary sub-channels inside an existing channel to help better organize conversations in a busy channel. + +## Thread related gateway events + + + You can use the type guard to make sure a + channel is a ! + + +Threads introduce a number of new gateway events, which are listed below: + +- : Emitted whenever a thread is created or when the + client user is added to a thread. +- : Emitted whenever a thread is deleted. +- : Emitted whenever a thread is updated (e.g. name + change, archive state change, locked state change). +- : Emitted whenever the client user gains access to + a text or announcement channel that contains threads. +- : Emitted whenever members are added or + removed from a thread. Requires GuildMembers privileged intent. +- : Emitted whenever the client user's thread + member is updated. + +## Creating and deleting threads + +Threads are created and deleted using the of a text or announcement channel. +To create a thread, you call the method: + + + +```js +import { ThreadAutoArchiveDuration } from 'discord.js'; + +const thread = await channel.threads.create({ + name: 'food-talk', + autoArchiveDuration: ThreadAutoArchiveDuration.OneHour, + reason: 'Needed a separate thread for food', +}); + +console.log(`Created thread: ${thread.name}`); +``` + + + +They can also be created from an existing message with the method, but will be "orphaned" if that message is deleted. + + + +```js focus=3[22:42] +import { ThreadAutoArchiveDuration } from 'discord.js'; + +const thread = await message.startThread({ + name: 'food-talk', + autoArchiveDuration: ThreadAutoArchiveDuration.OneHour, + reason: 'Needed a separate thread for food', +}); + +console.log(`Created thread: ${thread.name}`); +``` + + + +The created thread and the message it originated from will share the same id. The type of thread created matches the parent channel's type. + +To delete a thread, use the method: + + + +```js focus=2 +const thread = channel.threads.cache.find((x) => x.name === 'food-talk'); +if (thread.manageable) await thread.delete(); +``` + + + +## Joining and leaving threads + +To subscribe your client to a thread, use the method: + + + +```js focus=2 +const thread = channel.threads.cache.find((x) => x.name === 'food-talk'); +if (thread.joinable) await thread.join(); +``` + + + +And to leave one, use the method: + + + +```js focus=2 +const thread = channel.threads.cache.find((x) => x.name === 'food-talk'); +await thread.leave(); +``` + + + +## Archiving, unarchiving, and locking threads + +A thread can be either active or archived. Changing a thread from archived to active is referred to as unarchiving the thread. Threads that have _`locked`_ set to _`true`_ can only be unarchived by a member with the _`ManageThreads`_ permission. + +Threads are automatically archived after inactivity. "Activity" is defined as sending a message, unarchiving a thread, or changing the auto-archive time. + +To archive or unarchive a thread, use the method and pass in a boolean parameter: + + + +```js focus=2,3 +const thread = channel.threads.cache.find((x) => x.name === 'food-talk'); +await thread.setArchived(true); // Archived. +await thread.setArchived(false); // Unarchived. +``` + + + +This same principle applies to locking and unlocking a thread via the method: + + + +```js focus=2,3 +const thread = channel.threads.cache.find((x) => x.name === 'food-talk'); +await thread.setLocked(true); // Locked. +await thread.setLocked(false); // Unlocked. +``` + + + +## Private threads + +Public threads are viewable by everyone who can view the parent channel of the thread. Private threads, however, are only viewable to those who are invited or have the _`ManageThreads`_ permission. Private threads can only be created on text channels. + +To create a private thread, use the method and pass in _`ChannelType.PrivateThread`_ as the _`type`_: + + + +```js focus=1[10:21],6 +import { ChannelType, ThreadAutoArchiveDuration } from 'discord.js'; + +const thread = await channel.threads.create({ + name: 'mod-talk', + autoArchiveDuration: ThreadAutoArchiveDuration.OneHour, + type: ChannelType.PrivateThread, + reason: 'Needed a separate thread for moderation', +}); + +console.log(`Created thread: ${thread.name}`); +``` + + + +## Adding and removing members + +You can add members to a thread with the method. The thread must be unarchived and you must be able to send messages in it. + + + +```js focus=2 +const thread = channel.threads.cache.find((x) => x.name === 'food-talk'); +await thread.members.add('12345678901234567'); +``` + + + +You can remove members from a thread with the method. The thread must be unarchived and you must have the _`ManageThreads`_ permission unless the thread is private and you are the owner of it. + + + +```js focus=2 +const thread = channel.threads.cache.find((x) => x.name === 'food-talk'); +await thread.members.remove('12345678901234567'); +``` + + + +## Sending messages to threads with webhooks + +It is possible for a webhook built on the parent channel to send messages to the channel's threads. For the purpose of this example, it is assumed a single webhook already exists for that channel. If you wish to learn more about webhooks, see our [webhook guide](./webhooks). + + + +```js focus=4:7 +const webhooks = await channel.fetchWebhooks(); +const webhook = webhooks.first(); + +await webhook.send({ + content: "Look ma! I'm in a thread!", + threadId: '123456789012345678', +}); +``` + + + +And that's it! Now you know all there is to know on working with threads using discord.js! diff --git a/apps/guide/src/content/04-popular-topics/06-webhooks.mdx b/apps/guide/src/content/04-popular-topics/06-webhooks.mdx new file mode 100644 index 000000000000..a5fb46c00ef7 --- /dev/null +++ b/apps/guide/src/content/04-popular-topics/06-webhooks.mdx @@ -0,0 +1,227 @@ +--- +title: Webhooks +category: Popular topics +--- + +# Webhooks + +Webhooks can send messages to a text channel without having to log in as a bot. They can also fetch, edit, and delete their own messages. There are a variety of methods in discord.js to interact with webhooks. In this section, you will learn how to create, fetch, edit, and use webhooks. + +## What is a webhook + +Webhooks are a utility used to send messages to text channels without needing a Discord application. Webhooks are useful for allowing something to send messages without requiring a Discord application. You can also directly edit or delete messages you sent through the webhook. There are two structures to make use of this functionality: and . _`WebhookClient`_ is an extended version of a _`Webhook`_, which allows you to send messages through it without needing a bot client. + + + If you would like to read about using webhooks through the API without discord.js, you can read about them + [here](https://discord.com/developers/docs/resources/webhook). + + +## Detecting webhook messages + +Bots receive webhook messages in a text channel as usual. You can detect if a webhook sent the message by checking if the _`Message.webhookId`_ is not _`null`_. In this example, we return if a webhook sent the message. + + + +```js +if (message.webhookId) return; +``` + + + +If you would like to get the webhook object that sent the message, you can use . + +## Fetching webhooks + + + Webhook fetching will always make use of collections and promises. If you do not understand either concept, revise + them, and then come back to this section. You can read about collections [here](../additional-info/collections), and + promises [here](../additional-info/understanding-async-await) and + [here](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises). + + +### Fetching all webhooks of a guild + +If you would like to get all webhooks of a guild, you can use the method. This will return a promise which will resolve into a collection of webhooks. + +### Fetching webhooks of a channel + +Webhooks belonging to a channel can be fetched using the method. This will return a promise which will resolve into a collection of webhooks. A collection will be returned even if the channel contains a single webhook. If you are certain the channel contains a single webhook, you can use the method on the collection to get the webhook. + +### Fetching a single webhook + +#### Using client + +You can fetch a specific webhook using its _`id`_ with the method. You can obtain the webhook id by looking at its URL: the number after _`https://discord.com/api/webhooks/`_ is the _`id`_ and the part after that is the _`token`_. + +#### Using the WebhookClient constructor + +If you are not using a bot client, you can get a webhook by creating a new instance of _`WebhookClient`_ and passing the _`id`_ and _`token`_ into the constructor. These credentials do not require you to have a bot application, but it also offers limited information instead of fetching it using an authorized client. + + + +```js +const webhookClient = new WebhookClient({ id: 'id', token: 'token' }); +``` + + + +You can also pass in just a _`url`_: + + + +```js +const webhookClient = new WebhookClient({ url: 'https://discord.com/api/webhooks/id/token' }); +``` + + + +## Creating webhooks + +### Creating webhooks through server settings + +You can create webhooks directly through the Discord client. Go to Server Settings, and you will see an _`Integrations`_ tab. + +![Integrations tab](/assets/integrations-tab.png) + +If you already have created a webhook, the webhooks tab will look like this; you will need to click the _`View Webhooks`_ button. + +![Integrations tab](/assets/integrations-view-tab.png) + +Once you are there, click on the _`Create Webhook`_ / _`New Webhook`_ button; this will create a webhook. From here, you can edit the channel, the name, and the avatar. Copy the link, the first part is the id, and the second is the token. + +![Creating a Webhook](/assets/webhook.png) + +### Creating webhooks with discord.js + +Webhooks can be created with the method. + + + +```js +channel + .createWebhook({ name: 'Username', avatar: 'https://guide.discordjs.dev/assets/discordjs.png' }) + .then((webhook) => console.log(`Created webhook ${webhook}`)) + .catch(console.error); +``` + + + +## Editing webhooks + +You can edit Webhooks and WebhookClients to change their name, avatar, and channel using . + + + +```js +webhook + .edit({ name: 'Username', avatar: 'https://guide.discordjs.dev/assets/discordjs.png', channel: '123456789012345678' }) + .then((webhook) => console.log(`Edited webhook ${webhook}`)) + .catch(console.error); +``` + + + +## Using webhooks + +Webhooks can send messages to text channels, as well as fetch, edit, and delete their own. These methods are the same for both _`Webhook`_ and _`WebhookClient`_. + +### Sending messages + +Webhooks, like bots, can send up to 10 embeds per message. They can also send attachments and normal content. The method is very similar to the method used for sending a message to a text channel. Webhooks can also choose how the username and avatar will appear when they send the message. + +Example using a _`WebhookClient`_: + + + +```js +import { EmbedBuilder, WebhookClient } from 'discord.js'; +import config from './config.json' assert { type: 'json' }; +const { webhookId, webhookToken } = config; + +const webhookClient = new WebhookClient({ id: webhookId, token: webhookToken }); +const embed = new EmbedBuilder().setTitle('Some Title').setColor(0x00ffff); + +await webhookClient.send({ + content: 'Webhook test', + username: 'some-username', + avatarURL: 'https://guide.discordjs.dev/assets/discordjs.png', + embeds: [embed], +}); +``` + + + +Try to find a webhook your bot knows the token for. This makes sure your bot can execute the webhook later on. + + + +```js +import { Client, EmbedBuilder, Events, GatewayIntentBits } from 'discord.js'; +import config from './config.json' assert { type: 'json' }; +const { token } = config; + +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); +const embed = new EmbedBuilder().setTitle('Some Title').setColor(0x00ffff); + +client.once(Events.ClientReady, async () => { + const channel = client.channels.cache.get('123456789012345678'); + + try { + const webhooks = await channel.fetchWebhooks(); + const webhook = webhooks.find((wh) => wh.token); + if (!webhook) return console.log('No webhook was found that I can use!'); + + await webhook.send({ + content: 'Webhook test', + username: 'some-username', + avatarURL: 'https://guide.discordjs.dev/assets/discordjs.png', + embeds: [embed], + }); + } catch (error) { + console.error('Error trying to send a message: ', error); + } +}); + +client.login(token); +``` + + + +### Fetching messages + +You can use to fetch messages previously sent by the Webhook. + + + +```js +const message = await webhookClient.fetchMessage('123456789012345678'); +``` + + + +### Editing messages + +You can use to edit messages previously sent by the Webhook. + + + +```js +const message = await webhook.editMessage('123456789012345678', { + content: 'Edited!', + embeds: [embed], +}); +``` + + + +### Deleting messages + +You can use to delete messages previously sent by the webhook. + + + +```js +await webhookClient.deleteMessage('123456789012345678'); +``` + + diff --git a/apps/guide/src/pages/additional-info/async-await.mdx b/apps/guide/src/content/05-additional-info/01-understanding-async-await.mdx similarity index 93% rename from apps/guide/src/pages/additional-info/async-await.mdx rename to apps/guide/src/content/05-additional-info/01-understanding-async-await.mdx index 242d07f2af68..2e236b6b0709 100644 --- a/apps/guide/src/pages/additional-info/async-await.mdx +++ b/apps/guide/src/content/05-additional-info/01-understanding-async-await.mdx @@ -1,12 +1,8 @@ --- -layout: '../../layouts/SidebarLayout.astro' title: Understanding async/await category: Additional info --- -import { CH } from '@code-hike/mdx/components'; -import { Alert } from '@discordjs/ui'; - # Understanding async/await If you aren't very familiar with ECMAScript 2017, you may not know about async/await. It's a useful way to handle Promises in a hoisted manner. It's also slightly faster and increases overall readability. @@ -30,7 +26,7 @@ One important thing to know is that a Promise can only have one state simultaneo [here](/additional-info/es6-syntax.md). - + ```js function deleteMessages(amount) { @@ -63,7 +59,7 @@ The following information is essential to know before working with async/await. A simple example would be: - + ```js async function declaredAsAsync() { @@ -75,7 +71,7 @@ async function declaredAsAsync() { or - + ```js const declaredAsAsync = async () => { @@ -87,7 +83,7 @@ const declaredAsAsync = async () => { You can use that as well if you use the arrow function as an event listener. - + ```js client.on('event', async (first, last) => { @@ -103,18 +99,18 @@ An important thing to know is that a function declared as _`async`_ will always Now that you know how Promises work and what they are used for, let's look at an example that handles multiple Promises. Let's say you want to react with letters (regional indicators) in a specific order. For this example, here's a basic template for a discord.js bot with some ES6 adjustments. - + ```js -const { Client, GatewayIntentBits } = require('discord.js'); +import { Client, Events, GatewayIntentBits } from 'discord.js'; const client = new Client({ intents: [GatewayIntentBits.Guilds] }); -client.once('ready', () => { +client.once(Events.ClientReady, () => { console.log('I am ready!'); }); -client.on('interactionCreate', (interaction) => { +client.on(Events.InteractionCreate, (interaction) => { if (!interaction.isChatInputCommand()) return; if (interaction.commandName === 'react') { @@ -129,7 +125,7 @@ client.login('your-token-goes-here'); If you don't know how Node.js asynchronous execution works, you would probably try something like this: - + ```js mark=4:7 client.on('interactionCreate', (interaction) => { @@ -147,7 +143,7 @@ client.on('interactionCreate', (interaction) => { But since all of these methods are started at the same time, it would just be a race to which server request finished first, so there would be no guarantee that it would react at all (if the message isn't fetched) or in the order you wanted it to. In order to make sure it reacts after the message is sent and in order (a, b, c), you'd need to use the _`.then()`_ callback from the Promises that these methods return. The code would look like this: - + ```js mark=4:12 client.on('interactionCreate', (interaction) => { @@ -170,7 +166,7 @@ client.on('interactionCreate', (interaction) => { In this piece of code, the Promises are [chain resolved](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then#Chaining) with each other, and if one of the Promises gets rejected, the function passed to _`.catch()`_ gets called. Here's the same code but with async/await: - + ```js mark=1,4:7 client.on('interactionCreate', async (interaction) => { @@ -188,7 +184,7 @@ client.on('interactionCreate', async (interaction) => { It's mostly the same code, but how would you catch Promise rejections now since _`.catch()`_ isn't there anymore? That is also a useful feature with async/await; the error will be thrown if you await it so that you can wrap the awaited Promises inside a try/catch, and you're good to go. - + ```js mark=1,4:11 client.on('interactionCreate', async (interaction) => { @@ -213,7 +209,7 @@ So you may be asking, "How would I get the value the Promise resolved with?". Let's look at an example where you want to delete a sent reply. - + ```js mark=3:10 client.on('interactionCreate', (interaction) => { @@ -233,7 +229,7 @@ client.on('interactionCreate', (interaction) => { The return value of a _`.reply()`_ with the _`fetchReply`_ option set to _`true`_ is a Promise which resolves with the reply when it has been sent, but how would the same code with async/await look? - + ```js mark=1,4:10 client.on('interactionCreate', async (interaction) => { diff --git a/apps/guide/src/pages/additional-info/collections.mdx b/apps/guide/src/content/05-additional-info/02-collections.mdx similarity index 92% rename from apps/guide/src/pages/additional-info/collections.mdx rename to apps/guide/src/content/05-additional-info/02-collections.mdx index ac2303f82d3f..c86cd16dc82d 100644 --- a/apps/guide/src/pages/additional-info/collections.mdx +++ b/apps/guide/src/content/05-additional-info/02-collections.mdx @@ -1,12 +1,8 @@ --- -layout: '../../layouts/SidebarLayout.astro' title: Collections category: Additional info --- -import { CH } from '@code-hike/mdx/components'; -import { Alert } from '@discordjs/ui'; - # Collections discord.js comes with a utility class known as _`Collection`_. @@ -28,7 +24,7 @@ This is the point of the _`Collection`_ class! Many of the methods on _`Collection`_ correspond to their namesake in _`Array`_. One of them is _`find`_: - + ```js // Assume we have an array of users and a collection of the same users. @@ -58,7 +54,7 @@ Methods that follow this philosophy of staying close to the _`Array`_ interface Since _`Collection`_ extends _`Map`_, it is an [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), and can be converted to an _`Array`_ through either _`Array.from()`_ or spread syntax (_`...collection`_). - + ```js // For values. @@ -86,7 +82,7 @@ Array.from(collection); Some methods are not from _`Array`_ and are instead entirely new to standard JavaScript. - + ```js // A random value. @@ -110,9 +106,9 @@ collection.sweep((user) => user.username === 'Bob'); A more complicated method is _`partition`_, which splits a single Collection into two new Collections based on the provided function. -You can think of it as two \_`filter`\_s, but done at the same time: +You can think of it as two \_`filter`\_ methods, but done at the same time: - + ```js // `bots` is a Collection of users where their `bot` property was true. diff --git a/apps/guide/src/content/05-additional-info/03-updating-to-v14.mdx b/apps/guide/src/content/05-additional-info/03-updating-to-v14.mdx new file mode 100644 index 000000000000..bc8aadb9f4d4 --- /dev/null +++ b/apps/guide/src/content/05-additional-info/03-updating-to-v14.mdx @@ -0,0 +1,818 @@ +--- +title: Updating to v14 +category: Additional info +--- + +# Updating to v14 + +## Before you start + +v14 requires Node 16.9 or higher to use, so make sure you're up to date. To check your Node.js version, use _`node --version`_ in your terminal or command prompt, and if it's not high enough, update it! There are many resources online to help you with this step based on your host system. + +### Various packages are now included in v14 + +If you previously had _`@discordjs/builders`_, _`@discordjs/formatters`_, _`@discordjs/rest`_, or _`discord-api-types`_ manually installed, it's _highly_ recommended that you uninstall the packages to avoid package version conflicts. + + + +```sh npm +npm uninstall @discordjs/builders @discordjs/formatters @discordjs/rest discord-api-types +``` + +```sh yarn +yarn remove @discordjs/builders @discordjs/formatters @discordjs/rest discord-api-types +``` + +```sh pnpm +pnpm remove @discordjs/builders @discordjs/formatters @discordjs/rest discord-api-types +``` + + + +## Breaking Changes + +### API version + +discord.js v14 makes the switch to Discord API v10! + +### Common Breakages + +### Enum Values + +Any areas that used to accept a _`string`_ or _`number`_ type for an enum parameter will now only accept a _`number`_. + +In addition, the old enums exported by discord.js v13 and lower are replaced with new enums from . + +#### New enum differences + +Most of the difference between enums from discord.js and discord-api-types can be summarized as so: + +1. Enums are singular, i.e., _`ApplicationCommandOptionTypes`_ -> _`ApplicationCommandOptionType`_ +2. Enums that are prefixed with _`Message`_ no longer have the _`Message`_ prefix, i.e., _`MessageButtonStyles`_ -> _`ButtonStyle`_ +3. Enum values are _`PascalCase`_ rather than `SCREAMING_SNAKE_CASE`, i.e., `.CHAT_INPUT` -> `.ChatInput` + + + You might be inclined to a raw _`number`_ (most commonly referred to as [magic + numbers](https://en.wikipedia.org/wiki/Magic_number_(programming))) instead of enum values. This is highly + discouraged. Enums provide more readability and are more resistant to changes in the API. Magic numbers can obscure + the meaning of your code in many ways. Check out this [blog + post](https://blog.webdevsimplified.com/2020-02/magic-numbers) if you want more context on as to why they shouldn't be + used. + + +#### Common enum breakages + +Areas like _`Client`_ initialization, JSON slash commands and JSON message components will likely need to be modified to accommodate these changes: + +##### Common Client Initialization Changes + + + +```diff +- import { Client, Intents } = from 'discord.js'; ++ import { Client, GatewayIntentBits, Partials } = from 'discord.js'; + +- const client = new Client({ intents: [Intents.FLAGS.GUILDS], partials: ['CHANNEL'] }); ++ const client = new Client({ intents: [GatewayIntentBits.Guilds], partials: [Partials.Channel] }); +``` + + + +##### Common Application Command Data changes + + + +```diff ++ import { ApplicationCommandType, ApplicationCommandOptionType } = from 'discord.js'; + + const command = { + name: 'ping', +- type: 'CHAT_INPUT', ++ type: ApplicationCommandType.ChatInput, + options: [{ + name: 'option', + description: 'A sample option', +- type: 'STRING', ++ type: ApplicationCommandOptionType.String, + }], + }; +``` + + + +##### Common Button Data changes + + + +```diff ++ import { ButtonStyle } = from 'discord.js'; + + const button = { + label: 'test', +- style: 'PRIMARY', ++ style: ButtonStyle.Primary, + customId: '1234' + } +``` + + + +### Removal of method-based type guards + +#### Channels + +Some channel type guard methods that narrowed to one channel type have been removed. Instead compare the _`type`_ property against a enum member to narrow channels. + + + +```diff +- channel.isText(); ++ channel.type === ChannelType.GuildText; + +- channel.isVoice(); ++ channel.type === ChannelType.GuildVoice; + +- channel.isDM(); ++ channel.type === ChannelType.DM; +``` + + + +### Builders + +Builders are no longer returned by the API like they were previously. For example, you send the API an but you receive an of the same data. This may affect how your code handles received structures such as components. Refer to [message component changes section](#messagecomponent) for more details. + +Added and as top-level exports which disable or enable validation (enabled by default). + +### Consolidation of create & edit parameters + +Various _`create()`_ and _`edit()`_ methods on managers and objects have had their parameters consolidated. The changes are below: + +- now takes _`reason`_ in the _`data`_ parameter +- now takes _`reason`_ in the _`data`_ parameter +- now takes _`reason`_ in the _`data`_ parameter +- now takes _`reason`_ in the _`data`_ parameter +- now takes _`reason`_ in the _`data`_ parameter +- now takes _`reason`_ in the _`data`_ parameter +- now takes _`name`_ in the _`options`_ parameter +- (and other text-based channels) + now takes _`channel`_ and _`name`_ in the _`options`_ parameter +- now takes _`reason`_ as a part of _`data`_ +- now takes _`reason`_ as a part of _`data`_ +- now takes _`name`_ as a part of _`options`_ +- now takes _`reason`_ as a part of _`data`_ +- now takes _`reason`_ as a part of _`data`_ +- now takes _`reason`_ as a part of _`data`_ +- now takes _`reason`_ as a part of _`options`_ +- now takes _`reason`_ as a part of _`options`_ +- now takes _`attachment`_ and _`name`_ as + a part of _`options`_ +- now takes _`file`_, _`name`_, and _`tags`_ + as a part of _`options`_ + +### Activity + +The following properties have been removed as they are not supported by the API: + +- _`Activity#id`_ +- _`Activity#platform`_ +- _`Activity#sessionId`_ +- _`Activity#syncId`_ + +### Application + +_`Application#fetchAssets()`_ has been removed as it is no longer supported by the API. + +### BitField + +- BitField constituents now have a _`BitField`_ suffix to avoid naming conflicts with the enum names: + +```diff +- new Permissions(); ++ new PermissionsBitField(); + +- new MessageFlags(); ++ new MessageFlagsBitField(); + +- new ThreadMemberFlags(); ++ new ThreadMemberFlagsBitField(); + +- new UserFlags(); ++ new UserFlagsBitField(); + +- new SystemChannelFlags(); ++ new SystemChannelFlagsBitField(); + +- new ApplicationFlags(); ++ new ApplicationFlagsBitField(); + +- new Intents(); ++ new IntentsBitField(); + +- new ActivityFlags(); ++ new ActivityFlagsBitField(); +``` + +- _`#FLAGS`_ has been renamed to _`#Flags`_ + +### CDN + +The methods that return CDN URLs have changed. Here is an example on a `User`: + + + +```diff +- const url = user.displayAvatarURL({ dynamic: true, format: "png", size: 1024 }); ++ const url = user.displayAvatarURL({ extension: "png", size: 1024 }); +``` + + + +Dynamic URLs use and static URLs use . Since dynamic URLs are returned by default, this option has been renamed to _`forceStatic`_ which forces the return of a static URL. Additionally, _`format`_ has been renamed to _`extension`_. + +### CategoryChannel + + is no longer a _`Collection`_ of channels the category +contains. It is now a . This also means +_`CategoryChannel#createChannel()`_ has been moved to the . + +### Channel + +The following type guards have been removed: + +- _`Channel#isText()`_ +- _`Channel#isVoice()`_ +- _`Channel#isDirectory()`_ +- _`Channel#isDM()`_ +- _`Channel#isGroupDM()`_ +- _`Channel#isCategory()`_ +- _`Channel#isNews()`_ + +Refer to [this section](#channels) for more context. + +The base channel class is now . + +### Client + +The _`restWsBridgeTimeout`_ client option has been removed. + +### CommandInteractionOptionResolver + + no longer has a parameter +for _`required`_.[^1] + +### Constants + +- Many constant objects and key arrays are now top-level exports. For example: + + + +```diff +- import { Constants } = from 'discord.js'; +- const { Colors } = Constants; ++ import { Colors } = from 'discord.js'; +``` + + + +- The refactored constants structures have _`PascalCase`_ member names as opposed to _`SCREAMING_SNAKE_CASE`_ member names. + +- Many of the exported constants structures have been replaced and renamed: + + + +```diff +- Opcodes ++ GatewayOpcodes + +- WSEvents ++ GatewayDispatchEvents + +- WSCodes ++ GatewayCloseCodes + +- InviteScopes ++ OAuth2Scopes +``` + + + +### Events + +The _`message`_ and _`interaction`_ events are now removed. Use and instead. + +_`Client#applicationCommandCreate`_, _`Client#applicationCommandDelete`_, and _`Client#applicationCommandUpdate`_ have all been removed.[^2] + +The event now emits the users that were added, the users that were removed, and the thread respectively. + +### GuildBanManager + +Developers should utilise _`deleteMessageSeconds`_ instead of _`days`_ and _`deleteMessageDays`_: + + + +```diff +.create('123456789', { +- days: 3 +- deleteMessageDays: 3 ++ deleteMessageSeconds: 3 * 24 * 60 * 60 +}); +``` + + + +_`deleteMessageDays`_ and _`days`_ are both deprecated and will be removed in the future. + +### Guild + + and have been removed. Use and instead respectively. + + no longer has a default value of 25,000. + +_`Guild#me`_ has been moved to .[^3] + +### GuildAuditLogs & GuildAuditLogsEntry + +_`GuildAuditLogs.build()`_ has been removed as it has been deemed defunct. There is no alternative. + +The following properties & methods have been moved to the class: + +- `GuildAuditLogs.Targets` +- `GuildAuditLogs.actionType()` +- `GuildAuditLogs.targetType()` + +### GuildMember + + is now nullable to account for partial guild members.[^4] + +### IntegrationApplication + +_`IntegrationApplication#summary`_ has been removed as it is no longer supported by the API. + +### Interaction + +Whenever an interaction is replied to and one fetches the reply, it could possibly give an if the guild was not cached. However, interaction replies now always return a discord.js object with _`fetchReply`_ as _`true`_. + +The base interaction class is now . + +### Invite + + is now a getter and resolves structures from the cache. + +### MessageAttachment + +- _`MessageAttachment`_ has now been renamed to . + + + +```diff +- new MessageAttachment(buffer, 'image.png'); ++ new AttachmentBuilder(buffer, { name: 'image.png' }); +``` + + + +### MessageComponent + +- MessageComponents have been renamed as well. They no longer have the _`Message`_ prefix, and now have a _`Builder`_ suffix: + + + +```diff +- const button = new MessageButton(); ++ const button = new ButtonBuilder(); + +- const selectMenu = new MessageSelectMenu(); ++ const selectMenu = new StringSelectMenuBuilder(); + +- const actionRow = new MessageActionRow(); ++ const actionRow = new ActionRowBuilder(); + +- const textInput = new TextInputComponent(); ++ const textInput = new TextInputBuilder(); +``` + + + +- Components received from the API are no longer directly mutable. If you wish to mutate a component from the API, use _`ComponentBuilder#from()`_. For example, if you want to make a button mutable: + + + +```diff +- const editedButton = receivedButton.setDisabled(true); + ++ import { ButtonBuilder } = from 'discord.js'; ++ const editedButton = ButtonBuilder.from(receivedButton).setDisabled(true); +``` + + + +### MessageManager + +The second parameter of has been removed. The the second parameter once was is now merged into the first parameter. + + + +```diff +- messageManager.fetch('1234567890', { cache: false, force: true }); ++ messageManager.fetch({ message: '1234567890', cache: false, force: true }); +``` + + + +### MessageSelectMenu + +- _`MessageSelectMenu`_ has been renamed to . + +- _`StringSelectMenuBuilder#addOption()`_ has been removed. Use instead. + +### MessageEmbed + +- _`MessageEmbed`_ has now been renamed to . + +- now accepts a sole object. + +- now accepts a sole object. + +- _`EmbedBuilder#addField()`_ has been removed. Use instead. + + + +```diff +- new MessageEmbed().addField('Inline field title', 'Some value here', true); + ++ new EmbedBuilder().addFields([ ++ { name: 'one', value: 'one', inline: true }, ++ { name: 'two', value: 'two', inline: true }, ++]); +``` + + + +### Modal + +- _`Modal`_ has been renamed . + + + +```diff +- const modal = new Modal(); ++ const modal = new ModalBuilder(); +``` + + + +### PartialTypes + +The _`PartialTypes`_ string array has been removed. Use the enum instead. + +In addition to this, there is now a new partial: _`Partials.ThreadMember`_. + +### Permissions + +The thread permissions _`USE_PUBLIC_THREADS`_ and _`USE_PRIVATE_THREADS`_ have been removed as they are deprecated in the API. Use _`CREATE_PUBLIC_THREADS`_ and _`CREATE_PRIVATE_THREADS`_ respectively. + +_`ManageEmojisAndStickers`_ has been deprecated due to API changes. Its replacement is _`ManageGuildExpressions`_.[^7] + +### PermissionOverwritesManager + +Overwrites are now keyed by the _`PascalCase`_ permission key rather than the _`SCREAMING_SNAKE_CASE`_ permission key. + +### REST Events + +#### apiRequest + +This REST event has been removed as discord.js now uses [Undici](https://github.com/nodejs/undici) as the underlying request handler. You must now use a [Diagnostics Channel](https://undici.nodejs.org/#/docs/api/DiagnosticsChannel). Here is a simple example: + + + +```js JavaScript +import diagnosticsChannel from 'node:diagnostics_channel'; + +diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => { + const { request } = data; + console.log(request.method); // Log the method + console.log(request.path); // Log the path + console.log(request.headers); // Log the headers + console.log(request); // Or just log everything! +}); +``` + +```ts TypeScript +import diagnosticsChannel from 'node:diagnostics_channel'; +import { type DiagnosticsChannel } from 'undici'; + +diagnosticsChannel.channel('undici:request:create').subscribe((data) => { + const { request } = data as DiagnosticsChannel.RequestCreateMessage; + console.log(request.method); // Log the method + console.log(request.path); // Log the path + console.log(request.headers); // Log the headers + console.log(request); // Or just log everything! +}); +``` + + + +You can find further examples at the [Undici Diagnostics Channel documentation](https://undici.nodejs.org/#/docs/api/DiagnosticsChannel). + +#### apiResponse + +This REST event has been renamed to _`response`_ and moved to : + + + +```diff +- client.on('apiResponse', ...); ++ client.rest.on('response', ...); +``` + + + +#### invalidRequestWarning + +This REST event has been moved to : + + + +```diff +- client.on('invalidRequestWarning', ...); ++ client.rest.on('invalidRequestWarning', ...); +``` + + + +#### rateLimit + +This REST event has been renamed to _`rateLimited`_ and moved to : + + + +```diff +- client.on('rateLimit', ...); ++ client.rest.on('rateLimited', ...); +``` + + + +### RoleManager + +_`Role.comparePositions()`_ has been removed. Use instead. + +### Sticker + + is now a nullable string (_`string | null`_). Previously, it was +a nullable array of strings (_`string[] | null`_).[^5] + +### ThreadChannel + +The _`MAX`_ helper used in _`ThreadAutoArchiveDuration`_ has been removed. Discord has since allowed any guild to use any auto archive time which makes this helper redundant. + +### ThreadMemberManager + +The second parameter of has been removed. The the second parameter once was is now merged into the first parameter. In addition, the boolean helper to specify _`cache`_ has been removed. + +Usage is now as follows: + + + +```diff + // The second parameter is merged into the first parameter. +- threadMemberManager.fetch('1234567890', { cache: false, force: true }); ++ threadMemberManager.fetch({ member: '1234567890', cache: false, force: true }); + + // The lone boolean has been removed. One must be explicit here. +- threadMemberManager.fetch(false); ++ threadMemberManager.fetch({ cache: false }); +``` + + + +### Util + +_`Util.removeMentions()`_ has been removed. To control mentions, you should use _`allowedMentions`_ on instead. + +_`Util.splitMessage()`_ has been removed. This utility method is something the developer themselves should do. + +_`Util.resolveAutoArchiveMaxLimit()`_ has been removed. Discord has since allowed any guild to use any auto archive time which makes this method redundant. + +Other functions in _`Util`_ have been moved to top-level exports so you can directly import them from discord.js. + + + +```diff +- import { Util } from 'discord.js'; +- Util.escapeMarkdown(message); + ++ import { escapeMarkdown } from 'discord.js'; ++ escapeMarkdown(message); +``` + + + +### .deleted fields have been removed + +You can no longer use the _`deleted`_ property to check if a structure was deleted.[^6] + +### VoiceChannel + +_`VoiceChannel#editable`_ has been removed. You should use instead. + +### VoiceRegion + +_`VoiceRegion#vip`_ has been removed as it is no longer part of the API. + +### Webhook + +The second parameter of no longer allows a boolean to be passed. The _`cache`_ option in should be used instead. + +## Features + +### ApplicationCommand + +NFSW commands are supported. + +### Attachment + +Added support for voice message metadata fields. + +### AutocompleteInteraction + + has been added which is the id of the +guild the invoked application command is registered to. + +### BaseChannel + +Added support for . + +Store channels have been removed as they are no longer part of the API. + + has been added which is a link to a channel, just like in the +client. + +Additionally, new typeguards have been added: + +- +- +- + +### BaseInteraction + +Added to check whether a given interaction can be replied to. + +### ClientApplication + +Added support for role connection metadata. + +### Collection + +- Added and . +- Added which indicates an immutable _`Collection`_. + +### Collector + +A new event has been added which is emitted whenever an element is not collected by the collector. + +Component collector options now use the enum values: + + + +```diff ++ import { ComponentType } from 'discord.js'; + + const collector = interaction.channel.createMessageComponentCollector({ + filter, +- componentType: 'BUTTON', ++ componentType: ComponentType.Button, + time: 20000 + }); +``` + + + +### CommandInteraction + + has been added which is the id of the guild +the invoked application command is registered to. + +### CommandInteractionOptionResolver + + now has a third parameter +which narrows the channel type. + +### Events + +Added support for event. + +### ForumChannel + +Added support for forum channels. + +Added support for . + +### Guild + +Added support for which sets the guild's MFA level. + +Added support for . which indicates the maximum number of video channel users. + +Added support for . which indicates the maximum number of video channel users for stage channels. + +Added support for . which disables the guild's invites. + +Added support for the _`after`_ parameter in . + +### GuildChannelManager + +_`videoQualityMode`_ may be used whilst creating a channel to initially set the camera video quality mode. + +### GuildEmojiManager + +Added and for managing existing guild emojis. + +### GuildForumThreadManager + +Added as manager for threads in forum channels. + +### GuildMember + +Added support for . + +### GuildMembersChunk + +This object now supports the _`notFound`_ property. + +### GuildMemberManager + +Added to fetch the client user in the guild. + +Added and . These methods allow a single addition or removal of a role respectively to a guild member, even if uncached. + +### GuildTextThreadManager + +Added as manager for threads in text channels and announcement channels. + +### Message + + has been added as an approximate position in a thread. + +Added support for role subscription data. + +### MessageReaction + +Added to make the client user react with the reaction the class belongs to. + +### Role + +Added support for role subscriptions. + +Added support for _`Role#tags#guildConnections`_. + +### StageChannel + +Stage channels now allow messages to be sent in them, much like voice channels. + +### Sticker + +Added support for GIF stickers. + +### ThreadMemberManager + +The new _`withMember`_ options returns the associated guild member with the thread member. + +When fetching multiple thread members alongside _`withMember`_, paginated results will be returned. The _`after`_ and _`limit`_ option are supported in this scenario. + +### Webhook + +Added . + +Added the _`threadName`_ property in which allows a webhook to create a post in a forum channel. + +### WebSocketManager + +discord.js uses internally. + +[^1]: https://github.com/discordjs/discord.js/pull/7188 +[^2]: https://github.com/discordjs/discord.js/pull/6492 +[^3]: https://github.com/discordjs/discord.js/pull/7669 +[^4]: https://github.com/discordjs/discord.js/issues/6546 +[^5]: https://github.com/discordjs/discord.js/pull/8010 +[^6]: https://github.com/discordjs/discord.js/issues/7091 +[^7]: https://github.com/discord/discord-api-docs/pull/6017 diff --git a/apps/guide/src/contexts/nav.tsx b/apps/guide/src/contexts/nav.tsx new file mode 100644 index 000000000000..031417b73ee0 --- /dev/null +++ b/apps/guide/src/contexts/nav.tsx @@ -0,0 +1,27 @@ +'use client'; + +import { + type PropsWithChildren, + type Dispatch, + type SetStateAction, + createContext, + useContext, + useState, + useMemo, +} from 'react'; + +export const NavContext = createContext<{ opened: boolean; setOpened: Dispatch> }>({ + opened: false, + setOpened: (_) => {}, +}); + +export const NavProvider = ({ children }: PropsWithChildren) => { + const [opened, setOpened] = useState(false); + const value = useMemo(() => ({ opened, setOpened }), [opened]); + + return {children}; +}; + +export function useNav() { + return useContext(NavContext); +} diff --git a/apps/guide/src/layouts/SidebarLayout.astro b/apps/guide/src/layouts/SidebarLayout.astro deleted file mode 100644 index fd183239315c..000000000000 --- a/apps/guide/src/layouts/SidebarLayout.astro +++ /dev/null @@ -1,63 +0,0 @@ ---- -import '../styles/main.css'; -import '@code-hike/mdx/styles.css'; -import '../styles/ch.css'; -import type { MarkdownLayoutProps } from 'astro'; -import SidebarLayout from '../components/SidebarLayout.astro'; -import { DESCRIPTION } from '../util/constants.js'; - -type Props = MarkdownLayoutProps<{}>; -const props = Astro.props; ---- - - - - - - - - - - - - - - - - - - - - - - discord.js - - - - - - - - - - diff --git a/apps/guide/src/middleware.ts b/apps/guide/src/middleware.ts new file mode 100644 index 000000000000..afa3eb307cdc --- /dev/null +++ b/apps/guide/src/middleware.ts @@ -0,0 +1,9 @@ +import { NextResponse, type NextRequest } from 'next/server'; + +export default async function middleware(request: NextRequest) { + return NextResponse.redirect(new URL('/guide/home/introduction', request.url)); +} + +export const config = { + matcher: ['/', '/guide'], +}; diff --git a/apps/guide/src/pages/creating-your-bot/creating-commands.mdx b/apps/guide/src/pages/creating-your-bot/creating-commands.mdx deleted file mode 100644 index 9863f882fc18..000000000000 --- a/apps/guide/src/pages/creating-your-bot/creating-commands.mdx +++ /dev/null @@ -1,244 +0,0 @@ ---- -layout: '../../layouts/SidebarLayout.astro' -title: Creating commands -category: Creating your bot ---- - -import { CH } from '@code-hike/mdx/components'; -import { Alert, DiscordMessages, DiscordMessage } from '@discordjs/ui'; -import { DocsLink } from '../../components/DocsLink.jsx'; -import { ResultingCode } from '../../components/ResultingCode.jsx'; - -# Creating commands - - - This page is a follow-up and bases its code on [the previous page](/creating-your-bot/). - - - - - Pong! - - - -Discord allows developers to register [slash commands](https://discord.com/developers/docs/interactions/application-commands), which provide users a first-class way of interacting directly with your application. Before being able to reply to a command, you must first register it. - -## Registering commands - -This section will cover only the bare minimum to get you started, but you can refer to our [in-depth page on registering slash commands](/interactions/slash-commands.md#registering-slash-commands) for further details. It covers guild commands, global commands, options, option types, and choices. - -### Command deployment script - -Create a _`deploy-commands.js`_ file in your project directory. This file will be used to register and update the slash commands for your bot application. - -Since commands only need to be registered once, and updated when the definition (description, options etc) is changed, it's not necessary to connect a whole client to the gateway or do this on every _`ready`_ event. As such, a standalone script using the lighter REST manager is preferred. - -Below is a deployment script you can use. Focus on these variables: - -- _`clientId`_: Your application's client id -- _`guildId`_: Your development server's id -- _`commands`_: An array of commands to register. The [slash command builder](/popular-topics/builders.md#slash-command-builders) from _`discord.js`_ is used to build the data for your commands - - - In order to get your application's client id, go to [Discord Developer - Portal](https://discord.com/developers/applications) and choose your application. Find the id under "Application ID" - in General Information subpage. To get guild id, open Discord and go to your settings. On the "Advanced" page, turn on - "Developer Mode". This will enable a "Copy ID" button in the context menu when you right-click on a server icon, a - user's profile, etc. - - - - -```js deploy-commands.js mark=4,6:10 -const { REST, SlashCommandBuilder, Routes } = require('discord.js'); -const { clientId, guildId, token } = require('./config.json'); - -const commands = [ - new SlashCommandBuilder().setName('ping').setDescription('Replies with pong!'), - new SlashCommandBuilder().setName('server').setDescription('Replies with server info!'), - new SlashCommandBuilder().setName('user').setDescription('Replies with user info!'), -].map((command) => command.toJSON()); - -const rest = new REST({ version: '10' }).setToken(token); - -rest - .put(Routes.applicationGuildCommands(clientId, guildId), { body: commands }) - .then((data) => console.log(`Successfully registered ${data.length} application commands.`)) - .catch(console.error); -``` - ---- - -```json config.json mark=2:3 -{ - "clientId": "123456789012345678", - "guildId": "876543210987654321", - "token": "your-token-goes-here" -} -``` - - - -Once you fill in these values, run _`node deploy-commands.js`_ in your project directory to register your commands to a single guild. It's also possible to [register commands globally](/interactions/slash-commands.md#global-commands). - - - You only need to run `node deploy-commands.js` once. You should only run it again if you add or edit existing - commands. - - -## Replying to commands - -Once you've registered your commands, you can listen for interactions via in your _`index.js`_ file. - -You should first check if an interaction is a chat input command via _`.isChatInputCommand()`_, and then check the _`.commandName`_ property to know which command it is. You can respond to interactions with _`.reply()`_. - - - -```js mark=5:16 -client.once('ready', () => { - console.log('Ready!'); -}); - -client.on('interactionCreate', async (interaction) => { - if (!interaction.isChatInputCommand()) return; - const { commandName } = interaction; - if (commandName === 'ping') { - await interaction.reply('Pong!'); - } else if (commandName === 'server') { - await interaction.reply('Server info.'); - } else if (commandName === 'user') { - await interaction.reply('User info.'); - } -}); -client.login(token); -``` - - - -### Server info command - -Note that servers are referred to as "guilds" in the Discord API and discord.js library. _`interaction.guild`_ refers to the guild the interaction was sent in (a instance), which exposes properties such as _`.name`_ or _`.memberCount`_. - - - -```js focus=7 -client.on('interactionCreate', async (interaction) => { - if (!interaction.isChatInputCommand()) return; - const { commandName } = interaction; - if (commandName === 'ping') { - await interaction.reply('Pong!'); - } else if (commandName === 'server') { - await interaction.reply(`Server name: ${interaction.guild.name}\nTotal members: ${interaction.guild.memberCount}`); - } else if (commandName === 'user') { - await interaction.reply('User info.'); - } -}); -``` - - - - - -

Server name: discord.js Guide

-

Total members: 2

-
-
- -You could also display the date the server was created, or the server's verification level. You would do those in the same manner – use _`interaction.guild.createdAt`_ or _`interaction.guild.verificationLevel`_, respectively. - - - Refer to the documentation for a list of all the available properties and methods! - - -### User info command - -A "user" refers to a Discord user. _`interaction.user`_ refers to the user the interaction was sent by (a instance), which exposes properties such as _`.tag`_ or _`.id`_. - - - -```js focus=9 -client.on('interactionCreate', async (interaction) => { - if (!interaction.isChatInputCommand()) return; - const { commandName } = interaction; - if (commandName === 'ping') { - await interaction.reply('Pong!'); - } else if (commandName === 'server') { - await interaction.reply(`Server name: ${interaction.guild.name}\nTotal members: ${interaction.guild.memberCount}`); - } else if (commandName === 'user') { - await interaction.reply(`Your tag: ${interaction.user.tag}\nYour id: ${interaction.user.id}`); - } -}); -``` - - - - - -

Your tag: User#0001

-

Your id: 123456789012345678

-
-
- - - Refer to the documentation for a list of all the available properties and methods! - - -And there you have it! - -## The problem with if/else if - -If you don't plan on making more than a couple commands, then using an _`if`_/_`else if`_ chain is fine; however, this isn't always the case. Using a giant _`if`_/_`else if`_ chain will only hinder your development process in the long run. - -Here's a small list of reasons why you shouldn't do so: - -- Takes longer to find a piece of code you want; -- Easier to fall victim to [spaghetti code](https://en.wikipedia.org/wiki/Spaghetti_code); -- Difficult to maintain as it grows; -- Difficult to debug; -- Difficult to organize; -- General bad practice. - -Next, we'll be diving into something called a "command handler" – code that makes handling commands easier and much more efficient. This allows you to move your commands into individual files. - -## Resulting code - - diff --git a/apps/guide/src/pages/creating-your-bot/index.mdx b/apps/guide/src/pages/creating-your-bot/index.mdx deleted file mode 100644 index 961952b20e8c..000000000000 --- a/apps/guide/src/pages/creating-your-bot/index.mdx +++ /dev/null @@ -1,194 +0,0 @@ ---- -layout: '../../layouts/SidebarLayout.astro' -title: Initial files -category: Creating your bot ---- - -import { CH } from '@code-hike/mdx/components'; -import { Alert, Section } from '@discordjs/ui'; -import { DocsLink } from '../../components/DocsLink.jsx'; -import { ResultingCode } from '../../components/ResultingCode.jsx'; - -# Initial files - -Once you [add your bot to a server](/preparations/adding-your-bot-to-servers.md), the next step is to start coding and get it online! Let's start by creating a config file for your client token and a main file for your bot application. - -## Creating configuration files - -As explained in the ["What is a token, anyway?"](/preparations/setting-up-a-bot-application.md#what-is-a-token-anyway) section, your token is essentially your bot's password, and you should protect it as best as possible. This can be done through a _`config.json`_ file or by using environment variables. - -Open your application in the [Discord Developer Portal](https://discord.com/developers/applications) and go to the "Bot" page to copy your token. - -### Using config.json - -Storing data in a _`config.json`_ file is a common way of keeping your sensitive values safe. Create a _`config.json`_ file in your project directory and paste in your token. You can access your token inside other files by using _`require()`_. - - - -```json config.json -{ - "token": "your-token-goes-here" -} -``` - ---- - -```js Usage -const { token } = require('./config.json'); - -console.log(token); -``` - - - - - If you're using Git, you should not commit this file and should [ignore it via - _`.gitignore`_](/creating-your-bot/#git-and-gitignore). - - -### Using environment variables - -Environment variables are special values for your environment (e.g., terminal session, Docker container, or environment variable file). You can pass these values into your code's scope so that you can use them. - -One way to pass in environment variables is via the command line interface. When starting your app, instead of _`node index.js`_, use _`TOKEN=your-token-goes-here node index.js`_. You can repeat this pattern to expose other values as well. - -You can access the set values in your code via the _`process.env`_ global variable, accessible in any file. Note that values passed this way will always be strings and that you might need to parse them to a number, if using them to do calculations. - - - -```shellscript Command line -A=123 B=456 DISCORD_TOKEN=your-token-goes-here node index.js -``` - ---- - -```js Usage -console.log(process.env.A); -console.log(process.env.B); -console.log(process.env.DISCORD_TOKEN); -``` - - - -#### Using dotenv - -Another common approach is storing these values in a _`.env`_ file. This spares you from always copying your token into the command line. Each line in a _`.env`_ file should hold a _`KEY=value`_ pair. - -You can use the [_`dotenv`_ package](https://www.npmjs.com/package/dotenv) for this. Once installed, require and use the package to load your _`.env`_ file and attach the variables to _`process.env`_: - - - -```shellscript npm -npm install dotenv -``` - -```shellscript yarn -yarn add dotenv -``` - -```shellscript pnpm -pnpm add dotenv -``` - ---- - -```text .env -A=123 -B=456 -DISCORD_TOKEN=your-token-goes-here -``` - ---- - -```js Usage -const dotenv = require('dotenv'); - -dotenv.config(); - -console.log(process.env.A); -console.log(process.env.B); -console.log(process.env.DISCORD_TOKEN); -``` - - - - - If you're using Git, you should not commit this file and should [ignore it via - _`.gitignore`_](/creating-your-bot/#git-and-gitignore). - - -
-While we generally do not recommend using online editors as hosting solutions, but rather invest in a proper virtual private server, these services do offer ways to keep your credentials safe as well! Please see the respective service's documentation and help articles for more information on how to keep sensitive values safe: - -- Glitch: [Storing secrets in .env](https://glitch.happyfox.com/kb/article/18) -- Heroku: [Configuration variables](https://devcenter.heroku.com/articles/config-vars) -- Replit: [Secrets and environment variables](https://docs.replit.com/repls/secrets-environment-variables) - -
- -### Git and .gitignore - -Git is a fantastic tool to keep track of your code changes and allows you to upload progress to services like [GitHub](https://github.com/), [GitLab](https://about.gitlab.com/), or [Bitbucket](https://bitbucket.org/product). While this is super useful to share code with other developers, it also bears the risk of uploading your configuration files with sensitive values! - -You can specify files that Git should ignore in its versioning systems with a _`.gitignore`_ file. Create a _`.gitignore`_ file in your project directory and add the names of the files and folders you want to ignore: - - - -``` -node_modules -.env -config.json -``` - - - - - Aside from keeping credentials safe, _`node_modules`_ should be included here. Since this directory can be restored - based on the entries in your _`package.json`_ and _`package-lock.json`_ files by running _`npm install`_, it does not - need to be included in Git. You can specify quite intricate patterns in _`.gitignore`_ files, check out the [Git - documentation on _`.gitignore`_](https://git-scm.com/docs/gitignore) for more information! - - -## Creating the main file - -Open your code editor and create a new file. We suggest that you save the file as _`index.js`_, but you may name it whatever you wish. - -Here's the base code to get you started: - - - -```js -// Require the necessary discord.js classes -const { Client, GatewayIntentBits } = require('discord.js'); -const { token } = require('./config.json'); - -// Create a new client instance -const client = new Client({ intents: [GatewayIntentBits.Guilds] }); - -// When the client is ready, run this code (only once) -client.once('ready', () => { - console.log('Ready!'); -}); - -// Login to Discord with your client's token -client.login(token); -``` - - - -This is how you create a client instance for your Discord bot and login to Discord. The _`GatewayIntentBits.Guilds`_ intents option is necessary for your client to work properly, as it ensures that the caches for guilds, channels and roles are populated and available for internal use. - -Intents also define which events Discord should send to your bot, and you may wish to enable more than just the minimum. You can read more about the other intents on the [Intents topic](/popular-topics/intents). - -Open your terminal and run _`node index.js`_ to start the process. If you see "Ready!" after a few seconds, you're good to go! - - - You can open your _`package.json`_ file and edit the _`"main": "index.js"`_ field to point to your main file. You can - then run _`node .`_ in your terminal to start the process! After closing the process with _`Ctrl + C`_, you can press - the up arrow on your keyboard to bring up the latest commands you've run. Pressing up and then enter after closing the - process is a quick way to start it up again. - - -## Resulting code - - diff --git a/apps/guide/src/pages/requesting-more-content.mdx b/apps/guide/src/pages/requesting-more-content.mdx deleted file mode 100644 index 4c5b8541dca7..000000000000 --- a/apps/guide/src/pages/requesting-more-content.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -layout: '../layouts/SidebarLayout.astro' -title: Requesting more content -category: Home ---- - -import { Alert } from '@discordjs/ui'; - -# Requesting more content - -Since this guide is made specifically for the discord.js community, we want to be sure to provide the most relevant and up-to-date content. We will, of course, make additions to the current pages and add new ones as we see fit, but fulfilling requests is how we know we're providing content you all want the most. - -Requests may be as simple as "add an example to the [frequently asked questions](/popular-topics/faq.html) page", or as elaborate as "add a page regarding [sharding](/sharding/)". We'll do our best to fulfill all requests, as long as they're reasonable. - -To make a request, simply head over to [the repo's issue tracker](https://github.com/discordjs/guide/issues) and [create a new issue](https://github.com/discordjs/guide/issues/new)! Title it appropriately, and let us know exactly what you mean inside the issue description. Make sure that you've looked around the site before making a request; what you want to request might already exist! - - - Remember that you can always [fork the repo](https://github.com/discordjs/guide) and [make a pull - request](https://github.com/discordjs/guide/pulls) if you want to add anything to the guide yourself! - diff --git a/apps/guide/src/pages/test.mdx b/apps/guide/src/pages/test.mdx deleted file mode 100644 index 2716d6ac1da7..000000000000 --- a/apps/guide/src/pages/test.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Test -category: Test ---- - -import { DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs/ui'; - - - - 1234 - - - 1234 - - - - - - 1234 - - - - - - <> - - - - - Test - - - - diff --git a/apps/guide/src/styles/ch.css b/apps/guide/src/styles/ch.css index 828b8715e30f..e69de29bb2d1 100644 --- a/apps/guide/src/styles/ch.css +++ b/apps/guide/src/styles/ch.css @@ -1,3 +0,0 @@ -.ch-frame-buttons { - display: none; -} diff --git a/apps/guide/src/styles/cmdk.css b/apps/guide/src/styles/cmdk.css new file mode 100644 index 000000000000..1c47f4ddf1df --- /dev/null +++ b/apps/guide/src/styles/cmdk.css @@ -0,0 +1,3 @@ +[data-backdrop] { + background-color: rgb(0 0 0 / 35%); +} diff --git a/apps/guide/src/styles/code-hike-theme-dark-plus.json b/apps/guide/src/styles/code-hike-theme-dark-plus.json new file mode 100644 index 000000000000..d175610c0863 --- /dev/null +++ b/apps/guide/src/styles/code-hike-theme-dark-plus.json @@ -0,0 +1,566 @@ +{ + "$schema": "vscode://schemas/color-theme", + "name": "dark-plus", + "tokenColors": [ + { + "settings": { + "foreground": "#D4D4D4" + } + }, + { + "scope": ["meta.embedded", "source.groovy.embedded", "string meta.image.inline.markdown"], + "settings": { + "foreground": "#D4D4D4" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "header", + "settings": { + "foreground": "#000080" + } + }, + { + "scope": "comment", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "constant.numeric", + "variable.other.enummember", + "keyword.operator.plus.exponent", + "keyword.operator.minus.exponent" + ], + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#646695" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "entity.name.tag.css", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + "source.css.less entity.other.attribute-name.id", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.heading", + "settings": { + "fontStyle": "bold", + "foreground": "#569cd6" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.strikethrough", + "settings": { + "fontStyle": "strikethrough" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "punctuation.definition.quote.begin.markdown", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "punctuation.definition.list.begin.markdown", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "markup.inline.raw", + "settings": { + "foreground": "#ce9178" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": "punctuation.definition.tag", + "settings": { + "foreground": "#808080" + } + }, + { + "scope": ["meta.preprocessor", "entity.name.function.preprocessor"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["storage.modifier", "keyword.operator.noexcept"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": ["string", "meta.embedded.assembly"], + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#d16969" + } + }, + { + "name": "String interpolation", + "scope": [ + "punctuation.definition.template-expression.begin", + "punctuation.definition.template-expression.end", + "punctuation.section.embedded" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Reset JavaScript string interpolation expression", + "scope": ["meta.template.expression"], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less", + "source.coffee.embedded" + ], + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.alignof", + "keyword.operator.typeid", + "keyword.operator.alignas", + "keyword.operator.instanceof", + "keyword.operator.logical.python", + "keyword.operator.wordlike" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "variable.language.wildcard.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "name": "Function declarations", + "scope": [ + "entity.name.function", + "support.function", + "support.constant.handlebars", + "source.powershell variable.other.member", + "entity.name.operator.custom-literal" + ], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "name": "Types declaration and references", + "scope": [ + "support.class", + "support.type", + "entity.name.type", + "entity.name.namespace", + "entity.other.attribute", + "entity.name.scope-resolution", + "entity.name.class", + "storage.type.numeric.go", + "storage.type.byte.go", + "storage.type.boolean.go", + "storage.type.string.go", + "storage.type.uintptr.go", + "storage.type.error.go", + "storage.type.rune.go", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Types declaration and references, TS grammar specific", + "scope": [ + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" + ], + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "name": "Control flow / Special keywords", + "scope": [ + "keyword.control", + "source.cpp keyword.operator.new", + "keyword.operator.delete", + "keyword.other.using", + "keyword.other.operator", + "entity.name.operator" + ], + "settings": { + "foreground": "#C586C0" + } + }, + { + "name": "Variable and parameter name", + "scope": [ + "variable", + "meta.definition.variable.name", + "support.variable", + "entity.name.variable", + "constant.other.placeholder" + ], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "Constants and enums", + "scope": ["variable.other.constant", "variable.other.enummember"], + "settings": { + "foreground": "#4FC1FF" + } + }, + { + "name": "Object keys, TS grammar specific", + "scope": ["meta.object-literal.key"], + "settings": { + "foreground": "#9CDCFE" + } + }, + { + "name": "CSS property value", + "scope": [ + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "name": "Regular expression groups", + "scope": [ + "punctuation.definition.group.regexp", + "punctuation.definition.group.assertion.regexp", + "punctuation.definition.character-class.regexp", + "punctuation.character.set.begin.regexp", + "punctuation.character.set.end.regexp", + "keyword.operator.negation.regexp", + "support.other.parenthesis.regexp" + ], + "settings": { + "foreground": "#CE9178" + } + }, + { + "scope": [ + "constant.character.character-class.regexp", + "constant.other.character-class.set.regexp", + "constant.other.character-class.regexp", + "constant.character.set.regexp" + ], + "settings": { + "foreground": "#d16969" + } + }, + { + "scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], + "settings": { + "foreground": "#DCDCAA" + } + }, + { + "scope": "keyword.operator.quantifier.regexp", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "constant.character", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "constant.character.escape", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.name.label", + "settings": { + "foreground": "#C8C8C8" + } + } + ], + "semanticTokenColors": { + "newOperator": "#C586C0", + "stringLiteral": "#ce9178", + "customLiteral": "#DCDCAA", + "numberLiteral": "#b5cea8" + }, + "colors": { + "checkbox.border": "#6B6B6B", + "editor.background": "#1E1E1E", + "editor.foreground": "#D4D4D4", + "editor.inactiveSelectionBackground": "#3A3D41", + "editorIndentGuide.background": "#404040", + "editorIndentGuide.activeBackground": "#707070", + "editor.selectionHighlightBackground": "#ADD6FF26", + "list.dropBackground": "#383B3D", + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#BBBBBB", + "input.placeholderForeground": "#A6A6A6", + "menu.background": "#252526", + "menu.foreground": "#CCCCCC", + "menu.separatorBackground": "#454545", + "menu.border": "#454545", + "statusBarItem.remoteForeground": "#FFF", + "statusBarItem.remoteBackground": "#16825D", + "ports.iconRunningProcessForeground": "#369432", + "sideBarSectionHeader.background": "#0000", + "sideBarSectionHeader.border": "#ccc3", + "tab.lastPinnedBorder": "#ccc3", + "list.activeSelectionIconForeground": "#FFF", + "terminal.inactiveSelectionBackground": "#3A3D41", + "widget.border": "#303031" + }, + "type": "dark" +} diff --git a/apps/guide/src/styles/main.css b/apps/guide/src/styles/main.css index 3c1111412129..2981de4a93cc 100644 --- a/apps/guide/src/styles/main.css +++ b/apps/guide/src/styles/main.css @@ -1,16 +1,8 @@ -@import url('https://rsms.me/inter/inter.css'); - -:root { - font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, - 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', - 'Noto Color Emoji'; - font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; +body { + font-family: var(--font-inter); + min-height: 100vh; } -@supports (font-variation-settings: normal) { - :root { - font-family: 'Inter var', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, - 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', - 'Noto Color Emoji'; - } +code { + font-family: var(--font-mono); } diff --git a/apps/guide/src/util/constants.ts b/apps/guide/src/util/constants.ts index 0e728ecc55b9..d2ee15d21901 100644 --- a/apps/guide/src/util/constants.ts +++ b/apps/guide/src/util/constants.ts @@ -1,3 +1,39 @@ +export const BASE_URL = 'https://discord.js.org/docs/packages' as const; + +export const BASE_URL_LEGACY = 'https://old.discordjs.dev/#/docs/discord.js' as const; + +export const BASE_URL_DISCORD_API_TYPES = 'https://discord-api-types.dev' as const; + export const DESCRIPTION = 'Imagine a guide... that explores the many possibilities for your discord.js bot.'; export const GITHUB_BASE_PAGES_PATH = 'https://github.com/discordjs/discord.js/tree/main/apps/guide/src/pages'; + +export const PACKAGES = [ + 'discord.js', + 'brokers', + 'builders', + 'collection', + 'core', + 'formatters', + 'proxy', + 'rest', + 'next', + 'util', + 'voice', + 'ws', +] as const; + +/** + * The stable version of discord.js. + */ +export const VERSION = '14.11.0' as const; + +/** + * The API version (for discord-api-types). This is prefixed with a "v". + */ +export const DISCORD_API_TYPES_VERSION = 'v10' as const; + +/** + * The voice API version (for discord-api-types). This is prefixed with a "v". + */ +export const DISCORD_API_TYPES_VOICE_VERSION = 'v4' as const; diff --git a/apps/guide/src/util/fetcher.ts b/apps/guide/src/util/fetcher.ts new file mode 100644 index 000000000000..5071b32999b1 --- /dev/null +++ b/apps/guide/src/util/fetcher.ts @@ -0,0 +1,4 @@ +export const fetcher = async (url: string) => { + const res = await fetch(url); + return res.json(); +}; diff --git a/apps/guide/src/util/fonts.ts b/apps/guide/src/util/fonts.ts new file mode 100644 index 000000000000..d60a63379962 --- /dev/null +++ b/apps/guide/src/util/fonts.ts @@ -0,0 +1,13 @@ +import { Inter, JetBrains_Mono } from 'next/font/google'; + +export const inter = Inter({ + subsets: ['latin'], + display: 'swap', + variable: '--font-inter', +}); + +export const jetBrainsMono = JetBrains_Mono({ + subsets: ['latin'], + display: 'swap', + variable: '--font-mono', +}); diff --git a/apps/guide/tsconfig.eslint.json b/apps/guide/tsconfig.eslint.json index 4c08f27478c1..63e703d904ba 100644 --- a/apps/guide/tsconfig.eslint.json +++ b/apps/guide/tsconfig.eslint.json @@ -10,7 +10,6 @@ "**/*.cjs", "**/*.mjs", "**/*.jsx", - "**/*.astro", "**/*.test.ts", "**/*.test.js", "**/*.test.mjs", diff --git a/apps/guide/tsconfig.json b/apps/guide/tsconfig.json index 396305a4a7e4..4d3410f164b7 100644 --- a/apps/guide/tsconfig.json +++ b/apps/guide/tsconfig.json @@ -9,11 +9,19 @@ "allowJs": false, "incremental": true, "skipLibCheck": true, - "types": ["@astrojs/image/client"], + "sourceMap": true, + "plugins": [ + { + "name": "next" + } + ], "paths": { - "~/*": ["./src/*"] - } + "~/*": ["./src/*"], + "contentlayer/generated": ["./.contentlayer/generated"] + }, + "strictNullChecks": true, + "moduleResolution": "node" }, - "include": ["src/**/*.ts", "src/**/*.tsx", "types.d.ts"], + "include": ["src/**/*.ts", "src/**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts", ".contentlayer/generated"], "exclude": ["node_modules"] } diff --git a/apps/guide/types.d.ts b/apps/guide/types.d.ts deleted file mode 100644 index 35306c6fc9ae..000000000000 --- a/apps/guide/types.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '*.css'; diff --git a/apps/guide/vercel.json b/apps/guide/vercel.json deleted file mode 100644 index d964905c46f9..000000000000 --- a/apps/guide/vercel.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "cleanUrls": true -} diff --git a/apps/website/.eslintignore b/apps/website/.eslintignore new file mode 100644 index 000000000000..f76c765b1723 --- /dev/null +++ b/apps/website/.eslintignore @@ -0,0 +1 @@ +next-env.d.ts diff --git a/apps/website/.eslintrc.json b/apps/website/.eslintrc.json index d4eb55f4856e..612db2721195 100644 --- a/apps/website/.eslintrc.json +++ b/apps/website/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["../../.eslintrc.json", "neon/react", "neon/next", "neon/edge", "neon/prettier"], + "extends": ["../../.eslintrc.json", "neon/react", "neon/next", "neon/edge", "@unocss", "neon/prettier"], "settings": { "react": { "version": "detect" diff --git a/apps/website/.gitignore b/apps/website/.gitignore index 9c93f933b39b..43e71384e000 100644 --- a/apps/website/.gitignore +++ b/apps/website/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -13,17 +13,17 @@ pids # Env .env +.env*.local # Dist -dist/ -typings/ -.cache/ -build/ +.contentlayer +.next +public/searchIndex +src/assets/readme src/styles/unocss.css -.next/ # Miscellaneous -.tmp/ -coverage/ -.vercel -public/searchIndex +.tmp +.vscode +lighthouse-results + diff --git a/apps/website/.prettierignore b/apps/website/.prettierignore index 10286aa98784..82325298c94d 100644 --- a/apps/website/.prettierignore +++ b/apps/website/.prettierignore @@ -1,15 +1,8 @@ -# Autogenerated -CHANGELOG.md +.next .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ -.cache -build/ +.vscode +coverage +public/searchIndex +src/assets/readme src/styles/unocss.css -api/ -.next/ -.vercel/ -.cache/ +next-env.d.ts diff --git a/apps/website/README.md b/apps/website/README.md index ca3e929fc2f7..dc924c891aed 100644 --- a/apps/website/README.md +++ b/apps/website/README.md @@ -10,6 +10,7 @@

Vercel + Cloudflare Workers

@@ -18,7 +19,7 @@ - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -26,16 +27,17 @@ ## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/ +[documentation]: https://discord.js.org/docs [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/apps/website/next.config.js b/apps/website/next.config.js index bb69cbe720c3..86347ffb7ed0 100644 --- a/apps/website/next.config.js +++ b/apps/website/next.config.js @@ -1,22 +1,32 @@ -/* eslint-disable tsdoc/syntax */ -import { URL, fileURLToPath } from 'node:url'; +import bundleAnalyzer from '@next/bundle-analyzer'; -/** - * @type {import('next').NextConfig} - */ -export default { +const withBundleAnalyzer = bundleAnalyzer({ + enabled: process.env.ANALYZE === 'true', +}); + +export default withBundleAnalyzer({ reactStrictMode: true, - swcMinify: true, - eslint: { - ignoreDuringBuilds: true, - }, - cleanDistDir: true, experimental: { - outputFileTracingRoot: fileURLToPath(new URL('../../', import.meta.url)), - fallbackNodePolyfills: false, + appDir: true, + serverComponentsExternalPackages: ['@microsoft/api-extractor-model', 'jju'], }, images: { dangerouslyAllowSVG: true, - contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;", + contentDispositionType: 'attachment', + contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;", + }, + async redirects() { + return [ + { + source: '/static/logo.svg', + destination: '/logo.svg', + permanent: true, + }, + { + source: '/guide/:path*', + destination: 'https://next.discordjs.guide/guide/:path*', + permanent: true, + }, + ]; }, -}; +}); diff --git a/apps/website/package.json b/apps/website/package.json index bbec98fe9503..80004a0b076c 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -5,17 +5,22 @@ "private": true, "scripts": { "test": "vitest run", - "build:local": "yarn run --top-level docs --force && cross-env NEXT_PUBLIC_LOCAL_DEV=true yarn build:prod", - "build:prod": "yarn workspaces foreach -ptR run build && yarn build:css && yarn build:next", + "test:lighthouse": "lighthouse http://localhost:3000 --output-path=./lighthouse-results", + "build:copy_readme": "cpy '../../packages/*/README.md' 'src/assets/readme' --rename='home-{{basename}}'", + "build:local": "cross-env NEXT_PUBLIC_LOCAL_DEV=true yarn build:prod", + "build:prod": "yarn build:copy_readme && yarn build:css && yarn build:next", "build:next": "next build", "build:css": "yarn generate:css", - "build:search_indicies": "yarn node scripts/generateAllIndicies.js", - "dev": "yarn run --top-level docs && concurrently 'yarn dev:css' 'yarn dev:next'", + "build:search_indices": "yarn node scripts/generateAllIndices.js", + "build:analyze": "turbo run docs && cross-env ANALYZE=true NEXT_PUBLIC_LOCAL_DEV=true yarn build:prod", + "preview": "next start", + "dev": "concurrently 'yarn dev:css' 'yarn dev:next'", "dev:next": "next dev", "dev:css": "yarn generate:css --watch", "generate:css": "unocss 'src/**/*.tsx' '../../packages/ui/src/lib/components/**/*.tsx' --out-file ./src/styles/unocss.css --config ../../unocss.config.ts", "lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --format=pretty", - "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty" + "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.cjs,.ts,.tsx --fix --format=pretty", + "fmt": "yarn format" }, "type": "module", "contributors": [ @@ -33,7 +38,8 @@ ], "repository": { "type": "git", - "url": "https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "apps/website" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" @@ -43,57 +49,58 @@ "@discordjs/api-extractor-utils": "workspace:^", "@discordjs/scripts": "workspace:^", "@discordjs/ui": "workspace:^", - "@microsoft/api-extractor-model": "7.24.0", - "@microsoft/tsdoc": "0.14.1", - "@vercel/og": "^0.0.19", - "@vscode/codicons": "^0.0.32", - "ariakit": "^2.0.0-next.41", - "cmdk": "^0.1.20", - "meilisearch": "^0.28.0", - "next": "^12.3.1", - "next-mdx-remote": "^4.1.0", - "next-progress": "^2.2.0", + "@microsoft/api-extractor-model": "7.27.0", + "@microsoft/tsdoc": "0.14.2", + "@planetscale/database": "1.7.0", + "@react-icons/all-files": "^4.1.0", + "@vercel/analytics": "^1.0.1", + "@vercel/edge-config": "^0.1.11", + "@vercel/og": "^0.5.4", + "ariakit": "^2.0.0-next.44", + "bright": "^0.8.2", + "class-variance-authority": "^0.6.0", + "cmdk": "^0.2.0", + "meilisearch": "^0.32.4", + "next": "^13.4.3", + "next-mdx-remote": "^4.4.1", "next-themes": "^0.2.1", "react": "^18.2.0", "react-custom-scrollbars-2": "^4.5.0", "react-dom": "^18.2.0", - "react-icons": "^4.6.0", - "react-syntax-highlighter": "^15.5.0", "react-use": "^17.4.0", - "rehype-ignore": "^1.0.1", - "rehype-pretty-code": "^0.4.0", "rehype-raw": "^6.1.1", - "rehype-slug": "^5.0.1", + "rehype-slug": "^5.1.0", "remark-gfm": "^3.0.1", - "sharp": "^0.31.1", - "shiki": "^0.11.1", - "swr": "^1.3.0" + "sharp": "^0.32.1", + "swr": "^2.1.5" }, "devDependencies": { - "@testing-library/react": "^13.4.0", + "@next/bundle-analyzer": "^13.4.3", + "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", - "@types/node": "16.11.68", - "@types/react": "^18.0.21", - "@types/react-dom": "^18.0.6", - "@types/react-syntax-highlighter": "^15.5.5", - "@unocss/cli": "^0.45.30", - "@unocss/reset": "^0.45.30", - "@vitejs/plugin-react": "^2.1.0", - "@vitest/coverage-c8": "^0.24.3", - "concurrently": "^7.4.0", + "@types/node": "18.16.14", + "@types/react": "^18.2.6", + "@types/react-dom": "^18.2.4", + "@unocss/cli": "^0.52.3", + "@unocss/eslint-config": "^0.52.3", + "@unocss/reset": "^0.52.3", + "@vitejs/plugin-react": "^4.0.0", + "@vitest/coverage-c8": "^0.31.1", + "concurrently": "^8.0.1", + "cpy-cli": "^4.2.0", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "happy-dom": "^7.6.0", - "prettier": "^2.7.1", - "prettier-plugin-tailwindcss": "^0.1.13", - "typescript": "^4.8.4", - "unocss": "^0.45.30", - "vercel": "^28.4.12", - "vitest": "^0.24.3" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "happy-dom": "^9.20.1", + "lighthouse": "^10.2.0", + "prettier": "^2.8.8", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vercel": "^29.4.0", + "vitest": "^0.31.1" }, "engines": { - "node": ">=16.9.0" + "node": ">=18.13.0" } } diff --git a/apps/website/public/fonts/Inter-Black.woff2 b/apps/website/public/fonts/Inter-Black.woff2 deleted file mode 100644 index 68f64c9ed98c..000000000000 Binary files a/apps/website/public/fonts/Inter-Black.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-BlackItalic.woff2 b/apps/website/public/fonts/Inter-BlackItalic.woff2 deleted file mode 100644 index 1c9c7ca8b04a..000000000000 Binary files a/apps/website/public/fonts/Inter-BlackItalic.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-Bold.woff2 b/apps/website/public/fonts/Inter-Bold.woff2 deleted file mode 100644 index 2846f29cc8af..000000000000 Binary files a/apps/website/public/fonts/Inter-Bold.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-BoldItalic.woff2 b/apps/website/public/fonts/Inter-BoldItalic.woff2 deleted file mode 100644 index 0b1fe8e12550..000000000000 Binary files a/apps/website/public/fonts/Inter-BoldItalic.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-Italic.woff2 b/apps/website/public/fonts/Inter-Italic.woff2 deleted file mode 100644 index a619fc548614..000000000000 Binary files a/apps/website/public/fonts/Inter-Italic.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-Light.woff2 b/apps/website/public/fonts/Inter-Light.woff2 deleted file mode 100644 index bc4be6658b05..000000000000 Binary files a/apps/website/public/fonts/Inter-Light.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-LightItalic.woff2 b/apps/website/public/fonts/Inter-LightItalic.woff2 deleted file mode 100644 index 842b2dfcb77c..000000000000 Binary files a/apps/website/public/fonts/Inter-LightItalic.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-Medium.woff2 b/apps/website/public/fonts/Inter-Medium.woff2 deleted file mode 100644 index f92498a2ecf4..000000000000 Binary files a/apps/website/public/fonts/Inter-Medium.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-MediumItalic.woff2 b/apps/website/public/fonts/Inter-MediumItalic.woff2 deleted file mode 100644 index 0e3019f4ae7a..000000000000 Binary files a/apps/website/public/fonts/Inter-MediumItalic.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-Regular.woff2 b/apps/website/public/fonts/Inter-Regular.woff2 deleted file mode 100644 index 6c2b6893d593..000000000000 Binary files a/apps/website/public/fonts/Inter-Regular.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-SemiBold.woff2 b/apps/website/public/fonts/Inter-SemiBold.woff2 deleted file mode 100644 index 611e90c958f1..000000000000 Binary files a/apps/website/public/fonts/Inter-SemiBold.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-SemiBoldItalic.woff2 b/apps/website/public/fonts/Inter-SemiBoldItalic.woff2 deleted file mode 100644 index 545685bd2c6d..000000000000 Binary files a/apps/website/public/fonts/Inter-SemiBoldItalic.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-italic.var.woff2 b/apps/website/public/fonts/Inter-italic.var.woff2 deleted file mode 100644 index b826d5af84b3..000000000000 Binary files a/apps/website/public/fonts/Inter-italic.var.woff2 and /dev/null differ diff --git a/apps/website/public/fonts/Inter-roman.var.woff2 b/apps/website/public/fonts/Inter-roman.var.woff2 deleted file mode 100644 index 6a256a068f0d..000000000000 Binary files a/apps/website/public/fonts/Inter-roman.var.woff2 and /dev/null differ diff --git a/apps/website/public/logo.svg b/apps/website/public/logo.svg new file mode 100644 index 000000000000..e7a68eaba62a --- /dev/null +++ b/apps/website/public/logo.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/website/scripts/generateAllIndices.js b/apps/website/scripts/generateAllIndices.js new file mode 100644 index 000000000000..dda074cdc51d --- /dev/null +++ b/apps/website/scripts/generateAllIndices.js @@ -0,0 +1,5 @@ +import { generateAllIndices } from '@discordjs/scripts'; + +console.log('Generating all indices...'); +await generateAllIndices(); +console.log('Generated all indices.'); diff --git a/apps/website/scripts/generateAllIndicies.js b/apps/website/scripts/generateAllIndicies.js deleted file mode 100644 index 91e908196295..000000000000 --- a/apps/website/scripts/generateAllIndicies.js +++ /dev/null @@ -1,5 +0,0 @@ -import { generateAllIndicies } from '@discordjs/scripts'; - -console.log('Generating all indicies...'); -await generateAllIndicies(); -console.log('Generated all indicies.'); diff --git a/apps/website/src/pages/api/og_model.tsx b/apps/website/src/app/api/dynamic-open-graph.png/route.tsx similarity index 93% rename from apps/website/src/pages/api/og_model.tsx rename to apps/website/src/app/api/dynamic-open-graph.png/route.tsx index 66ec4f1b281b..3e29d5da6b96 100644 --- a/apps/website/src/pages/api/og_model.tsx +++ b/apps/website/src/app/api/dynamic-open-graph.png/route.tsx @@ -1,11 +1,14 @@ /* eslint-disable react/no-unknown-property */ + import type { ApiItemKind } from '@microsoft/api-extractor-model'; import { ImageResponse } from '@vercel/og'; import type { NextRequest } from 'next/server'; +export const runtime = 'edge'; + const fonts = Promise.all([ - fetch(new URL('../../assets/fonts/Inter-Regular.ttf', import.meta.url)).then(async (res) => res.arrayBuffer()), - fetch(new URL('../../assets/fonts/Inter-Bold.ttf', import.meta.url)).then(async (res) => res.arrayBuffer()), + fetch(new URL('../../../assets/fonts/Inter-Regular.ttf', import.meta.url)).then(async (res) => res.arrayBuffer()), + fetch(new URL('../../../assets/fonts/Inter-Bold.ttf', import.meta.url)).then(async (res) => res.arrayBuffer()), ]); function resolveIcon(icon: keyof typeof ApiItemKind, size = 88) { @@ -20,9 +23,9 @@ function resolveIcon(icon: keyof typeof ApiItemKind, size = 88) { return ( ); @@ -30,9 +33,9 @@ function resolveIcon(icon: keyof typeof ApiItemKind, size = 88) { return ( ); @@ -52,9 +55,9 @@ function resolveIcon(icon: keyof typeof ApiItemKind, size = 88) { return ( ); @@ -73,10 +76,10 @@ function resolveIcon(icon: keyof typeof ApiItemKind, size = 88) { } } -export default async function handler(req: NextRequest) { +export async function GET(request: NextRequest) { const fontData = await fonts; - const { searchParams } = new URL(req.url); + const { searchParams } = new URL(request.url); const hasPkg = searchParams.has('pkg'); const hasKind = searchParams.has('kind'); @@ -164,7 +167,3 @@ export default async function handler(req: NextRequest) { }, ); } - -export const config = { - runtime: 'experimental-edge', -}; diff --git a/apps/website/src/pages/api/og.tsx b/apps/website/src/app/api/open-graph.png/route.tsx similarity index 80% rename from apps/website/src/pages/api/og.tsx rename to apps/website/src/app/api/open-graph.png/route.tsx index 178b45e4b6fc..9ebc85d4fd62 100644 --- a/apps/website/src/pages/api/og.tsx +++ b/apps/website/src/app/api/open-graph.png/route.tsx @@ -1,11 +1,14 @@ /* eslint-disable react/no-unknown-property */ + import { ImageResponse } from '@vercel/og'; -const fonts = fetch(new URL('../../assets/fonts/Inter-Black.ttf', import.meta.url)).then(async (res) => +export const runtime = 'edge'; + +const fonts = fetch(new URL('../../../assets/fonts/Inter-Black.ttf', import.meta.url)).then(async (res) => res.arrayBuffer(), ); -export default async function handler() { +export async function GET() { const fontData = await fonts; return new ImageResponse( @@ -38,7 +41,3 @@ export default async function handler() { }, ); } - -export const config = { - runtime: 'experimental-edge', -}; diff --git a/apps/website/src/app/docAPI.ts b/apps/website/src/app/docAPI.ts new file mode 100644 index 000000000000..b733f61bec5d --- /dev/null +++ b/apps/website/src/app/docAPI.ts @@ -0,0 +1,43 @@ +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import { connect } from '@planetscale/database'; + +const sql = connect({ + async fetch(input, init) { + // @ts-expect-error: Deleting cache or setting as undefined, same thing + return fetch(input, { ...init, cache: undefined, next: { revalidate: 3_600 } }); + }, + url: process.env.DATABASE_URL!, +}); + +export async function fetchVersions(packageName: string): Promise { + const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, { + next: { revalidate: 3_600 }, + }); + + return response.json(); +} + +export async function fetchModelJSON(packageName: string, version: string): Promise { + if (process.env.NEXT_PUBLIC_LOCAL_DEV) { + const res = await readFile( + join(process.cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'), + 'utf8', + ); + + try { + return JSON.parse(res); + } catch { + console.log(res); + return {}; + } + } + + const { rows } = await sql.execute('select data from documentation where name = ? and version = ?', [ + packageName, + version, + ]); + + // @ts-expect-error: https://github.com/planetscale/database-js/issues/71 + return rows[0].data; +} diff --git a/apps/website/src/app/docs/packages/[package]/[version]/[item]/not-found.tsx b/apps/website/src/app/docs/packages/[package]/[version]/[item]/not-found.tsx new file mode 100644 index 000000000000..c6ffd4589bf5 --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/[version]/[item]/not-found.tsx @@ -0,0 +1,22 @@ +'use client'; + +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +export default function NotFound() { + const pathname = usePathname(); + const href = pathname.split('/').slice(0, -1).join('/'); + + return ( +
+

404

+

Not found.

+ + Take me back + +
+ ); +} diff --git a/apps/website/src/app/docs/packages/[package]/[version]/[item]/page.tsx b/apps/website/src/app/docs/packages/[package]/[version]/[item]/page.tsx new file mode 100644 index 000000000000..3514e7db5238 --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/[version]/[item]/page.tsx @@ -0,0 +1,150 @@ +import { addPackageToModel, tryResolveSummaryText } from '@discordjs/scripts'; +import type { + ApiClass, + ApiDeclaredItem, + ApiEnum, + ApiInterface, + ApiItem, + ApiItemContainerMixin, + ApiMethod, + ApiMethodSignature, + ApiProperty, + ApiPropertySignature, + ApiTypeAlias, + ApiVariable, + ApiFunction, +} from '@microsoft/api-extractor-model'; +import { ApiItemKind, ApiModel } from '@microsoft/api-extractor-model'; +import type { Metadata } from 'next'; +import { notFound } from 'next/navigation'; +import { fetchModelJSON } from '~/app/docAPI'; +import { Class } from '~/components/model/Class'; +import { Interface } from '~/components/model/Interface'; +import { TypeAlias } from '~/components/model/TypeAlias'; +import { Variable } from '~/components/model/Variable'; +import { Enum } from '~/components/model/enum/Enum'; +import { Function } from '~/components/model/function/Function'; +import { OVERLOAD_SEPARATOR } from '~/util/constants'; +import type { ItemRouteParams } from '~/util/fetchMember'; +import { fetchMember } from '~/util/fetchMember'; +import { findMember } from '~/util/model'; + +async function fetchHeadMember({ package: packageName, version, item }: ItemRouteParams) { + const modelJSON = await fetchModelJSON(packageName, version); + const model = addPackageToModel(new ApiModel(), modelJSON); + const pkg = model.tryGetPackageByName(packageName); + const entry = pkg?.entryPoints[0]; + if (!entry) { + return undefined; + } + + const [memberName] = decodeURIComponent(item).split(OVERLOAD_SEPARATOR); + return findMember(model, packageName, memberName); +} + +function resolveMemberSearchParams(packageName: string, member?: ApiItem) { + const params = new URLSearchParams({ + pkg: packageName, + kind: member?.kind ?? '', + name: member?.displayName ?? '', + }); + + switch (member?.kind) { + case ApiItemKind.Interface: + case ApiItemKind.Class: { + const typedMember = member as ApiItemContainerMixin; + + const properties = typedMember.members.filter((member) => + [ApiItemKind.Property, ApiItemKind.PropertySignature].includes(member.kind), + ) as (ApiProperty | ApiPropertySignature)[]; + const methods = typedMember.members.filter((member) => + [ApiItemKind.Method, ApiItemKind.Method].includes(member.kind), + ) as (ApiMethod | ApiMethodSignature)[]; + + params.append('methods', methods.length.toString()); + params.append('props', properties.length.toString()); + break; + } + + case ApiItemKind.Enum: { + const typedMember = member as ApiEnum; + params.append('members', typedMember.members.length.toString()); + break; + } + + default: + break; + } + + return params; +} + +export async function generateMetadata({ params }: { params: ItemRouteParams }) { + const member = await fetchHeadMember(params); + const name = `discord.js${member?.displayName ? ` | ${member.displayName}` : ''}`; + const ogTitle = `${params.package ?? 'discord.js'}${member?.displayName ? ` | ${member.displayName}` : ''}`; + const url = new URL('https://discordjs.dev/api/dynamic-open-graph.png'); + const searchParams = resolveMemberSearchParams(params.package, member); + url.search = searchParams.toString(); + const ogImage = url.toString(); + const description = tryResolveSummaryText(member as ApiDeclaredItem); + + return { + title: name, + description: description ?? 'Discord.js API Documentation', + openGraph: { + title: ogTitle, + description: description ?? 'Discord.js API Documentation', + images: ogImage, + }, + } satisfies Metadata; +} + +export async function generateStaticParams({ params: { package: packageName, version } }: { params: ItemRouteParams }) { + const modelJSON = await fetchModelJSON(packageName, version); + const model = addPackageToModel(new ApiModel(), modelJSON); + + const pkg = model.tryGetPackageByName(packageName); + const entry = pkg?.entryPoints[0]; + + if (!entry) { + notFound(); + } + + return entry.members.map((member: ApiItem) => ({ + item: `${member.displayName}${OVERLOAD_SEPARATOR}${member.kind}`, + })); +} + +function Member({ member }: { member?: ApiItem }) { + switch (member?.kind) { + case 'Class': + return ; + case 'Function': + return ; + case 'Interface': + return ; + case 'TypeAlias': + return ; + case 'Variable': + return ; + case 'Enum': + return ; + default: + return
Cannot render that item type
; + } +} + +export default async function Page({ params }: { params: ItemRouteParams }) { + const member = await fetchMember(params); + + if (!member) { + notFound(); + } + + return ( +
+ +
+ ); +} diff --git a/apps/website/src/app/docs/packages/[package]/[version]/error.tsx b/apps/website/src/app/docs/packages/[package]/[version]/error.tsx new file mode 100644 index 000000000000..96631ad5ee10 --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/[version]/error.tsx @@ -0,0 +1,12 @@ +'use client'; + +export default function Error({ error }: { error: Error }) { + console.error(error); + + return ( +
+

500

+

Error.

+
+ ); +} diff --git a/apps/website/src/app/docs/packages/[package]/[version]/layout.tsx b/apps/website/src/app/docs/packages/[package]/[version]/layout.tsx new file mode 100644 index 000000000000..da3b4dc7053d --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/[version]/layout.tsx @@ -0,0 +1,90 @@ +import { addPackageToModel } from '@discordjs/scripts'; +import type { ApiFunction, ApiItem } from '@microsoft/api-extractor-model'; +import { ApiModel } from '@microsoft/api-extractor-model'; +import dynamic from 'next/dynamic'; +import { notFound } from 'next/navigation'; +import type { PropsWithChildren } from 'react'; +import { Providers } from './providers'; +import { fetchModelJSON, fetchVersions } from '~/app/docAPI'; +import { Banner } from '~/components/Banner'; +import { CmdKDialog } from '~/components/CmdK'; +import { Nav } from '~/components/Nav'; +import type { SidebarSectionItemData } from '~/components/Sidebar'; +import { resolveItemURI } from '~/components/documentation/util'; +import { N_RECENT_VERSIONS, PACKAGES } from '~/util/constants'; + +const Header = dynamic(async () => import('~/components/Header')); +const Footer = dynamic(async () => import('~/components/Footer')); + +export interface VersionRouteParams { + package: string; + version: string; +} + +export async function generateStaticParams() { + const params: VersionRouteParams[] = []; + + await Promise.all( + PACKAGES.map(async (packageName) => { + const versions = (await fetchVersions(packageName)).slice(-N_RECENT_VERSIONS); + + params.push(...versions.map((version) => ({ package: packageName, version }))); + }), + ); + + return params; +} + +function serializeIntoSidebarItemData(item: ApiItem): SidebarSectionItemData { + return { + kind: item.kind, + name: item.displayName, + href: resolveItemURI(item), + overloadIndex: 'overloadIndex' in item ? (item.overloadIndex as number) : undefined, + }; +} + +export default async function PackageLayout({ children, params }: PropsWithChildren<{ params: VersionRouteParams }>) { + const modelJSON = await fetchModelJSON(params.package, params.version); + const model = addPackageToModel(new ApiModel(), modelJSON); + + const pkg = model.tryGetPackageByName(params.package); + + if (!pkg) { + notFound(); + } + + const entry = pkg.entryPoints[0]; + + if (!entry) { + notFound(); + } + + const members = entry.members.filter((member) => { + if (member.kind !== 'Function') { + return true; + } + + return (member as ApiFunction).overloadIndex === 1; + }); + + return ( + + +
+
+
+
+
+ +
+ {children} +
+
+
+
+ +
+ ); +} diff --git a/apps/website/src/app/docs/packages/[package]/[version]/page.tsx b/apps/website/src/app/docs/packages/[package]/[version]/page.tsx new file mode 100644 index 000000000000..aaf550e3a5a3 --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/[version]/page.tsx @@ -0,0 +1,34 @@ +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import type { SerializeOptions } from 'next-mdx-remote/dist/types'; +import { MDXRemote } from 'next-mdx-remote/rsc'; +import rehypeRaw from 'rehype-raw'; +import rehypeSlug from 'rehype-slug'; +import remarkGfm from 'remark-gfm'; +import type { VersionRouteParams } from './layout'; +import { SyntaxHighlighter } from '~/components/SyntaxHighlighter'; + +async function loadREADME(packageName: string) { + return readFile(join(process.cwd(), 'src', 'assets', 'readme', packageName, 'home-README.md'), 'utf8'); +} + +const mdxOptions = { + mdxOptions: { + remarkPlugins: [remarkGfm], + remarkRehypeOptions: { allowDangerousHtml: true }, + rehypePlugins: [rehypeRaw, rehypeSlug], + format: 'md', + }, +} satisfies SerializeOptions; + +export default async function Page({ params }: { params: VersionRouteParams }) { + const { package: packageName } = params; + const readmeSource = await loadREADME(packageName); + + return ( +
+ {/* @ts-expect-error async component */} + +
+ ); +} diff --git a/apps/website/src/app/docs/packages/[package]/[version]/providers.tsx b/apps/website/src/app/docs/packages/[package]/[version]/providers.tsx new file mode 100644 index 000000000000..27ee38f28201 --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/[version]/providers.tsx @@ -0,0 +1,16 @@ +'use client'; + +import type { PropsWithChildren } from 'react'; +import { CmdKProvider } from '~/contexts/cmdK'; +import { MemberProvider } from '~/contexts/member'; +import { NavProvider } from '~/contexts/nav'; + +export function Providers({ children }: PropsWithChildren) { + return ( + + + {children} + + + ); +} diff --git a/apps/website/src/app/docs/packages/[package]/loading.tsx b/apps/website/src/app/docs/packages/[package]/loading.tsx new file mode 100644 index 000000000000..bde40d687c23 --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/loading.tsx @@ -0,0 +1 @@ +export { default } from '~/app/loading'; diff --git a/apps/website/src/app/docs/packages/[package]/page.tsx b/apps/website/src/app/docs/packages/[package]/page.tsx new file mode 100644 index 000000000000..51436a329940 --- /dev/null +++ b/apps/website/src/app/docs/packages/[package]/page.tsx @@ -0,0 +1,54 @@ +import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft'; +import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight'; +import { VscVersions } from '@react-icons/all-files/vsc/VscVersions'; +import Link from 'next/link'; +import { notFound } from 'next/navigation'; +import { buttonVariants } from '~/styles/Button'; +import { PACKAGES } from '~/util/constants'; + +export const runtime = 'edge'; + +async function getData(pkg: string) { + if (!PACKAGES.includes(pkg)) { + notFound(); + } + + const res = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`, { next: { revalidate: 3_600 } }); + const data: string[] = await res.json(); + + if (!data.length) { + throw new Error('Failed to fetch data'); + } + + return data.reverse(); +} + +export default async function Page({ params }: { params: { package: string } }) { + const data = await getData(params.package); + + return ( +
+

Select a version:

+
+ {data.map((version, idx) => ( + +
+
+ +

{version}

+
+ +
+ + )) ?? null} +
+ + Go back + +
+ ); +} diff --git a/apps/website/src/app/docs/packages/loading.tsx b/apps/website/src/app/docs/packages/loading.tsx new file mode 100644 index 000000000000..bde40d687c23 --- /dev/null +++ b/apps/website/src/app/docs/packages/loading.tsx @@ -0,0 +1 @@ +export { default } from '~/app/loading'; diff --git a/apps/website/src/app/docs/packages/page.tsx b/apps/website/src/app/docs/packages/page.tsx new file mode 100644 index 000000000000..d88b18a67af5 --- /dev/null +++ b/apps/website/src/app/docs/packages/page.tsx @@ -0,0 +1,63 @@ +import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink'; +import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft'; +import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight'; +import { VscPackage } from '@react-icons/all-files/vsc/VscPackage'; +import Link from 'next/link'; +import { buttonVariants } from '~/styles/Button'; +import { PACKAGES } from '~/util/constants'; + +export const runtime = 'edge'; + +export default function Page() { + return ( +
+

Select a package:

+
+ +
+
+ +

discord.js

+
+ +
+
+ {PACKAGES.map((pkg, idx) => ( + +
+
+ +

{pkg}

+
+ {/* +
+ Select version +
+ */} + +
+ + ))} + +
+
+ +

discord-api-types

+
+ +
+
+
+ + Go back + +
+ ); +} diff --git a/apps/website/src/app/error.tsx b/apps/website/src/app/error.tsx new file mode 100644 index 000000000000..cf88c89518df --- /dev/null +++ b/apps/website/src/app/error.tsx @@ -0,0 +1,12 @@ +'use client'; + +export default function Error({ error }: { error: Error }) { + console.error(error); + + return ( +
+

500

+

Error.

+
+ ); +} diff --git a/apps/website/src/app/global-error.tsx b/apps/website/src/app/global-error.tsx new file mode 100644 index 000000000000..398f8312f3ab --- /dev/null +++ b/apps/website/src/app/global-error.tsx @@ -0,0 +1,94 @@ +'use client'; + +import { Analytics } from '@vercel/analytics/react'; +import type { Metadata } from 'next'; +import { Providers } from './providers'; +import { DESCRIPTION } from '~/util/constants'; +import { inter } from '~/util/fonts'; + +import '@unocss/reset/tailwind-compat.css'; +import '~/styles/unocss.css'; +import '~/styles/cmdk.css'; +import '~/styles/main.css'; + +export const metadata: Metadata = { + title: 'discord.js', + description: DESCRIPTION, + viewport: { + minimumScale: 1, + initialScale: 1, + width: 'device-width', + }, + icons: { + other: [ + { + url: '/favicon-32x32.png', + sizes: '32x32', + type: 'image/png', + }, + { + url: '/favicon-16x16.png', + sizes: '16x16', + type: 'image/png', + }, + ], + apple: [ + '/apple-touch-icon.png', + { + url: '/safari-pinned-tab.svg', + rel: 'mask-icon', + }, + ], + }, + + manifest: '/site.webmanifest', + + themeColor: [ + { media: '(prefers-color-scheme: light)', color: '#f1f3f5' }, + { media: '(prefers-color-scheme: dark)', color: '#1c1c1e' }, + ], + colorScheme: 'light dark', + + appleWebApp: { + title: 'discord.js', + }, + + applicationName: 'discord.js', + + openGraph: { + siteName: 'discord.js', + type: 'website', + title: 'discord.js', + description: DESCRIPTION, + images: 'https://discordjs.dev/api/open-graph.png', + }, + + twitter: { + card: 'summary_large_image', + creator: '@iCrawlToGo', + }, + + other: { + 'msapplication-TileColor': '#1c1c1e', + }, +}; + +export default function GlobalError({ error }: { error: Error }) { + console.error(error); + + return ( + + + +
+
+

500

+

Error.

+
+
+
+ + + + ); +} diff --git a/apps/website/src/app/layout.tsx b/apps/website/src/app/layout.tsx new file mode 100644 index 000000000000..e5e868a55c16 --- /dev/null +++ b/apps/website/src/app/layout.tsx @@ -0,0 +1,84 @@ +import { Analytics } from '@vercel/analytics/react'; +import type { Metadata } from 'next'; +import type { PropsWithChildren } from 'react'; +import { Providers } from './providers'; +import { DESCRIPTION } from '~/util/constants'; +import { inter, jetBrainsMono } from '~/util/fonts'; + +import '@unocss/reset/tailwind-compat.css'; +import '~/styles/unocss.css'; +import '~/styles/cmdk.css'; +import '~/styles/main.css'; + +export const metadata: Metadata = { + title: 'discord.js', + description: DESCRIPTION, + viewport: { + minimumScale: 1, + initialScale: 1, + width: 'device-width', + }, + icons: { + other: [ + { + url: '/favicon-32x32.png', + sizes: '32x32', + type: 'image/png', + }, + { + url: '/favicon-16x16.png', + sizes: '16x16', + type: 'image/png', + }, + ], + apple: [ + '/apple-touch-icon.png', + { + url: '/safari-pinned-tab.svg', + rel: 'mask-icon', + }, + ], + }, + + manifest: '/site.webmanifest', + + themeColor: [ + { media: '(prefers-color-scheme: light)', color: '#f1f3f5' }, + { media: '(prefers-color-scheme: dark)', color: '#1c1c1e' }, + ], + colorScheme: 'light dark', + + appleWebApp: { + title: 'discord.js', + }, + + applicationName: 'discord.js', + + openGraph: { + siteName: 'discord.js', + type: 'website', + title: 'discord.js', + description: DESCRIPTION, + images: 'https://discordjs.dev/api/open-graph.png', + }, + + twitter: { + card: 'summary_large_image', + creator: '@iCrawlToGo', + }, + + other: { + 'msapplication-TileColor': '#1c1c1e', + }, +}; + +export default function RootLayout({ children }: PropsWithChildren) { + return ( + + + {children} + + + + ); +} diff --git a/apps/website/src/app/loading.tsx b/apps/website/src/app/loading.tsx new file mode 100644 index 000000000000..8852a454635f --- /dev/null +++ b/apps/website/src/app/loading.tsx @@ -0,0 +1,20 @@ +export default function Loading() { + return ( +
+ + + + +
Loading...
+
+ ); +} diff --git a/apps/website/src/app/not-found.tsx b/apps/website/src/app/not-found.tsx new file mode 100644 index 000000000000..6d0b6b9de08c --- /dev/null +++ b/apps/website/src/app/not-found.tsx @@ -0,0 +1,16 @@ +import Link from 'next/link'; + +export default function NotFound() { + return ( +
+

404

+

Not found.

+ + Take me back + +
+ ); +} diff --git a/apps/website/src/app/page.tsx b/apps/website/src/app/page.tsx new file mode 100644 index 000000000000..ec5efdba45c4 --- /dev/null +++ b/apps/website/src/app/page.tsx @@ -0,0 +1,85 @@ +import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink'; +import Image from 'next/image'; +import Link from 'next/link'; +import vercelLogo from '~/assets/powered-by-vercel.svg'; +import workersLogo from '~/assets/powered-by-workers.png'; +import { Banner } from '~/components/Banner'; +import { InstallButton } from '~/components/InstallButton'; +import { buttonVariants } from '~/styles/Button'; +import { DESCRIPTION } from '~/util/constants'; + +export default function Page() { + return ( +
+ +
+
+
+

+ The most popular way to build + Discord bots. +

+

{DESCRIPTION}

+
+ + Docs + + + Guide + + + GitHub + +
+ +
+
+ +
+
+ ); +} diff --git a/apps/website/src/app/providers.tsx b/apps/website/src/app/providers.tsx new file mode 100644 index 000000000000..4a90036e52eb --- /dev/null +++ b/apps/website/src/app/providers.tsx @@ -0,0 +1,13 @@ +'use client'; + +import { ThemeProvider } from 'next-themes'; +import type { PropsWithChildren } from 'react'; +import { useSystemThemeFallback } from '~/hooks/useSystemThemeFallback'; +import { useUnregisterServiceWorker } from '~/hooks/useUnregisterServiceWorker'; + +export function Providers({ children }: PropsWithChildren) { + useUnregisterServiceWorker(); + useSystemThemeFallback(); + + return {children}; +} diff --git a/apps/website/src/assets/fonts/Inter-Light.ttf b/apps/website/src/assets/fonts/Inter-Light.ttf deleted file mode 100644 index 9e265d8905dd..000000000000 Binary files a/apps/website/src/assets/fonts/Inter-Light.ttf and /dev/null differ diff --git a/apps/website/src/assets/fonts/Inter-Medium.ttf b/apps/website/src/assets/fonts/Inter-Medium.ttf deleted file mode 100644 index b53fb1c4acbe..000000000000 Binary files a/apps/website/src/assets/fonts/Inter-Medium.ttf and /dev/null differ diff --git a/apps/website/src/assets/fonts/Inter-SemiBold.ttf b/apps/website/src/assets/fonts/Inter-SemiBold.ttf deleted file mode 100644 index c6aeeb16a6d7..000000000000 Binary files a/apps/website/src/assets/fonts/Inter-SemiBold.ttf and /dev/null differ diff --git a/apps/website/src/assets/powered-by-vercel.svg b/apps/website/src/assets/powered-by-vercel.svg index 8778286845d2..e8fc8e010709 100644 --- a/apps/website/src/assets/powered-by-vercel.svg +++ b/apps/website/src/assets/powered-by-vercel.svg @@ -1,6 +1 @@ - - - - - - + diff --git a/apps/website/src/assets/powered-by-workers.png b/apps/website/src/assets/powered-by-workers.png new file mode 100644 index 000000000000..e9cbbbed6cb1 Binary files /dev/null and b/apps/website/src/assets/powered-by-workers.png differ diff --git a/apps/website/src/components/Anchor.tsx b/apps/website/src/components/Anchor.tsx new file mode 100644 index 000000000000..450f192a5e69 --- /dev/null +++ b/apps/website/src/components/Anchor.tsx @@ -0,0 +1,9 @@ +import { FiLink } from '@react-icons/all-files/fi/FiLink'; + +export function Anchor({ href }: { href: string }) { + return ( + + + + ); +} diff --git a/apps/website/src/components/Badges.tsx b/apps/website/src/components/Badges.tsx new file mode 100644 index 000000000000..b965664d8f87 --- /dev/null +++ b/apps/website/src/components/Badges.tsx @@ -0,0 +1,37 @@ +import type { ApiDocumentedItem } from '@microsoft/api-extractor-model'; +import { ApiAbstractMixin, ApiProtectedMixin, ApiReadonlyMixin, ApiStaticMixin } from '@microsoft/api-extractor-model'; +import type { PropsWithChildren } from 'react'; + +export enum BadgeColor { + Danger = 'bg-red-500', + Primary = 'bg-blurple', + Warning = 'bg-yellow-500', +} + +export function Badge({ children, color = BadgeColor.Primary }: PropsWithChildren<{ color?: BadgeColor | undefined }>) { + return ( + + {children} + + ); +} + +export function Badges({ item }: { item: ApiDocumentedItem }) { + const isStatic = ApiStaticMixin.isBaseClassOf(item) && item.isStatic; + const isProtected = ApiProtectedMixin.isBaseClassOf(item) && item.isProtected; + const isReadonly = ApiReadonlyMixin.isBaseClassOf(item) && item.isReadonly; + const isAbstract = ApiAbstractMixin.isBaseClassOf(item) && item.isAbstract; + const isDeprecated = Boolean(item.tsdocComment?.deprecatedBlock); + + return ( +
+ {isDeprecated ? Deprecated : null} + {isProtected ? Protected : null} + {isStatic ? Static : null} + {isAbstract ? Abstract : null} + {isReadonly ? Readonly : null} +
+ ); +} diff --git a/apps/website/src/components/Banner.tsx b/apps/website/src/components/Banner.tsx new file mode 100644 index 000000000000..359d5763d026 --- /dev/null +++ b/apps/website/src/components/Banner.tsx @@ -0,0 +1,15 @@ +import type { HTMLAttributes } from 'react'; + +export function Banner({ className, ...props }: HTMLAttributes) { + return ( +
+ You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ + has been moved to{' '} + + + old.discordjs.dev + + +
+ ); +} diff --git a/apps/website/src/components/CmdK.tsx b/apps/website/src/components/CmdK.tsx index 0fadbd493953..80134e9c8657 100644 --- a/apps/website/src/components/CmdK.tsx +++ b/apps/website/src/components/CmdK.tsx @@ -1,18 +1,18 @@ +'use client'; + import type { ApiItemKind } from '@microsoft/api-extractor-model'; +import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight'; +import { VscSymbolClass } from '@react-icons/all-files/vsc/VscSymbolClass'; +import { VscSymbolEnum } from '@react-icons/all-files/vsc/VscSymbolEnum'; +import { VscSymbolField } from '@react-icons/all-files/vsc/VscSymbolField'; +import { VscSymbolInterface } from '@react-icons/all-files/vsc/VscSymbolInterface'; +import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod'; +import { VscSymbolProperty } from '@react-icons/all-files/vsc/VscSymbolProperty'; +import { VscSymbolVariable } from '@react-icons/all-files/vsc/VscSymbolVariable'; import { Dialog } from 'ariakit/dialog'; import { Command } from 'cmdk'; -import { useRouter } from 'next/router'; +import { usePathname, useRouter } from 'next/navigation'; import { useEffect, useMemo, useState } from 'react'; -import { - VscArrowRight, - VscSymbolClass, - VscSymbolEnum, - VscSymbolField, - VscSymbolInterface, - VscSymbolMethod, - VscSymbolProperty, - VscSymbolVariable, -} from 'react-icons/vsc'; import { useKey } from 'react-use'; import { useCmdK } from '~/contexts/cmdK'; import { client } from '~/util/search'; @@ -36,36 +36,34 @@ function resolveIcon(item: keyof typeof ApiItemKind) { } } -export function CmdKDialog({ - currentPackageName, - currentVersion, -}: { - currentPackageName?: string | undefined; - currentVersion?: string | undefined; -}) { +export function CmdKDialog() { + const pathname = usePathname(); const router = useRouter(); const dialog = useCmdK(); const [search, setSearch] = useState(''); const [searchResults, setSearchResults] = useState([]); + const packageName = pathname?.split('/').slice(3, 4)[0]; + const branchName = pathname?.split('/').slice(4, 5)[0]; + const searchResultItems = useMemo( () => - searchResults?.map((item) => ( + searchResults?.map((item, idx) => ( { - void router.push(item.path); + router.push(item.path); dialog!.setOpen(false); }} >
{resolveIcon(item.kind)} -
+

{item.name}

{item.summary}
-
+
{item.path}
@@ -101,12 +99,12 @@ export function CmdKDialog({ useEffect(() => { const searchDoc = async (searchString: string, version: string) => { - const res = await client.index(`${currentPackageName}-${version}`).search(searchString, { limit: 5 }); + const res = await client.index(`${packageName}-${version}`).search(searchString, { limit: 5 }); setSearchResults(res.hits); }; - if (search && currentPackageName) { - void searchDoc(search, currentVersion?.replaceAll('.', '-') ?? 'main'); + if (search && packageName) { + void searchDoc(search, branchName?.replaceAll('.', '-') ?? 'main'); } else { setSearchResults([]); } @@ -114,14 +112,14 @@ export function CmdKDialog({ }, [search]); return ( - + + {href ? : null} + {children} +
+ ); +} diff --git a/apps/website/src/components/CodeListing.tsx b/apps/website/src/components/CodeListing.tsx deleted file mode 100644 index 7ddf5275327b..000000000000 --- a/apps/website/src/components/CodeListing.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import type { TokenDocumentation, ApiItemJSON, AnyDocNodeJSON, InheritanceData } from '@discordjs/api-extractor-utils'; -import type { PropsWithChildren } from 'react'; -import { FiLink } from 'react-icons/fi'; -import { HyperlinkedText } from './HyperlinkedText'; -import { InheritanceText } from './InheritanceText'; -import { TSDoc } from './tsdoc/TSDoc'; - -export enum CodeListingSeparatorType { - Type = ':', - Value = '=', -} - -export function CodeListing({ - name, - separator = CodeListingSeparatorType.Type, - typeTokens, - readonly = false, - optional = false, - summary, - children, - comment, - deprecation, - inheritanceData, -}: PropsWithChildren<{ - comment?: AnyDocNodeJSON | null; - deprecation?: AnyDocNodeJSON | null; - inheritanceData?: InheritanceData | null; - name: string; - optional?: boolean; - readonly?: boolean; - separator?: CodeListingSeparatorType; - summary?: ApiItemJSON['summary']; - typeTokens: TokenDocumentation[]; -}>) { - return ( -
-
- - - - {deprecation || readonly || optional ? ( -
- {deprecation ? ( -
- Deprecated -
- ) : null} - {readonly ? ( -
- Readonly -
- ) : null} - {optional ? ( -
- Optional -
- ) : null} -
- ) : null} -
-

- {name} - {optional ? '?' : ''} -

-

{separator}

-

- -

-
-
- {summary || inheritanceData ? ( -
- {deprecation ? : null} - {summary ? : null} - {comment ? : null} - {inheritanceData ? : null} - {children} -
- ) : null} -
- ); -} diff --git a/apps/website/src/components/DocContainer.tsx b/apps/website/src/components/DocContainer.tsx deleted file mode 100644 index 515d1d005519..000000000000 --- a/apps/website/src/components/DocContainer.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import type { - ApiItemJSON, - TokenDocumentation, - TypeParameterData, - ApiClassJSON, - ApiInterfaceJSON, -} from '@discordjs/api-extractor-utils'; -import { Section } from '@discordjs/ui'; -import type { ReactNode } from 'react'; -import { Fragment, type PropsWithChildren } from 'react'; -import { Scrollbars } from 'react-custom-scrollbars-2'; -import { - VscSymbolClass, - VscSymbolMethod, - VscSymbolEnum, - VscSymbolInterface, - VscSymbolVariable, - VscListSelection, - VscSymbolParameter, -} from 'react-icons/vsc'; -import { useMedia } from 'react-use'; -import { HyperlinkedText } from './HyperlinkedText'; -import { SyntaxHighlighter } from './SyntaxHighlighter'; -import { TableOfContentItems } from './TableOfContentItems'; -import { TypeParamTable } from './TypeParamTable'; -import { TSDoc } from './tsdoc/TSDoc'; - -type DocContainerProps = PropsWithChildren<{ - excerpt: string; - extendsTokens?: TokenDocumentation[] | null; - implementsTokens?: TokenDocumentation[][]; - kind: string; - methods?: ApiClassJSON['methods'] | ApiInterfaceJSON['methods'] | null; - name: string; - properties?: ApiClassJSON['properties'] | ApiInterfaceJSON['properties'] | null; - subHeading?: ReactNode; - summary?: ApiItemJSON['summary']; - typeParams?: TypeParameterData[]; -}>; - -function generateIcon(kind: string) { - const icons = { - Class: , - Method: , - Function: , - Enum: , - Interface: , - TypeAlias: , - }; - - return icons[kind as keyof typeof icons]; -} - -export function DocContainer({ - name, - kind, - excerpt, - summary, - typeParams, - children, - extendsTokens, - implementsTokens, - methods, - properties, - subHeading, -}: DocContainerProps) { - const matches = useMedia('(max-width: 768px)', true); - - return ( - <> -
-

- {generateIcon(kind)} - {name} -

- {subHeading} -
} padded title="Summary"> - {summary ? : No summary provided.} -
-
- - {extendsTokens?.length ? ( -
-

Extends

- - - -
- ) : null} - {implementsTokens?.length ? ( -
-

Implements

- - {implementsTokens.map((token, idx) => ( - - - {idx < implementsTokens.length - 1 ? ', ' : ''} - - ))} - -
- ) : null} -
- {typeParams?.length ? ( -
} - padded - title="Type Parameters" - > - -
- ) : null} - {children} -
-
- {(kind === 'Class' || kind === 'Interface') && (methods?.length || properties?.length) ? ( - - ) : null} - - ); -} diff --git a/apps/website/src/components/ExcerptText.tsx b/apps/website/src/components/ExcerptText.tsx new file mode 100644 index 000000000000..f0acd288f70b --- /dev/null +++ b/apps/website/src/components/ExcerptText.tsx @@ -0,0 +1,64 @@ +import type { ApiModel, Excerpt } from '@microsoft/api-extractor-model'; +import { ExcerptTokenKind } from '@microsoft/api-extractor-model'; +import { ItemLink } from './ItemLink'; +import { resolveItemURI } from './documentation/util'; +import { DISCORD_API_TYPES_DOCS_URL } from '~/util/constants'; + +export interface ExcerptTextProps { + /** + * The tokens to render. + */ + excerpt: Excerpt; + /** + * The model to resolve item references from. + */ + model: ApiModel; +} + +/** + * A component that renders excerpt tokens from an api item. + */ +export function ExcerptText({ model, excerpt }: ExcerptTextProps) { + return ( + + {excerpt.spannedTokens.map((token, idx) => { + if (token.kind === ExcerptTokenKind.Reference) { + const source = token.canonicalReference?.source; + + if (source && 'packageName' in source && source.packageName === 'discord-api-types') { + const meaning = token.canonicalReference.symbol?.meaning; + const href = + meaning === 'type' + ? `${DISCORD_API_TYPES_DOCS_URL}#${token.text}` + : `${DISCORD_API_TYPES_DOCS_URL}/${meaning}/${token.text}`; + + return ( + + {token.text} + + ); + } + + const item = model.resolveDeclarationReference(token.canonicalReference!, model).resolvedApiItem; + + if (!item) { + return token.text; + } + + return ( + + {token.text} + + ); + } + + return token.text; + })} + + ); +} diff --git a/apps/website/src/components/Footer.tsx b/apps/website/src/components/Footer.tsx new file mode 100644 index 000000000000..b07ec0494fef --- /dev/null +++ b/apps/website/src/components/Footer.tsx @@ -0,0 +1,98 @@ +import Image from 'next/image'; +import vercelLogo from '~/assets/powered-by-vercel.svg'; +import workersLogo from '~/assets/powered-by-workers.png'; + +export default function Footer() { + return ( + + ); +} diff --git a/apps/website/src/components/Header.tsx b/apps/website/src/components/Header.tsx new file mode 100644 index 000000000000..d90864ceab7f --- /dev/null +++ b/apps/website/src/components/Header.tsx @@ -0,0 +1,115 @@ +'use client'; + +import { FiCommand } from '@react-icons/all-files/fi/FiCommand'; +import { VscGithubInverted } from '@react-icons/all-files/vsc/VscGithubInverted'; +import { VscMenu } from '@react-icons/all-files/vsc/VscMenu'; +import { VscSearch } from '@react-icons/all-files/vsc/VscSearch'; +import { Button } from 'ariakit/button'; +import dynamic from 'next/dynamic'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; +import { Fragment, useMemo } from 'react'; +import { useCmdK } from '~/contexts/cmdK'; +import { useNav } from '~/contexts/nav'; + +const ThemeSwitcher = dynamic(async () => import('./ThemeSwitcher')); + +export default function Header() { + const pathname = usePathname(); + const { setOpened } = useNav(); + const dialog = useCmdK(); + + const pathElements = useMemo( + () => + pathname + .split('/') + .slice(1) + .map((path, idx, original) => ( + + {path} + + )), + [pathname], + ); + + const breadcrumbs = useMemo( + () => + pathElements.flatMap((el, idx, array) => { + if (idx === 0) { + return ( + +
/
+
{el}
+
/
+
+ ); + } + + if (idx !== array.length - 1) { + return ( + +
{el}
+
/
+
+ ); + } + + return
{el}
; + }), + [pathElements], + ); + + return ( +
+
+
+ +
{breadcrumbs}
+ +
+ + + +
+
+
+
+ ); +} diff --git a/apps/website/src/components/HyperlinkedText.tsx b/apps/website/src/components/HyperlinkedText.tsx deleted file mode 100644 index cff44759ed59..000000000000 --- a/apps/website/src/components/HyperlinkedText.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { TokenDocumentation } from '@discordjs/api-extractor-utils'; -import Link from 'next/link'; - -export function HyperlinkedText({ tokens }: { tokens: TokenDocumentation[] }) { - return ( - <> - {tokens.map((token, idx) => { - if (token.path) { - return ( - - - {token.text} - - - ); - } - - return {token.text}; - })} - - ); -} diff --git a/apps/website/src/components/InheritanceText.tsx b/apps/website/src/components/InheritanceText.tsx index 9d396de39924..b13bb2ed87c1 100644 --- a/apps/website/src/components/InheritanceText.tsx +++ b/apps/website/src/components/InheritanceText.tsx @@ -1,15 +1,17 @@ -import type { InheritanceData } from '@discordjs/api-extractor-utils'; -import Link from 'next/link'; +import type { ApiDeclaredItem } from '@microsoft/api-extractor-model'; +import { ItemLink } from './ItemLink'; +import { resolveItemURI } from './documentation/util'; -export function InheritanceText({ data }: { data: InheritanceData }) { +export function InheritanceText({ parent }: { parent: ApiDeclaredItem }) { return ( Inherited from{' '} - - - {data.parentName} - - + + {parent.displayName} + ); } diff --git a/apps/website/src/components/InstallButton.tsx b/apps/website/src/components/InstallButton.tsx new file mode 100644 index 000000000000..9e19d131b96f --- /dev/null +++ b/apps/website/src/components/InstallButton.tsx @@ -0,0 +1,35 @@ +'use client'; + +import { FiCheck } from '@react-icons/all-files/fi/FiCheck'; +import { FiCopy } from '@react-icons/all-files/fi/FiCopy'; +import { useEffect, useState } from 'react'; +import { useCopyToClipboard } from 'react-use'; +import { buttonVariants } from '~/styles/Button'; + +export function InstallButton() { + const [interacted, setInteracted] = useState(false); + const [state, copyToClipboard] = useCopyToClipboard(); + + useEffect(() => { + const timer = setTimeout(() => setInteracted(false), 2_000); + return () => clearTimeout(timer); + }, [interacted]); + + return ( + + ); +} diff --git a/apps/website/src/components/ItemLink.tsx b/apps/website/src/components/ItemLink.tsx new file mode 100644 index 000000000000..1a2876558c02 --- /dev/null +++ b/apps/website/src/components/ItemLink.tsx @@ -0,0 +1,44 @@ +'use client'; + +import type { LinkProps } from 'next/link'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; +import type { AnchorHTMLAttributes, PropsWithChildren, RefAttributes } from 'react'; +import { useCurrentPathMeta } from '~/hooks/useCurrentPathMeta'; + +export interface ItemLinkProps + extends Omit, + RefAttributes, + Omit, keyof LinkProps> { + className?: string; + + /** + * The URI of the api item to link to. (e.g. `/RestManager`) + */ + itemURI: string; + + /** + * The name of the package the item belongs to. + */ + packageName?: string | undefined; +} + +/** + * A component that renders a link to an api item. + * + * @remarks + * This component only needs the relative path to the item, and will automatically + * generate the full path to the item client-side. + */ +export function ItemLink(props: PropsWithChildren) { + const pathname = usePathname(); + const { packageName, version } = useCurrentPathMeta(); + + if (!pathname) { + throw new Error('ItemLink must be used inside a Next.js page. (e.g. /docs/packages/foo/main)'); + } + + const { itemURI, packageName: pkgName, ...linkProps } = props; + + return ; +} diff --git a/apps/website/src/components/MethodItem.tsx b/apps/website/src/components/MethodItem.tsx deleted file mode 100644 index 7f77b9fcc02d..000000000000 --- a/apps/website/src/components/MethodItem.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import type { ApiMethodJSON, ApiMethodSignatureJSON } from '@discordjs/api-extractor-utils'; -import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit'; -import { useCallback, useMemo, useState } from 'react'; -import { FiLink } from 'react-icons/fi'; -import { VscChevronDown, VscVersions } from 'react-icons/vsc'; -import { HyperlinkedText } from './HyperlinkedText'; -import { InheritanceText } from './InheritanceText'; -import { ParameterTable } from './ParameterTable'; -import { TSDoc } from './tsdoc/TSDoc'; - -export function MethodItem({ data }: { data: ApiMethodJSON | ApiMethodSignatureJSON }) { - const method = data as ApiMethodJSON; - const [overloadIndex, setOverloadIndex] = useState(1); - const overloadedData = method.mergedSiblings[overloadIndex - 1]!; - const menu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true }); - - const key = useMemo( - () => `${data.name}${data.overloadIndex && data.overloadIndex > 1 ? `:${data.overloadIndex}` : ''}`, - [data.name, data.overloadIndex], - ); - - const getShorthandName = useCallback( - (data: ApiMethodJSON | ApiMethodSignatureJSON) => - `${data.name}${data.optional ? '?' : ''}(${data.parameters.reduce((prev, cur, index) => { - if (index === 0) { - return `${prev}${cur.isOptional ? `${cur.name}?` : cur.name}`; - } - - return `${prev}, ${cur.isOptional ? `${cur.name}?` : cur.name}`; - }, '')})`, - [], - ); - - return ( -
-
-
- - - - {data.deprecated || - (data.kind === 'Method' && method.protected) || - (data.kind === 'Method' && method.static) ? ( -
- {data.deprecated ? ( -
- Deprecated -
- ) : null} - {data.kind === 'Method' && method.protected ? ( -
- Protected -
- ) : null} - {data.kind === 'Method' && method.static ? ( -
- Static -
- ) : null} -
- ) : null} -
-

{getShorthandName(overloadedData)}

-

:

-

- -

-
-
-
- {data.mergedSiblings.length > 1 ? ( -
- -
- -
- {`Overload ${overloadIndex}`} - {` of ${data.mergedSiblings.length}`} -
- -
-
- - {data.mergedSiblings.map((_, idx) => ( - setOverloadIndex(idx + 1)} - > - {`Overload ${idx + 1}`} - - ))} - -
- ) : null} - {data.summary || data.parameters.length ? ( -
- {overloadedData.deprecated ? : null} - {overloadedData.summary ?? data.summary ? : null} - {overloadedData.remarks ? : null} - {overloadedData.comment ? : null} - {overloadedData.parameters.length ? : null} - {data.inheritanceData ? : null} -
- ) : null} -
- ); -} diff --git a/apps/website/src/components/MethodList.tsx b/apps/website/src/components/MethodList.tsx deleted file mode 100644 index 478554bf700a..000000000000 --- a/apps/website/src/components/MethodList.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { ApiMethodJSON, ApiMethodSignatureJSON } from '@discordjs/api-extractor-utils'; -import { Fragment, useMemo } from 'react'; -import { MethodItem } from './MethodItem'; - -export function MethodList({ data }: { data: (ApiMethodJSON | ApiMethodSignatureJSON)[] }) { - const methodItems = useMemo( - () => - data - .filter((method) => method.overloadIndex <= 1) - .map((method) => ( - 1 ? `:${method.overloadIndex}` : ''}`} - > - -
- - )), - [data], - ); - - return
{methodItems}
; -} diff --git a/apps/website/src/components/Nav.tsx b/apps/website/src/components/Nav.tsx new file mode 100644 index 000000000000..d59ad505edca --- /dev/null +++ b/apps/website/src/components/Nav.tsx @@ -0,0 +1,39 @@ +'use client'; + +import dynamic from 'next/dynamic'; +import { Scrollbars } from 'react-custom-scrollbars-2'; +import { Sidebar } from './Sidebar'; +import type { SidebarSectionItemData } from './Sidebar'; +import { useNav } from '~/contexts/nav'; + +const PackageSelect = dynamic(async () => import('./PackageSelect')); +const VersionSelect = dynamic(async () => import('./VersionSelect')); + +export function Nav({ members }: { members: SidebarSectionItemData[] }) { + const { opened } = useNav(); + + return ( + + ); +} diff --git a/apps/website/src/components/Outline.tsx b/apps/website/src/components/Outline.tsx new file mode 100644 index 000000000000..d4128d97d8e0 --- /dev/null +++ b/apps/website/src/components/Outline.tsx @@ -0,0 +1,23 @@ +'use client'; + +import { Scrollbars } from './Scrollbars'; +import type { TableOfContentsSerialized } from './TableOfContentItems'; +import { TableOfContentItems } from './TableOfContentItems'; + +export function Outline({ members }: { members: TableOfContentsSerialized[] }) { + return ( + + ); +} diff --git a/apps/website/src/components/OverloadSwitcher.tsx b/apps/website/src/components/OverloadSwitcher.tsx new file mode 100644 index 000000000000..34bd125b14a8 --- /dev/null +++ b/apps/website/src/components/OverloadSwitcher.tsx @@ -0,0 +1,60 @@ +'use client'; + +import { VscChevronDown } from '@react-icons/all-files/vsc/VscChevronDown'; +import { VscVersions } from '@react-icons/all-files/vsc/VscVersions'; +import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit/menu'; +import type { PropsWithChildren, ReactNode } from 'react'; +import { useMemo, useState } from 'react'; + +export interface OverloadSwitcherProps { + overloads: ReactNode[]; +} + +export default function OverloadSwitcher({ overloads, children }: PropsWithChildren<{ overloads: ReactNode[] }>) { + const [overloadIndex, setOverloadIndex] = useState(1); + const overloadedNode = overloads[overloadIndex - 1]!; + const menu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true }); + + const menuItems = useMemo( + () => + overloads.map((_, idx) => ( + setOverloadIndex(idx + 1)} + > + {`Overload ${idx + 1}`} + + )), + [overloads], + ); + + return ( +
+ +
+ +
+ {`Overload ${overloadIndex}`} + {` of ${overloads.length}`} +
+ +
+
+ + {menuItems} + + {children} + {overloadedNode} +
+ ); +} diff --git a/apps/website/src/components/PackageSelect.tsx b/apps/website/src/components/PackageSelect.tsx new file mode 100644 index 000000000000..d9987af1829a --- /dev/null +++ b/apps/website/src/components/PackageSelect.tsx @@ -0,0 +1,70 @@ +'use client'; + +import { VscChevronDown } from '@react-icons/all-files/vsc/VscChevronDown'; +import { VscPackage } from '@react-icons/all-files/vsc/VscPackage'; +import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit/menu'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; +import { useMemo } from 'react'; +import { PACKAGES } from '~/util/constants'; + +export default function PackageSelect() { + const pathname = usePathname(); + const packageName = pathname?.split('/').slice(3, 4)[0]; + + const packageMenu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true }); + + const packageMenuItems = useMemo( + () => [ + + packageMenu.setOpen(false)} + state={packageMenu} + > + discord.js + + , + ...PACKAGES.map((pkg, idx) => ( + + packageMenu.setOpen(false)} + state={packageMenu} + > + {pkg} + + + )), + ], + [packageMenu], + ); + + return ( + <> + +
+
+ + {packageName} +
+ +
+
+ + {packageMenuItems} + + + ); +} diff --git a/apps/website/src/components/Panel.tsx b/apps/website/src/components/Panel.tsx new file mode 100644 index 000000000000..50e6a0ed835e --- /dev/null +++ b/apps/website/src/components/Panel.tsx @@ -0,0 +1,10 @@ +import type { PropsWithChildren } from 'react'; + +export function Panel({ children }: PropsWithChildren) { + return ( + <> + {children} +
+ + ); +} diff --git a/apps/website/src/components/ParameterTable.tsx b/apps/website/src/components/ParameterTable.tsx index 534752a04c65..50cc9eb4c67d 100644 --- a/apps/website/src/components/ParameterTable.tsx +++ b/apps/website/src/components/ParameterTable.tsx @@ -1,24 +1,27 @@ -import type { ParameterDocumentation } from '@discordjs/api-extractor-utils'; +import type { ApiDocumentedItem, ApiParameterListMixin } from '@microsoft/api-extractor-model'; import { useMemo } from 'react'; -import { HyperlinkedText } from './HyperlinkedText'; +import { ExcerptText } from './ExcerptText'; import { Table } from './Table'; -import { TSDoc } from './tsdoc/TSDoc'; +import { TSDoc } from './documentation/tsdoc/TSDoc'; +import { resolveParameters } from '~/util/model'; const columnStyles = { Name: 'font-mono whitespace-nowrap', Type: 'font-mono whitespace-pre-wrap break-normal', }; -export function ParameterTable({ data }: { data: ParameterDocumentation[] }) { +export function ParameterTable({ item }: { item: ApiDocumentedItem & ApiParameterListMixin }) { + const params = resolveParameters(item); + const rows = useMemo( () => - data.map((param) => ({ + params.map((param) => ({ Name: param.name, - Type: , + Type: , Optional: param.isOptional ? 'Yes' : 'No', - Description: param.paramCommentBlock ? : 'None', + Description: param.description ? : 'None', })), - [data], + [item, params], ); return ( diff --git a/apps/website/src/components/Property.tsx b/apps/website/src/components/Property.tsx new file mode 100644 index 000000000000..7f7dc2ae8f39 --- /dev/null +++ b/apps/website/src/components/Property.tsx @@ -0,0 +1,45 @@ +import type { + ApiDeclaredItem, + ApiItemContainerMixin, + ApiProperty, + ApiPropertySignature, +} from '@microsoft/api-extractor-model'; +import type { PropsWithChildren } from 'react'; +import { Badges } from './Badges'; +import { CodeHeading } from './CodeHeading'; +import { ExcerptText } from './ExcerptText'; +import { InheritanceText } from './InheritanceText'; +import { TSDoc } from './documentation/tsdoc/TSDoc'; + +export function Property({ + item, + children, + inheritedFrom, +}: PropsWithChildren<{ + inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined; + item: ApiProperty | ApiPropertySignature; +}>) { + const hasSummary = Boolean(item.tsdocComment?.summarySection); + + return ( +
+
+ + + {`${item.displayName}${item.isOptional ? '?' : ''}`} + : + {item.propertyTypeExcerpt.text ? ( + + ) : null} + +
+ {hasSummary || inheritedFrom ? ( +
+ {item.tsdocComment ? : null} + {inheritedFrom ? : null} + {children} +
+ ) : null} +
+ ); +} diff --git a/apps/website/src/components/PropertyList.tsx b/apps/website/src/components/PropertyList.tsx index 84d87493e20f..2b97fb5dcd6d 100644 --- a/apps/website/src/components/PropertyList.tsx +++ b/apps/website/src/components/PropertyList.tsx @@ -1,26 +1,36 @@ -import type { ApiPropertyItemJSON } from '@discordjs/api-extractor-utils'; +import type { + ApiDeclaredItem, + ApiItem, + ApiItemContainerMixin, + ApiProperty, + ApiPropertySignature, +} from '@microsoft/api-extractor-model'; +import { ApiItemKind } from '@microsoft/api-extractor-model'; import { Fragment, useMemo } from 'react'; -import { CodeListing } from './CodeListing'; +import { Property } from './Property'; +import { resolveMembers } from '~/util/members'; + +export function isPropertyLike(item: ApiItem): item is ApiProperty | ApiPropertySignature { + return item.kind === ApiItemKind.Property || item.kind === ApiItemKind.PropertySignature; +} + +export function PropertyList({ item }: { item: ApiItemContainerMixin }) { + const members = resolveMembers(item, isPropertyLike); -export function PropertyList({ data }: { data: ApiPropertyItemJSON[] }) { const propertyItems = useMemo( () => - data.map((prop) => ( - - -
- - )), - [data], + members.map((prop, idx) => { + return ( + + +
+ + ); + }), + [members], ); return
{propertyItems}
; diff --git a/apps/website/src/components/Scrollbars.tsx b/apps/website/src/components/Scrollbars.tsx new file mode 100644 index 000000000000..9e76b4923726 --- /dev/null +++ b/apps/website/src/components/Scrollbars.tsx @@ -0,0 +1,8 @@ +'use client'; + +import type { ScrollbarProps } from 'react-custom-scrollbars-2'; +import { Scrollbars as ReactScrollbars2 } from 'react-custom-scrollbars-2'; + +export function Scrollbars(props: ScrollbarProps) { + return ; +} diff --git a/apps/website/src/components/Section.tsx b/apps/website/src/components/Section.tsx new file mode 100644 index 000000000000..722344864a9a --- /dev/null +++ b/apps/website/src/components/Section.tsx @@ -0,0 +1,8 @@ +'use client'; + +import { Section as DJSSection, type SectionOptions } from '@discordjs/ui'; +import type { PropsWithChildren } from 'react'; + +export function Section(options: PropsWithChildren) { + return ; +} diff --git a/apps/website/src/components/Sections.tsx b/apps/website/src/components/Sections.tsx deleted file mode 100644 index 4f196e2d6cf6..000000000000 --- a/apps/website/src/components/Sections.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import type { - ApiClassJSON, - ApiInterfaceJSON, - ParameterDocumentation, - ApiConstructorJSON, -} from '@discordjs/api-extractor-utils'; -import { Section } from '@discordjs/ui'; -import { useMemo } from 'react'; -import { VscSymbolConstant, VscSymbolMethod, VscSymbolProperty } from 'react-icons/vsc'; -import { useMedia } from 'react-use'; -import { MethodList } from './MethodList'; -import { ParameterTable } from './ParameterTable'; -import { PropertyList } from './PropertyList'; -import { TSDoc } from './tsdoc/TSDoc'; - -export function PropertiesSection({ data }: { data: ApiClassJSON['properties'] | ApiInterfaceJSON['properties'] }) { - const matches = useMedia('(max-width: 768px)', true); - - return data.length ? ( -
} padded title="Properties"> - -
- ) : null; -} - -export function MethodsSection({ data }: { data: ApiClassJSON['methods'] | ApiInterfaceJSON['methods'] }) { - const matches = useMedia('(max-width: 768px)', true); - - return data.length ? ( -
} padded title="Methods"> - -
- ) : null; -} - -export function ParametersSection({ data }: { data: ParameterDocumentation[] }) { - const matches = useMedia('(max-width: 768px)', true); - - return data.length ? ( -
} padded title="Parameters"> - -
- ) : null; -} - -export function ConstructorSection({ data }: { data: ApiConstructorJSON }) { - const matches = useMedia('(max-width: 768px)', true); - - const getShorthandName = useMemo( - () => - `constructor(${data.parameters.reduce((prev, cur, index) => { - if (index === 0) { - return `${prev}${cur.isOptional ? `${cur.name}?` : cur.name}`; - } - - return `${prev}, ${cur.isOptional ? `${cur.name}?` : cur.name}`; - }, '')})`, - [data.parameters], - ); - - return data.parameters.length ? ( -
} padded title="Constructor"> -
-
-
- {data.deprecated || data.protected ? ( -
- {data.deprecated ? ( -
- Deprecated -
- ) : null} - {data.protected ? ( -
- Protected -
- ) : null} -
- ) : null} -

{getShorthandName}

-
-
- {data.summary || data.parameters.length ? ( -
- {data.deprecated ? : null} - {data.summary ? : null} - {data.remarks ? : null} - {data.comment ? : null} - {data.parameters.length ? : null} -
- ) : null} -
-
- ) : null; -} diff --git a/apps/website/src/components/Sidebar.tsx b/apps/website/src/components/Sidebar.tsx new file mode 100644 index 000000000000..114b111df5dc --- /dev/null +++ b/apps/website/src/components/Sidebar.tsx @@ -0,0 +1,124 @@ +'use client'; + +import type { ApiItemKind } from '@microsoft/api-extractor-model'; +import { VscSymbolClass } from '@react-icons/all-files/vsc/VscSymbolClass'; +import { VscSymbolEnum } from '@react-icons/all-files/vsc/VscSymbolEnum'; +import { VscSymbolInterface } from '@react-icons/all-files/vsc/VscSymbolInterface'; +import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod'; +import { VscSymbolVariable } from '@react-icons/all-files/vsc/VscSymbolVariable'; +import { useSelectedLayoutSegment } from 'next/navigation'; +import { useMemo } from 'react'; +import { ItemLink } from './ItemLink'; +import { Section } from './Section'; +import { useNav } from '~/contexts/nav'; + +export interface SidebarSectionItemData { + href: string; + kind: ApiItemKind; + name: string; + overloadIndex?: number | undefined; +} + +interface GroupedMembers { + Classes: SidebarSectionItemData[]; + Enums: SidebarSectionItemData[]; + Functions: SidebarSectionItemData[]; + Interfaces: SidebarSectionItemData[]; + Types: SidebarSectionItemData[]; + Variables: SidebarSectionItemData[]; +} + +function groupMembers(members: readonly SidebarSectionItemData[]): GroupedMembers { + const Classes: SidebarSectionItemData[] = []; + const Enums: SidebarSectionItemData[] = []; + const Interfaces: SidebarSectionItemData[] = []; + const Types: SidebarSectionItemData[] = []; + const Variables: SidebarSectionItemData[] = []; + const Functions: SidebarSectionItemData[] = []; + + for (const member of members) { + switch (member.kind) { + case 'Class': + Classes.push(member); + break; + case 'Enum': + Enums.push(member); + break; + case 'Interface': + Interfaces.push(member); + break; + case 'TypeAlias': + Types.push(member); + break; + case 'Variable': + Variables.push(member); + break; + case 'Function': + Functions.push(member); + break; + default: + break; + } + } + + return { Classes, Functions, Enums, Interfaces, Types, Variables }; +} + +function resolveIcon(item: string) { + switch (item) { + case 'Classes': + return ; + case 'Enums': + return ; + case 'Interfaces': + return ; + case 'Types': + case 'Variables': + return ; + default: + return ; + } +} + +export function Sidebar({ members }: { members: SidebarSectionItemData[] }) { + const segment = useSelectedLayoutSegment(); + const { setOpened } = useNav(); + + const groupItems = useMemo(() => groupMembers(members), [members]); + + return ( +
+ {(Object.keys(groupItems) as (keyof GroupedMembers)[]) + .filter((group) => groupItems[group].length) + .map((group, idx) => ( +
+ {groupItems[group].map((member, index) => ( + setOpened(false)} + title={member.name} + > +
+ {member.name} + {member.overloadIndex && member.overloadIndex > 1 ? ( + {member.overloadIndex} + ) : null} +
+
+ ))} +
+ ))} +
+ ); +} diff --git a/apps/website/src/components/SidebarItems.tsx b/apps/website/src/components/SidebarItems.tsx deleted file mode 100644 index 88fb57230994..000000000000 --- a/apps/website/src/components/SidebarItems.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { Section } from '@discordjs/ui'; -import Link from 'next/link'; -import { type Dispatch, type SetStateAction, useMemo } from 'react'; -import { - VscSymbolClass, - VscSymbolEnum, - VscSymbolInterface, - VscSymbolField, - VscSymbolVariable, - VscSymbolMethod, -} from 'react-icons/vsc'; -import type { GroupedMembers, Members } from './SidebarLayout'; - -function groupMembers(members: Members): GroupedMembers { - const Classes: Members = []; - const Enums: Members = []; - const Interfaces: Members = []; - const Types: Members = []; - const Variables: Members = []; - const Functions: Members = []; - - for (const member of members) { - switch (member.kind) { - case 'Class': - Classes.push(member); - break; - case 'Enum': - Enums.push(member); - break; - case 'Interface': - Interfaces.push(member); - break; - case 'TypeAlias': - Types.push(member); - break; - case 'Variable': - Variables.push(member); - break; - case 'Function': - Functions.push(member); - break; - default: - break; - } - } - - return { Classes, Functions, Enums, Interfaces, Types, Variables }; -} - -function resolveIcon(item: keyof GroupedMembers) { - switch (item) { - case 'Classes': - return ; - case 'Enums': - return ; - case 'Interfaces': - return ; - case 'Types': - return ; - case 'Variables': - return ; - default: - return ; - } -} - -export function SidebarItems({ - members, - setOpened, - asPath, -}: { - asPath: string; - members: Members; - setOpened: Dispatch>; -}) { - const groupItems = useMemo(() => groupMembers(members), [members]); - - return ( -
- {(Object.keys(groupItems) as (keyof GroupedMembers)[]) - .filter((group) => groupItems[group].length) - .map((group, idx) => ( -
- {groupItems[group].map((member, index) => ( - - setOpened(false)} - title={member.name} - > -
- {member.name} - {member.overloadIndex && member.overloadIndex > 1 ? ( - {member.overloadIndex} - ) : null} -
-
- - ))} -
- ))} -
- ); -} diff --git a/apps/website/src/components/SidebarLayout.tsx b/apps/website/src/components/SidebarLayout.tsx deleted file mode 100644 index feda2798cded..000000000000 --- a/apps/website/src/components/SidebarLayout.tsx +++ /dev/null @@ -1,373 +0,0 @@ -import type { getMembers, ApiClassJSON, ApiInterfaceJSON } from '@discordjs/api-extractor-utils'; -import { Button } from 'ariakit/button'; -import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit/menu'; -import Image from 'next/future/image'; -import Link from 'next/link'; -import type { MDXRemoteSerializeResult } from 'next-mdx-remote'; -import { useTheme } from 'next-themes'; -import { type PropsWithChildren, useState, useEffect, useMemo, Fragment } from 'react'; -import { Scrollbars } from 'react-custom-scrollbars-2'; -import { FiCommand } from 'react-icons/fi'; -import { - VscChevronDown, - VscColorMode, - VscGithubInverted, - VscMenu, - VscPackage, - VscSearch, - VscVersions, -} from 'react-icons/vsc'; -import { useMedia /* useLockBodyScroll */ } from 'react-use'; -import useSWR from 'swr'; -import vercelLogo from '../assets/powered-by-vercel.svg'; -import { CmdKDialog } from './CmdK'; -import { SidebarItems } from './SidebarItems'; -import { useCmdK } from '~/contexts/cmdK'; -import { PACKAGES } from '~/util/constants'; -import { fetcher } from '~/util/fetcher'; -import type { findMember } from '~/util/model.server'; - -export interface SidebarLayoutProps { - asPath: string; - branchName: string; - data: { - description: string; - member?: ReturnType; - members: ReturnType; - source: MDXRemoteSerializeResult; - }; - packageName: string; -} - -export type Members = SidebarLayoutProps['data']['members']; - -export interface GroupedMembers { - Classes: Members; - Enums: Members; - Functions: Members; - Interfaces: Members; - Types: Members; - Variables: Members; -} - -export function SidebarLayout({ - packageName, - branchName, - data, - asPath, - children, -}: PropsWithChildren) { - const dialog = useCmdK(); - const { data: versions } = useSWR(`https://docs.discordjs.dev/api/info?package=${packageName}`, fetcher); - const { resolvedTheme, setTheme } = useTheme(); - const toggleTheme = () => setTheme(resolvedTheme === 'light' ? 'dark' : 'light'); - const matches = useMedia('(min-width: 992px)', false); - const [opened, setOpened] = useState(false); - const packageMenu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true }); - const versionMenu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true }); - // useLockBodyScroll(opened); - - useEffect(() => { - if (matches) { - setOpened(false); - } - }, [matches]); - - const asPathWithoutContainerKey = useMemo(() => asPath?.split(':')[0] ?? '', [asPath]); - - const packageMenuItems = useMemo( - () => [ - - packageMenu.setOpen(false)} - state={packageMenu} - > - discord.js - - , - ...PACKAGES.map((pkg) => ( - - packageMenu.setOpen(false)} - state={packageMenu} - > - {pkg} - - - )), - ], - // eslint-disable-next-line react-hooks/exhaustive-deps - [], - ); - - const versionMenuItems = useMemo( - () => - versions - ?.map((item) => ( - - versionMenu.setOpen(false)} - state={versionMenu} - > - {item} - - - )) - .reverse() ?? [], - // eslint-disable-next-line react-hooks/exhaustive-deps - [versions, packageName], - ); - - const pathElements = useMemo( - () => - asPathWithoutContainerKey - .split('/') - .slice(1) - .map((path, idx, original) => ( - - {path} - - )), - [asPathWithoutContainerKey], - ); - - const breadcrumbs = useMemo( - () => - pathElements.flatMap((el, idx, array) => { - if (idx === 0) { - return ( - -
/
- {el} -
/
-
- ); - } - - if (idx !== array.length - 1) { - return ( - - {el} -
/
-
- ); - } - - return {el}; - }), - [pathElements], - ); - - return ( - <> -
-
-
- -
{breadcrumbs}
-
- - - -
-
-
-
- -
- -
- - - ); -} diff --git a/apps/website/src/components/SignatureText.tsx b/apps/website/src/components/SignatureText.tsx new file mode 100644 index 000000000000..b8c29710ff62 --- /dev/null +++ b/apps/website/src/components/SignatureText.tsx @@ -0,0 +1,10 @@ +import type { ApiModel, Excerpt } from '@microsoft/api-extractor-model'; +import { ExcerptText } from './ExcerptText'; + +export function SignatureText({ excerpt, model }: { excerpt: Excerpt; model: ApiModel }) { + return ( +

+ +

+ ); +} diff --git a/apps/website/src/components/SyntaxHighlighter.tsx b/apps/website/src/components/SyntaxHighlighter.tsx index 967fbeb33bc4..138df78e2a79 100644 --- a/apps/website/src/components/SyntaxHighlighter.tsx +++ b/apps/website/src/components/SyntaxHighlighter.tsx @@ -1,30 +1,15 @@ -import { PrismAsyncLight } from 'react-syntax-highlighter'; -import { vscDarkPlus, prism } from 'react-syntax-highlighter/dist/cjs/styles/prism'; +import { Code } from 'bright'; -export function SyntaxHighlighter({ language = 'typescript', code }: { code: string; language?: string }) { +export function SyntaxHighlighter(props: typeof Code) { return ( <>
- - {code} - + {/* @ts-expect-error async component */} +
-
- - {code} - +
+ {/* @ts-expect-error async component */} +
); diff --git a/apps/website/src/components/Table.tsx b/apps/website/src/components/Table.tsx index ee194eff31dd..a427c9b8659f 100644 --- a/apps/website/src/components/Table.tsx +++ b/apps/website/src/components/Table.tsx @@ -1,3 +1,5 @@ +'use client'; + import { useMemo, type ReactNode } from 'react'; export function Table({ @@ -11,10 +13,10 @@ export function Table({ }) { const cols = useMemo( () => - columns.map((column) => ( + columns.map((column, idx) => ( {column} @@ -26,12 +28,12 @@ export function Table({ () => rows.map((row, idx) => ( - {Object.entries(row).map(([colName, val]) => ( + {Object.entries(row).map(([colName, val], index) => ( {val} diff --git a/apps/website/src/components/TableOfContentItems.tsx b/apps/website/src/components/TableOfContentItems.tsx index dfd88b387c5c..4980f252ff49 100644 --- a/apps/website/src/components/TableOfContentItems.tsx +++ b/apps/website/src/components/TableOfContentItems.tsx @@ -1,64 +1,97 @@ -import type { ApiClassJSON, ApiInterfaceJSON } from '@discordjs/api-extractor-utils'; +'use client'; + +import { VscListSelection } from '@react-icons/all-files/vsc/VscListSelection'; +import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod'; +import { VscSymbolProperty } from '@react-icons/all-files/vsc/VscSymbolProperty'; import { useMemo } from 'react'; -import { VscListSelection, VscSymbolMethod, VscSymbolProperty } from 'react-icons/vsc'; -export function TableOfContentItems({ - methods, - properties, -}: { - methods: ApiClassJSON['methods'] | ApiInterfaceJSON['methods']; - properties: ApiClassJSON['properties'] | ApiInterfaceJSON['properties']; -}) { +export interface TableOfContentsSerializedMethod { + kind: 'Method' | 'MethodSignature'; + name: string; + overloadIndex?: number; +} + +export interface TableOfContentsSerializedProperty { + kind: 'Property' | 'PropertySignature'; + name: string; +} + +export type TableOfContentsSerialized = TableOfContentsSerializedMethod | TableOfContentsSerializedProperty; + +export interface TableOfContentsItemProps { + serializedMembers: TableOfContentsSerialized[]; +} + +export function TableOfContentsPropertyItem({ property }: { property: TableOfContentsSerializedProperty }) { + return ( + + {property.name} + + ); +} + +export function TableOfContentsMethodItem({ method }: { method: TableOfContentsSerializedMethod }) { + if (method.overloadIndex && method.overloadIndex > 1) { + return null; + } + + const key = `${method.name}${method.overloadIndex && method.overloadIndex > 1 ? `:${method.overloadIndex}` : ''}`; + + return ( + + {method.name} + {method.overloadIndex && method.overloadIndex > 1 ? ( + {method.overloadIndex} + ) : null} + + ); +} + +export function TableOfContentItems({ serializedMembers }: TableOfContentsItemProps) { const propertyItems = useMemo( () => - properties.map((prop) => ( - - {prop.name} - - )), - [properties], + serializedMembers + .filter( + (member): member is TableOfContentsSerializedProperty => + member.kind === 'Property' || member.kind === 'PropertySignature', + ) + .map((prop, idx) => ), + [serializedMembers], ); const methodItems = useMemo( () => - methods.map((member) => { - if (member.overloadIndex && member.overloadIndex > 1) { - return null; - } - - const key = `${member.name}${ - member.overloadIndex && member.overloadIndex > 1 ? `:${member.overloadIndex}` : '' - }`; - - return ( - - {member.name} - {member.overloadIndex && member.overloadIndex > 1 ? ( - {member.overloadIndex} - ) : null} - - ); - }), - [methods], + serializedMembers + .filter( + (member): member is TableOfContentsSerializedMethod => + member.kind === 'Method' || member.kind === 'MethodSignature', + ) + .map((member, idx) => ( + + )), + [serializedMembers], ); return (
-
+
Contents
-
+
{propertyItems.length ? (
diff --git a/apps/website/src/components/ThemeSwitcher.tsx b/apps/website/src/components/ThemeSwitcher.tsx new file mode 100644 index 000000000000..38acea06884b --- /dev/null +++ b/apps/website/src/components/ThemeSwitcher.tsx @@ -0,0 +1,20 @@ +'use client'; + +import { VscColorMode } from '@react-icons/all-files/vsc/VscColorMode'; +import { Button } from 'ariakit/button'; +import { useTheme } from 'next-themes'; + +export default function ThemeSwitcher() { + const { resolvedTheme, setTheme } = useTheme(); + const toggleTheme = () => setTheme(resolvedTheme === 'light' ? 'dark' : 'light'); + + return ( + + ); +} diff --git a/apps/website/src/components/TypeParamTable.tsx b/apps/website/src/components/TypeParamTable.tsx index b2bb4f870ff7..cad4bc0cde63 100644 --- a/apps/website/src/components/TypeParamTable.tsx +++ b/apps/website/src/components/TypeParamTable.tsx @@ -1,8 +1,8 @@ -import type { TypeParameterData } from '@discordjs/api-extractor-utils'; +import type { ApiTypeParameterListMixin } from '@microsoft/api-extractor-model'; import { useMemo } from 'react'; -import { HyperlinkedText } from './HyperlinkedText'; +import { ExcerptText } from './ExcerptText'; import { Table } from './Table'; -import { TSDoc } from './tsdoc/TSDoc'; +import { TSDoc } from './documentation/tsdoc/TSDoc'; const rowElements = { Name: 'font-mono whitespace-nowrap', @@ -10,17 +10,22 @@ const rowElements = { Default: 'font-mono whitespace-pre break-normal', }; -export function TypeParamTable({ data }: { data: TypeParameterData[] }) { +export function TypeParamTable({ item }: { item: ApiTypeParameterListMixin }) { + const model = item.getAssociatedModel()!; const rows = useMemo( () => - data.map((typeParam) => ({ + item.typeParameters.map((typeParam) => ({ Name: typeParam.name, - Constraints: , - Optional: typeParam.optional ? 'Yes' : 'No', - Default: , - Description: typeParam.commentBlock ? : 'None', + Constraints: , + Optional: typeParam.isOptional ? 'Yes' : 'No', + Default: , + Description: typeParam.tsdocTypeParamBlock ? ( + + ) : ( + 'None' + ), })), - [data], + [item, model], ); return ( diff --git a/apps/website/src/components/VersionSelect.tsx b/apps/website/src/components/VersionSelect.tsx new file mode 100644 index 000000000000..cc2d2bd432e7 --- /dev/null +++ b/apps/website/src/components/VersionSelect.tsx @@ -0,0 +1,63 @@ +'use client'; + +import { VscChevronDown } from '@react-icons/all-files/vsc/VscChevronDown'; +import { VscVersions } from '@react-icons/all-files/vsc/VscVersions'; +import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit/menu'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; +import { useMemo } from 'react'; +import useSWR from 'swr'; +import { fetcher } from '~/util/fetcher'; + +export default function VersionSelect() { + const pathname = usePathname(); + const packageName = pathname?.split('/').slice(3, 4)[0]; + const branchName = pathname?.split('/').slice(4, 5)[0]; + + const { data: versions } = useSWR(`https://docs.discordjs.dev/api/info?package=${packageName}`, fetcher); + const versionMenu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true }); + + const versionMenuItems = useMemo( + () => + versions + ?.map((item, idx) => ( + + versionMenu.setOpen(false)} + state={versionMenu} + > + {item} + + + )) + .reverse() ?? [], + [versions, packageName, versionMenu], + ); + + return ( + <> + +
+
+ + {branchName} +
+ +
+
+ + {versionMenuItems} + + + ); +} diff --git a/apps/website/src/components/documentation/Documentation.tsx b/apps/website/src/components/documentation/Documentation.tsx new file mode 100644 index 000000000000..223abdae798b --- /dev/null +++ b/apps/website/src/components/documentation/Documentation.tsx @@ -0,0 +1,8 @@ +import type { PropsWithChildren } from 'react'; + +/** + * Layout parent of documentation pages. + */ +export function Documentation({ children }: PropsWithChildren) { + return
{children}
; +} diff --git a/apps/website/src/components/documentation/Header.tsx b/apps/website/src/components/documentation/Header.tsx new file mode 100644 index 000000000000..4f68a20708bc --- /dev/null +++ b/apps/website/src/components/documentation/Header.tsx @@ -0,0 +1,49 @@ +import { ApiItemKind } from '@microsoft/api-extractor-model'; +import { VscFileCode } from '@react-icons/all-files/vsc/VscFileCode'; +import { VscSymbolClass } from '@react-icons/all-files/vsc/VscSymbolClass'; +import { VscSymbolEnum } from '@react-icons/all-files/vsc/VscSymbolEnum'; +import { VscSymbolInterface } from '@react-icons/all-files/vsc/VscSymbolInterface'; +import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod'; +import { VscSymbolVariable } from '@react-icons/all-files/vsc/VscSymbolVariable'; +import type { PropsWithChildren } from 'react'; + +function generateIcon(kind: ApiItemKind) { + switch (kind) { + case ApiItemKind.Class: + return ; + case ApiItemKind.Function: + case ApiItemKind.Method: + return ; + case ApiItemKind.Enum: + return ; + case ApiItemKind.Interface: + return ; + case ApiItemKind.TypeAlias: + case ApiItemKind.Variable: + return ; + default: + return ; + } +} + +export function Header({ + kind, + name, + sourceURL, +}: PropsWithChildren<{ kind: ApiItemKind; name: string; sourceURL?: string | undefined }>) { + return ( +
+

+ + {generateIcon(kind)} + {name} + + {sourceURL ? ( + + + + ) : null} +

+
+ ); +} diff --git a/apps/website/src/components/documentation/HierarchyText.tsx b/apps/website/src/components/documentation/HierarchyText.tsx new file mode 100644 index 000000000000..4e971683edfb --- /dev/null +++ b/apps/website/src/components/documentation/HierarchyText.tsx @@ -0,0 +1,51 @@ +import type { ApiClass, ApiInterface, Excerpt } from '@microsoft/api-extractor-model'; +import { ApiItemKind } from '@microsoft/api-extractor-model'; +import { ExcerptText } from '../ExcerptText'; + +export function HierarchyText({ item, type }: { item: ApiClass | ApiInterface; type: 'Extends' | 'Implements' }) { + const model = item.getAssociatedModel()!; + + if ( + (item.kind === ApiItemKind.Class && + (item as ApiClass).extendsType === undefined && + (item as ApiClass).implementsTypes.length === 0) || + (item.kind === ApiItemKind.Interface && !(item as ApiInterface).extendsTypes) + ) { + return null; + } + + let excerpts: Excerpt[]; + + if (item.kind === ApiItemKind.Class) { + if (type === 'Implements') { + if ((item as ApiClass).implementsTypes.length === 0) { + return null; + } + + excerpts = (item as ApiClass).implementsTypes.map((typeExcerpt) => typeExcerpt.excerpt); + } else { + if (!(item as ApiClass).extendsType) { + return null; + } + + excerpts = [(item as ApiClass).extendsType!.excerpt]; + } + } else { + if ((item as ApiInterface).extendsTypes.length === 0) { + return null; + } + + excerpts = (item as ApiInterface).extendsTypes.map((typeExcerpt) => typeExcerpt.excerpt); + } + + return ( +
+

{type}

+ + {excerpts.map((excerpt, idx) => ( + + ))} + +
+ ); +} diff --git a/apps/website/src/components/documentation/Members.tsx b/apps/website/src/components/documentation/Members.tsx new file mode 100644 index 000000000000..8c21ceef89a5 --- /dev/null +++ b/apps/website/src/components/documentation/Members.tsx @@ -0,0 +1,13 @@ +import type { ApiDeclaredItem, ApiItemContainerMixin } from '@microsoft/api-extractor-model'; +import { MethodsSection } from './section/MethodsSection'; +import { PropertiesSection } from './section/PropertiesSection'; +import { hasProperties, hasMethods } from './util'; + +export function Members({ item }: { item: ApiDeclaredItem & ApiItemContainerMixin }) { + return ( + <> + {hasProperties(item) ? : null} + {hasMethods(item) ? : null} + + ); +} diff --git a/apps/website/src/components/documentation/ObjectHeader.tsx b/apps/website/src/components/documentation/ObjectHeader.tsx new file mode 100644 index 000000000000..8204aa1554c0 --- /dev/null +++ b/apps/website/src/components/documentation/ObjectHeader.tsx @@ -0,0 +1,19 @@ +import type { ApiDeclaredItem } from '@microsoft/api-extractor-model'; +import { SyntaxHighlighter } from '../SyntaxHighlighter'; +import { Header } from './Header'; +import { SummarySection } from './section/SummarySection'; + +export interface ObjectHeaderProps { + item: ApiDeclaredItem; +} + +export function ObjectHeader({ item }: ObjectHeaderProps) { + return ( + <> +
+ {/* @ts-expect-error async component */} + + + + ); +} diff --git a/apps/website/src/components/documentation/section/ConstructorSection.tsx b/apps/website/src/components/documentation/section/ConstructorSection.tsx new file mode 100644 index 000000000000..b9e767b2eaf6 --- /dev/null +++ b/apps/website/src/components/documentation/section/ConstructorSection.tsx @@ -0,0 +1,19 @@ +import type { ApiConstructor } from '@microsoft/api-extractor-model'; +import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod'; +import { ParameterTable } from '../../ParameterTable'; +import { TSDoc } from '../tsdoc/TSDoc'; +import { parametersString } from '../util'; +import { DocumentationSection } from './DocumentationSection'; +import { CodeHeading } from '~/components/CodeHeading'; + +export function ConstructorSection({ item }: { item: ApiConstructor }) { + return ( + } padded title="Constructor"> +
+ {`constructor(${parametersString(item)})`} + {item.tsdocComment ? : null} + +
+
+ ); +} diff --git a/apps/website/src/components/documentation/section/DocumentationSection.tsx b/apps/website/src/components/documentation/section/DocumentationSection.tsx new file mode 100644 index 000000000000..e56bd389bd37 --- /dev/null +++ b/apps/website/src/components/documentation/section/DocumentationSection.tsx @@ -0,0 +1,14 @@ +import type { SectionOptions } from '@discordjs/ui'; +import type { PropsWithChildren } from 'react'; +import { Section } from '../../Section'; + +export function DocumentationSection(opts: PropsWithChildren) { + const { children, separator, ...props } = opts; + + return ( +
+ {children} + {separator ?
: null} +
+ ); +} diff --git a/apps/website/src/components/documentation/section/MethodsSection.tsx b/apps/website/src/components/documentation/section/MethodsSection.tsx new file mode 100644 index 000000000000..3d1dacc93c2c --- /dev/null +++ b/apps/website/src/components/documentation/section/MethodsSection.tsx @@ -0,0 +1,45 @@ +import type { + ApiDeclaredItem, + ApiItem, + ApiItemContainerMixin, + ApiMethod, + ApiMethodSignature, +} from '@microsoft/api-extractor-model'; +import { ApiItemKind } from '@microsoft/api-extractor-model'; +import { VscSymbolMethod } from '@react-icons/all-files/vsc/VscSymbolMethod'; +import { useMemo, Fragment } from 'react'; +import { Method } from '../../model/method/Method'; +import { DocumentationSection } from './DocumentationSection'; +import { resolveMembers } from '~/util/members'; + +function isMethodLike(item: ApiItem): item is ApiMethod | ApiMethodSignature { + return ( + item.kind === ApiItemKind.Method || + (item.kind === ApiItemKind.MethodSignature && (item as ApiMethod).overloadIndex <= 1) + ); +} + +export function MethodsSection({ item }: { item: ApiItemContainerMixin }) { + const members = resolveMembers(item, isMethodLike); + + const methodItems = useMemo( + () => + members.map(({ item: method, inherited }) => ( + 1 ? `:${(method as ApiMethod).overloadIndex}` : '' + }`} + > + +
+ + )), + [members], + ); + + return ( + } padded title="Methods"> +
{methodItems}
+
+ ); +} diff --git a/apps/website/src/components/documentation/section/ParametersSection.tsx b/apps/website/src/components/documentation/section/ParametersSection.tsx new file mode 100644 index 000000000000..a34d98705c9a --- /dev/null +++ b/apps/website/src/components/documentation/section/ParametersSection.tsx @@ -0,0 +1,12 @@ +import type { ApiDocumentedItem, ApiParameterListMixin } from '@microsoft/api-extractor-model'; +import { VscSymbolParameter } from '@react-icons/all-files/vsc/VscSymbolParameter'; +import { ParameterTable } from '../../ParameterTable'; +import { DocumentationSection } from './DocumentationSection'; + +export function ParameterSection({ item }: { item: ApiDocumentedItem & ApiParameterListMixin }) { + return ( + } padded title="Parameters"> + + + ); +} diff --git a/apps/website/src/components/documentation/section/PropertiesSection.tsx b/apps/website/src/components/documentation/section/PropertiesSection.tsx new file mode 100644 index 000000000000..57a84765cd1c --- /dev/null +++ b/apps/website/src/components/documentation/section/PropertiesSection.tsx @@ -0,0 +1,12 @@ +import type { ApiItemContainerMixin } from '@microsoft/api-extractor-model'; +import { VscSymbolProperty } from '@react-icons/all-files/vsc/VscSymbolProperty'; +import { PropertyList } from '../../PropertyList'; +import { DocumentationSection } from './DocumentationSection'; + +export function PropertiesSection({ item }: { item: ApiItemContainerMixin }) { + return ( + } padded title="Properties"> + + + ); +} diff --git a/apps/website/src/components/documentation/section/SummarySection.tsx b/apps/website/src/components/documentation/section/SummarySection.tsx new file mode 100644 index 000000000000..27ef7f785092 --- /dev/null +++ b/apps/website/src/components/documentation/section/SummarySection.tsx @@ -0,0 +1,16 @@ +import type { ApiDeclaredItem } from '@microsoft/api-extractor-model'; +import { VscListSelection } from '@react-icons/all-files/vsc/VscListSelection'; +import { TSDoc } from '../tsdoc/TSDoc'; +import { DocumentationSection } from './DocumentationSection'; + +export function SummarySection({ item }: { item: ApiDeclaredItem }) { + return ( + } padded separator title="Summary"> + {item.tsdocComment?.summarySection ? ( + + ) : ( +

No summary provided.

+ )} +
+ ); +} diff --git a/apps/website/src/components/documentation/section/TypeParametersSection.tsx b/apps/website/src/components/documentation/section/TypeParametersSection.tsx new file mode 100644 index 000000000000..afa94f13db57 --- /dev/null +++ b/apps/website/src/components/documentation/section/TypeParametersSection.tsx @@ -0,0 +1,12 @@ +import type { ApiTypeParameterListMixin } from '@microsoft/api-extractor-model'; +import { VscSymbolParameter } from '@react-icons/all-files/vsc/VscSymbolParameter'; +import { TypeParamTable } from '../../TypeParamTable'; +import { DocumentationSection } from './DocumentationSection'; + +export function TypeParameterSection({ item }: { item: ApiTypeParameterListMixin }) { + return ( + } padded title="Type Parameters"> + + + ); +} diff --git a/apps/website/src/components/documentation/tsdoc/BlockComment.tsx b/apps/website/src/components/documentation/tsdoc/BlockComment.tsx new file mode 100644 index 000000000000..f3fec803a3bd --- /dev/null +++ b/apps/website/src/components/documentation/tsdoc/BlockComment.tsx @@ -0,0 +1,42 @@ +import { Alert } from '@discordjs/ui'; +import type { PropsWithChildren } from 'react'; + +export function Block({ children, title }: PropsWithChildren<{ title: string }>) { + return ( +
+
{title}
+ {children} +
+ ); +} + +export function ExampleBlock({ + children, + exampleIndex, +}: PropsWithChildren<{ exampleIndex?: number | undefined }>): JSX.Element { + return {children}; +} + +export function DefaultValueBlock({ children }: PropsWithChildren): JSX.Element { + return {children}; +} + +export function RemarksBlock({ children }: PropsWithChildren): JSX.Element { + return {children}; +} + +export function DeprecatedBlock({ children }: PropsWithChildren): JSX.Element { + return ( + + {children} + + ); +} + +export function SeeBlock({ children }: PropsWithChildren): JSX.Element { + return {children}; +} + +export function ReturnsBlock({ children }: PropsWithChildren): JSX.Element { + return {children}; +} diff --git a/apps/website/src/components/documentation/tsdoc/TSDoc.tsx b/apps/website/src/components/documentation/tsdoc/TSDoc.tsx new file mode 100644 index 000000000000..33d40cd826d4 --- /dev/null +++ b/apps/website/src/components/documentation/tsdoc/TSDoc.tsx @@ -0,0 +1,130 @@ +import type { ApiItem } from '@microsoft/api-extractor-model'; +import type { DocComment, DocFencedCode, DocLinkTag, DocNode, DocNodeContainer, DocPlainText } from '@microsoft/tsdoc'; +import { DocNodeKind, StandardTags } from '@microsoft/tsdoc'; +import Link from 'next/link'; +import { Fragment, useCallback, type ReactNode } from 'react'; +import { ItemLink } from '../../ItemLink'; +import { SyntaxHighlighter } from '../../SyntaxHighlighter'; +import { resolveItemURI } from '../util'; +import { DefaultValueBlock, DeprecatedBlock, ExampleBlock, RemarksBlock, ReturnsBlock, SeeBlock } from './BlockComment'; + +export function TSDoc({ item, tsdoc }: { item: ApiItem; tsdoc: DocNode }): JSX.Element { + const createNode = useCallback( + (tsdoc: DocNode, idx?: number): ReactNode => { + switch (tsdoc.kind) { + case DocNodeKind.PlainText: + return ( + + {(tsdoc as DocPlainText).text} + + ); + case DocNodeKind.Section: + case DocNodeKind.Paragraph: + return ( + + {(tsdoc as DocNodeContainer).nodes.map((node, idx) => createNode(node, idx))} + + ); + case DocNodeKind.SoftBreak: + return ; + case DocNodeKind.LinkTag: { + const { codeDestination, urlDestination, linkText } = tsdoc as DocLinkTag; + + if (codeDestination) { + const foundItem = item + .getAssociatedModel() + ?.resolveDeclarationReference(codeDestination, item).resolvedApiItem; + + if (!foundItem) return null; + + return ( + + {linkText ?? foundItem.displayName} + + ); + } + + if (urlDestination) { + return ( + + {linkText ?? urlDestination} + + ); + } + + return null; + } + + case DocNodeKind.CodeSpan: { + const { code } = tsdoc as DocFencedCode; + return ( + + {code} + + ); + } + + case DocNodeKind.FencedCode: { + const { language, code } = tsdoc as DocFencedCode; + // @ts-expect-error async component + return ; + } + + case DocNodeKind.Comment: { + const comment = tsdoc as DocComment; + + const exampleBlocks = comment.customBlocks.filter( + (block) => block.blockTag.tagName.toUpperCase() === StandardTags.example.tagNameWithUpperCase, + ); + + const defaultValueBlock = comment.customBlocks.find( + (block) => block.blockTag.tagName.toUpperCase() === StandardTags.defaultValue.tagNameWithUpperCase, + ); + + return ( +
+ {comment.deprecatedBlock ? ( + {createNode(comment.deprecatedBlock.content)} + ) : null} + {comment.summarySection ? createNode(comment.summarySection) : null} + {comment.remarksBlock ? {createNode(comment.remarksBlock.content)} : null} + {defaultValueBlock ? ( + {createNode(defaultValueBlock.content)} + ) : null} + {comment.returnsBlock ? {createNode(comment.returnsBlock.content)} : null} + {exampleBlocks.length + ? exampleBlocks.map((block, idx) => {createNode(block.content)}) + : null} + {comment.seeBlocks.length ? ( + {comment.seeBlocks.map((seeBlock, idx) => createNode(seeBlock.content, idx))} + ) : null} +
+ ); + } + + default: + // console.log(`Captured unknown node kind: ${node.kind}`); + return null; + } + }, + [item], + ); + + return ( + <> + {tsdoc.kind === 'Paragraph' || tsdoc.kind === 'Section' ? ( + <>{(tsdoc as DocNodeContainer).nodes.map((node, idx) => createNode(node, idx))} + ) : ( + createNode(tsdoc) + )} + + ); +} diff --git a/apps/website/src/components/documentation/util.ts b/apps/website/src/components/documentation/util.ts new file mode 100644 index 000000000000..b6984016b979 --- /dev/null +++ b/apps/website/src/components/documentation/util.ts @@ -0,0 +1,71 @@ +import { ApiItemKind } from '@microsoft/api-extractor-model'; +import type { + ApiItem, + ApiItemContainerMixin, + ApiMethod, + ApiMethodSignature, + ApiProperty, + ApiPropertySignature, + ApiDocumentedItem, + ApiParameterListMixin, +} from '@microsoft/api-extractor-model'; +import type { TableOfContentsSerialized } from '../TableOfContentItems'; +import { METHOD_SEPARATOR, OVERLOAD_SEPARATOR } from '~/util/constants'; +import { resolveMembers } from '~/util/members'; +import { resolveParameters } from '~/util/model'; + +export function hasProperties(item: ApiItemContainerMixin) { + return resolveMembers(item, memberPredicate).some( + ({ item: member }) => member.kind === ApiItemKind.Property || member.kind === ApiItemKind.PropertySignature, + ); +} + +export function hasMethods(item: ApiItemContainerMixin) { + return resolveMembers(item, memberPredicate).some( + ({ item: member }) => member.kind === ApiItemKind.Method || member.kind === ApiItemKind.MethodSignature, + ); +} + +export function resolveItemURI(item: ApiItem): string { + return !item.parent || item.parent.kind === ApiItemKind.EntryPoint + ? `${item.displayName}${OVERLOAD_SEPARATOR}${item.kind}` + : `${item.parent.displayName}${OVERLOAD_SEPARATOR}${item.parent.kind}${METHOD_SEPARATOR}${item.displayName}`; +} + +export function memberPredicate( + item: ApiItem, +): item is ApiMethod | ApiMethodSignature | ApiProperty | ApiPropertySignature { + return ( + item.kind === ApiItemKind.Property || + item.kind === ApiItemKind.PropertySignature || + item.kind === ApiItemKind.Method || + item.kind === ApiItemKind.MethodSignature + ); +} + +export function serializeMembers(clazz: ApiItemContainerMixin): TableOfContentsSerialized[] { + return resolveMembers(clazz, memberPredicate).map(({ item: member }) => { + if (member.kind === 'Method' || member.kind === 'MethodSignature') { + return { + kind: member.kind as 'Method' | 'MethodSignature', + name: member.displayName, + }; + } else { + return { + kind: member.kind as 'Property' | 'PropertySignature', + name: member.displayName, + overloadIndex: (member as ApiMethod | ApiMethodSignature).overloadIndex, + }; + } + }); +} + +export function parametersString(item: ApiDocumentedItem & ApiParameterListMixin) { + return resolveParameters(item).reduce((prev, cur, index) => { + if (index === 0) { + return `${prev}${cur.isOptional ? `${cur.name}?` : cur.name}`; + } + + return `${prev}, ${cur.isOptional ? `${cur.name}?` : cur.name}`; + }, ''); +} diff --git a/apps/website/src/components/model/Class.tsx b/apps/website/src/components/model/Class.tsx index 880e4dc54950..ff791a03384e 100644 --- a/apps/website/src/components/model/Class.tsx +++ b/apps/website/src/components/model/Class.tsx @@ -1,23 +1,30 @@ -import type { ApiClassJSON } from '@discordjs/api-extractor-utils'; -import { DocContainer } from '../DocContainer'; -import { ConstructorSection, MethodsSection, PropertiesSection } from '../Sections'; +import type { ApiClass, ApiConstructor } from '@microsoft/api-extractor-model'; +import { ApiItemKind } from '@microsoft/api-extractor-model'; +// import { Outline } from '../Outline'; +import { Badges } from '../Badges'; +import { Documentation } from '../documentation/Documentation'; +import { HierarchyText } from '../documentation/HierarchyText'; +import { Members } from '../documentation/Members'; +import { ObjectHeader } from '../documentation/ObjectHeader'; +import { ConstructorSection } from '../documentation/section/ConstructorSection'; +import { TypeParameterSection } from '../documentation/section/TypeParametersSection'; +// import { serializeMembers } from '../documentation/util'; + +export function Class({ clazz }: { clazz: ApiClass }) { + const constructor = clazz.members.find((member) => member.kind === ApiItemKind.Constructor) as + | ApiConstructor + | undefined; -export function Class({ data }: { data: ApiClassJSON }) { return ( - - {data.constructor ? : null} - - - + + + + + + {clazz.typeParameters.length ? : null} + {constructor ? : null} + + {/* */} + ); } diff --git a/apps/website/src/components/model/Enum.tsx b/apps/website/src/components/model/Enum.tsx deleted file mode 100644 index 56bc4700b338..000000000000 --- a/apps/website/src/components/model/Enum.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import type { ApiEnumJSON } from '@discordjs/api-extractor-utils'; -import { Section } from '@discordjs/ui'; -import { Fragment } from 'react'; -import { VscSymbolEnumMember } from 'react-icons/vsc'; -import { useMedia } from 'react-use'; -import { CodeListing, CodeListingSeparatorType } from '../CodeListing'; -import { DocContainer } from '../DocContainer'; - -export function Enum({ data }: { data: ApiEnumJSON }) { - const matches = useMedia('(max-width: 768px)', true); - - return ( - -
} padded title="Members"> -
- {data.members.map((member) => ( - - -
- - ))} -
-
-
- ); -} diff --git a/apps/website/src/components/model/Function.tsx b/apps/website/src/components/model/Function.tsx deleted file mode 100644 index 0c6540d664b0..000000000000 --- a/apps/website/src/components/model/Function.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import type { ApiFunctionJSON } from '@discordjs/api-extractor-utils'; -import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit'; -import { useState } from 'react'; -import { VscChevronDown, VscVersions } from 'react-icons/vsc'; -import { DocContainer } from '../DocContainer'; -import { ParametersSection } from '../Sections'; - -export function Function({ data }: { data: ApiFunctionJSON }) { - const [overloadIndex, setOverloadIndex] = useState(1); - const overloadedData = data.mergedSiblings[overloadIndex - 1]!; - const menu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true }); - - return ( - 1 ? ` (${overloadedData.overloadIndex})` : '' - }`} - subHeading={ - data.mergedSiblings.length > 1 ? ( -
- -
- -
- {`Overload ${overloadIndex}`} - {` of ${data.mergedSiblings.length}`} -
- -
-
- - {data.mergedSiblings.map((_, idx) => ( - setOverloadIndex(idx + 1)} - > - {`Overload ${idx + 1}`} - - ))} - -
- ) : null - } - summary={overloadedData.summary} - typeParams={overloadedData.typeParameters} - > - -
- ); -} diff --git a/apps/website/src/components/model/Interface.tsx b/apps/website/src/components/model/Interface.tsx index f55a17aa99b8..a2856826ebd4 100644 --- a/apps/website/src/components/model/Interface.tsx +++ b/apps/website/src/components/model/Interface.tsx @@ -1,20 +1,20 @@ -import type { ApiInterfaceJSON } from '@discordjs/api-extractor-utils'; -import { DocContainer } from '../DocContainer'; -import { MethodsSection, PropertiesSection } from '../Sections'; +import type { ApiInterface } from '@microsoft/api-extractor-model'; +// import { Outline } from '../Outline'; +import { Documentation } from '../documentation/Documentation'; +import { HierarchyText } from '../documentation/HierarchyText'; +import { Members } from '../documentation/Members'; +import { ObjectHeader } from '../documentation/ObjectHeader'; +import { TypeParameterSection } from '../documentation/section/TypeParametersSection'; +// import { serializeMembers } from '../documentation/util'; -export function Interface({ data }: { data: ApiInterfaceJSON }) { +export function Interface({ item }: { item: ApiInterface }) { return ( - - - - + + + + {item.typeParameters.length ? : null} + + {/* */} + ); } diff --git a/apps/website/src/components/model/TypeAlias.tsx b/apps/website/src/components/model/TypeAlias.tsx index 13ce11039fc3..6d3501093d14 100644 --- a/apps/website/src/components/model/TypeAlias.tsx +++ b/apps/website/src/components/model/TypeAlias.tsx @@ -1,14 +1,16 @@ -import type { ApiTypeAliasJSON } from '@discordjs/api-extractor-utils'; -import { DocContainer } from '../DocContainer'; +import type { ApiTypeAlias } from '@microsoft/api-extractor-model'; +import { SyntaxHighlighter } from '../SyntaxHighlighter'; +import { Documentation } from '../documentation/Documentation'; +import { Header } from '../documentation/Header'; +import { SummarySection } from '../documentation/section/SummarySection'; -export function TypeAlias({ data }: { data: ApiTypeAliasJSON }) { +export function TypeAlias({ item }: { item: ApiTypeAlias }) { return ( - + +
+ {/* @ts-expect-error async component */} + + + ); } diff --git a/apps/website/src/components/model/Variable.tsx b/apps/website/src/components/model/Variable.tsx index 44c4f5e1e2ce..16168cd8ecea 100644 --- a/apps/website/src/components/model/Variable.tsx +++ b/apps/website/src/components/model/Variable.tsx @@ -1,6 +1,11 @@ -import type { ApiVariableJSON } from '@discordjs/api-extractor-utils'; -import { DocContainer } from '../DocContainer'; +import type { ApiVariable } from '@microsoft/api-extractor-model'; +import { Documentation } from '../documentation/Documentation'; +import { ObjectHeader } from '../documentation/ObjectHeader'; -export function Variable({ data }: { data: ApiVariableJSON }) { - return ; +export function Variable({ item }: { item: ApiVariable }) { + return ( + + + + ); } diff --git a/apps/website/src/components/model/enum/Enum.tsx b/apps/website/src/components/model/enum/Enum.tsx new file mode 100644 index 000000000000..40339442621e --- /dev/null +++ b/apps/website/src/components/model/enum/Enum.tsx @@ -0,0 +1,24 @@ +import type { ApiEnum } from '@microsoft/api-extractor-model'; +import { VscSymbolEnum } from '@react-icons/all-files/vsc/VscSymbolEnum'; +import { Panel } from '../../Panel'; +import { Documentation } from '../../documentation/Documentation'; +import { ObjectHeader } from '../../documentation/ObjectHeader'; +import { DocumentationSection } from '../../documentation/section/DocumentationSection'; +import { EnumMember } from './EnumMember'; + +export function Enum({ item }: { item: ApiEnum }) { + return ( + + + } padded title="Members"> +
+ {item.members.map((member, idx) => ( + + + + ))} +
+
+
+ ); +} diff --git a/apps/website/src/components/model/enum/EnumMember.tsx b/apps/website/src/components/model/enum/EnumMember.tsx new file mode 100644 index 000000000000..9d9afc754c9e --- /dev/null +++ b/apps/website/src/components/model/enum/EnumMember.tsx @@ -0,0 +1,19 @@ +import type { ApiEnumMember } from '@microsoft/api-extractor-model'; +import { SignatureText } from '../../SignatureText'; +import { TSDoc } from '../../documentation/tsdoc/TSDoc'; +import { CodeHeading } from '~/components/CodeHeading'; + +export function EnumMember({ member }: { member: ApiEnumMember }) { + return ( +
+ + {member.name} + = + {member.initializerExcerpt ? ( + + ) : null} + + {member.tsdocComment ? : null} +
+ ); +} diff --git a/apps/website/src/components/model/function/Function.tsx b/apps/website/src/components/model/function/Function.tsx new file mode 100644 index 000000000000..d903f2ae2799 --- /dev/null +++ b/apps/website/src/components/model/function/Function.tsx @@ -0,0 +1,30 @@ +import type { ApiFunction } from '@microsoft/api-extractor-model'; +import dynamic from 'next/dynamic'; +import { Header } from '../../documentation/Header'; +import { FunctionBody } from './FunctionBody'; + +const OverloadSwitcher = dynamic(async () => import('../../OverloadSwitcher')); + +export function Function({ item }: { item: ApiFunction }) { + const header =
; + + if (item.getMergedSiblings().length > 1) { + const overloads = item + .getMergedSiblings() + .map((sibling, idx) => ); + + return ( +
+ {header} + +
+ ); + } + + return ( +
+ {header} + +
+ ); +} diff --git a/apps/website/src/components/model/function/FunctionBody.tsx b/apps/website/src/components/model/function/FunctionBody.tsx new file mode 100644 index 000000000000..63291e433686 --- /dev/null +++ b/apps/website/src/components/model/function/FunctionBody.tsx @@ -0,0 +1,23 @@ +import type { ApiFunction } from '@microsoft/api-extractor-model'; +import { SyntaxHighlighter } from '../../SyntaxHighlighter'; +import { Documentation } from '../../documentation/Documentation'; +import { ParameterSection } from '../../documentation/section/ParametersSection'; +import { SummarySection } from '../../documentation/section/SummarySection'; +import { TypeParameterSection } from '../../documentation/section/TypeParametersSection'; + +export interface FunctionBodyProps { + mergedSiblingCount: number; + overloadDocumentation: React.ReactNode[]; +} + +export function FunctionBody({ item }: { item: ApiFunction }) { + return ( + + {/* @ts-expect-error async component */} + + + {item.typeParameters.length ? : null} + {item.parameters.length ? : null} + + ); +} diff --git a/apps/website/src/components/model/method/Method.tsx b/apps/website/src/components/model/method/Method.tsx new file mode 100644 index 000000000000..dd64052359aa --- /dev/null +++ b/apps/website/src/components/model/method/Method.tsx @@ -0,0 +1,41 @@ +import type { + ApiDeclaredItem, + ApiItemContainerMixin, + ApiMethod, + ApiMethodSignature, +} from '@microsoft/api-extractor-model'; +import dynamic from 'next/dynamic'; +import { Fragment } from 'react'; +import { MethodDocumentation } from './MethodDocumentation'; +import { MethodHeader } from './MethodHeader'; + +const OverloadSwitcher = dynamic(async () => import('../../OverloadSwitcher')); + +export function Method({ + method, + inheritedFrom, +}: { + inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined; + method: ApiMethod | ApiMethodSignature; +}) { + if (method.getMergedSiblings().length > 1) { + // We have overloads, use the overload switcher, but render + // each overload node on the server. + const overloads = method.getMergedSiblings().map((sibling, idx) => ( + + + + + )); + + return ; + } + + // We have just a single method, render it on the server. + return ( + <> + + + + ); +} diff --git a/apps/website/src/components/model/method/MethodDocumentation.tsx b/apps/website/src/components/model/method/MethodDocumentation.tsx new file mode 100644 index 000000000000..3c0354b7de0f --- /dev/null +++ b/apps/website/src/components/model/method/MethodDocumentation.tsx @@ -0,0 +1,30 @@ +import type { + ApiDeclaredItem, + ApiItemContainerMixin, + ApiMethod, + ApiMethodSignature, +} from '@microsoft/api-extractor-model'; +import { InheritanceText } from '../../InheritanceText'; +import { ParameterTable } from '../../ParameterTable'; +import { TSDoc } from '../../documentation/tsdoc/TSDoc'; + +export interface MethodDocumentationProps { + inheritedFrom?: (ApiDeclaredItem & ApiItemContainerMixin) | undefined; + method: ApiMethod | ApiMethodSignature; +} + +export function MethodDocumentation({ method, inheritedFrom }: MethodDocumentationProps) { + const parent = method.parent as ApiDeclaredItem; + + if (!(method.tsdocComment?.summarySection || method.parameters.length > 0)) { + return null; + } + + return ( +
+ {method.tsdocComment ? : null} + {method.parameters.length ? : null} + {inheritedFrom && parent ? : null} +
+ ); +} diff --git a/apps/website/src/components/model/method/MethodHeader.tsx b/apps/website/src/components/model/method/MethodHeader.tsx new file mode 100644 index 000000000000..6c39095f825d --- /dev/null +++ b/apps/website/src/components/model/method/MethodHeader.tsx @@ -0,0 +1,26 @@ +import type { ApiMethod, ApiMethodSignature } from '@microsoft/api-extractor-model'; +import { useMemo } from 'react'; +import { Badges } from '~/components/Badges'; +import { CodeHeading } from '~/components/CodeHeading'; +import { ExcerptText } from '~/components/ExcerptText'; +import { parametersString } from '~/components/documentation/util'; + +export function MethodHeader({ method }: { method: ApiMethod | ApiMethodSignature }) { + const key = useMemo( + () => `${method.displayName}${method.overloadIndex && method.overloadIndex > 1 ? `:${method.overloadIndex}` : ''}`, + [method.displayName, method.overloadIndex], + ); + + return ( +
+
+ + + {`${method.name}(${parametersString(method)})`} + : + + +
+
+ ); +} diff --git a/apps/website/src/components/tsdoc/BlockComment.tsx b/apps/website/src/components/tsdoc/BlockComment.tsx deleted file mode 100644 index c7c53e75bd6c..000000000000 --- a/apps/website/src/components/tsdoc/BlockComment.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { Alert } from '@discordjs/ui'; -import { StandardTags } from '@microsoft/tsdoc'; -import type { PropsWithChildren } from 'react'; - -export function Block({ children, title }: PropsWithChildren<{ title: string }>) { - return ( -
-
{title}
- {children} -
- ); -} - -export function ExampleBlock({ - children, - exampleIndex, -}: PropsWithChildren<{ exampleIndex?: number | undefined }>): JSX.Element { - return {children}; -} - -export function DefaultValueBlock({ children }: PropsWithChildren): JSX.Element { - return {children}; -} - -export function RemarksBlock({ children }: PropsWithChildren): JSX.Element { - return {children}; -} - -export function BlockComment({ - children, - tagName, - index, -}: PropsWithChildren<{ - index?: number | undefined; - tagName: string; -}>): JSX.Element { - switch (tagName.toUpperCase()) { - case StandardTags.example.tagNameWithUpperCase: - return {children}; - case StandardTags.deprecated.tagNameWithUpperCase: - return ( - - {children} - - ); - case StandardTags.remarks.tagNameWithUpperCase: - return {children}; - case StandardTags.defaultValue.tagNameWithUpperCase: - return {children}; - case StandardTags.typeParam.tagNameWithUpperCase: - case StandardTags.param.tagNameWithUpperCase: - return {children}; - default: // TODO: Support more blocks in the future. - return <>{children}; - } -} diff --git a/apps/website/src/components/tsdoc/TSDoc.tsx b/apps/website/src/components/tsdoc/TSDoc.tsx deleted file mode 100644 index 245d64bdeef0..000000000000 --- a/apps/website/src/components/tsdoc/TSDoc.tsx +++ /dev/null @@ -1,123 +0,0 @@ -import type { - AnyDocNodeJSON, - DocPlainTextJSON, - DocNodeContainerJSON, - DocLinkTagJSON, - DocFencedCodeJSON, - DocBlockJSON, - DocCommentJSON, -} from '@discordjs/api-extractor-utils'; -import { DocNodeKind, StandardTags } from '@microsoft/tsdoc'; -import Link from 'next/link'; -import { Fragment, useCallback, type ReactNode } from 'react'; -import { SyntaxHighlighter } from '../SyntaxHighlighter'; -import { BlockComment } from './BlockComment'; - -export function TSDoc({ node }: { node: AnyDocNodeJSON }): JSX.Element { - const createNode = useCallback((node: AnyDocNodeJSON, idx?: number): ReactNode => { - let numberOfExamples = 0; - let exampleIndex = 0; - - switch (node.kind) { - case DocNodeKind.PlainText: - return ( - - {(node as DocPlainTextJSON).text} - - ); - case DocNodeKind.Paragraph: - return ( - - {(node as DocNodeContainerJSON).nodes.map((node, idx) => createNode(node, idx))} - - ); - case DocNodeKind.SoftBreak: - return ; - case DocNodeKind.LinkTag: { - const { codeDestination, urlDestination, text } = node as DocLinkTagJSON; - - if (codeDestination) { - return ( - - - {text ?? codeDestination.name} - - - ); - } - - if (urlDestination) { - return ( - - - {text ?? urlDestination} - - - ); - } - - return null; - } - - case DocNodeKind.CodeSpan: { - const { code } = node as DocFencedCodeJSON; - return ( - - {code} - - ); - } - - case DocNodeKind.FencedCode: { - const { language, code } = node as DocFencedCodeJSON; - return ; - } - - case DocNodeKind.ParamBlock: - case DocNodeKind.Block: { - const { tag } = node as DocBlockJSON; - - if (tag.tagName.toUpperCase() === StandardTags.example.tagNameWithUpperCase) { - exampleIndex++; - } - - const index = numberOfExamples > 1 ? exampleIndex : undefined; - - return ( - - {(node as DocBlockJSON).content.map((node, idx) => createNode(node, idx))} - - ); - } - - case DocNodeKind.Comment: { - const comment = node as DocCommentJSON; - - if (!comment.customBlocks.length) { - return null; - } - - // Cheat a bit by finding out how many comments we have beforehand... - numberOfExamples = comment.customBlocks.filter( - (block) => block.tag.tagName.toUpperCase() === StandardTags.example.tagNameWithUpperCase, - ).length; - - return
{comment.customBlocks.map((node, idx) => createNode(node, idx))}
; - } - - default: - // console.log(`Captured unknown node kind: ${node.kind}`); - return null; - } - }, []); - - return ( - <> - {node.kind === 'Paragraph' || node.kind === 'Section' ? ( - <>{(node as DocNodeContainerJSON).nodes.map((node, idx) => createNode(node, idx))} - ) : ( - createNode(node) - )} - - ); -} diff --git a/apps/website/src/contexts/cmdK.tsx b/apps/website/src/contexts/cmdK.tsx index 00a1d269a1c0..127c1b20420a 100644 --- a/apps/website/src/contexts/cmdK.tsx +++ b/apps/website/src/contexts/cmdK.tsx @@ -1,6 +1,8 @@ -import { type DisclosureState, useDialogState } from 'ariakit'; -import type { PropsWithChildren } from 'react'; -import { createContext, useContext } from 'react'; +'use client'; + +import { useDialogState } from 'ariakit/dialog'; +import type { DisclosureState } from 'ariakit/disclosure'; +import { type PropsWithChildren, createContext, useContext } from 'react'; export const CmdKContext = createContext(null); diff --git a/apps/website/src/contexts/member.tsx b/apps/website/src/contexts/member.tsx index a9037653f8a4..0c0db2923740 100644 --- a/apps/website/src/contexts/member.tsx +++ b/apps/website/src/contexts/member.tsx @@ -1,15 +1,21 @@ +'use client'; + import type { ApiItemJSON } from '@discordjs/api-extractor-utils'; -import { createContext, useContext, type ReactNode } from 'react'; +import type { ApiItem } from '@microsoft/api-extractor-model'; +import { createContext, useContext, useMemo, useState } from 'react'; +import type { PropsWithChildren, Dispatch, SetStateAction } from 'react'; + +export const MemberContext = createContext<{ + member: ApiItem | ApiItemJSON | null | undefined; + setMember: Dispatch>; +}>({ member: undefined, setMember: (_) => {} }); -export const MemberContext = createContext(undefined); +export const MemberProvider = ({ children }: PropsWithChildren) => { + const [member, setMember] = useState(undefined); + const value = useMemo(() => ({ member, setMember }), [member]); -export const MemberProvider = ({ - member, - children, -}: { - children?: ReactNode | undefined; - member: ApiItemJSON | undefined; -}) => {children}; + return {children}; +}; export function useMember() { return useContext(MemberContext); diff --git a/apps/website/src/contexts/nav.tsx b/apps/website/src/contexts/nav.tsx new file mode 100644 index 000000000000..031417b73ee0 --- /dev/null +++ b/apps/website/src/contexts/nav.tsx @@ -0,0 +1,27 @@ +'use client'; + +import { + type PropsWithChildren, + type Dispatch, + type SetStateAction, + createContext, + useContext, + useState, + useMemo, +} from 'react'; + +export const NavContext = createContext<{ opened: boolean; setOpened: Dispatch> }>({ + opened: false, + setOpened: (_) => {}, +}); + +export const NavProvider = ({ children }: PropsWithChildren) => { + const [opened, setOpened] = useState(false); + const value = useMemo(() => ({ opened, setOpened }), [opened]); + + return {children}; +}; + +export function useNav() { + return useContext(NavContext); +} diff --git a/apps/website/src/hooks/useCurrentPathMeta.ts b/apps/website/src/hooks/useCurrentPathMeta.ts new file mode 100644 index 000000000000..a9f867ac3a21 --- /dev/null +++ b/apps/website/src/hooks/useCurrentPathMeta.ts @@ -0,0 +1,19 @@ +'use client'; + +import { usePathname } from 'next/navigation'; + +export function useCurrentPathMeta() { + const pathname = usePathname(); + + if (!pathname) { + return {}; + } + + const [, , , packageName, version, item] = pathname.split('/'); + + return { + packageName, + version, + item, + }; +} diff --git a/apps/website/src/hooks/useSystemThemeFallback.ts b/apps/website/src/hooks/useSystemThemeFallback.ts new file mode 100644 index 000000000000..5e7102938c75 --- /dev/null +++ b/apps/website/src/hooks/useSystemThemeFallback.ts @@ -0,0 +1,13 @@ +'use client'; + +import { useEffect } from 'react'; + +export function useSystemThemeFallback() { + useEffect(() => { + const theme = localStorage.getItem('theme'); + if (theme === 'auto') { + localStorage.setItem('theme', 'system'); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); +} diff --git a/apps/website/src/hooks/useUnregisterServiceWorker.ts b/apps/website/src/hooks/useUnregisterServiceWorker.ts new file mode 100644 index 000000000000..d56676f203ee --- /dev/null +++ b/apps/website/src/hooks/useUnregisterServiceWorker.ts @@ -0,0 +1,14 @@ +'use client'; + +import { useEffect } from 'react'; + +export function useUnregisterServiceWorker() { + useEffect(() => { + // eslint-disable-next-line promise/prefer-await-to-then + void navigator.serviceWorker?.getRegistrations().then((registrations) => { + for (const registration of registrations) { + void registration.unregister(); + } + }); + }, []); +} diff --git a/apps/website/src/middleware.ts b/apps/website/src/middleware.ts index 7bee8f55e25c..e53dcb50a9d4 100644 --- a/apps/website/src/middleware.ts +++ b/apps/website/src/middleware.ts @@ -1,17 +1,33 @@ +import { get } from '@vercel/edge-config'; import { NextResponse, type NextRequest } from 'next/server'; import { PACKAGES } from './util/constants'; +async function fetchLatestVersion(packageName: string) { + const res = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`, { cache: 'no-store' }); + const data: string[] = await res.json(); + + return data.at(-2); +} + export default async function middleware(request: NextRequest) { + if (request.nextUrl.pathname === '/docs') { + try { + const skip = await get('SKIP_PACKAGE_VERSION_SELECTION'); + if (skip) { + const latestVersion = await fetchLatestVersion('core'); + return NextResponse.redirect(new URL(`/docs/packages/core/${latestVersion}`, request.url)); + } + } catch {} + } + if (request.nextUrl.pathname.includes('discord.js')) { - return NextResponse.redirect('https://discord.js.org/#/docs/discord.js'); + return NextResponse.redirect('https://old.discordjs.dev/#/docs/discord.js'); } if (PACKAGES.some((pkg) => request.nextUrl.pathname.includes(pkg))) { - const packageName = /\/docs\/packages\/([^/]+)\/.*/.exec(request.nextUrl.pathname)?.[1] ?? 'builders'; - const res = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`); - const data: string[] = await res.json(); - - const latestVersion = data.at(-2); + // eslint-disable-next-line prefer-named-capture-group + const packageName = /\/docs\/packages\/([^/]+)\/.*/.exec(request.nextUrl.pathname)?.[1] ?? 'core'; + const latestVersion = await fetchLatestVersion(packageName); return NextResponse.redirect( new URL(request.nextUrl.pathname.replace('stable', latestVersion ?? 'main'), request.url), ); diff --git a/apps/website/src/pages/404.tsx b/apps/website/src/pages/404.tsx deleted file mode 100644 index e52bf19fc3fb..000000000000 --- a/apps/website/src/pages/404.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import Head from 'next/head'; -import Link from 'next/link'; - -export default function FourOhFourPage() { - return ( - <> - - discord.js | 404 - - -
-

404

-

Not found.

- - - Take me back - - -
- - ); -} diff --git a/apps/website/src/pages/_app.tsx b/apps/website/src/pages/_app.tsx deleted file mode 100644 index 57f555d35870..000000000000 --- a/apps/website/src/pages/_app.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import type { AppProps } from 'next/app'; -import Head from 'next/head'; -import NextProgress from 'next-progress'; -import { ThemeProvider } from 'next-themes'; -import '@unocss/reset/tailwind.css'; -import '../styles/inter.css'; -import '../styles/unocss.css'; -import '../styles/cmdk.css'; -import '../styles/main.css'; - -export default function MyApp({ Component, pageProps }: AppProps) { - return ( - <> - - discord.js - - - - - - - - - ); -} diff --git a/apps/website/src/pages/_document.tsx b/apps/website/src/pages/_document.tsx deleted file mode 100644 index 0ce3f5e4cb44..000000000000 --- a/apps/website/src/pages/_document.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { Html, Head, Main, NextScript } from 'next/document'; -import { DESCRIPTION } from '~/util/constants'; - -export default function Document() { - return ( - - - - - - - - - - - - - - - - - - - - - -
- - - - ); -} diff --git a/apps/website/src/pages/docs/[...slug].tsx b/apps/website/src/pages/docs/[...slug].tsx deleted file mode 100644 index 1fe48ca8004f..000000000000 --- a/apps/website/src/pages/docs/[...slug].tsx +++ /dev/null @@ -1,344 +0,0 @@ -/* eslint-disable no-case-declarations */ -import { readFile } from 'node:fs/promises'; -import { join } from 'node:path'; -import process, { cwd } from 'node:process'; -import { - findPackage, - getMembers, - type ApiItemJSON, - type ApiClassJSON, - type ApiFunctionJSON, - type ApiInterfaceJSON, - type ApiTypeAliasJSON, - type ApiVariableJSON, - type ApiEnumJSON, -} from '@discordjs/api-extractor-utils'; -import { createApiModel } from '@discordjs/scripts'; -import { ApiFunction, ApiItemKind, type ApiPackage } from '@microsoft/api-extractor-model'; -import Head from 'next/head'; -import { useRouter } from 'next/router'; -import type { GetStaticPaths, GetStaticProps } from 'next/types'; -import { MDXRemote } from 'next-mdx-remote'; -import { serialize } from 'next-mdx-remote/serialize'; -import { useEffect, useMemo, useState } from 'react'; -import rehypeIgnore from 'rehype-ignore'; -import rehypePrettyCode, { type Options } from 'rehype-pretty-code'; -import rehypeRaw from 'rehype-raw'; -import rehypeSlug from 'rehype-slug'; -import remarkGfm from 'remark-gfm'; -import { getHighlighter } from 'shiki'; -import shikiLangJavascript from 'shiki/languages/javascript.tmLanguage.json'; -import shikiLangTypescript from 'shiki/languages/typescript.tmLanguage.json'; -import shikiThemeDarkPlus from 'shiki/themes/dark-plus.json'; -import shikiThemeLightPlus from 'shiki/themes/light-plus.json'; -import { SidebarLayout, type SidebarLayoutProps } from '~/components/SidebarLayout'; -import { Class } from '~/components/model/Class'; -import { Enum } from '~/components/model/Enum'; -import { Function } from '~/components/model/Function'; -import { Interface } from '~/components/model/Interface'; -import { TypeAlias } from '~/components/model/TypeAlias'; -import { Variable } from '~/components/model/Variable'; -import { CmdKProvider } from '~/contexts/cmdK'; -import { MemberProvider } from '~/contexts/member'; -import { DESCRIPTION, PACKAGES } from '~/util/constants'; -import { findMember, findMemberByKey } from '~/util/model.server'; -import { tryResolveDescription } from '~/util/summary'; - -export const getStaticPaths: GetStaticPaths = async () => { - const pkgs = ( - await Promise.all( - PACKAGES.map(async (packageName) => { - try { - let data: any[] = []; - let versions: string[] = []; - if (process.env.NEXT_PUBLIC_LOCAL_DEV) { - const res = await readFile( - join(cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'), - 'utf8', - ); - data = JSON.parse(res); - } else { - const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`); - versions = await response.json(); - versions = versions.slice(-2); - - for (const version of versions) { - const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${version}.api.json`); - data = [...data, await res.json()]; - } - } - - if (Array.isArray(data)) { - const models = data.map((innerData) => createApiModel(innerData)); - const pkgs = models.map((model) => findPackage(model, packageName)) as ApiPackage[]; - - return [ - ...versions.map((version) => ({ params: { slug: ['packages', packageName, version] } })), - ...pkgs.flatMap((pkg, idx) => - getMembers(pkg, versions[idx] ?? 'main').map((member) => { - if (member.kind === ApiItemKind.Function && member.overloadIndex && member.overloadIndex > 1) { - return { - params: { - slug: [ - 'packages', - packageName, - versions[idx] ?? 'main', - `${member.name}:${member.overloadIndex}:${member.kind}`, - ], - }, - }; - } - - return { - params: { - slug: ['packages', packageName, versions[idx] ?? 'main', `${member.name}:${member.kind}`], - }, - }; - }), - ), - ]; - } - - const model = createApiModel(data); - const pkg = findPackage(model, packageName)!; - - return [ - { params: { slug: ['packages', packageName, 'main'] } }, - ...getMembers(pkg, 'main').map((member) => { - if (member.kind === ApiItemKind.Function && member.overloadIndex && member.overloadIndex > 1) { - return { - params: { - slug: ['packages', packageName, 'main', `${member.name}:${member.overloadIndex}:${member.kind}`], - }, - }; - } - - return { params: { slug: ['packages', packageName, 'main', `${member.name}:${member.kind}`] } }; - }), - ]; - } catch { - return { params: { slug: [] } }; - } - }), - ) - ).flat(); - - return { - paths: pkgs, - fallback: true, - }; -}; - -export const getStaticProps: GetStaticProps = async ({ params }) => { - const [path, packageName = 'builders', branchName = 'main', member] = params!.slug as string[]; - - if (path !== 'packages' || !PACKAGES.includes(packageName)) { - return { - notFound: true, - }; - } - - const [memberName, overloadIndex] = member?.split(':') ?? []; - - try { - const readme = await readFile(join(cwd(), '..', '..', 'packages', packageName, 'README.md'), 'utf8'); - - const mdxSource = await serialize(readme, { - mdxOptions: { - remarkPlugins: [remarkGfm], - remarkRehypeOptions: { allowDangerousHtml: true }, - rehypePlugins: [ - rehypeRaw, - rehypeIgnore, - rehypeSlug, - [ - rehypePrettyCode, - { - theme: { - dark: shikiThemeDarkPlus, - light: shikiThemeLightPlus, - }, - getHighlighter: async (options?: Partial) => - getHighlighter({ - ...options, - langs: [ - // @ts-expect-error: Working as intended - { id: 'javascript', aliases: ['js'], scopeName: 'source.js', grammar: shikiLangJavascript }, - // @ts-expect-error: Working as intended - { id: 'typescript', aliases: ['ts'], scopeName: 'source.ts', grammar: shikiLangTypescript }, - ], - }), - }, - ], - ], - format: 'md', - }, - }); - - let data; - if (process.env.NEXT_PUBLIC_LOCAL_DEV) { - const res = await readFile(join(cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'), 'utf8'); - data = JSON.parse(res); - } else { - const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${branchName}.api.json`); - data = await res.json(); - } - - const model = createApiModel(data); - const pkg = findPackage(model, packageName); - - // eslint-disable-next-line prefer-const - let { containerKey, name } = findMember(model, packageName, memberName, branchName) ?? {}; - if (name && overloadIndex && !Number.isNaN(Number.parseInt(overloadIndex, 10))) { - containerKey = ApiFunction.getContainerKey(name, Number.parseInt(overloadIndex, 10)); - } - - const members = pkg - ? getMembers(pkg, branchName).filter((item) => item.overloadIndex === null || item.overloadIndex <= 1) - : []; - const member = - memberName && containerKey ? findMemberByKey(model, packageName, containerKey, branchName) ?? null : null; - const description = member ? tryResolveDescription(member) ?? DESCRIPTION : DESCRIPTION; - - return { - props: { - packageName, - branchName, - data: { - members, - member, - description, - source: mdxSource, - }, - }, - revalidate: 3_600, - }; - } catch (error_) { - const error = error_ as Error; - console.error(error); - - return { - props: { - error: error.message, - }, - revalidate: 1, - }; - } -}; - -function resolveMember(packageName?: string | undefined, member?: SidebarLayoutProps['data']['member']) { - switch (member?.kind) { - case 'Class': { - const typedMember = member as ApiClassJSON; - return `?pkg=${packageName}&kind=${typedMember.kind}&name=${typedMember.name}&methods=${typedMember.methods.length}&props=${typedMember.properties.length}`; - } - - case 'Function': { - const typedMember = member as ApiFunctionJSON; - return `?pkg=${packageName}&kind=${typedMember.kind}&name=${typedMember.name}`; - } - - case 'Interface': { - const typedMember = member as ApiInterfaceJSON; - return `?pkg=${packageName}&kind=${typedMember.kind}&name=${typedMember.name}&methods=${typedMember.methods.length}&props=${typedMember.properties.length}`; - } - - case 'TypeAlias': { - const typedMember = member as ApiTypeAliasJSON; - return `?pkg=${packageName}&kind=${typedMember.kind}&name=${typedMember.name}`; - } - - case 'Variable': { - const typedMember = member as ApiVariableJSON; - return `?pkg=${packageName}&kind=${typedMember.kind}&name=${typedMember.name}`; - } - - case 'Enum': { - const typedMember = member as ApiEnumJSON; - return `?pkg=${packageName}&kind=${typedMember.kind}&name=${typedMember.name}&members=${typedMember.members.length}`; - } - - default: { - return `?pkg=${packageName}&kind=${member?.kind}&name=${member?.name}`; - } - } -} - -function member(props?: ApiItemJSON | undefined) { - switch (props?.kind) { - case 'Class': - return ; - case 'Function': - return ; - case 'Interface': - return ; - case 'TypeAlias': - return ; - case 'Variable': - return ; - case 'Enum': - return ; - default: - return
Cannot render that item type
; - } -} - -export default function SlugPage(props: SidebarLayoutProps & { error?: string }) { - const router = useRouter(); - const [asPathWithoutQueryAndAnchor, setAsPathWithoutQueryAndAnchor] = useState(''); - - const name = useMemo( - () => `discord.js${props.data?.member?.name ? ` | ${props.data.member.name}` : ''}`, - [props.data?.member?.name], - ); - const ogTitle = useMemo( - () => `${props.packageName ?? 'discord.js'}${props.data?.member?.name ? ` | ${props.data.member.name}` : ''}`, - [props.packageName, props.data?.member?.name], - ); - const ogImage = useMemo( - () => resolveMember(props.packageName, props.data?.member), - [props.packageName, props.data?.member], - ); - - useEffect(() => { - setAsPathWithoutQueryAndAnchor(router.asPath.split('?')[0]?.split('#')[0] ?? ''); - }, [router.asPath]); - - if (router.isFallback) { - return null; - } - - // Just in case - // return ; - - return props.error ? ( -
{props.error}
- ) : ( - - - - {props.data?.member ? ( - <> - - {name} - - - - - - {member(props.data.member)} - - ) : props.data?.source ? ( -
- -
- ) : null} -
-
-
- ); -} - -export const config = { - unstable_includeFiles: [`../../packages/{brokers,builders,collection,proxy,rest,util,voice,ws}/README.md`], -}; diff --git a/apps/website/src/pages/docs/packages/[package]/index.tsx b/apps/website/src/pages/docs/packages/[package]/index.tsx deleted file mode 100644 index 9643a856b6ca..000000000000 --- a/apps/website/src/pages/docs/packages/[package]/index.tsx +++ /dev/null @@ -1,93 +0,0 @@ -import Link from 'next/link'; -import type { GetStaticPaths, GetStaticProps } from 'next/types'; -import { VscArrowLeft, VscArrowRight, VscVersions } from 'react-icons/vsc'; -import { PACKAGES } from '~/util/constants'; - -interface VersionProps { - data: { - versions: string[]; - }; - packageName: string; -} - -export const getStaticPaths: GetStaticPaths = () => { - const versions = PACKAGES.map((packageName) => ({ params: { package: packageName } })); - - return { - paths: versions, - fallback: false, - }; -}; - -export const getStaticProps: GetStaticProps = async ({ params }) => { - const packageName = params!.package as string; - - if (!PACKAGES.includes(packageName)) { - return { - notFound: true, - }; - } - - try { - const res = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`); - const data: string[] = await res.json(); - - if (!data.length) { - return { - notFound: true, - }; - } - - return { - props: { - packageName, - data: { - versions: data.reverse(), - }, - }, - revalidate: 3_600, - }; - } catch (error_) { - const error = error_ as Error; - console.error(error); - - return { - props: { - error: error.message, - }, - revalidate: 1, - }; - } -}; - -export default function VersionsRoute(props: Partial & { error?: string }) { - return props.error ? ( -
- {props.error} -
- ) : ( -
-
-

Select a version:

- {props.data?.versions.map((version) => ( - - -
-
- -

{version}

-
- -
-
- - )) ?? null} - - - Go back - - -
-
- ); -} diff --git a/apps/website/src/pages/docs/packages/index.tsx b/apps/website/src/pages/docs/packages/index.tsx deleted file mode 100644 index 1a3d50e4bcc7..000000000000 --- a/apps/website/src/pages/docs/packages/index.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { Button } from 'ariakit/button'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; -import type { GetStaticProps } from 'next/types'; -import { useCallback, type MouseEvent } from 'react'; -import { VscArrowLeft, VscArrowRight, VscPackage } from 'react-icons/vsc'; -import { PACKAGES } from '~/util/constants'; - -interface PackageProps { - data: { - versions: { packageName: string; version: string }[]; - }; -} - -export const getStaticProps: GetStaticProps = async () => { - try { - const versions = await Promise.all( - PACKAGES.map(async (pkg) => { - const response = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`); - const versions = await response.json(); - const latestVersion = versions.at(-2) ?? 'main'; - return { packageName: pkg, version: latestVersion }; - }), - ); - - return { - props: { - versions, - }, - revalidate: 3_600, - }; - } catch (error_) { - const error = error_ as Error; - console.error(error); - - return { - props: { - error: error.message, - }, - revalidate: 1, - }; - } -}; - -export default function PackagesRoute(props: Partial & { error?: string }) { - const router = useRouter(); - - const findLatestVersion = useCallback( - (pkg: string) => props.data?.versions.find((version) => version.packageName === pkg), - [props.data?.versions], - ); - - const handleClick = async (ev: MouseEvent, packageName: string) => { - ev.stopPropagation(); - void router.push(`/docs/packages/${packageName}`); - }; - - return props.error ? ( -
- {props.error} -
- ) : ( - - ); -} diff --git a/apps/website/src/pages/index.tsx b/apps/website/src/pages/index.tsx deleted file mode 100644 index 3e9e58c88b8e..000000000000 --- a/apps/website/src/pages/index.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import Image from 'next/future/image'; -import Link from 'next/link'; -import { FiExternalLink } from 'react-icons/fi'; -import vercelLogo from '../assets/powered-by-vercel.svg'; -import { SyntaxHighlighter } from '~/components/SyntaxHighlighter'; -import { CODE_EXAMPLE } from '~/util/constants'; - -export default function IndexRoute() { - return ( -
-
-
-

- The most popular way to build - Discord
bots. -

-

- discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It - takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code - significantly tidier and easier to comprehend. -

- -
- -
-
- - Vercel - -
-
- ); -} diff --git a/apps/website/src/styles/Button.tsx b/apps/website/src/styles/Button.tsx new file mode 100644 index 000000000000..439a2a07349f --- /dev/null +++ b/apps/website/src/styles/Button.tsx @@ -0,0 +1,17 @@ +import { cva } from 'class-variance-authority'; + +export const buttonVariants = cva( + 'h-11 flex flex-row transform-gpu cursor-pointer select-none appearance-none place-items-center rounded px-6 text-base font-semibold leading-none text-white no-underline outline-none active:translate-y-px focus:ring focus:ring-width-2 focus:ring-white gap-2', + { + variants: { + variant: { + primary: 'bg-blurple text-white border-0', + secondary: + 'bg-white text-gray-800 border-gray-400 border border-light-900 text-black transition duration-200 active:translate-y-px dark:border-dark-100 hover:border-black active:bg-light-300 dark:bg-dark-400 hover:bg-light-200 dark:text-white focus:ring focus:ring-width-2 focus:ring-blurple dark:active:bg-dark-200 dark:hover:bg-dark-300', + }, + }, + defaultVariants: { + variant: 'primary', + }, + }, +); diff --git a/apps/website/src/styles/cmdk.css b/apps/website/src/styles/cmdk.css index 1c47f4ddf1df..d175e54cfbcb 100644 --- a/apps/website/src/styles/cmdk.css +++ b/apps/website/src/styles/cmdk.css @@ -1,3 +1,3 @@ [data-backdrop] { - background-color: rgb(0 0 0 / 35%); + background-color: rgb(0 0 0 / 15%); } diff --git a/apps/website/src/styles/inter.css b/apps/website/src/styles/inter.css deleted file mode 100644 index 3108a7dd5978..000000000000 --- a/apps/website/src/styles/inter.css +++ /dev/null @@ -1,106 +0,0 @@ -@font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: url('/fonts/Inter-Light.woff2?v=3.19') format('woff2'); -} -@font-face { - font-family: 'Inter'; - font-style: italic; - font-weight: 300; - font-display: swap; - src: url('/fonts/Inter-LightItalic.woff2?v=3.19') format('woff2'); -} - -@font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: url('/fonts/Inter-Regular.woff2?v=3.19') format('woff2'); -} -@font-face { - font-family: 'Inter'; - font-style: italic; - font-weight: 400; - font-display: swap; - src: url('/fonts/Inter-Italic.woff2?v=3.19') format('woff2'); -} - -@font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: url('/fonts/Inter-Medium.woff2?v=3.19') format('woff2'); -} -@font-face { - font-family: 'Inter'; - font-style: italic; - font-weight: 500; - font-display: swap; - src: url('/fonts/Inter-MediumItalic.woff2?v=3.19') format('woff2'); -} - -@font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 600; - font-display: swap; - src: url('/fonts/Inter-SemiBold.woff2?v=3.19') format('woff2'); -} -@font-face { - font-family: 'Inter'; - font-style: italic; - font-weight: 600; - font-display: swap; - src: url('/fonts/Inter-SemiBoldItalic.woff2?v=3.19') format('woff2'); -} - -@font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 700; - font-display: swap; - src: url('/fonts/Inter-Bold.woff2?v=3.19') format('woff2'); -} -@font-face { - font-family: 'Inter'; - font-style: italic; - font-weight: 700; - font-display: swap; - src: url('/fonts/Inter-BoldItalic.woff2?v=3.19') format('woff2'); -} - -@font-face { - font-family: 'Inter'; - font-style: normal; - font-weight: 900; - font-display: swap; - src: url('/fonts/Inter-Black.woff2?v=3.19') format('woff2'); -} -@font-face { - font-family: 'Inter'; - font-style: italic; - font-weight: 900; - font-display: swap; - src: url('/fonts/Inter-BlackItalic.woff2?v=3.19') format('woff2'); -} - -@font-face { - font-family: 'Inter var'; - font-weight: 100 900; - font-display: swap; - font-style: normal; - font-named-instance: 'Regular'; - src: url('/fonts/Inter-roman.var.woff2?v=3.19') format('woff2'); -} -@font-face { - font-family: 'Inter var'; - font-weight: 100 900; - font-display: swap; - font-style: italic; - font-named-instance: 'Italic'; - src: url('/fonts/Inter-italic.var.woff2?v=3.19') format('woff2'); -} diff --git a/apps/website/src/styles/main.css b/apps/website/src/styles/main.css index 0691bff87d78..a9e7296d8504 100644 --- a/apps/website/src/styles/main.css +++ b/apps/website/src/styles/main.css @@ -1,26 +1,6 @@ -:root { - font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, - 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', - 'Noto Color Emoji'; - font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; -} - -@supports (font-variation-settings: normal) { - :root { - font-family: 'Inter var', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, - 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', - 'Noto Color Emoji'; - } -} - -html, body { - height: 100%; - color-scheme: light; -} - -#__next { - height: 100%; + font-family: var(--font-inter); + min-height: 100vh; } [data-theme='dark'] { @@ -35,15 +15,6 @@ body { display: none; } -pre[data-theme='light'] { - background: #ffffff; - border: 1px solid #dddddd; -} - -pre[data-theme='dark'] { - background: #1e1e1e; -} - pre { font-size: 13px !important; white-space: pre; @@ -59,5 +30,5 @@ pre { } code { - font-family: 'JetBrains Mono', monospace !important; + font-family: var(--font-mono); } diff --git a/apps/website/src/util/constants.ts b/apps/website/src/util/constants.ts index bc85a14f3397..cedd0d7ec632 100644 --- a/apps/website/src/util/constants.ts +++ b/apps/website/src/util/constants.ts @@ -1,22 +1,25 @@ -export const PACKAGES = ['brokers', 'builders', 'collection', 'proxy', 'rest', 'util', 'voice', 'ws']; +export const PACKAGES = [ + 'brokers', + 'builders', + 'collection', + 'core', + 'formatters', + 'next', + 'proxy', + 'rest', + 'util', + 'voice', + 'ws', +]; -export const DESCRIPTION = - "discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend."; - -export const CODE_EXAMPLE = `import { Client, GatewayIntentBits } from 'discord.js'; +export const N_RECENT_VERSIONS = 2; -const client = new Client({ intents: [GatewayIntentBits.Guilds] }); +export const OVERLOAD_SEPARATOR = ':'; -client.on('ready', () => { - console.log(\`Logged in as \${client.user.tag}!\`); -}); +export const METHOD_SEPARATOR = '#'; -client.on('interactionCreate', async (interaction) => { - if (!interaction.isChatInputCommand()) return; - - if (interaction.commandName === 'ping') { - await interaction.reply('Pong!'); - } -}); +export const DESCRIPTION = + "discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend."; -await client.login(TOKEN);`; +export const DISCORD_API_TYPES_VERSION = 'v10'; +export const DISCORD_API_TYPES_DOCS_URL = `https://discord-api-types.dev/api/discord-api-types-${DISCORD_API_TYPES_VERSION}`; diff --git a/apps/website/src/util/fetchMember.ts b/apps/website/src/util/fetchMember.ts new file mode 100644 index 000000000000..324e5b7e9c42 --- /dev/null +++ b/apps/website/src/util/fetchMember.ts @@ -0,0 +1,41 @@ +import { addPackageToModel } from '@discordjs/scripts'; +import { ApiModel, ApiFunction } from '@microsoft/api-extractor-model'; +import { notFound } from 'next/navigation'; +import { OVERLOAD_SEPARATOR, PACKAGES } from './constants'; +import { findMember, findMemberByKey } from './model'; +import { fetchModelJSON } from '~/app/docAPI'; + +export interface ItemRouteParams { + item: string; + package: string; + version: string; +} + +export async function fetchMember({ package: packageName, version: branchName = 'main', item }: ItemRouteParams) { + if (!PACKAGES.includes(packageName)) { + notFound(); + } + + const model = new ApiModel(); + + if (branchName === 'main') { + const modelJSONFiles = await Promise.all(PACKAGES.map(async (pkg) => fetchModelJSON(pkg, branchName))); + + for (const modelJSONFile of modelJSONFiles) { + addPackageToModel(model, modelJSONFile); + } + } else { + const modelJSON = await fetchModelJSON(packageName, branchName); + addPackageToModel(model, modelJSON); + } + + const [memberName, overloadIndex] = decodeURIComponent(item).split(OVERLOAD_SEPARATOR); + + // eslint-disable-next-line prefer-const + let { containerKey, displayName: name } = findMember(model, packageName, memberName) ?? {}; + if (name && overloadIndex && !Number.isNaN(Number.parseInt(overloadIndex, 10))) { + containerKey = ApiFunction.getContainerKey(name, Number.parseInt(overloadIndex, 10)); + } + + return memberName && containerKey ? findMemberByKey(model, packageName, containerKey) ?? null : null; +} diff --git a/apps/website/src/util/fetcher.ts b/apps/website/src/util/fetcher.ts index 5071b32999b1..884d108a66f1 100644 --- a/apps/website/src/util/fetcher.ts +++ b/apps/website/src/util/fetcher.ts @@ -1,4 +1,4 @@ export const fetcher = async (url: string) => { - const res = await fetch(url); + const res = await fetch(url, { next: { revalidate: 3_600 } }); return res.json(); }; diff --git a/apps/website/src/util/fonts.ts b/apps/website/src/util/fonts.ts new file mode 100644 index 000000000000..d60a63379962 --- /dev/null +++ b/apps/website/src/util/fonts.ts @@ -0,0 +1,13 @@ +import { Inter, JetBrains_Mono } from 'next/font/google'; + +export const inter = Inter({ + subsets: ['latin'], + display: 'swap', + variable: '--font-inter', +}); + +export const jetBrainsMono = JetBrains_Mono({ + subsets: ['latin'], + display: 'swap', + variable: '--font-mono', +}); diff --git a/apps/website/src/util/members.ts b/apps/website/src/util/members.ts new file mode 100644 index 000000000000..be6dc5f3c622 --- /dev/null +++ b/apps/website/src/util/members.ts @@ -0,0 +1,38 @@ +import type { ApiItem, ApiItemContainerMixin } from '@microsoft/api-extractor-model'; + +/** + * Resolves all inherited members (including merged members) of a given parent. + * + * @param parent - The parent to resolve the inherited members of. + * @param predicate - A predicate to filter the members by. + */ +export function resolveMembers( + parent: ApiItemContainerMixin, + predicate: (item: ApiItem) => item is T, +) { + const seenItems = new Set(); + const inheritedMembers = parent.findMembersWithInheritance().items.reduce((acc, item) => { + if (predicate(item) && !seenItems.has(item.displayName)) { + acc.push({ + item, + inherited: + item.parent?.containerKey === parent.containerKey + ? undefined + : (item.parent as ApiItemContainerMixin | undefined), + }); + + seenItems.add(item.displayName); + } + + return acc; + }, new Array<{ inherited?: ApiItemContainerMixin | undefined; item: T }>()); + + const mergedMembers = parent + .getMergedSiblings() + .filter((sibling) => sibling.containerKey !== parent.containerKey) + .flatMap((sibling) => (sibling as ApiItemContainerMixin).findMembersWithInheritance().items) + .filter((item) => predicate(item) && !seenItems.has(item.containerKey)) + .map((item) => ({ item: item as T, inherited: item.parent ? (item.parent as ApiItemContainerMixin) : undefined })); + + return [...inheritedMembers, ...mergedMembers]; +} diff --git a/apps/website/src/util/model.server.ts b/apps/website/src/util/model.server.ts deleted file mode 100644 index 360f8ccdc5ca..000000000000 --- a/apps/website/src/util/model.server.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { findPackage, ApiNodeJSONEncoder } from '@discordjs/api-extractor-utils'; -import type { ApiEntryPoint, ApiModel } from '@microsoft/api-extractor-model'; - -export function findMemberByKey(model: ApiModel, packageName: string, containerKey: string, version: string) { - const pkg = findPackage(model, packageName)!; - const member = (pkg.members[0] as ApiEntryPoint).tryGetMemberByKey(containerKey); - - if (!member) { - return undefined; - } - - return ApiNodeJSONEncoder.encode(model, member, version); -} - -export function findMember( - model: ApiModel, - packageName: string, - memberName: string | undefined, - version: string, -): ReturnType | undefined { - if (!memberName) { - return undefined; - } - - const pkg = findPackage(model, packageName)!; - const member = (pkg.members[0] as ApiEntryPoint).findMembersByName(memberName)[0]; - - if (!member) { - return undefined; - } - - return ApiNodeJSONEncoder.encode(model, member, version); -} diff --git a/apps/website/src/util/model.ts b/apps/website/src/util/model.ts new file mode 100644 index 000000000000..abf82196cf1e --- /dev/null +++ b/apps/website/src/util/model.ts @@ -0,0 +1,51 @@ +import type { + ApiDocumentedItem, + ApiEntryPoint, + ApiModel, + ApiParameterListMixin, + Excerpt, +} from '@microsoft/api-extractor-model'; +import type { DocSection } from '@microsoft/tsdoc'; + +export function findMemberByKey(model: ApiModel, packageName: string, containerKey: string) { + const pkg = model.tryGetPackageByName(`@discordjs/${packageName}`)!; + return (pkg.members[0] as ApiEntryPoint).tryGetMemberByKey(containerKey); +} + +export function findMember(model: ApiModel, packageName: string, memberName: string | undefined) { + if (!memberName) { + return undefined; + } + + const pkg = model.tryGetPackageByName(`@discordjs/${packageName}`)!; + return pkg.entryPoints[0]?.findMembersByName(memberName)[0]; +} + +interface ResolvedParameter { + description?: DocSection | undefined; + isOptional: boolean; + name: string; + parameterTypeExcerpt: Excerpt; +} + +/** + * This takes an api item with a parameter list and resolves the names and descriptions of all the parameters. + * + * @remarks + * This is different from accessing `Parameter#name` or `Parameter.tsdocBlockComment` as this method cross-references the associated tsdoc + * parameter names and descriptions and uses them as a higher precedence to the source code. + * @param item - The api item to resolve parameter data for + * @returns An array of parameters + */ +export function resolveParameters(item: ApiDocumentedItem & ApiParameterListMixin): ResolvedParameter[] { + return item.parameters.map((param, idx) => { + const tsdocAnalog = item.tsdocComment?.params.blocks[idx]; + + return { + name: param.tsdocParamBlock?.parameterName ?? tsdocAnalog?.parameterName ?? param.name, + description: param.tsdocParamBlock?.content ?? tsdocAnalog?.content, + isOptional: param.isOptional, + parameterTypeExcerpt: param.parameterTypeExcerpt, + }; + }); +} diff --git a/apps/website/src/util/summary.ts b/apps/website/src/util/summary.ts deleted file mode 100644 index 7b2d1cc80dea..000000000000 --- a/apps/website/src/util/summary.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { - ApiItemJSON, - DocNodeJSON, - DocCodeSpanJSON, - DocPlainTextJSON, - DocNodeContainerJSON, - DocLinkTagJSON, -} from '@discordjs/api-extractor-utils'; - -export function tryResolveDescription(member: ApiItemJSON) { - const { summary } = member!; - - if (!summary) { - return null; - } - - let retVal = ''; - - function recurseNodes(node: DocNodeJSON, emitMarkdownLinks = false) { - switch (node.kind) { - case 'CodeSpan': - retVal += (node as DocCodeSpanJSON).code; - break; - case 'LinkTag': { - const { text, urlDestination } = node as DocLinkTagJSON; - - if (text && urlDestination && emitMarkdownLinks) { - retVal += `[${text}](${urlDestination})`; - } else { - retVal += text ?? urlDestination ?? ''; - } - - break; - } - - case 'PlainText': - retVal += (node as DocPlainTextJSON).text; - break; - case 'Section': - case 'Paragraph': - for (const currentNode of (node as DocNodeContainerJSON).nodes) { - recurseNodes(currentNode); - } - - break; - default: - break; - } - } - - for (const node of summary.nodes) { - recurseNodes(node); - } - - if (retVal === '') { - return null; - } - - return retVal; -} diff --git a/apps/website/tsconfig.json b/apps/website/tsconfig.json index 4f5b62466a37..e1000b00c911 100644 --- a/apps/website/tsconfig.json +++ b/apps/website/tsconfig.json @@ -9,10 +9,18 @@ "allowJs": false, "incremental": true, "skipLibCheck": true, + "sourceMap": true, + "plugins": [ + { + "name": "next" + } + ], "paths": { "~/*": ["./src/*"] - } + }, + "strictNullChecks": true, + "moduleResolution": "node" }, - "include": ["src/**/*.ts", "src/**/*.tsx", "next-env.d.ts", "types.d.ts"], + "include": ["src/**/*.ts", "src/**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts"], "exclude": ["node_modules"] } diff --git a/apps/website/types.d.ts b/apps/website/types.d.ts deleted file mode 100644 index 35306c6fc9ae..000000000000 --- a/apps/website/types.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '*.css'; diff --git a/codecov.yml b/codecov.yml index 8b363613c007..9c76afdf62ae 100644 --- a/codecov.yml +++ b/codecov.yml @@ -15,6 +15,7 @@ coverage: flag_management: default_rules: + carryforward: true statuses: - type: project target: auto diff --git a/package.json b/package.json index a1fba1e57176..608444c333a2 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,20 @@ "private": true, "scripts": { "build": "turbo run build", + "build:affected": "turbo run build --filter='...[origin/main]'", + "build:apps": "turbo run build:local --filter='...{apps/*}'", + "build:apps:affected": "turbo run build:local --filter='...{apps/*}[origin/main]'", "test": "turbo run test --parallel", + "test:affected": "turbo run test --filter='...[origin/main]' --parallel", "lint": "turbo run lint --parallel", + "lint:affected": "turbo run lint --filter='...[origin/main]' --parallel", "format": "turbo run format --parallel", + "format:affected": "turbo run format --filter='...[origin/main]' --parallel", "fmt": "turbo run format --parallel", - "postinstall": "is-ci || husky install", + "fmt:affected": "turbo run format --filter='...[origin/main]' --parallel", "docs": "turbo run docs --parallel", + "docs:affected": "turbo run docs --filter='...[origin/main]' --parallel", + "postinstall": "is-ci || husky install", "update": "yarn upgrade-interactive", "create-package": "node packages/scripts/src/packageScript.mjs" }, @@ -38,22 +46,30 @@ }, "homepage": "https://discord.js.org", "devDependencies": { - "@commitlint/cli": "^17.1.2", - "@commitlint/config-angular": "^17.1.0", - "@favware/cliff-jumper": "^1.8.8", - "@favware/npm-deprecate": "^1.0.5", + "@commitlint/cli": "^17.6.3", + "@commitlint/config-angular": "^17.6.3", + "@favware/cliff-jumper": "^2.0.0", + "@favware/npm-deprecate": "^1.0.7", "conventional-changelog-cli": "^2.2.2", - "husky": "^8.0.1", + "husky": "^8.0.3", "is-ci": "^3.0.1", - "lint-staged": "^13.0.3", - "tsup": "^6.3.0", - "turbo": "^1.5.6", - "typescript": "^4.8.4", - "unocss": "^0.45.30", - "vitest": "^0.24.3" + "lint-staged": "^13.2.2", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "unocss": "^0.52.3", + "vercel": "^29.4.0", + "vitest": "^0.31.1" }, "resolutions": { - "@microsoft/tsdoc-config": "patch:@microsoft/tsdoc-config@npm:0.16.1#.yarn/patches/@microsoft-tsdoc-config-npm-0.16.1-81031b1bbf.patch" + "@microsoft/tsdoc-config@~0.16.1": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch", + "@microsoft/tsdoc-config@0.16.2": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch", + "yaml@2.2.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch", + "yaml@^2.2.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch", + "yaml@^1.10.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch", + "yaml@^1.10.0": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch", + "yaml@^2.1.1": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch", + "tsup@^6.7.0": "patch:tsup@npm%3A6.7.0#./.yarn/patches/tsup-npm-6.7.0-5093540b93.patch" }, "engines": { "node": ">=16.9.0" @@ -62,5 +78,5 @@ "apps/*", "packages/*" ], - "packageManager": "yarn@3.2.4" + "packageManager": "yarn@3.5.1" } diff --git a/packages/actions/.gitignore b/packages/actions/.gitignore index 69227d965403..8150f3511c2e 100644 --- a/packages/actions/.gitignore +++ b/packages/actions/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,15 +15,9 @@ pids .env # Dist -dist/ -typings/ - -docs/**/* -!docs/index.yml -!docs/README.md -!docs/examples/ -!docs/examples/*.md +dist # Miscellaneous -.tmp/ -coverage/ +.turbo +.tmp +coverage diff --git a/packages/actions/.lintstagedrc.js b/packages/actions/.lintstagedrc.cjs similarity index 100% rename from packages/actions/.lintstagedrc.js rename to packages/actions/.lintstagedrc.cjs diff --git a/packages/actions/.prettierignore b/packages/actions/.prettierignore index 8b94c7d45e03..76348206aa96 100644 --- a/packages/actions/.prettierignore +++ b/packages/actions/.prettierignore @@ -1,8 +1,3 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist diff --git a/packages/actions/.prettierrc.js b/packages/actions/.prettierrc.cjs similarity index 100% rename from packages/actions/.prettierrc.js rename to packages/actions/.prettierrc.cjs diff --git a/packages/actions/README.md b/packages/actions/README.md index ea818daad5ac..6f664f8f1a98 100644 --- a/packages/actions/README.md +++ b/packages/actions/README.md @@ -10,15 +10,15 @@

Vercel + Cloudflare Workers

## Links - [Website][website] ([source][website-source]) -- [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -26,16 +26,16 @@ ## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/actions/__tests__/formatTag.test.ts b/packages/actions/__tests__/formatTag.test.ts index 47cc8ffd735b..898349c4a0bd 100644 --- a/packages/actions/__tests__/formatTag.test.ts +++ b/packages/actions/__tests__/formatTag.test.ts @@ -3,16 +3,29 @@ import { formatTag } from '../src/index.js'; describe('Format Tag', () => { test('GIVEN tag with a prefix THEN format tag to not contain the prefix', () => { - expect(formatTag('@discordjs/rest@0.4.0')).toEqual({ package: 'rest', semver: '0.4.0' }); - expect(formatTag('@discordjs/collection@0.6.0')).toEqual({ package: 'collection', semver: '0.6.0' }); - expect(formatTag('@discordjs/proxy@0.1.0')).toEqual({ package: 'proxy', semver: '0.1.0' }); - expect(formatTag('@discordjs/builders@0.13.0')).toEqual({ package: 'builders', semver: '0.13.0' }); - expect(formatTag('@discordjs/voice@0.9.0')).toEqual({ package: 'voice', semver: '0.9.0' }); + expect(formatTag('@discordjs/rest@0.4.0')).toEqual({ isSubpackage: true, package: 'rest', semver: '0.4.0' }); + expect(formatTag('@discordjs/collection@0.6.0')).toEqual({ + isSubpackage: true, + package: 'collection', + semver: '0.6.0', + }); + expect(formatTag('@discordjs/proxy@0.1.0')).toEqual({ isSubpackage: true, package: 'proxy', semver: '0.1.0' }); + expect(formatTag('@discordjs/builders@0.13.0')).toEqual({ + isSubpackage: true, + package: 'builders', + semver: '0.13.0', + }); + expect(formatTag('@discordjs/voice@0.9.0')).toEqual({ isSubpackage: true, package: 'voice', semver: '0.9.0' }); }); test('GIVEN tag with no prefix THEN return tag', () => { - expect(formatTag('13.5.1')).toEqual({ package: 'discord.js', semver: '13.5.1' }); - expect(formatTag('13.7.0')).toEqual({ package: 'discord.js', semver: '13.7.0' }); + expect(formatTag('13.5.1')).toEqual({ isSubpackage: false, package: 'discord.js', semver: '13.5.1' }); + expect(formatTag('13.7.0')).toEqual({ isSubpackage: false, package: 'discord.js', semver: '13.7.0' }); + expect(formatTag('create-discord-bot@1.0.0')).toEqual({ + isSubpackage: false, + package: 'create-discord-bot', + semver: '1.0.0', + }); }); test('GIVEN no or invalid tag THEN return null', () => { diff --git a/packages/actions/package.json b/packages/actions/package.json index d95dfbbf91b8..72a5e8bee758 100644 --- a/packages/actions/package.json +++ b/packages/actions/package.json @@ -10,6 +10,7 @@ "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format" }, + "type": "module", "main": "./dist/index.mjs", "types": "./dist/index.d.ts", "directories": { @@ -32,7 +33,8 @@ ], "repository": { "type": "git", - "url": "https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/actions" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" @@ -40,19 +42,23 @@ "homepage": "https://discord.js.org", "dependencies": { "@actions/core": "^1.10.0", - "tslib": "^2.4.0" + "@actions/glob": "^0.4.0", + "@planetscale/database": "^1.7.0", + "tslib": "^2.5.2", + "undici": "^5.22.1" }, "devDependencies": { - "@types/node": "16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@types/node": "16.18.32", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/actions/src/formatTag/action.yml b/packages/actions/src/formatTag/action.yml index 004beb5d5331..64299b046adf 100644 --- a/packages/actions/src/formatTag/action.yml +++ b/packages/actions/src/formatTag/action.yml @@ -5,10 +5,12 @@ inputs: description: 'The input tag' required: true outputs: + subpackage: + description: 'Whether this tag is a subpackage tag' package: description: 'The package string that was extracted from this tag' semver: description: 'The semver string that was extracted from this tag' runs: using: node16 - main: ../../dist/formatTag/index.mjs + main: ../../dist/formatTag/index.js diff --git a/packages/actions/src/formatTag/formatTag.ts b/packages/actions/src/formatTag/formatTag.ts index c1c792fe505d..cd4e531326ac 100644 --- a/packages/actions/src/formatTag/formatTag.ts +++ b/packages/actions/src/formatTag/formatTag.ts @@ -1,11 +1,17 @@ export function formatTag(tag: string) { - // eslint-disable-next-line unicorn/no-unsafe-regex, prefer-named-capture-group - const parsed = /(^@.*\/(?.*)@v?)?(?\d+.\d+.\d+)-?.*/.exec(tag); + // eslint-disable-next-line unicorn/no-unsafe-regex + const parsed = /(?:^@.*\/(?.*)@v?)?(?\d+.\d+.\d+)-?.*/.exec(tag); + const parsedPackage = /(?.*)@v?-?.*/.exec(tag); if (parsed?.groups) { + const isSubpackage = typeof parsed.groups.package === 'string'; + const pkg = isSubpackage ? parsed.groups.package : parsedPackage?.groups?.package ?? 'discord.js'; + const semver = parsed.groups.semver; + return { - package: parsed.groups.package ?? 'discord.js', - semver: parsed.groups.semver, + isSubpackage, + package: pkg, + semver, }; } diff --git a/packages/actions/src/formatTag/index.ts b/packages/actions/src/formatTag/index.ts index 031b89dc9b43..d6e98c0ed045 100644 --- a/packages/actions/src/formatTag/index.ts +++ b/packages/actions/src/formatTag/index.ts @@ -5,6 +5,7 @@ const tag = getInput('tag', { required: true }); const parsed = formatTag(tag); if (parsed) { + setOutput('subpackage', parsed.isSubpackage); setOutput('package', parsed.package); setOutput('semver', parsed.semver); } diff --git a/packages/actions/src/uploadCoverage/action.yml b/packages/actions/src/uploadCoverage/action.yml index f45d0e70ba65..3652a560b828 100644 --- a/packages/actions/src/uploadCoverage/action.yml +++ b/packages/actions/src/uploadCoverage/action.yml @@ -39,6 +39,12 @@ runs: files: ./packages/discord.js/coverage/cobertura-coverage.xml flags: discord.js + - name: Upload Next Coverage + uses: codecov/codecov-action@v3 + with: + files: ./packages/next/coverage/cobertura-coverage.xml + flags: next + - name: Upload Proxy Coverage uses: codecov/codecov-action@v3 with: diff --git a/packages/actions/src/uploadDocumentation/action.yml b/packages/actions/src/uploadDocumentation/action.yml new file mode 100644 index 000000000000..3e0ff978b12b --- /dev/null +++ b/packages/actions/src/uploadDocumentation/action.yml @@ -0,0 +1,10 @@ +name: 'Upload documentation' +description: 'Uploads the docs.api.json file to a planetscale database' +inputs: + package: + description: 'The package string' + version: + description: 'The semver string' +runs: + using: node16 + main: ../../dist/uploadDocumentation/index.js diff --git a/packages/actions/src/uploadDocumentation/index.ts b/packages/actions/src/uploadDocumentation/index.ts new file mode 100644 index 000000000000..ff3475e61692 --- /dev/null +++ b/packages/actions/src/uploadDocumentation/index.ts @@ -0,0 +1,30 @@ +import { readFile } from 'node:fs/promises'; +import process from 'node:process'; +import { getInput, setFailed } from '@actions/core'; +import { create } from '@actions/glob'; +import { connect } from '@planetscale/database'; +import { fetch } from 'undici'; + +if (!process.env.DATABASE_URL) { + setFailed('DATABASE_URL is not set'); +} + +const pkg = getInput('package') || '*'; +const version = getInput('version') || 'main'; + +const sql = connect({ + fetch, + url: process.env.DATABASE_URL!, +}); + +const globber = await create(`packages/${pkg}/docs/docs.api.json`); +for await (const file of globber.globGenerator()) { + const data = await readFile(file, 'utf8'); + try { + console.log(`Uploading ${file} with ${version}...`); + await sql.execute('replace into documentation (version, data) values (?, ?)', [version, data]); + } catch (error) { + const err = error as Error; + setFailed(err.message); + } +} diff --git a/packages/actions/tsup.config.js b/packages/actions/tsup.config.ts similarity index 59% rename from packages/actions/tsup.config.js rename to packages/actions/tsup.config.ts index 5612dfe342f6..2449486b8fdf 100644 --- a/packages/actions/tsup.config.js +++ b/packages/actions/tsup.config.ts @@ -1,7 +1,7 @@ import { createTsupConfig } from '../../tsup.config.js'; export default createTsupConfig({ - entry: ['src/index.ts', 'src/formatTag/index.ts'], + entry: ['src/index.ts', 'src/formatTag/index.ts', 'src/uploadDocumentation/index.ts'], format: ['esm'], minify: true, }); diff --git a/packages/api-extractor-utils/.gitignore b/packages/api-extractor-utils/.gitignore index 86b93e929ae6..538c22f97306 100644 --- a/packages/api-extractor-utils/.gitignore +++ b/packages/api-extractor-utils/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,8 @@ pids .env # Dist -dist/ -typings/ -docs/**/* -!docs/index.json -!docs/README.md +dist # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp diff --git a/packages/api-extractor-utils/.prettierignore b/packages/api-extractor-utils/.prettierignore index 8b94c7d45e03..76348206aa96 100644 --- a/packages/api-extractor-utils/.prettierignore +++ b/packages/api-extractor-utils/.prettierignore @@ -1,8 +1,3 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist diff --git a/packages/api-extractor-utils/README.md b/packages/api-extractor-utils/README.md index 4861c268b009..4e526f5083e7 100644 --- a/packages/api-extractor-utils/README.md +++ b/packages/api-extractor-utils/README.md @@ -10,15 +10,15 @@

Vercel + Cloudflare Workers

## Links - [Website][website] ([source][website-source]) -- [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -26,16 +26,16 @@ ## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/api-extractor-utils/package.json b/packages/api-extractor-utils/package.json index 7b4e4fae615e..cb0859b472e7 100644 --- a/packages/api-extractor-utils/package.json +++ b/packages/api-extractor-utils/package.json @@ -24,25 +24,27 @@ "license": "Apache-2.0", "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/api-extractor-utils" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { - "@microsoft/api-extractor-model": "7.24.0", - "@microsoft/tsdoc": "0.14.1" + "@microsoft/api-extractor-model": "7.27.0", + "@microsoft/tsdoc": "0.14.2" }, "devDependencies": { - "@types/node": "16.11.68", + "@types/node": "16.18.32", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4" }, "engines": { "node": ">=16.9.0" diff --git a/packages/api-extractor-utils/src/ApiNodeJSONEncoder.ts b/packages/api-extractor-utils/src/ApiNodeJSONEncoder.ts index ca1c64f0ac37..e237272b5c03 100644 --- a/packages/api-extractor-utils/src/ApiNodeJSONEncoder.ts +++ b/packages/api-extractor-utils/src/ApiNodeJSONEncoder.ts @@ -1,24 +1,23 @@ -import type { ApiReturnTypeMixin } from '@microsoft/api-extractor-model'; -import { - type ApiModel, - ApiDeclaredItem, - type ApiPropertyItem, - type ApiMethod, - type ApiParameterListMixin, - type ApiTypeParameterListMixin, - type ApiClass, - type ApiFunction, - ApiItemKind, - type ApiTypeAlias, - type ApiEnum, - type ApiInterface, - type ApiMethodSignature, - type ApiPropertySignature, - type ApiVariable, - type ApiItem, - type ApiConstructor, - type ApiItemContainerMixin, +import type { + ApiModel, + ApiPropertyItem, + ApiMethod, + ApiParameterListMixin, + ApiTypeParameterListMixin, + ApiClass, + ApiFunction, + ApiTypeAlias, + ApiEnum, + ApiInterface, + ApiMethodSignature, + ApiPropertySignature, + ApiVariable, + ApiItem, + ApiConstructor, + ApiItemContainerMixin, + ApiReturnTypeMixin, } from '@microsoft/api-extractor-model'; +import { ApiDeclaredItem, ApiItemKind } from '@microsoft/api-extractor-model'; import { generateTypeParamData } from './TypeParameterJSONEncoder.js'; import { type TokenDocumentation, resolveName, genReference, genToken, genParameter, generatePath } from './parse.js'; import type { DocBlockJSON } from './tsdoc/CommentBlock.js'; diff --git a/packages/api-extractor-utils/src/tsdoc/CommentBlock.ts b/packages/api-extractor-utils/src/tsdoc/CommentBlock.ts index 2f7a039a5d0c..09b4de7533a5 100644 --- a/packages/api-extractor-utils/src/tsdoc/CommentBlock.ts +++ b/packages/api-extractor-utils/src/tsdoc/CommentBlock.ts @@ -2,7 +2,7 @@ import type { ApiModel, ApiItem } from '@microsoft/api-extractor-model'; import type { DocBlock } from '@microsoft/tsdoc'; import { blockTag, type DocBlockTagJSON } from './CommentBlockTag.js'; import { type AnyDocNodeJSON, type DocNodeJSON, node } from './CommentNode.js'; -import { createCommentNode } from '.'; +import { createCommentNode } from './index.js'; export interface DocBlockJSON extends DocNodeJSON { content: AnyDocNodeJSON[]; diff --git a/packages/api-extractor-utils/src/tsdoc/CommentNodeContainer.ts b/packages/api-extractor-utils/src/tsdoc/CommentNodeContainer.ts index 294d6843ed97..28c43e86fd15 100644 --- a/packages/api-extractor-utils/src/tsdoc/CommentNodeContainer.ts +++ b/packages/api-extractor-utils/src/tsdoc/CommentNodeContainer.ts @@ -1,7 +1,7 @@ import type { ApiItem, ApiModel } from '@microsoft/api-extractor-model'; import type { DocNodeContainer } from '@microsoft/tsdoc'; import { type AnyDocNodeJSON, type DocNodeJSON, node } from './CommentNode.js'; -import { createCommentNode } from '.'; +import { createCommentNode } from './index.js'; export interface DocNodeContainerJSON extends DocNodeJSON { nodes: AnyDocNodeJSON[]; diff --git a/packages/api-extractor-utils/src/tsdoc/RootComment.ts b/packages/api-extractor-utils/src/tsdoc/RootComment.ts index 19f10d85f985..cf503d296490 100644 --- a/packages/api-extractor-utils/src/tsdoc/RootComment.ts +++ b/packages/api-extractor-utils/src/tsdoc/RootComment.ts @@ -2,7 +2,7 @@ import type { ApiItem, ApiModel } from '@microsoft/api-extractor-model'; import type { DocComment } from '@microsoft/tsdoc'; import { block, type DocBlockJSON } from './CommentBlock.js'; import { type DocNodeJSON, node } from './CommentNode.js'; -import { createCommentNode } from '.'; +import { createCommentNode } from './index.js'; export interface DocCommentJSON extends DocNodeJSON { customBlocks: DocBlockJSON[]; diff --git a/packages/api-extractor-utils/tsup.config.js b/packages/api-extractor-utils/tsup.config.ts similarity index 100% rename from packages/api-extractor-utils/tsup.config.js rename to packages/api-extractor-utils/tsup.config.ts diff --git a/packages/brokers/.gitignore b/packages/brokers/.gitignore index 86b93e929ae6..90500960f32b 100644 --- a/packages/brokers/.gitignore +++ b/packages/brokers/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,14 @@ pids .env # Dist -dist/ -typings/ +dist +dist-docs + +# Docs docs/**/* -!docs/index.json !docs/README.md # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp +coverage diff --git a/packages/brokers/.prettierignore b/packages/brokers/.prettierignore index 8b94c7d45e03..fc03103c7b8c 100644 --- a/packages/brokers/.prettierignore +++ b/packages/brokers/.prettierignore @@ -1,8 +1,6 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/brokers/CHANGELOG.md b/packages/brokers/CHANGELOG.md new file mode 100644 index 000000000000..ec1c091f4c9f --- /dev/null +++ b/packages/brokers/CHANGELOG.md @@ -0,0 +1,38 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +# [@discordjs/brokers@0.2.1](https://github.com/discordjs/discord.js/compare/@discordjs/brokers@0.2.0...@discordjs/brokers@0.2.1) - (2023-05-01) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae)) + +# [@discordjs/brokers@0.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/brokers@0.1.0...@discordjs/brokers@0.2.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) +- **WebSocketShard:** Proper error bubbling (#9119) ([9681f34](https://github.com/discordjs/discord.js/commit/9681f348770b0e2ff9b7c96b1c30575dd950e2ed)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) + +# [@discordjs/brokers@0.1.0](https://github.com/discordjs/discord.js/tree/@discordjs/brokers@0.1.0) - (2022-11-23) + +## Bug Fixes + +- **brokers:** Publish the scripts folder (#8794) ([0bcc18a](https://github.com/discordjs/discord.js/commit/0bcc18a0bdd8f1e1ebb974126a460d2743547b34)) +- **BaseRedisBroker:** Proper import path to lua script (#8776) ([e7cbc1b](https://github.com/discordjs/discord.js/commit/e7cbc1bf111b09b64accfd95e82ad9f3a408fc4c)) + +## Features + +- @discordjs/brokers (#8548) ([bf9aa18](https://github.com/discordjs/discord.js/commit/bf9aa1858dab2e1bca3be390ce2392b99d208dbf)) + diff --git a/packages/brokers/README.md b/packages/brokers/README.md index 33b7e60fb7a4..e0d6da045058 100644 --- a/packages/brokers/README.md +++ b/packages/brokers/README.md @@ -13,6 +13,7 @@

Vercel + Cloudflare Workers

@@ -24,7 +25,7 @@ **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install @discordjs/brokers yarn add @discordjs/brokers pnpm add @discordjs/brokers @@ -88,7 +89,7 @@ await broker.subscribe('responders', ['testcall']); - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -103,12 +104,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/brokers +[documentation]: https://discord.js.org/docs/packages/brokers/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/brokers/api-extractor-docs.json b/packages/brokers/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/brokers/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/brokers/api-extractor.json b/packages/brokers/api-extractor.json index bc73f2cc022e..f1adb5b8d4bc 100644 --- a/packages/brokers/api-extractor.json +++ b/packages/brokers/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/brokers" + } } diff --git a/packages/brokers/cliff.toml b/packages/brokers/cliff.toml index 56402e3f6efd..c2a90ae849a4 100644 --- a/packages/brokers/cliff.toml +++ b/packages/brokers/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/brokers@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/brokers/docs/README.md b/packages/brokers/docs/README.md index 88e2e10f72f2..29247c8cea21 100644 --- a/packages/brokers/docs/README.md +++ b/packages/brokers/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/brokers) +## [View the documentation here.](https://discord.js.org/docs/packages/brokers/main) diff --git a/packages/brokers/docs/index.json b/packages/brokers/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/brokers/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/brokers/package.json b/packages/brokers/package.json index dcd626c2e41d..287fd53de540 100644 --- a/packages/brokers/package.json +++ b/packages/brokers/package.json @@ -1,14 +1,15 @@ { "name": "@discordjs/brokers", - "version": "0.1.0", + "version": "0.2.1", "description": "Powerful set of message brokers", "scripts": { "test": "vitest run", "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn lint && yarn test && yarn build", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/brokers/*'", "release": "cliff-jumper" @@ -17,9 +18,9 @@ "module": "./dist/index.mjs", "typings": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src", @@ -49,30 +50,32 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/brokers" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { - "@msgpack/msgpack": "^2.8.0", - "@vladfrangu/async_event_emitter": "^2.1.2", - "ioredis": "^5.2.3" + "@msgpack/msgpack": "^3.0.0-beta2", + "@vladfrangu/async_event_emitter": "^2.2.2", + "ioredis": "^5.3.2" }, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/node": "^16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "16.18.32", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/brokers/src/brokers/Broker.ts b/packages/brokers/src/brokers/Broker.ts index 40c31f3b2ba4..7664051cd767 100644 --- a/packages/brokers/src/brokers/Broker.ts +++ b/packages/brokers/src/brokers/Broker.ts @@ -26,7 +26,9 @@ export interface BaseBrokerOptions { */ maxChunk?: number; /** - * Unique consumer name. See: https://redis.io/commands/xreadgroup/ + * Unique consumer name. + * + * @see {@link https://redis.io/commands/xreadgroup/} */ name?: string; } @@ -34,7 +36,7 @@ export interface BaseBrokerOptions { /** * Default broker options */ -export const DefaultBrokerOptions: Required = { +export const DefaultBrokerOptions = { name: randomBytes(20).toString('hex'), maxChunk: 10, blockTimeout: 5_000, @@ -43,7 +45,7 @@ export const DefaultBrokerOptions: Required = { return Buffer.from(encoded.buffer, encoded.byteOffset, encoded.byteLength); }, decode: (data): unknown => decode(data), -}; +} as const satisfies Required; export type ToEventMap< TRecord extends Record, diff --git a/packages/brokers/src/brokers/redis/BaseRedis.ts b/packages/brokers/src/brokers/redis/BaseRedis.ts index 1e95913b4c05..e13acdd57c2d 100644 --- a/packages/brokers/src/brokers/redis/BaseRedis.ts +++ b/packages/brokers/src/brokers/redis/BaseRedis.ts @@ -32,7 +32,7 @@ export abstract class BaseRedisBroker> implements IBaseBroker { /** - * Used for Redis queues, see the 3rd argument taken by {@link https://redis.io/commands/xadd | xadd } + * Used for Redis queues, see the 3rd argument taken by {@link https://redis.io/commands/xadd | xadd} */ public static readonly STREAM_DATA_KEY = 'data'; diff --git a/packages/brokers/src/brokers/redis/RPCRedis.ts b/packages/brokers/src/brokers/redis/RPCRedis.ts index 5aed520d9762..eb06109bb89e 100644 --- a/packages/brokers/src/brokers/redis/RPCRedis.ts +++ b/packages/brokers/src/brokers/redis/RPCRedis.ts @@ -21,10 +21,10 @@ export interface RPCRedisBrokerOptions extends RedisBrokerOptions { /** * Default values used for the {@link RPCRedisBrokerOptions} */ -export const DefaultRPCRedisBrokerOptions: Required> = { +export const DefaultRPCRedisBrokerOptions = { ...DefaultBrokerOptions, timeout: 5_000, -}; +} as const satisfies Required>; /** * RPC broker powered by Redis diff --git a/packages/brokers/tsconfig.docs.json b/packages/brokers/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/brokers/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/brokers/tsup.config.js b/packages/brokers/tsup.config.ts similarity index 100% rename from packages/brokers/tsup.config.js rename to packages/brokers/tsup.config.ts diff --git a/packages/builders/.gitignore b/packages/builders/.gitignore index 50a709e10bc1..8664763c9bb3 100644 --- a/packages/builders/.gitignore +++ b/packages/builders/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,15 +15,15 @@ pids .env # Dist -dist/ -typings/ +dist +dist-docs +# Docs docs/**/* -!docs/index.json !docs/README.md -!docs/examples/ -!docs/examples/*.md +!docs/examples/**/* # Miscellaneous -.tmp/ -coverage/ +.turbo +.tmp +coverage diff --git a/packages/builders/.prettierignore b/packages/builders/.prettierignore index 8b94c7d45e03..fc03103c7b8c 100644 --- a/packages/builders/.prettierignore +++ b/packages/builders/.prettierignore @@ -1,8 +1,6 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/builders/CHANGELOG.md b/packages/builders/CHANGELOG.md index 5f927a2ee475..de5bb4f386f3 100644 --- a/packages/builders/CHANGELOG.md +++ b/packages/builders/CHANGELOG.md @@ -2,6 +2,85 @@ All notable changes to this project will be documented in this file. +# [@discordjs/builders@1.6.3](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.2...@discordjs/builders@1.6.3) - (2023-05-01) + +## Refactor + +- Remove `@discordjs/util` re-export (#9488) ([54ceedf](https://github.com/discordjs/discord.js/commit/54ceedf6c535d4641643d4106b6286cbef09de4a)) + +# [@discordjs/builders@1.6.2](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.1...@discordjs/builders@1.6.2) - (2023-05-01) + +## Bug Fixes + +- **BaseSelectMenuBuilder:** Modify class to be `abstract` (#9358) ([ca4de2d](https://github.com/discordjs/discord.js/commit/ca4de2d9c6bc204e85d1b7eae7eabd23dbeb4475)) +- Correct `@link` tags that involve parents (#9351) ([fbbce3e](https://github.com/discordjs/discord.js/commit/fbbce3eb4ba20bc0c4806ca2259d1f86001594be)) +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- **builders:** Add some basic documentation (#9359) ([8073561](https://github.com/discordjs/discord.js/commit/8073561824f911d1a18d0b4f1de39f452bc69fa9)) +- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae)) + +# [@discordjs/builders@1.6.2](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.1...@discordjs/builders@1.6.2) - (2023-05-01) + +## Bug Fixes + +- **BaseSelectMenuBuilder:** Modify class to be `abstract` (#9358) ([ca4de2d](https://github.com/discordjs/discord.js/commit/ca4de2d9c6bc204e85d1b7eae7eabd23dbeb4475)) +- Correct `@link` tags that involve parents (#9351) ([fbbce3e](https://github.com/discordjs/discord.js/commit/fbbce3eb4ba20bc0c4806ca2259d1f86001594be)) +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- **builders:** Add some basic documentation (#9359) ([8073561](https://github.com/discordjs/discord.js/commit/8073561824f911d1a18d0b4f1de39f452bc69fa9)) +- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae)) + +# [@discordjs/builders@1.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.5.0...@discordjs/builders@1.6.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +# [@discordjs/builders@1.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.4.0...@discordjs/builders@1.5.0) - (2023-03-12) + +## Documentation + +- **EmbedBuilder#spliceFields:** Fix a typo (#9159) ([4367ab9](https://github.com/discordjs/discord.js/commit/4367ab930227048868db3ed8437f6c4507ff32e1)) +- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28)) + +## Features + +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) +- **StringSelectMenu:** Add `spliceOptions()` (#8937) ([a6941d5](https://github.com/discordjs/discord.js/commit/a6941d536ce24ed2b5446a154cbc886b2b97c63a)) +- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8)) +- Add `@discordjs/formatters` (#8889) ([3fca638](https://github.com/discordjs/discord.js/commit/3fca638a8470dcea2f79ddb9f18526dbc0017c88)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +# [@discordjs/builders@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.3.0...@discordjs/builders@1.4.0) - (2022-11-28) + +## Bug Fixes + +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Features + +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) +- Allow punctuation characters in context menus (#8783) ([b521366](https://github.com/discordjs/discord.js/commit/b5213664fa66746daab1673ebe2adf2db3d1522c)) + +## Typings + +- **Formatters:** Allow boolean in `formatEmoji` (#8823) ([ec37f13](https://github.com/discordjs/discord.js/commit/ec37f137fd4fca0fdbdb8a5c83abf32362a8f285)) + # [@discordjs/builders@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.2.0...@discordjs/builders@1.3.0) - (2022-10-08) ## Bug Fixes diff --git a/packages/builders/README.md b/packages/builders/README.md index 59508dd11ba1..dd6661387b94 100644 --- a/packages/builders/README.md +++ b/packages/builders/README.md @@ -13,14 +13,19 @@

Vercel + Cloudflare Workers

+## About + +`@discordjs/builders` is a utility package for easily building Discord API payloads. + ## Installation **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install @discordjs/builders yarn add @discordjs/builders pnpm add @discordjs/builders @@ -28,16 +33,14 @@ pnpm add @discordjs/builders ## Examples -Here are some examples for the builders and utilities you can find in this package: - -- [Slash Command Builders][example] +You can find examples of how to use the builders in the [Slash Command Builders][example] examples. ## Links - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -52,13 +55,12 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. [example]: https://github.com/discordjs/discord.js/blob/main/packages/builders/docs/examples/Slash%20Command%20Builders.md -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/builders +[documentation]: https://discord.js.org/docs/packages/builders/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/builders/__tests__/components/button.test.ts b/packages/builders/__tests__/components/button.test.ts index eb66b2613500..29da7b4720b0 100644 --- a/packages/builders/__tests__/components/button.test.ts +++ b/packages/builders/__tests__/components/button.test.ts @@ -101,6 +101,7 @@ describe('Button Components', () => { button.toJSON(); }).toThrowError(); + // @ts-expect-error: Invalid style expect(() => buttonComponent().setStyle(24)).toThrowError(); expect(() => buttonComponent().setLabel(longStr)).toThrowError(); // @ts-expect-error: Invalid parameter for disabled diff --git a/packages/builders/__tests__/components/selectMenu.test.ts b/packages/builders/__tests__/components/selectMenu.test.ts index f7ab28144918..6e0c887dc274 100644 --- a/packages/builders/__tests__/components/selectMenu.test.ts +++ b/packages/builders/__tests__/components/selectMenu.test.ts @@ -29,6 +29,20 @@ const selectMenuData: APISelectMenuComponent = { options: [selectMenuOptionData], }; +function makeStringSelectMenuWithOptions() { + const selectMenu = new StringSelectMenuBuilder(); + selectMenu.addOptions( + { label: 'foo', value: 'bar' }, + { label: 'foo2', value: 'bar2' }, + { label: 'foo3', value: 'bar3' }, + ); + return selectMenu; +} + +function mapStringSelectMenuOptionBuildersToJson(selectMenu: StringSelectMenuBuilder) { + return selectMenu.options.map((option) => option.toJSON()); +} + describe('Select Menu Components', () => { describe('Assertion Tests', () => { test('GIVEN valid inputs THEN Select Menu does not throw', () => { @@ -176,5 +190,40 @@ describe('Select Menu Components', () => { ).toEqual(selectMenuData); expect(new StringSelectMenuOptionBuilder(selectMenuOptionData).toJSON()).toEqual(selectMenuOptionData); }); + + test('GIVEN a StringSelectMenuBuilder using StringSelectMenuBuilder#spliceOptions works', () => { + expect( + mapStringSelectMenuOptionBuildersToJson(makeStringSelectMenuWithOptions().spliceOptions(0, 1)), + ).toStrictEqual([ + { label: 'foo2', value: 'bar2' }, + { label: 'foo3', value: 'bar3' }, + ]); + + expect( + mapStringSelectMenuOptionBuildersToJson( + makeStringSelectMenuWithOptions().spliceOptions(0, 1, selectMenuOptionData), + ), + ).toStrictEqual([selectMenuOptionData, { label: 'foo2', value: 'bar2' }, { label: 'foo3', value: 'bar3' }]); + + expect( + mapStringSelectMenuOptionBuildersToJson( + makeStringSelectMenuWithOptions().spliceOptions(0, 3, selectMenuOptionData), + ), + ).toStrictEqual([selectMenuOptionData]); + + expect(() => + makeStringSelectMenuWithOptions().spliceOptions( + 0, + 0, + ...Array.from({ length: 26 }, () => selectMenuOptionData), + ), + ).toThrowError(); + + expect(() => + makeStringSelectMenuWithOptions() + .setOptions(Array.from({ length: 25 }, () => selectMenuOptionData)) + .spliceOptions(-1, 2, selectMenuOptionData, selectMenuOptionData), + ).toThrowError(); + }); }); }); diff --git a/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts b/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts index 0726d0d534be..f58159632de5 100644 --- a/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts +++ b/packages/builders/__tests__/interactions/SlashCommands/SlashCommands.test.ts @@ -240,8 +240,10 @@ describe('Slash Commands', () => { }); test('GIVEN a builder with valid channel options and channel_types THEN does throw an error', () => { + // @ts-expect-error: Invalid channel type expect(() => getBuilder().addChannelOption(getChannelOption().addChannelTypes(100))).toThrowError(); + // @ts-expect-error: Invalid channel types expect(() => getBuilder().addChannelOption(getChannelOption().addChannelTypes(100, 200))).toThrowError(); }); diff --git a/packages/builders/api-extractor-docs.json b/packages/builders/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/builders/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/builders/api-extractor.json b/packages/builders/api-extractor.json index bc73f2cc022e..0f6ad6ab1355 100644 --- a/packages/builders/api-extractor.json +++ b/packages/builders/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/builders" + } } diff --git a/packages/builders/cliff.toml b/packages/builders/cliff.toml index 6c6625772255..940740a02182 100644 --- a/packages/builders/cliff.toml +++ b/packages/builders/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/builders@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/builders/docs/README.md b/packages/builders/docs/README.md index b5a4bb01b18c..efed4aba3991 100644 --- a/packages/builders/docs/README.md +++ b/packages/builders/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/builders) +## [View the documentation here.](https://discord.js.org/docs/packages/builders/main) diff --git a/packages/builders/docs/index.json b/packages/builders/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/builders/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/builders/package.json b/packages/builders/package.json index fd481908da84..1ac281e9f34a 100644 --- a/packages/builders/package.json +++ b/packages/builders/package.json @@ -1,14 +1,15 @@ { "name": "@discordjs/builders", - "version": "1.3.0", + "version": "1.6.3", "description": "A set of builders that you can use when creating your bot", "scripts": { "test": "vitest run", "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json && yarn downlevel-dts ./dist-docs ./dist-docs", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn lint && yarn test && yarn build", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/builders/*'", "release": "cliff-jumper" @@ -17,9 +18,9 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src", @@ -47,34 +48,38 @@ ], "repository": { "type": "git", - "url": "https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/builders" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { + "@discordjs/formatters": "workspace:^", "@discordjs/util": "workspace:^", - "@sapphire/shapeshift": "^3.7.0", - "discord-api-types": "^0.37.15", + "@sapphire/shapeshift": "^3.9.0", + "discord-api-types": "^0.37.42", "fast-deep-equal": "^3.1.3", - "ts-mixer": "^6.0.1", - "tslib": "^2.4.0" + "ts-mixer": "^6.0.3", + "tslib": "^2.5.2" }, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/node": "16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "16.18.32", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "esbuild-plugin-version-injector": "^1.0.0", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "downlevel-dts": "^0.11.0", + "esbuild-plugin-version-injector": "^1.1.0", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/builders/src/components/ActionRow.ts b/packages/builders/src/components/ActionRow.ts index 90dda30cae9e..05ed65684fb5 100644 --- a/packages/builders/src/components/ActionRow.ts +++ b/packages/builders/src/components/ActionRow.ts @@ -18,10 +18,21 @@ import type { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js'; import type { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js'; import type { TextInputBuilder } from './textInput/TextInput.js'; +/** + * The builders that may be used for messages. + */ export type MessageComponentBuilder = | ActionRowBuilder | MessageActionRowComponentBuilder; + +/** + * The builders that may be used for modals. + */ export type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder; + +/** + * The builders that may be used within an action row for messages. + */ export type MessageActionRowComponentBuilder = | ButtonBuilder | ChannelSelectMenuBuilder @@ -29,11 +40,19 @@ export type MessageActionRowComponentBuilder = | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder; + +/** + * The builders that may be used within an action row for modals. + */ export type ModalActionRowComponentBuilder = TextInputBuilder; + +/** + * Any builder. + */ export type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder; /** - * Represents an action row component + * A builder that creates API-compatible JSON data for action rows. * * @typeParam T - The types of components this action row holds */ @@ -41,16 +60,16 @@ export class ActionRowBuilder extends ComponentBu APIActionRowComponent > { /** - * The components within this action row + * The components within this action row. */ public readonly components: T[]; /** - * Creates a new action row from API data + * Creates a new action row from API data. * * @param data - The API data to create this action row with * @example - * Creating an action row from an API data object + * Creating an action row from an API data object: * ```ts * const actionRow = new ActionRowBuilder({ * components: [ @@ -64,7 +83,7 @@ export class ActionRowBuilder extends ComponentBu * }); * ``` * @example - * Creating an action row using setters and API data + * Creating an action row using setters and API data: * ```ts * const actionRow = new ActionRowBuilder({ * components: [ @@ -87,7 +106,7 @@ export class ActionRowBuilder extends ComponentBu /** * Adds components to this action row. * - * @param components - The components to add to this action row. + * @param components - The components to add */ public addComponents(...components: RestOrArray) { this.components.push(...normalizeArray(components)); @@ -95,9 +114,9 @@ export class ActionRowBuilder extends ComponentBu } /** - * Sets the components in this action row + * Sets components for this action row. * - * @param components - The components to set this row to + * @param components - The components to set */ public setComponents(...components: RestOrArray) { this.components.splice(0, this.components.length, ...normalizeArray(components)); diff --git a/packages/builders/src/components/Component.ts b/packages/builders/src/components/Component.ts index 9fe213355f37..e5e59638dfb9 100644 --- a/packages/builders/src/components/Component.ts +++ b/packages/builders/src/components/Component.ts @@ -6,10 +6,13 @@ import type { ComponentType, } from 'discord-api-types/v10'; +/** + * Any action row component data represented as an object. + */ export type AnyAPIActionRowComponent = APIActionRowComponent | APIActionRowComponentTypes; /** - * Represents a discord component + * The base component builder that contains common symbols for all sorts of components. * * @typeParam DataType - The type of internal API data that is stored within the component */ @@ -18,12 +21,12 @@ export abstract class ComponentBuilder< > implements JSONEncodable { /** - * The API data associated with this component + * The API data associated with this component. */ public readonly data: Partial; /** - * Serializes this component to an API-compatible JSON object + * Serializes this builder to API-compatible JSON data. * * @remarks * This method runs validations on the data before serializing it. @@ -31,6 +34,11 @@ export abstract class ComponentBuilder< */ public abstract toJSON(): AnyAPIActionRowComponent; + /** + * Constructs a new kind of component. + * + * @param data - The data to construct a component out of + */ public constructor(data: Partial) { this.data = data; } diff --git a/packages/builders/src/components/Components.ts b/packages/builders/src/components/Components.ts index d3e635ece957..a8d287d05c56 100644 --- a/packages/builders/src/components/Components.ts +++ b/packages/builders/src/components/Components.ts @@ -14,27 +14,63 @@ import { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js'; import { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js'; import { TextInputBuilder } from './textInput/TextInput.js'; +/** + * Components here are mapped to their respective builder. + */ export interface MappedComponentTypes { + /** + * The action row component type is associated with an {@link ActionRowBuilder}. + */ [ComponentType.ActionRow]: ActionRowBuilder; + /** + * The button component type is associated with an {@link ButtonBuilder}. + */ [ComponentType.Button]: ButtonBuilder; + /** + * The string select component type is associated with an {@link StringSelectMenuBuilder}. + */ [ComponentType.StringSelect]: StringSelectMenuBuilder; + /** + * The text inpiut component type is associated with an {@link TextInputBuilder}. + */ [ComponentType.TextInput]: TextInputBuilder; + /** + * The user select component type is associated with an {@link UserSelectMenuBuilder}. + */ [ComponentType.UserSelect]: UserSelectMenuBuilder; + /** + * The role select component type is associated with an {@link RoleSelectMenuBuilder}. + */ [ComponentType.RoleSelect]: RoleSelectMenuBuilder; + /** + * The mentionable select component type is associated with an {@link MentionableSelectMenuBuilder}. + */ [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder; + /** + * The channel select component type is associated with an {@link ChannelSelectMenuBuilder}. + */ [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder; } /** - * Factory for creating components from API data + * Factory for creating components from API data. * - * @param data - The api data to transform to a component class + * @typeParam T - The type of component to use + * @param data - The API data to transform to a component class */ export function createComponentBuilder( // eslint-disable-next-line @typescript-eslint/sort-type-union-intersection-members data: (APIModalComponent | APIMessageComponent) & { type: T }, ): MappedComponentTypes[T]; + +/** + * Factory for creating components from API data. + * + * @typeParam C - The type of component to use + * @param data - The API data to transform to a component class + */ export function createComponentBuilder(data: C): C; + export function createComponentBuilder( data: APIMessageComponent | APIModalComponent | MessageComponentBuilder, ): ComponentBuilder { @@ -60,7 +96,7 @@ export function createComponentBuilder( case ComponentType.ChannelSelect: return new ChannelSelectMenuBuilder(data); default: - // @ts-expect-error: This case can still occur if we get a newer unsupported component type + // @ts-expect-error This case can still occur if we get a newer unsupported component type throw new Error(`Cannot properly serialize component type: ${data.type}`); } } diff --git a/packages/builders/src/components/button/Button.ts b/packages/builders/src/components/button/Button.ts index f6edbb863ed0..30aad629b8a8 100644 --- a/packages/builders/src/components/button/Button.ts +++ b/packages/builders/src/components/button/Button.ts @@ -18,15 +18,15 @@ import { import { ComponentBuilder } from '../Component.js'; /** - * Represents a button component + * A builder that creates API-compatible JSON data for buttons. */ export class ButtonBuilder extends ComponentBuilder { /** - * Creates a new button from API data + * Creates a new button from API data. * * @param data - The API data to create this button with * @example - * Creating a button from an API data object + * Creating a button from an API data object: * ```ts * const button = new ButtonBuilder({ * custom_id: 'a cool button', @@ -39,7 +39,7 @@ export class ButtonBuilder extends ComponentBuilder { * }); * ``` * @example - * Creating a button using setters and API data + * Creating a button using setters and API data: * ```ts * const button = new ButtonBuilder({ * style: ButtonStyle.Secondary, @@ -54,9 +54,9 @@ export class ButtonBuilder extends ComponentBuilder { } /** - * Sets the style of this button + * Sets the style of this button. * - * @param style - The style of the button + * @param style - The style to use */ public setStyle(style: ButtonStyle) { this.data.style = buttonStyleValidator.parse(style); @@ -64,12 +64,12 @@ export class ButtonBuilder extends ComponentBuilder { } /** - * Sets the URL for this button + * Sets the URL for this button. * * @remarks * This method is only available to buttons using the `Link` button style. - * Only three types of URL schemes are currently supported: `https://`, `http://` and `discord://` - * @param url - The URL to open when this button is clicked + * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`. + * @param url - The URL to use */ public setURL(url: string) { (this.data as APIButtonComponentWithURL).url = urlValidator.parse(url); @@ -77,11 +77,11 @@ export class ButtonBuilder extends ComponentBuilder { } /** - * Sets the custom id for this button + * Sets the custom id for this button. * * @remarks * This method is only applicable to buttons that are not using the `Link` button style. - * @param customId - The custom id to use for this button + * @param customId - The custom id to use */ public setCustomId(customId: string) { (this.data as APIButtonComponentWithCustomId).custom_id = customIdValidator.parse(customId); @@ -89,9 +89,9 @@ export class ButtonBuilder extends ComponentBuilder { } /** - * Sets the emoji to display on this button + * Sets the emoji to display on this button. * - * @param emoji - The emoji to display on this button + * @param emoji - The emoji to use */ public setEmoji(emoji: APIMessageComponentEmoji) { this.data.emoji = emojiValidator.parse(emoji); @@ -99,7 +99,7 @@ export class ButtonBuilder extends ComponentBuilder { } /** - * Sets whether this button is disabled + * Sets whether this button is disabled. * * @param disabled - Whether to disable this button */ @@ -109,9 +109,9 @@ export class ButtonBuilder extends ComponentBuilder { } /** - * Sets the label for this button + * Sets the label for this button. * - * @param label - The label to display on this button + * @param label - The label to use */ public setLabel(label: string) { this.data.label = buttonLabelValidator.parse(label); diff --git a/packages/builders/src/components/selectMenu/BaseSelectMenu.ts b/packages/builders/src/components/selectMenu/BaseSelectMenu.ts index cd1a306ac8f8..298d7dc5e1fd 100644 --- a/packages/builders/src/components/selectMenu/BaseSelectMenu.ts +++ b/packages/builders/src/components/selectMenu/BaseSelectMenu.ts @@ -2,13 +2,18 @@ import type { APISelectMenuComponent } from 'discord-api-types/v10'; import { customIdValidator, disabledValidator, minMaxValidator, placeholderValidator } from '../Assertions.js'; import { ComponentBuilder } from '../Component.js'; -export class BaseSelectMenuBuilder< +/** + * The base select menu builder that contains common symbols for select menu builders. + * + * @typeParam SelectMenuType - The type of select menu this would be instantiated for. + */ +export abstract class BaseSelectMenuBuilder< SelectMenuType extends APISelectMenuComponent, > extends ComponentBuilder { /** - * Sets the placeholder for this select menu + * Sets the placeholder for this select menu. * - * @param placeholder - The placeholder to use for this select menu + * @param placeholder - The placeholder to use */ public setPlaceholder(placeholder: string) { this.data.placeholder = placeholderValidator.parse(placeholder); @@ -16,7 +21,7 @@ export class BaseSelectMenuBuilder< } /** - * Sets the minimum values that must be selected in the select menu + * Sets the minimum values that must be selected in the select menu. * * @param minValues - The minimum values that must be selected */ @@ -26,7 +31,7 @@ export class BaseSelectMenuBuilder< } /** - * Sets the maximum values that must be selected in the select menu + * Sets the maximum values that must be selected in the select menu. * * @param maxValues - The maximum values that must be selected */ @@ -36,9 +41,9 @@ export class BaseSelectMenuBuilder< } /** - * Sets the custom id for this select menu + * Sets the custom id for this select menu. * - * @param customId - The custom id to use for this select menu + * @param customId - The custom id to use */ public setCustomId(customId: string) { this.data.custom_id = customIdValidator.parse(customId); @@ -46,7 +51,7 @@ export class BaseSelectMenuBuilder< } /** - * Sets whether this select menu is disabled + * Sets whether this select menu is disabled. * * @param disabled - Whether this select menu is disabled */ @@ -55,6 +60,9 @@ export class BaseSelectMenuBuilder< return this; } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ public toJSON(): SelectMenuType { customIdValidator.parse(this.data.custom_id); return { diff --git a/packages/builders/src/components/selectMenu/ChannelSelectMenu.ts b/packages/builders/src/components/selectMenu/ChannelSelectMenu.ts index a2d46f35e65c..fe5b27b83ae1 100644 --- a/packages/builders/src/components/selectMenu/ChannelSelectMenu.ts +++ b/packages/builders/src/components/selectMenu/ChannelSelectMenu.ts @@ -4,13 +4,16 @@ import { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js'; import { channelTypesValidator, customIdValidator } from '../Assertions.js'; import { BaseSelectMenuBuilder } from './BaseSelectMenu.js'; +/** + * A builder that creates API-compatible JSON data for channel select menus. + */ export class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder { /** - * Creates a new select menu from API data + * Creates a new select menu from API data. * * @param data - The API data to create this select menu with * @example - * Creating a select menu from an API data object + * Creating a select menu from an API data object: * ```ts * const selectMenu = new ChannelSelectMenuBuilder({ * custom_id: 'a cool select menu', @@ -19,39 +22,45 @@ export class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder) { super({ ...data, type: ComponentType.ChannelSelect }); } + /** + * Adds channel types to this select menu. + * + * @param types - The channel types to use + */ public addChannelTypes(...types: RestOrArray) { - // eslint-disable-next-line no-param-reassign - types = normalizeArray(types); - + const normalizedTypes = normalizeArray(types); this.data.channel_types ??= []; - this.data.channel_types.push(...channelTypesValidator.parse(types)); + this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes)); return this; } + /** + * Sets channel types for this select menu. + * + * @param types - The channel types to use + */ public setChannelTypes(...types: RestOrArray) { - // eslint-disable-next-line no-param-reassign - types = normalizeArray(types); - + const normalizedTypes = normalizeArray(types); this.data.channel_types ??= []; - this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(types)); + this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes)); return this; } /** - * {@inheritDoc ComponentBuilder.toJSON} + * {@inheritDoc BaseSelectMenuBuilder.toJSON} */ public override toJSON(): APIChannelSelectComponent { customIdValidator.parse(this.data.custom_id); diff --git a/packages/builders/src/components/selectMenu/MentionableSelectMenu.ts b/packages/builders/src/components/selectMenu/MentionableSelectMenu.ts index c996e2b4776d..a3a39a975fd8 100644 --- a/packages/builders/src/components/selectMenu/MentionableSelectMenu.ts +++ b/packages/builders/src/components/selectMenu/MentionableSelectMenu.ts @@ -2,13 +2,16 @@ import type { APIMentionableSelectComponent } from 'discord-api-types/v10'; import { ComponentType } from 'discord-api-types/v10'; import { BaseSelectMenuBuilder } from './BaseSelectMenu.js'; +/** + * A builder that creates API-compatible JSON data for mentionable select menus. + */ export class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder { /** - * Creates a new select menu from API data + * Creates a new select menu from API data. * * @param data - The API data to create this select menu with * @example - * Creating a select menu from an API data object + * Creating a select menu from an API data object: * ```ts * const selectMenu = new MentionableSelectMenuBuilder({ * custom_id: 'a cool select menu', @@ -17,12 +20,12 @@ export class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder) { diff --git a/packages/builders/src/components/selectMenu/RoleSelectMenu.ts b/packages/builders/src/components/selectMenu/RoleSelectMenu.ts index 818ef5b7763f..2055b5f536cc 100644 --- a/packages/builders/src/components/selectMenu/RoleSelectMenu.ts +++ b/packages/builders/src/components/selectMenu/RoleSelectMenu.ts @@ -2,13 +2,16 @@ import type { APIRoleSelectComponent } from 'discord-api-types/v10'; import { ComponentType } from 'discord-api-types/v10'; import { BaseSelectMenuBuilder } from './BaseSelectMenu.js'; +/** + * A builder that creates API-compatible JSON data for role select menus. + */ export class RoleSelectMenuBuilder extends BaseSelectMenuBuilder { /** - * Creates a new select menu from API data + * Creates a new select menu from API data. * * @param data - The API data to create this select menu with * @example - * Creating a select menu from an API data object + * Creating a select menu from an API data object: * ```ts * const selectMenu = new RoleSelectMenuBuilder({ * custom_id: 'a cool select menu', @@ -17,12 +20,12 @@ export class RoleSelectMenuBuilder extends BaseSelectMenuBuilder) { diff --git a/packages/builders/src/components/selectMenu/StringSelectMenu.ts b/packages/builders/src/components/selectMenu/StringSelectMenu.ts index ed5f928c144b..9c6542387db0 100644 --- a/packages/builders/src/components/selectMenu/StringSelectMenu.ts +++ b/packages/builders/src/components/selectMenu/StringSelectMenu.ts @@ -1,25 +1,25 @@ -import type { APIStringSelectComponent } from 'discord-api-types/v10'; -import { ComponentType, type APISelectMenuOption } from 'discord-api-types/v10'; +import { ComponentType } from 'discord-api-types/v10'; +import type { APIStringSelectComponent, APISelectMenuOption } from 'discord-api-types/v10'; import { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js'; import { jsonOptionValidator, optionsLengthValidator, validateRequiredSelectMenuParameters } from '../Assertions.js'; import { BaseSelectMenuBuilder } from './BaseSelectMenu.js'; import { StringSelectMenuOptionBuilder } from './StringSelectMenuOption.js'; /** - * Represents a string select menu component + * A builder that creates API-compatible JSON data for string select menus. */ export class StringSelectMenuBuilder extends BaseSelectMenuBuilder { /** - * The options within this select menu + * The options within this select menu. */ public readonly options: StringSelectMenuOptionBuilder[]; /** - * Creates a new select menu from API data + * Creates a new select menu from API data. * * @param data - The API data to create this select menu with * @example - * Creating a select menu from an API data object + * Creating a select menu from an API data object: * ```ts * const selectMenu = new StringSelectMenuBuilder({ * custom_id: 'a cool select menu', @@ -33,7 +33,7 @@ export class StringSelectMenuBuilder extends BaseSelectMenuBuilder) { - // eslint-disable-next-line no-param-reassign - options = normalizeArray(options); - optionsLengthValidator.parse(this.options.length + options.length); + const normalizedOptions = normalizeArray(options); + optionsLengthValidator.parse(this.options.length + normalizedOptions.length); this.options.push( - ...options.map((option) => - option instanceof StringSelectMenuOptionBuilder - ? option - : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(option)), + ...normalizedOptions.map((normalizedOption) => + normalizedOption instanceof StringSelectMenuOptionBuilder + ? normalizedOption + : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)), ), ); return this; } /** - * Sets the options on this select menu + * Sets the options for this select menu. * - * @param options - The options to set on this select menu + * @param options - The options to set */ public setOptions(...options: RestOrArray) { - // eslint-disable-next-line no-param-reassign - options = normalizeArray(options); - optionsLengthValidator.parse(options.length); - this.options.splice( - 0, - this.options.length, - ...options.map((option) => - option instanceof StringSelectMenuOptionBuilder - ? option - : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(option)), + return this.spliceOptions(0, this.options.length, ...options); + } + + /** + * Removes, replaces, or inserts options for this select menu. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}. + * It's useful for modifying and adjusting the order of existing options. + * @example + * Remove the first option: + * ```ts + * selectMenu.spliceOptions(0, 1); + * ``` + * @example + * Remove the first n option: + * ```ts + * const n = 4; + * selectMenu.spliceOptions(0, n); + * ``` + * @example + * Remove the last option: + * ```ts + * selectMenu.spliceOptions(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of options to remove + * @param options - The replacing option objects or builders + */ + public spliceOptions( + index: number, + deleteCount: number, + ...options: RestOrArray + ) { + const normalizedOptions = normalizeArray(options); + + const clone = [...this.options]; + + clone.splice( + index, + deleteCount, + ...normalizedOptions.map((normalizedOption) => + normalizedOption instanceof StringSelectMenuOptionBuilder + ? normalizedOption + : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)), ), ); + + optionsLengthValidator.parse(clone.length); + this.options.splice(0, this.options.length, ...clone); return this; } /** - * {@inheritDoc ComponentBuilder.toJSON} + * {@inheritDoc BaseSelectMenuBuilder.toJSON} */ public override toJSON(): APIStringSelectComponent { validateRequiredSelectMenuParameters(this.options, this.data.custom_id); diff --git a/packages/builders/src/components/selectMenu/StringSelectMenuOption.ts b/packages/builders/src/components/selectMenu/StringSelectMenuOption.ts index c43145463947..3e45970878e2 100644 --- a/packages/builders/src/components/selectMenu/StringSelectMenuOption.ts +++ b/packages/builders/src/components/selectMenu/StringSelectMenuOption.ts @@ -8,15 +8,15 @@ import { } from '../Assertions.js'; /** - * Represents an option within a string select menu component + * A builder that creates API-compatible JSON data for string select menu options. */ export class StringSelectMenuOptionBuilder implements JSONEncodable { /** - * Creates a new string select menu option from API data + * Creates a new string select menu option from API data. * * @param data - The API data to create this string select menu option with * @example - * Creating a string select menu option from an API data object + * Creating a string select menu option from an API data object: * ```ts * const selectMenuOption = new SelectMenuOptionBuilder({ * label: 'catchy label', @@ -24,21 +24,21 @@ export class StringSelectMenuOptionBuilder implements JSONEncodable = {}) {} /** - * Sets the label of this option + * Sets the label for this option. * - * @param label - The label to show on this option + * @param label - The label to use */ public setLabel(label: string) { this.data.label = labelValueDescriptionValidator.parse(label); @@ -46,9 +46,9 @@ export class StringSelectMenuOptionBuilder implements JSONEncodable { /** - * Creates a new select menu from API data + * Creates a new select menu from API data. * * @param data - The API data to create this select menu with * @example - * Creating a select menu from an API data object + * Creating a select menu from an API data object: * ```ts * const selectMenu = new UserSelectMenuBuilder({ * custom_id: 'a cool select menu', @@ -17,12 +20,12 @@ export class UserSelectMenuBuilder extends BaseSelectMenuBuilder) { diff --git a/packages/builders/src/components/textInput/TextInput.ts b/packages/builders/src/components/textInput/TextInput.ts index 02b97cb8620b..42a4583726e1 100644 --- a/packages/builders/src/components/textInput/TextInput.ts +++ b/packages/builders/src/components/textInput/TextInput.ts @@ -14,16 +14,19 @@ import { textInputStyleValidator, } from './Assertions.js'; +/** + * A builder that creates API-compatible JSON data for text inputs. + */ export class TextInputBuilder extends ComponentBuilder implements Equatable> { /** - * Creates a new text input from API data + * Creates a new text input from API data. * * @param data - The API data to create this text input with * @example - * Creating a select menu option from an API data object + * Creating a select menu option from an API data object: * ```ts * const textInput = new TextInputBuilder({ * custom_id: 'a cool select menu', @@ -32,7 +35,7 @@ export class TextInputBuilder * }); * ``` * @example - * Creating a select menu option using setters and API data + * Creating a select menu option using setters and API data: * ```ts * const textInput = new TextInputBuilder({ * label: 'Type something else', @@ -46,9 +49,9 @@ export class TextInputBuilder } /** - * Sets the custom id for this text input + * Sets the custom id for this text input. * - * @param customId - The custom id of this text input + * @param customId - The custom id to use */ public setCustomId(customId: string) { this.data.custom_id = customIdValidator.parse(customId); @@ -56,9 +59,9 @@ export class TextInputBuilder } /** - * Sets the label for this text input + * Sets the label for this text input. * - * @param label - The label for this text input + * @param label - The label to use */ public setLabel(label: string) { this.data.label = labelValidator.parse(label); @@ -66,9 +69,9 @@ export class TextInputBuilder } /** - * Sets the style for this text input + * Sets the style for this text input. * - * @param style - The style for this text input + * @param style - The style to use */ public setStyle(style: TextInputStyle) { this.data.style = textInputStyleValidator.parse(style); @@ -76,7 +79,7 @@ export class TextInputBuilder } /** - * Sets the minimum length of text for this text input + * Sets the minimum length of text for this text input. * * @param minLength - The minimum length of text for this text input */ @@ -86,7 +89,7 @@ export class TextInputBuilder } /** - * Sets the maximum length of text for this text input + * Sets the maximum length of text for this text input. * * @param maxLength - The maximum length of text for this text input */ @@ -96,9 +99,9 @@ export class TextInputBuilder } /** - * Sets the placeholder of this text input + * Sets the placeholder for this text input. * - * @param placeholder - The placeholder of this text input + * @param placeholder - The placeholder to use */ public setPlaceholder(placeholder: string) { this.data.placeholder = placeholderValidator.parse(placeholder); @@ -106,9 +109,9 @@ export class TextInputBuilder } /** - * Sets the value of this text input + * Sets the value for this text input. * - * @param value - The value for this text input + * @param value - The value to use */ public setValue(value: string) { this.data.value = valueValidator.parse(value); @@ -116,7 +119,7 @@ export class TextInputBuilder } /** - * Sets whether this text input is required + * Sets whether this text input is required. * * @param required - Whether this text input is required */ diff --git a/packages/builders/src/index.ts b/packages/builders/src/index.ts index 9f644d5b064c..55eaa684bd9a 100644 --- a/packages/builders/src/index.ts +++ b/packages/builders/src/index.ts @@ -1,6 +1,7 @@ export * as EmbedAssertions from './messages/embed/Assertions.js'; export * from './messages/embed/Embed.js'; -export * from './messages/formatters.js'; +// TODO: Consider removing this dep in the next major version +export * from '@discordjs/formatters'; export * as ComponentAssertions from './components/Assertions.js'; export * from './components/ActionRow.js'; @@ -58,12 +59,11 @@ export * from './interactions/contextMenuCommands/ContextMenuCommandBuilder.js'; export * from './util/componentUtil.js'; export * from './util/normalizeArray.js'; export * from './util/validation.js'; -export * from '@discordjs/util'; /** - * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders/#readme | @discordjs/builders} version + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version * that you are currently using. + * + * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild. */ -// This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild -// eslint-disable-next-line @typescript-eslint/no-inferrable-types -export const version: string = '[VI]{{inject}}[/VI]'; +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts index ea94da034f4b..a4cb2be1d1d4 100644 --- a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts +++ b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts @@ -15,45 +15,54 @@ import { validateDMPermission, } from './Assertions.js'; +/** + * The type a context menu command can be. + */ +export type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User; + +/** + * A builder that creates API-compatible JSON data for context menu commands. + */ export class ContextMenuCommandBuilder { /** - * The name of this context menu command + * The name of this command. */ public readonly name: string = undefined!; /** - * The localized names for this command + * The name localizations of this command. */ public readonly name_localizations?: LocalizationMap; /** - * The type of this context menu command + * The type of this command. */ public readonly type: ContextMenuCommandType = undefined!; /** - * Whether the command is enabled by default when the app is added to a guild + * Whether this command is enabled by default when the application is added to a guild. * - * @deprecated This property is deprecated and will be removed in the future. - * You should use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. */ public readonly default_permission: boolean | undefined = undefined; /** - * Set of permissions represented as a bit set for the command + * The set of permissions represented as a bit set for the command. */ public readonly default_member_permissions: Permissions | null | undefined = undefined; /** - * Indicates whether the command is available in DMs with the application, only for globally-scoped commands. - * By default, commands are visible. + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. */ public readonly dm_permission: boolean | undefined = undefined; /** - * Sets the name + * Sets the name of this command. * - * @param name - The name + * @param name - The name to use */ public setName(name: string) { // Assert the name matches the conditions @@ -65,9 +74,9 @@ export class ContextMenuCommandBuilder { } /** - * Sets the type + * Sets the type of this command. * - * @param type - The type + * @param type - The type to use */ public setType(type: ContextMenuCommandType) { // Assert the type is valid @@ -83,8 +92,8 @@ export class ContextMenuCommandBuilder { * * @remarks * If set to `false`, you will have to later `PUT` the permissions for this command. - * @param value - Whether or not to enable this command by default - * @see https://discord.com/developers/docs/interactions/application-commands#permissions + * @param value - Whether to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. */ public setDefaultPermission(value: boolean) { @@ -97,12 +106,12 @@ export class ContextMenuCommandBuilder { } /** - * Sets the default permissions a member should have in order to run the command. + * Sets the default permissions a member should have in order to run this command. * * @remarks * You can set this to `'0'` to disable the command by default. * @param permissions - The permissions bit field to set - * @see https://discord.com/developers/docs/interactions/application-commands#permissions + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} */ public setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) { // Assert the value and parse it @@ -114,11 +123,12 @@ export class ContextMenuCommandBuilder { } /** - * Sets if the command is available in DMs with the application, only for globally-scoped commands. - * By default, commands are visible. + * Sets if the command is available in direct messages with the application. * - * @param enabled - If the command should be enabled in DMs - * @see https://discord.com/developers/docs/interactions/application-commands#permissions + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} */ public setDMPermission(enabled: boolean | null | undefined) { // Assert the value matches the conditions @@ -130,10 +140,10 @@ export class ContextMenuCommandBuilder { } /** - * Sets a name localization + * Sets a name localization for this command. * - * @param locale - The locale to set a description for - * @param localizedName - The localized description for the given locale + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` */ public setNameLocalization(locale: LocaleString, localizedName: string | null) { if (!this.name_localizations) { @@ -154,9 +164,9 @@ export class ContextMenuCommandBuilder { } /** - * Sets the name localizations + * Sets the name localizations for this command. * - * @param localizedNames - The dictionary of localized descriptions to set + * @param localizedNames - The object of localized names to set */ public setNameLocalizations(localizedNames: LocalizationMap | null) { if (localizedNames === null) { @@ -172,7 +182,7 @@ export class ContextMenuCommandBuilder { } /** - * Returns the final data that should be sent to Discord. + * Serializes this builder to API-compatible JSON data. * * @remarks * This method runs validations on the data before serializing it. @@ -186,5 +196,3 @@ export class ContextMenuCommandBuilder { return { ...this }; } } - -export type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User; diff --git a/packages/builders/src/interactions/modals/Modal.ts b/packages/builders/src/interactions/modals/Modal.ts index 46cd4b3fc133..948d774df203 100644 --- a/packages/builders/src/interactions/modals/Modal.ts +++ b/packages/builders/src/interactions/modals/Modal.ts @@ -1,3 +1,5 @@ +/* eslint-disable jsdoc/check-param-names */ + import type { JSONEncodable } from '@discordjs/util'; import type { APIActionRowComponent, @@ -10,11 +12,25 @@ import { createComponentBuilder } from '../../components/Components.js'; import { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js'; import { titleValidator, validateRequiredParameters } from './Assertions.js'; +/** + * A builder that creates API-compatible JSON data for modals. + */ export class ModalBuilder implements JSONEncodable { + /** + * The API data associated with this modal. + */ public readonly data: Partial; + /** + * The components within this modal. + */ public readonly components: ActionRowBuilder[] = []; + /** + * Creates a new modal from API data. + * + * @param data - The API data to create this modal with + */ public constructor({ components, ...data }: Partial = {}) { this.data = { ...data }; this.components = (components?.map((component) => createComponentBuilder(component)) ?? @@ -22,9 +38,9 @@ export class ModalBuilder implements JSONEncodable>) { this.components.splice(0, this.components.length, ...normalizeArray(components)); diff --git a/packages/builders/src/interactions/slashCommands/Assertions.ts b/packages/builders/src/interactions/slashCommands/Assertions.ts index 586f968a1f70..d61da838fa82 100644 --- a/packages/builders/src/interactions/slashCommands/Assertions.ts +++ b/packages/builders/src/interactions/slashCommands/Assertions.ts @@ -94,3 +94,7 @@ const memberPermissionPredicate = s.union( export function validateDefaultMemberPermissions(permissions: unknown) { return memberPermissionPredicate.parse(permissions); } + +export function validateNSFW(value: unknown): asserts value is boolean { + booleanPredicate.parse(value); +} diff --git a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts index 8bdb6c49e1bf..d10ba093ed52 100644 --- a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts +++ b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts @@ -13,75 +13,66 @@ import { validateDMPermission, validateMaxOptionsLength, validateRequiredParameters, + validateNSFW, } from './Assertions.js'; import { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands.js'; import { SharedNameAndDescription } from './mixins/NameAndDescription.js'; import { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js'; +/** + * A builder that creates API-compatible JSON data for slash commands. + */ @mix(SharedSlashCommandOptions, SharedNameAndDescription) export class SlashCommandBuilder { /** - * The name of this slash command + * The name of this command. */ public readonly name: string = undefined!; /** - * The localized names for this command + * The name localizations of this command. */ public readonly name_localizations?: LocalizationMap; /** - * The description of this slash command + * The description of this command. */ public readonly description: string = undefined!; /** - * The localized descriptions for this command + * The description localizations of this command. */ public readonly description_localizations?: LocalizationMap; /** - * The options of this slash command + * The options of this command. */ public readonly options: ToAPIApplicationCommandOptions[] = []; /** - * Whether the command is enabled by default when the app is added to a guild + * Whether this command is enabled by default when the application is added to a guild. * - * @deprecated This property is deprecated and will be removed in the future. - * You should use {@link (SlashCommandBuilder:class).setDefaultMemberPermissions} or {@link (SlashCommandBuilder:class).setDMPermission} instead. + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. */ public readonly default_permission: boolean | undefined = undefined; /** - * Set of permissions represented as a bit set for the command + * The set of permissions represented as a bit set for the command. */ public readonly default_member_permissions: Permissions | null | undefined = undefined; /** - * Indicates whether the command is available in DMs with the application, only for globally-scoped commands. - * By default, commands are visible. + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. */ public readonly dm_permission: boolean | undefined = undefined; /** - * Returns the final data that should be sent to Discord. - * - * @remarks - * This method runs validations on the data before serializing it. - * As such, it may throw an error if the data is invalid. + * Whether this command is NSFW. */ - public toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody { - validateRequiredParameters(this.name, this.description, this.options); - - validateLocalizationMap(this.name_localizations); - validateLocalizationMap(this.description_localizations); - - return { - ...this, - options: this.options.map((option) => option.toJSON()), - }; - } + public readonly nsfw: boolean | undefined = undefined; /** * Sets whether the command is enabled by default when the application is added to a guild. @@ -89,8 +80,8 @@ export class SlashCommandBuilder { * @remarks * If set to `false`, you will have to later `PUT` the permissions for this command. * @param value - Whether or not to enable this command by default - * @see https://discord.com/developers/docs/interactions/application-commands#permissions - * @deprecated Use {@link (SlashCommandBuilder:class).setDefaultMemberPermissions} or {@link (SlashCommandBuilder:class).setDMPermission} instead. + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link SlashCommandBuilder.setDefaultMemberPermissions} or {@link SlashCommandBuilder.setDMPermission} instead. */ public setDefaultPermission(value: boolean) { // Assert the value matches the conditions @@ -107,7 +98,7 @@ export class SlashCommandBuilder { * @remarks * You can set this to `'0'` to disable the command by default. * @param permissions - The permissions bit field to set - * @see https://discord.com/developers/docs/interactions/application-commands#permissions + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} */ public setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) { // Assert the value and parse it @@ -119,11 +110,12 @@ export class SlashCommandBuilder { } /** - * Sets if the command is available in DMs with the application, only for globally-scoped commands. - * By default, commands are visible. + * Sets if the command is available in direct messages with the application. * - * @param enabled - If the command should be enabled in DMs - * @see https://discord.com/developers/docs/interactions/application-commands#permissions + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} */ public setDMPermission(enabled: boolean | null | undefined) { // Assert the value matches the conditions @@ -135,9 +127,21 @@ export class SlashCommandBuilder { } /** - * Adds a new subcommand group to this command + * Sets whether this command is NSFW. * - * @param input - A function that returns a subcommand group builder, or an already built builder + * @param nsfw - Whether this command is NSFW + */ + public setNSFW(nsfw = true) { + // Assert the value matches the conditions + validateNSFW(nsfw); + Reflect.set(this, 'nsfw', nsfw); + return this; + } + + /** + * Adds a new subcommand group to this command. + * + * @param input - A function that returns a subcommand group builder or an already built builder */ public addSubcommandGroup( input: @@ -161,9 +165,9 @@ export class SlashCommandBuilder { } /** - * Adds a new subcommand to this command + * Adds a new subcommand to this command. * - * @param input - A function that returns a subcommand builder, or an already built builder + * @param input - A function that returns a subcommand builder or an already built builder */ public addSubcommand( input: @@ -185,18 +189,47 @@ export class SlashCommandBuilder { return this; } + + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + public toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody { + validateRequiredParameters(this.name, this.description, this.options); + + validateLocalizationMap(this.name_localizations); + validateLocalizationMap(this.description_localizations); + + return { + ...this, + options: this.options.map((option) => option.toJSON()), + }; + } } export interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {} +/** + * An interface specifically for slash command subcommands. + */ export interface SlashCommandSubcommandsOnlyBuilder extends Omit> {} +/** + * An interface specifically for slash command options. + */ export interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick {} +/** + * An interface that ensures the `toJSON()` call will return something + * that can be serialized into API-compatible data. + */ export interface ToAPIApplicationCommandOptions { toJSON(): APIApplicationCommandOption; } diff --git a/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts b/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts index e9b540448d65..38821537674f 100644 --- a/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts +++ b/packages/builders/src/interactions/slashCommands/SlashCommandSubcommands.ts @@ -11,31 +11,31 @@ import { SharedNameAndDescription } from './mixins/NameAndDescription.js'; import { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js'; /** - * Represents a folder for subcommands + * Represents a folder for subcommands. * - * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups + * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups} */ @mix(SharedNameAndDescription) export class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions { /** - * The name of this subcommand group + * The name of this subcommand group. */ public readonly name: string = undefined!; /** - * The description of this subcommand group + * The description of this subcommand group. */ public readonly description: string = undefined!; /** - * The subcommands part of this subcommand group + * The subcommands within this subcommand group. */ public readonly options: SlashCommandSubcommandBuilder[] = []; /** - * Adds a new subcommand to this group + * Adds a new subcommand to this group. * - * @param input - A function that returns a subcommand builder, or an already built builder + * @param input - A function that returns a subcommand builder or an already built builder */ public addSubcommand( input: @@ -60,6 +60,13 @@ export class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationComma return this; } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ public toJSON(): APIApplicationCommandSubcommandGroupOption { validateRequiredParameters(this.name, this.description, this.options); @@ -77,27 +84,34 @@ export class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationComma export interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {} /** - * Represents a subcommand + * A builder that creates API-compatible JSON data for slash command subcommands. * - * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups + * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups} */ @mix(SharedNameAndDescription, SharedSlashCommandOptions) export class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions { /** - * The name of this subcommand + * The name of this subcommand. */ public readonly name: string = undefined!; /** - * The description of this subcommand + * The description of this subcommand. */ public readonly description: string = undefined!; /** - * The options of this subcommand + * The options within this subcommand. */ public readonly options: ApplicationCommandOptionBase[] = []; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ public toJSON(): APIApplicationCommandSubcommandOption { validateRequiredParameters(this.name, this.description, this.options); diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts index 5ac38d1f6a89..0cdbdbe6266f 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts @@ -1,17 +1,26 @@ +/** + * This mixin holds minimum and maximum symbols used for options. + */ export abstract class ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The maximum value of this option. + */ public readonly max_value?: number; + /** + * The minimum value of this option. + */ public readonly min_value?: number; /** - * Sets the maximum number value of this option + * Sets the maximum number value of this option. * * @param max - The maximum value this option can be */ public abstract setMaxValue(max: number): this; /** - * Sets the minimum number value of this option + * Sets the minimum number value of this option. * * @param min - The minimum value this option can be */ diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts index b40ce0c96934..51f450e0f355 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts @@ -2,15 +2,26 @@ import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } f import { validateRequiredParameters, validateRequired, validateLocalizationMap } from '../Assertions.js'; import { SharedNameAndDescription } from './NameAndDescription.js'; +/** + * The base application command option builder that contains common symbols for application command builders. + */ export abstract class ApplicationCommandOptionBase extends SharedNameAndDescription { + /** + * The type of this option. + */ public abstract readonly type: ApplicationCommandOptionType; + /** + * Whether this option is required. + * + * @defaultValue `false` + */ public readonly required: boolean = false; /** - * Marks the option as required + * Sets whether this option is required. * - * @param required - If this option should be required + * @param required - Whether this option should be required */ public setRequired(required: boolean) { // Assert that you actually passed a boolean @@ -21,8 +32,18 @@ export abstract class ApplicationCommandOptionBase extends SharedNameAndDescript return this; } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ public abstract toJSON(): APIApplicationCommandBasicOption; + /** + * This method runs required validators on this builder. + */ protected runRequiredValidations() { validateRequiredParameters(this.name, this.description, []); diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts index cd022ec39210..c97d996e7fb4 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts @@ -1,7 +1,12 @@ import { s } from '@sapphire/shapeshift'; import { ChannelType } from 'discord-api-types/v10'; -// Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime) +/** + * The allowed channel types used for a channel option in a slash command builder. + * + * @privateRemarks This can't be dynamic because const enums are erased at runtime. + * @internal + */ const allowedChannelTypes = [ ChannelType.GuildText, ChannelType.GuildVoice, @@ -14,17 +19,26 @@ const allowedChannelTypes = [ ChannelType.GuildForum, ] as const; -export type ApplicationCommandOptionAllowedChannelTypes = typeof allowedChannelTypes[number]; +/** + * The type of allowed channel types used for a channel option. + */ +export type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number]; const channelTypesPredicate = s.array(s.union(...allowedChannelTypes.map((type) => s.literal(type)))); +/** + * This mixin holds channel type symbols used for options. + */ export class ApplicationCommandOptionChannelTypesMixin { + /** + * The channel types of this option. + */ public readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[]; /** - * Adds channel types to this option + * Adds channel types to this option. * - * @param channelTypes - The channel types to add + * @param channelTypes - The channel types */ public addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]) { if (this.channel_types === undefined) { diff --git a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts index 5ea7105f14c4..29fdd1e3cabf 100644 --- a/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts +++ b/packages/builders/src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts @@ -11,16 +11,29 @@ const choicesPredicate = s.object({ }).array; const booleanPredicate = s.boolean; +/** + * This mixin holds choices and autocomplete symbols used for options. + */ export class ApplicationCommandOptionWithChoicesAndAutocompleteMixin { + /** + * The choices of this option. + */ public readonly choices?: APIApplicationCommandOptionChoice[]; + /** + * Whether this option utilizes autocomplete. + */ public readonly autocomplete?: boolean; - // Since this is present and this is a mixin, this is needed + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ public readonly type!: ApplicationCommandOptionType; /** - * Adds multiple choices for this option + * Adds multiple choices to this option. * * @param choices - The choices to add */ @@ -51,6 +64,11 @@ export class ApplicationCommandOptionWithChoicesAndAutocompleteMixin[]>(...choices: Input): this { if (choices.length > 0 && this.autocomplete) { throw new RangeError('Autocomplete and choices are mutually exclusive to each other.'); @@ -65,9 +83,9 @@ export class ApplicationCommandOptionWithChoicesAndAutocompleteMixin { public readonly options!: ToAPIApplicationCommandOptions[]; /** - * Adds a boolean option + * Adds a boolean option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addBooleanOption( input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption), @@ -26,18 +31,18 @@ export class SharedSlashCommandOptions { } /** - * Adds a user option + * Adds a user option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) { return this._sharedAddOptionMethod(input, SlashCommandUserOption); } /** - * Adds a channel option + * Adds a channel option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addChannelOption( input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption), @@ -46,18 +51,18 @@ export class SharedSlashCommandOptions { } /** - * Adds a role option + * Adds a role option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) { return this._sharedAddOptionMethod(input, SlashCommandRoleOption); } /** - * Adds an attachment option + * Adds an attachment option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addAttachmentOption( input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption), @@ -66,9 +71,9 @@ export class SharedSlashCommandOptions { } /** - * Adds a mentionable option + * Adds a mentionable option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addMentionableOption( input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption), @@ -77,9 +82,9 @@ export class SharedSlashCommandOptions { } /** - * Adds a string option + * Adds a string option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addStringOption( input: @@ -97,9 +102,9 @@ export class SharedSlashCommandOptions { } /** - * Adds an integer option + * Adds an integer option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addIntegerOption( input: @@ -117,9 +122,9 @@ export class SharedSlashCommandOptions { } /** - * Adds a number option + * Adds a number option. * - * @param input - A function that returns an option builder, or an already built builder + * @param input - A function that returns an option builder or an already built builder */ public addNumberOption( input: @@ -136,6 +141,13 @@ export class SharedSlashCommandOptions { return this._sharedAddOptionMethod(input, SlashCommandNumberOption); } + /** + * Where the actual adding magic happens. ✨ + * + * @param input - The input. What else? + * @param Instance - The instance of whatever is being added + * @internal + */ private _sharedAddOptionMethod( input: | Omit diff --git a/packages/builders/src/interactions/slashCommands/options/attachment.ts b/packages/builders/src/interactions/slashCommands/options/attachment.ts index 006911033f78..cb31812f1c4a 100644 --- a/packages/builders/src/interactions/slashCommands/options/attachment.ts +++ b/packages/builders/src/interactions/slashCommands/options/attachment.ts @@ -1,9 +1,18 @@ import { ApplicationCommandOptionType, type APIApplicationCommandAttachmentOption } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js'; +/** + * A slash command attachment option. + */ export class SlashCommandAttachmentOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ public override readonly type = ApplicationCommandOptionType.Attachment as const; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandAttachmentOption { this.runRequiredValidations(); diff --git a/packages/builders/src/interactions/slashCommands/options/boolean.ts b/packages/builders/src/interactions/slashCommands/options/boolean.ts index f2c9768bad6e..5d82ea77c8ae 100644 --- a/packages/builders/src/interactions/slashCommands/options/boolean.ts +++ b/packages/builders/src/interactions/slashCommands/options/boolean.ts @@ -1,9 +1,18 @@ import { ApplicationCommandOptionType, type APIApplicationCommandBooleanOption } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js'; +/** + * A slash command boolean option. + */ export class SlashCommandBooleanOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ public readonly type = ApplicationCommandOptionType.Boolean as const; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandBooleanOption { this.runRequiredValidations(); diff --git a/packages/builders/src/interactions/slashCommands/options/channel.ts b/packages/builders/src/interactions/slashCommands/options/channel.ts index e3dac0aa6c15..89400820c004 100644 --- a/packages/builders/src/interactions/slashCommands/options/channel.ts +++ b/packages/builders/src/interactions/slashCommands/options/channel.ts @@ -3,10 +3,19 @@ import { mix } from 'ts-mixer'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js'; import { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin.js'; +/** + * A slash command channel option. + */ @mix(ApplicationCommandOptionChannelTypesMixin) export class SlashCommandChannelOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ public override readonly type = ApplicationCommandOptionType.Channel as const; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandChannelOption { this.runRequiredValidations(); diff --git a/packages/builders/src/interactions/slashCommands/options/integer.ts b/packages/builders/src/interactions/slashCommands/options/integer.ts index e8a98f4c44d0..b66b2e092c4d 100644 --- a/packages/builders/src/interactions/slashCommands/options/integer.ts +++ b/packages/builders/src/interactions/slashCommands/options/integer.ts @@ -7,11 +7,17 @@ import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixi const numberValidator = s.number.int; +/** + * A slash command integer option. + */ @mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin) export class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The type of this option. + */ public readonly type = ApplicationCommandOptionType.Integer as const; /** @@ -36,6 +42,9 @@ export class SlashCommandIntegerOption return this; } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandIntegerOption { this.runRequiredValidations(); @@ -43,7 +52,7 @@ export class SlashCommandIntegerOption throw new RangeError('Autocomplete and choices are mutually exclusive to each other.'); } - return { ...this }; + return { ...this } as APIApplicationCommandIntegerOption; } } diff --git a/packages/builders/src/interactions/slashCommands/options/mentionable.ts b/packages/builders/src/interactions/slashCommands/options/mentionable.ts index 91a0416dfd62..56292f612675 100644 --- a/packages/builders/src/interactions/slashCommands/options/mentionable.ts +++ b/packages/builders/src/interactions/slashCommands/options/mentionable.ts @@ -1,9 +1,18 @@ import { ApplicationCommandOptionType, type APIApplicationCommandMentionableOption } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js'; +/** + * A slash command mentionable option. + */ export class SlashCommandMentionableOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ public readonly type = ApplicationCommandOptionType.Mentionable as const; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandMentionableOption { this.runRequiredValidations(); diff --git a/packages/builders/src/interactions/slashCommands/options/number.ts b/packages/builders/src/interactions/slashCommands/options/number.ts index 80b5cd6e5593..0afdad447e5a 100644 --- a/packages/builders/src/interactions/slashCommands/options/number.ts +++ b/packages/builders/src/interactions/slashCommands/options/number.ts @@ -7,11 +7,17 @@ import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixi const numberValidator = s.number; +/** + * A slash command number option. + */ @mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin) export class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The type of this option. + */ public readonly type = ApplicationCommandOptionType.Number as const; /** @@ -36,6 +42,9 @@ export class SlashCommandNumberOption return this; } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandNumberOption { this.runRequiredValidations(); @@ -43,7 +52,7 @@ export class SlashCommandNumberOption throw new RangeError('Autocomplete and choices are mutually exclusive to each other.'); } - return { ...this }; + return { ...this } as APIApplicationCommandNumberOption; } } diff --git a/packages/builders/src/interactions/slashCommands/options/role.ts b/packages/builders/src/interactions/slashCommands/options/role.ts index 4f5871d56069..8dca05d0adc6 100644 --- a/packages/builders/src/interactions/slashCommands/options/role.ts +++ b/packages/builders/src/interactions/slashCommands/options/role.ts @@ -1,9 +1,18 @@ import { ApplicationCommandOptionType, type APIApplicationCommandRoleOption } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js'; +/** + * A slash command role option. + */ export class SlashCommandRoleOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ public override readonly type = ApplicationCommandOptionType.Role as const; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandRoleOption { this.runRequiredValidations(); diff --git a/packages/builders/src/interactions/slashCommands/options/string.ts b/packages/builders/src/interactions/slashCommands/options/string.ts index 345b7934a12a..65ad1930c144 100644 --- a/packages/builders/src/interactions/slashCommands/options/string.ts +++ b/packages/builders/src/interactions/slashCommands/options/string.ts @@ -7,12 +7,24 @@ import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixi const minLengthValidator = s.number.greaterThanOrEqual(0).lessThanOrEqual(6_000); const maxLengthValidator = s.number.greaterThanOrEqual(1).lessThanOrEqual(6_000); +/** + * A slash command string option. + */ @mix(ApplicationCommandOptionWithChoicesAndAutocompleteMixin) export class SlashCommandStringOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ public readonly type = ApplicationCommandOptionType.String as const; + /** + * The maximum length of this option. + */ public readonly max_length?: number; + /** + * The minimum length of this option. + */ public readonly min_length?: number; /** @@ -41,6 +53,9 @@ export class SlashCommandStringOption extends ApplicationCommandOptionBase { return this; } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandStringOption { this.runRequiredValidations(); @@ -48,7 +63,7 @@ export class SlashCommandStringOption extends ApplicationCommandOptionBase { throw new RangeError('Autocomplete and choices are mutually exclusive to each other.'); } - return { ...this }; + return { ...this } as APIApplicationCommandStringOption; } } diff --git a/packages/builders/src/interactions/slashCommands/options/user.ts b/packages/builders/src/interactions/slashCommands/options/user.ts index 609450fa5d11..471faf96ce44 100644 --- a/packages/builders/src/interactions/slashCommands/options/user.ts +++ b/packages/builders/src/interactions/slashCommands/options/user.ts @@ -1,9 +1,18 @@ import { ApplicationCommandOptionType, type APIApplicationCommandUserOption } from 'discord-api-types/v10'; import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js'; +/** + * A slash command user option. + */ export class SlashCommandUserOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ public readonly type = ApplicationCommandOptionType.User as const; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ public toJSON(): APIApplicationCommandUserOption { this.runRequiredValidations(); diff --git a/packages/builders/src/messages/embed/Embed.ts b/packages/builders/src/messages/embed/Embed.ts index c6ad12187891..ab3474b12184 100644 --- a/packages/builders/src/messages/embed/Embed.ts +++ b/packages/builders/src/messages/embed/Embed.ts @@ -13,59 +13,91 @@ import { validateFieldLength, } from './Assertions.js'; +/** + * A tuple satisfying the RGB color model. + * + * @see {@link https://developer.mozilla.org/docs/Glossary/RGB} + */ export type RGBTuple = [red: number, green: number, blue: number]; +/** + * The base icon data typically used in payloads. + */ export interface IconData { /** - * The URL of the icon + * The URL of the icon. */ iconURL?: string; /** - * The proxy URL of the icon + * The proxy URL of the icon. */ proxyIconURL?: string; } +/** + * Represents the author data of an embed. + */ export type EmbedAuthorData = IconData & Omit; +/** + * Represents the author options of an embed. + */ export type EmbedAuthorOptions = Omit; +/** + * Represents the footer data of an embed. + */ export type EmbedFooterData = IconData & Omit; +/** + * Represents the footer options of an embed. + */ export type EmbedFooterOptions = Omit; +/** + * Represents the image data of an embed. + */ export interface EmbedImageData extends Omit { /** - * The proxy URL for the image + * The proxy URL for the image. */ proxyURL?: string; } + /** - * Represents a embed in a message (image/video preview, rich embed, etc.) + * A builder that creates API-compatible JSON data for embeds. */ export class EmbedBuilder { + /** + * The API data associated with this embed. + */ public readonly data: APIEmbed; + /** + * Creates a new embed from API data. + * + * @param data - The API data to create this embed with + */ public constructor(data: APIEmbed = {}) { this.data = { ...data }; if (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString(); } /** - * Appends fields to the embed + * Appends fields to the embed. * * @remarks * This method accepts either an array of fields or a variable number of field parameters. * The maximum amount of fields that can be added is 25. * @example - * Using an array + * Using an array: * ```ts * const fields: APIEmbedField[] = ...; * const embed = new EmbedBuilder() * .addFields(fields); * ``` * @example - * Using rest parameters (variadic) + * Using rest parameters (variadic): * ```ts * const embed = new EmbedBuilder() * .addFields( @@ -76,41 +108,40 @@ export class EmbedBuilder { * @param fields - The fields to add */ public addFields(...fields: RestOrArray): this { - // eslint-disable-next-line no-param-reassign - fields = normalizeArray(fields); + const normalizedFields = normalizeArray(fields); // Ensure adding these fields won't exceed the 25 field limit - validateFieldLength(fields.length, this.data.fields); + validateFieldLength(normalizedFields.length, this.data.fields); // Data assertions - embedFieldsArrayPredicate.parse(fields); + embedFieldsArrayPredicate.parse(normalizedFields); - if (this.data.fields) this.data.fields.push(...fields); - else this.data.fields = fields; + if (this.data.fields) this.data.fields.push(...normalizedFields); + else this.data.fields = normalizedFields; return this; } /** - * Removes, replaces, or inserts fields in the embed. + * Removes, replaces, or inserts fields for this embed. * * @remarks * This method behaves similarly - * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice}. + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}. * The maximum amount of fields that can be added is 25. * * It's useful for modifying and adjusting order of the already-existing fields of an embed. * @example - * Remove the first field + * Remove the first field: * ```ts * embed.spliceFields(0, 1); * ``` * @example - * Remove the first n fields + * Remove the first n fields: * ```ts - * const n = 4 + * const n = 4; * embed.spliceFields(0, n); * ``` * @example - * Remove the last field + * Remove the last field: * ```ts * embed.spliceFields(-1, 1); * ``` @@ -130,7 +161,7 @@ export class EmbedBuilder { } /** - * Sets the embed's fields + * Sets the fields for this embed. * * @remarks * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically, @@ -145,9 +176,9 @@ export class EmbedBuilder { } /** - * Sets the author of this embed + * Sets the author of this embed. * - * @param options - The options for the author + * @param options - The options to use */ public setAuthor(options: EmbedAuthorOptions | null): this { @@ -164,9 +195,9 @@ export class EmbedBuilder { } /** - * Sets the color of this embed + * Sets the color of this embed. * - * @param color - The color of the embed + * @param color - The color to use */ public setColor(color: RGBTuple | number | null): this { // Data assertions @@ -183,9 +214,9 @@ export class EmbedBuilder { } /** - * Sets the description of this embed + * Sets the description of this embed. * - * @param description - The description + * @param description - The description to use */ public setDescription(description: string | null): this { // Data assertions @@ -196,9 +227,9 @@ export class EmbedBuilder { } /** - * Sets the footer of this embed + * Sets the footer of this embed. * - * @param options - The options for the footer + * @param options - The footer to use */ public setFooter(options: EmbedFooterOptions | null): this { if (options === null) { @@ -214,9 +245,9 @@ export class EmbedBuilder { } /** - * Sets the image of this embed + * Sets the image of this embed. * - * @param url - The URL of the image + * @param url - The image URL to use */ public setImage(url: string | null): this { // Data assertions @@ -227,9 +258,9 @@ export class EmbedBuilder { } /** - * Sets the thumbnail of this embed + * Sets the thumbnail of this embed. * - * @param url - The URL of the thumbnail + * @param url - The thumbnail URL to use */ public setThumbnail(url: string | null): this { // Data assertions @@ -240,9 +271,9 @@ export class EmbedBuilder { } /** - * Sets the timestamp of this embed + * Sets the timestamp of this embed. * - * @param timestamp - The timestamp or date + * @param timestamp - The timestamp or date to use */ public setTimestamp(timestamp: Date | number | null = Date.now()): this { // Data assertions @@ -253,9 +284,9 @@ export class EmbedBuilder { } /** - * Sets the title of this embed + * Sets the title for this embed. * - * @param title - The title + * @param title - The title to use */ public setTitle(title: string | null): this { // Data assertions @@ -266,9 +297,9 @@ export class EmbedBuilder { } /** - * Sets the URL of this embed + * Sets the URL of this embed. * - * @param url - The URL + * @param url - The URL to use */ public setURL(url: string | null): this { // Data assertions @@ -279,7 +310,11 @@ export class EmbedBuilder { } /** - * Transforms the embed to a plain object + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. */ public toJSON(): APIEmbed { return { ...this.data }; diff --git a/packages/builders/src/util/componentUtil.ts b/packages/builders/src/util/componentUtil.ts index 06ec6bf8c694..f2439fb9925e 100644 --- a/packages/builders/src/util/componentUtil.ts +++ b/packages/builders/src/util/componentUtil.ts @@ -1,5 +1,10 @@ import type { APIEmbed } from 'discord-api-types/v10'; +/** + * Calculates the length of the embed. + * + * @param data - The embed data to check + */ export function embedLength(data: APIEmbed) { return ( (data.title?.length ?? 0) + diff --git a/packages/builders/src/util/normalizeArray.ts b/packages/builders/src/util/normalizeArray.ts index 2fda6fbdf33b..bf31830a324b 100644 --- a/packages/builders/src/util/normalizeArray.ts +++ b/packages/builders/src/util/normalizeArray.ts @@ -1,6 +1,19 @@ +/** + * Normalizes data that is a rest parameter or an array into an array with a depth of 1. + * + * @typeParam T - The data that must satisfy {@link RestOrArray}. + * @param arr - The (possibly variadic) data to normalize + */ export function normalizeArray(arr: RestOrArray): T[] { if (Array.isArray(arr[0])) return arr[0]; return arr as T[]; } +/** + * Represents data that may be an array or came from a rest parameter. + * + * @remarks + * This type is used throughout builders to ensure both an array and variadic arguments + * may be used. It is normalized with {@link normalizeArray}. + */ export type RestOrArray = T[] | [T[]]; diff --git a/packages/builders/src/util/validation.ts b/packages/builders/src/util/validation.ts index c2830f99926f..37e5c224bc6e 100644 --- a/packages/builders/src/util/validation.ts +++ b/packages/builders/src/util/validation.ts @@ -1,5 +1,26 @@ let validate = true; -export const enableValidators = () => (validate = true); -export const disableValidators = () => (validate = false); -export const isValidationEnabled = () => validate; +/** + * Enables validators. + * + * @returns Whether validation is occurring. + */ +export function enableValidators() { + return (validate = true); +} + +/** + * Disables validators. + * + * @returns Whether validation is occurring. + */ +export function disableValidators() { + return (validate = false); +} + +/** + * Checks whether validation is occurring. + */ +export function isValidationEnabled() { + return validate; +} diff --git a/packages/builders/tsconfig.docs.json b/packages/builders/tsconfig.docs.json new file mode 100644 index 000000000000..4613ccafd627 --- /dev/null +++ b/packages/builders/tsconfig.docs.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs", + "exactOptionalPropertyTypes": false + } +} diff --git a/packages/builders/tsconfig.json b/packages/builders/tsconfig.json index 10563526b533..70f2d60b569e 100644 --- a/packages/builders/tsconfig.json +++ b/packages/builders/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "emitDecoratorMetadata": true, "exactOptionalPropertyTypes": false }, "include": ["src/**/*.ts"] diff --git a/packages/builders/tsup.config.js b/packages/builders/tsup.config.ts similarity index 100% rename from packages/builders/tsup.config.js rename to packages/builders/tsup.config.ts diff --git a/packages/collection/.gitignore b/packages/collection/.gitignore index 86b93e929ae6..90500960f32b 100644 --- a/packages/collection/.gitignore +++ b/packages/collection/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,14 @@ pids .env # Dist -dist/ -typings/ +dist +dist-docs + +# Docs docs/**/* -!docs/index.json !docs/README.md # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp +coverage diff --git a/packages/collection/.prettierignore b/packages/collection/.prettierignore index 8b94c7d45e03..fc03103c7b8c 100644 --- a/packages/collection/.prettierignore +++ b/packages/collection/.prettierignore @@ -1,8 +1,6 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/collection/CHANGELOG.md b/packages/collection/CHANGELOG.md index 35e8f6e856db..726af82a5995 100644 --- a/packages/collection/CHANGELOG.md +++ b/packages/collection/CHANGELOG.md @@ -2,6 +2,54 @@ All notable changes to this project will be documented in this file. +# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +# [@discordjs/collection@1.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.4.0...@discordjs/collection@1.5.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +## Refactor + +- **collection:** Fix/silence linter warnings (#9266) ([d6f4e60](https://github.com/discordjs/discord.js/commit/d6f4e60efd1a1796fc84dbbfbac4f9790e480a1c)) + +# [@discordjs/collection@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.3.0...@discordjs/collection@1.4.0) - (2023-03-12) + +## Documentation + +- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28)) + +## Features + +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) + +# [@discordjs/collection@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.2.0...@discordjs/collection@1.3.0) - (2022-11-28) + +## Bug Fixes + +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Features + +- Add `Collection#subtract()` (#8393) ([291f36c](https://github.com/discordjs/discord.js/commit/291f36cd736b5dea058145a1335bf7c78ec1d81d)) + # [@discordjs/collection@1.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.1.0...@discordjs/collection@1.2.0) - (2022-10-08) ## Bug Fixes diff --git a/packages/collection/README.md b/packages/collection/README.md index 93c12e4c2d0b..709f8900908b 100644 --- a/packages/collection/README.md +++ b/packages/collection/README.md @@ -13,6 +13,7 @@

Vercel + Cloudflare Workers

@@ -24,7 +25,7 @@ **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install @discordjs/collection yarn add @discordjs/collection pnpm add @discordjs/collection @@ -35,7 +36,7 @@ pnpm add @discordjs/collection - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -50,12 +51,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/collection +[documentation]: https://discord.js.org/docs/packages/collection/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/collection/__tests__/collection.test.ts b/packages/collection/__tests__/collection.test.ts index b2d01213f096..fc069376b926 100644 --- a/packages/collection/__tests__/collection.test.ts +++ b/packages/collection/__tests__/collection.test.ts @@ -3,22 +3,23 @@ import { describe, test, expect } from 'vitest'; import { Collection } from '../src/index.js'; -type TestCollection = Collection; +type TestCollection = Collection; -function createCollection(): TestCollection { +function createCollection(): TestCollection { return new Collection(); } -function createCollectionFrom(...entries: [key: string, value: number][]): TestCollection { +function createCollectionFrom(...entries: [key: string, value: V][]): TestCollection { return new Collection(entries); } -function createTestCollection(): TestCollection { +function createTestCollection(): TestCollection { return createCollectionFrom(['a', 1], ['b', 2], ['c', 3]); } function expectInvalidFunctionError(cb: () => unknown, val?: unknown): void { expect(() => { + // eslint-disable-next-line promise/prefer-await-to-callbacks cb(); }).toThrowError(new TypeError(`${val} is not a function`)); } @@ -699,12 +700,17 @@ describe('reduce() tests', () => { test('reduce collection into a single value with initial value', () => { const sum = coll.reduce((a, x) => a + x, 0); - expect(sum).toStrictEqual(6); + expect(sum).toStrictEqual(6); }); test('reduce collection into a single value without initial value', () => { - const sum = coll.reduce((a, x) => a + x); - expect(sum).toStrictEqual(6); + const sum = coll.reduce((a, x) => a + x); + expect(sum).toStrictEqual(6); + }); + + test('reduce empty collection with initial value', () => { + const coll = createCollection(); + expect(coll.reduce((a, x) => a + x, 0)).toStrictEqual(0); }); test('reduce empty collection without initial value', () => { @@ -770,6 +776,19 @@ describe('sort() tests', () => { }); }); +describe('subtract() tests', () => { + const coll1 = createCollectionFrom(['a', 1], ['b', 2], ['c', 3], ['d', undefined]); + const coll2 = createCollectionFrom(['b', 2], ['c', 0]); + + test('it returns a new collection', () => { + const c = coll1.subtract(coll2); + expect(c).toBeInstanceOf(Collection); + expect(c.size).toStrictEqual(3); + + expect(c).toStrictEqual(createCollectionFrom(['a', 1], ['c', 3], ['d', undefined])); + }); +}); + describe('sweep() test', () => { const coll = createTestCollection(); diff --git a/packages/collection/api-extractor-docs.json b/packages/collection/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/collection/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/collection/api-extractor.json b/packages/collection/api-extractor.json index bc73f2cc022e..e43e20649b99 100644 --- a/packages/collection/api-extractor.json +++ b/packages/collection/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/collection" + } } diff --git a/packages/collection/cliff.toml b/packages/collection/cliff.toml index 98480c1e148d..fcf1dbf16025 100644 --- a/packages/collection/cliff.toml +++ b/packages/collection/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/collection@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/collection/docs/README.md b/packages/collection/docs/README.md index e729e721f591..7a63106ac796 100644 --- a/packages/collection/docs/README.md +++ b/packages/collection/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/collection) +## [View the documentation here.](https://discord.js.org/docs/packages/collection/main) diff --git a/packages/collection/docs/index.json b/packages/collection/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/collection/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/collection/package.json b/packages/collection/package.json index 68cb5ba4e5d3..19f4f0065758 100644 --- a/packages/collection/package.json +++ b/packages/collection/package.json @@ -1,14 +1,15 @@ { "name": "@discordjs/collection", - "version": "1.2.0", + "version": "1.5.1", "description": "Utility data structure used in discord.js", "scripts": { "test": "vitest run", "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn lint && yarn test && yarn build", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/collection/*'", "release": "cliff-jumper" @@ -17,9 +18,9 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src", @@ -43,26 +44,28 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/collection" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/node": "16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "16.18.32", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "esbuild-plugin-version-injector": "^1.0.0", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "esbuild-plugin-version-injector": "^1.1.0", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/collection/src/collection.ts b/packages/collection/src/collection.ts index c8a14cdea52f..0547ebb81006 100644 --- a/packages/collection/src/collection.ts +++ b/packages/collection/src/collection.ts @@ -1,4 +1,3 @@ -/* eslint-disable id-length */ /* eslint-disable no-param-reassign */ /** * @internal @@ -62,7 +61,7 @@ export class Collection extends Map { * @returns `true` if all of the elements exist, `false` if at least one does not exist. */ public hasAll(...keys: K[]) { - return keys.every((k) => super.has(k)); + return keys.every((key) => super.has(key)); } /** @@ -72,7 +71,7 @@ export class Collection extends Map { * @returns `true` if any of the elements exist, `false` if none exist. */ public hasAny(...keys: K[]) { - return keys.some((k) => super.has(k)); + return keys.some((key) => super.has(key)); } /** @@ -84,7 +83,7 @@ export class Collection extends Map { public first(): V | undefined; public first(amount: number): V[]; public first(amount?: number): V | V[] | undefined { - if (typeof amount === 'undefined') return this.values().next().value; + if (amount === undefined) return this.values().next().value; if (amount < 0) return this.last(amount * -1); amount = Math.min(this.size, amount); const iter = this.values(); @@ -101,7 +100,7 @@ export class Collection extends Map { public firstKey(): K | undefined; public firstKey(amount: number): K[]; public firstKey(amount?: number): K | K[] | undefined { - if (typeof amount === 'undefined') return this.keys().next().value; + if (amount === undefined) return this.keys().next().value; if (amount < 0) return this.lastKey(amount * -1); amount = Math.min(this.size, amount); const iter = this.keys(); @@ -119,7 +118,7 @@ export class Collection extends Map { public last(amount: number): V[]; public last(amount?: number): V | V[] | undefined { const arr = [...this.values()]; - if (typeof amount === 'undefined') return arr[arr.length - 1]; + if (amount === undefined) return arr[arr.length - 1]; if (amount < 0) return this.first(amount * -1); if (!amount) return []; return arr.slice(-amount); @@ -136,7 +135,7 @@ export class Collection extends Map { public lastKey(amount: number): K[]; public lastKey(amount?: number): K | K[] | undefined { const arr = [...this.keys()]; - if (typeof amount === 'undefined') return arr[arr.length - 1]; + if (amount === undefined) return arr[arr.length - 1]; if (amount < 0) return this.firstKey(amount * -1); if (!amount) return []; return arr.slice(-amount); @@ -178,7 +177,7 @@ export class Collection extends Map { public random(amount: number): V[]; public random(amount?: number): V | V[] | undefined { const arr = [...this.values()]; - if (typeof amount === 'undefined') return arr[Math.floor(Math.random() * arr.length)]; + if (amount === undefined) return arr[Math.floor(Math.random() * arr.length)]; if (!arr.length || !amount) return []; return Array.from( { length: Math.min(amount, arr.length) }, @@ -196,7 +195,7 @@ export class Collection extends Map { public randomKey(amount: number): K[]; public randomKey(amount?: number): K | K[] | undefined { const arr = [...this.keys()]; - if (typeof amount === 'undefined') return arr[Math.floor(Math.random() * arr.length)]; + if (amount === undefined) return arr[Math.floor(Math.random() * arr.length)]; if (!arr.length || !amount) return []; return Array.from( { length: Math.min(amount, arr.length) }, @@ -238,7 +237,7 @@ export class Collection extends Map { public find(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined; public find(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): V | undefined { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); for (const [key, val] of this) { if (fn(val, key, this)) return val; } @@ -267,7 +266,7 @@ export class Collection extends Map { public findKey(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined; public findKey(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): K | undefined { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); for (const [key, val] of this) { if (fn(val, key, this)) return key; } @@ -286,7 +285,7 @@ export class Collection extends Map { public sweep(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number; public sweep(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): number { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); const previousSize = this.size; for (const [key, val] of this) { if (fn(val, key, this)) this.delete(key); @@ -321,7 +320,7 @@ export class Collection extends Map { public filter(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection; public filter(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): Collection { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); const results = new this.constructor[Symbol.species](); for (const [key, val] of this) { if (fn(val, key, this)) results.set(key, val); @@ -365,7 +364,7 @@ export class Collection extends Map { thisArg?: unknown, ): [Collection, Collection] { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); const results: [Collection, Collection] = [ new this.constructor[Symbol.species](), new this.constructor[Symbol.species](), @@ -418,7 +417,7 @@ export class Collection extends Map { public map(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[]; public map(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): T[] { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); const iter = this.entries(); return Array.from({ length: this.size }, (): T => { const [key, value] = iter.next().value; @@ -441,7 +440,7 @@ export class Collection extends Map { public mapValues(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection; public mapValues(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): Collection { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); const coll = new this.constructor[Symbol.species](); for (const [key, val] of this) coll.set(key, fn(val, key, this)); return coll; @@ -462,7 +461,7 @@ export class Collection extends Map { public some(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean; public some(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); for (const [key, val] of this) { if (fn(val, key, this)) return true; } @@ -495,7 +494,7 @@ export class Collection extends Map { public every(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean; public every(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); for (const [key, val] of this) { if (!fn(val, key, this)) return false; } @@ -515,30 +514,20 @@ export class Collection extends Map { * collection.reduce((acc, guild) => acc + guild.memberCount, 0); * ``` */ - public reduce(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T { + public reduce(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); let accumulator!: T; - if (typeof initialValue !== 'undefined') { + const iterator = this.entries(); + if (initialValue === undefined) { + if (this.size === 0) throw new TypeError('Reduce of empty collection with no initial value'); + accumulator = iterator.next().value[1]; + } else { accumulator = initialValue; - for (const [key, val] of this) accumulator = fn(accumulator, val, key, this); - return accumulator; } - let first = true; - for (const [key, val] of this) { - if (first) { - accumulator = val as unknown as T; - first = false; - continue; - } - - accumulator = fn(accumulator, val, key, this); - } - - // No items iterated. - if (first) { - throw new TypeError('Reduce of empty collection with no initial value'); + for (const [key, value] of iterator) { + accumulator = fn(accumulator, value, key, this); } return accumulator; @@ -563,8 +552,12 @@ export class Collection extends Map { public each(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this; public each(fn: (value: V, key: K, collection: this) => void, thisArg?: unknown): this { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - // eslint-disable-next-line unicorn/no-array-method-this-argument - this.forEach(fn as (value: V, key: K, map: Map) => void, thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); + + for (const [key, value] of this) { + fn(value, key, this); + } + return this; } @@ -585,7 +578,7 @@ export class Collection extends Map { public tap(fn: (this: T, collection: this) => void, thisArg: T): this; public tap(fn: (collection: this) => void, thisArg?: unknown): this { if (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`); - if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg); + if (thisArg !== undefined) fn = fn.bind(thisArg); fn(this); return this; } @@ -661,8 +654,8 @@ export class Collection extends Map { super.clear(); // Set the new entries - for (const [k, v] of entries) { - super.set(k, v); + for (const [key, value] of entries) { + super.set(key, value); } return this; @@ -675,9 +668,25 @@ export class Collection extends Map { */ public intersect(other: ReadonlyCollection): Collection { const coll = new this.constructor[Symbol.species](); - for (const [k, v] of other) { - if (this.has(k) && Object.is(v, this.get(k))) { - coll.set(k, v); + for (const [key, value] of other) { + if (this.has(key) && Object.is(value, this.get(key))) { + coll.set(key, value); + } + } + + return coll; + } + + /** + * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other. + * + * @param other - The other Collection to filter against + */ + public subtract(other: ReadonlyCollection): Collection { + const coll = new this.constructor[Symbol.species](); + for (const [key, value] of this) { + if (!other.has(key) || !Object.is(value, other.get(key))) { + coll.set(key, value); } } @@ -691,12 +700,12 @@ export class Collection extends Map { */ public difference(other: ReadonlyCollection): Collection { const coll = new this.constructor[Symbol.species](); - for (const [k, v] of other) { - if (!this.has(k)) coll.set(k, v); + for (const [key, value] of other) { + if (!this.has(key)) coll.set(key, value); } - for (const [k, v] of this) { - if (!other.has(k)) coll.set(k, v); + for (const [key, value] of this) { + if (!other.has(key)) coll.set(key, value); } return coll; @@ -738,19 +747,20 @@ export class Collection extends Map { ): Collection { const coll = new this.constructor[Symbol.species](); const keys = new Set([...this.keys(), ...other.keys()]); - for (const k of keys) { - const hasInSelf = this.has(k); - const hasInOther = other.has(k); + + for (const key of keys) { + const hasInSelf = this.has(key); + const hasInOther = other.has(key); if (hasInSelf && hasInOther) { - const r = whenInBoth(this.get(k)!, other.get(k)!, k); - if (r.keep) coll.set(k, r.value); + const result = whenInBoth(this.get(key)!, other.get(key)!, key); + if (result.keep) coll.set(key, result.value); } else if (hasInSelf) { - const r = whenInSelf(this.get(k)!, k); - if (r.keep) coll.set(k, r.value); + const result = whenInSelf(this.get(key)!, key); + if (result.keep) coll.set(key, result.value); } else if (hasInOther) { - const r = whenInOther(other.get(k)!, k); - if (r.keep) coll.set(k, r.value); + const result = whenInOther(other.get(key)!, key); + if (result.keep) coll.set(key, result.value); } } @@ -799,11 +809,11 @@ export class Collection extends Map { combine: (firstValue: V, secondValue: V, key: K) => V, ): Collection { const coll = new Collection(); - for (const [k, v] of entries) { - if (coll.has(k)) { - coll.set(k, combine(coll.get(k)!, v, k)); + for (const [key, value] of entries) { + if (coll.has(key)) { + coll.set(key, combine(coll.get(key)!, value, key)); } else { - coll.set(k, v); + coll.set(key, value); } } diff --git a/packages/collection/src/index.ts b/packages/collection/src/index.ts index df7a4cd316f5..501cd6827690 100644 --- a/packages/collection/src/index.ts +++ b/packages/collection/src/index.ts @@ -5,5 +5,4 @@ export * from './collection.js'; * that you are currently using. */ // This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild -// eslint-disable-next-line @typescript-eslint/no-inferrable-types -export const version: string = '[VI]{{inject}}[/VI]'; +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/collection/tsconfig.docs.json b/packages/collection/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/collection/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/collection/tsup.config.js b/packages/collection/tsup.config.ts similarity index 100% rename from packages/collection/tsup.config.js rename to packages/collection/tsup.config.ts diff --git a/packages/core/.cliff-jumperrc.json b/packages/core/.cliff-jumperrc.json new file mode 100644 index 000000000000..2d962203a9be --- /dev/null +++ b/packages/core/.cliff-jumperrc.json @@ -0,0 +1,5 @@ +{ + "name": "core", + "org": "discordjs", + "packagePath": "packages/core" +} diff --git a/packages/core/.eslintrc.json b/packages/core/.eslintrc.json new file mode 100644 index 000000000000..99ef7cec8051 --- /dev/null +++ b/packages/core/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../../.eslintrc.json" +} diff --git a/packages/scripts/src/template/default/.gitignore b/packages/core/.gitignore similarity index 61% rename from packages/scripts/src/template/default/.gitignore rename to packages/core/.gitignore index 86b93e929ae6..90500960f32b 100644 --- a/packages/scripts/src/template/default/.gitignore +++ b/packages/core/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,14 @@ pids .env # Dist -dist/ -typings/ +dist +dist-docs + +# Docs docs/**/* -!docs/index.json !docs/README.md # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp +coverage diff --git a/packages/core/.lintstagedrc.js b/packages/core/.lintstagedrc.js new file mode 100644 index 000000000000..dc17706a55ac --- /dev/null +++ b/packages/core/.lintstagedrc.js @@ -0,0 +1 @@ +module.exports = require('../../.lintstagedrc.json'); diff --git a/packages/core/.prettierignore b/packages/core/.prettierignore new file mode 100644 index 000000000000..fc03103c7b8c --- /dev/null +++ b/packages/core/.prettierignore @@ -0,0 +1,6 @@ +.turbo +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/scripts/src/template/default/.prettierrc.js b/packages/core/.prettierrc.js similarity index 100% rename from packages/scripts/src/template/default/.prettierrc.js rename to packages/core/.prettierrc.js diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md new file mode 100644 index 000000000000..5e3603ec5ae3 --- /dev/null +++ b/packages/core/CHANGELOG.md @@ -0,0 +1,111 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +# [@discordjs/core@0.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.5.2...@discordjs/core@0.6.0) - (2023-05-01) + +## Documentation + +- Update example usage (#9461) ([6212bff](https://github.com/discordjs/discord.js/commit/6212bffa30f4c6bbe6a81dc5b2b037e5b65d493c)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +## Features + +- **core:** Abstract gateway (#9410) ([5d1a4c2](https://github.com/discordjs/discord.js/commit/5d1a4c27d5ee2686c8fab6cad8bd97d8d0876e66)) + +# [@discordjs/core@0.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.5.0...@discordjs/core@0.5.1) - (2023-04-16) + +## Bug Fixes + +- **interactions:** Make `data` parameter optional (#9379) ([66dc401](https://github.com/discordjs/discord.js/commit/66dc4014fe4553f1dd73aaa7c32fd83e10bde263)) +- **core:** Support attachment editing on interactions (#9356) ([676307f](https://github.com/discordjs/discord.js/commit/676307ff5c6c4ef56a353b6fc74501a1080da869)) +- **core:** Missed optional options (#9311) ([6912faa](https://github.com/discordjs/discord.js/commit/6912faa9b3852adbacc7d0b002aae81be041f529)) + +## Typings + +- **ChannelsAPI:** Use correct type for `editMessage` (#9399) ([0a1701b](https://github.com/discordjs/discord.js/commit/0a1701b0463919a895c518e5daa9836760d9b6cf)) + +# [@discordjs/core@0.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.4.0...@discordjs/core@0.5.1) - (2023-04-16) + +## Bug Fixes + +- **interactions:** Make `data` parameter optional (#9379) ([66dc401](https://github.com/discordjs/discord.js/commit/66dc4014fe4553f1dd73aaa7c32fd83e10bde263)) +- **core:** Support attachment editing on interactions (#9356) ([676307f](https://github.com/discordjs/discord.js/commit/676307ff5c6c4ef56a353b6fc74501a1080da869)) +- **core:** Missed optional options (#9311) ([6912faa](https://github.com/discordjs/discord.js/commit/6912faa9b3852adbacc7d0b002aae81be041f529)) + +## Typings + +- **ChannelsAPI:** Use correct type for `editMessage` (#9399) ([0a1701b](https://github.com/discordjs/discord.js/commit/0a1701b0463919a895c518e5daa9836760d9b6cf)) + +# [@discordjs/core@0.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.5.0...@discordjs/core@0.5.1) - (2023-04-16) + +## Bug Fixes + +- **interactions:** Make `data` parameter optional (#9379) ([66dc401](https://github.com/discordjs/discord.js/commit/66dc4014fe4553f1dd73aaa7c32fd83e10bde263)) +- **core:** Support attachment editing on interactions (#9356) ([676307f](https://github.com/discordjs/discord.js/commit/676307ff5c6c4ef56a353b6fc74501a1080da869)) +- **core:** Missed optional options (#9311) ([6912faa](https://github.com/discordjs/discord.js/commit/6912faa9b3852adbacc7d0b002aae81be041f529)) + +## Typings + +- **ChannelsAPI:** Use correct type for `editMessage` (#9399) ([0a1701b](https://github.com/discordjs/discord.js/commit/0a1701b0463919a895c518e5daa9836760d9b6cf)) + +# [@discordjs/core@0.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.4.0...@discordjs/core@0.5.0) - (2023-04-01) + +## Bug Fixes + +- **core:** Include data for defer (#9284) ([9d69bba](https://github.com/discordjs/discord.js/commit/9d69bba47c73b756086992bc14e57c40fadb34d1)) +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) + +## Features + +- **core:** Http-only wrapper (#9281) ([11e682c](https://github.com/discordjs/discord.js/commit/11e682cfe388b9a3070388f73ebef3c27555c0dd)) +- **core:** Add `AbortSignal` support. (#9042) ([907eb1b](https://github.com/discordjs/discord.js/commit/907eb1b4708bdaf30f4e59f4016ef8a717f47a4c)) +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +# [@discordjs/core@0.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.3.0...@discordjs/core@0.4.0) - (2023-03-12) + +## Bug Fixes + +- **core:** Use `auth: false` for interaction callback methods (#9211) ([1b29099](https://github.com/discordjs/discord.js/commit/1b29099ed0b0deb98db844671aa23b4a84ec9c08)) +- **WebSocketShard:** Proper error bubbling (#9119) ([9681f34](https://github.com/discordjs/discord.js/commit/9681f348770b0e2ff9b7c96b1c30575dd950e2ed)) +- **oauth2:** Pass through body (#9106) ([483cbb3](https://github.com/discordjs/discord.js/commit/483cbb3b2abd2e3afadc3f814069d8e12bcf812b)) + +## Documentation + +- Fix /core README example (#9201) ([f65ac2e](https://github.com/discordjs/discord.js/commit/f65ac2ea780e9f60123c611292f0d0b647106d4c)) + +## Features + +- **core:** Adds `getWebhooks()` function for the channel API and for the guild API (#9043) ([c6f9c50](https://github.com/discordjs/discord.js/commit/c6f9c50ba9abf9555a2c40de3113a08765b830d5)) +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) +- **core:** Implement some ws send events (#8941) ([816aed4](https://github.com/discordjs/discord.js/commit/816aed478e3035060697092d52ad2b58106be0ee)) +- **core:** Add oauth2 api support (#8938) ([36560c9](https://github.com/discordjs/discord.js/commit/36560c99559ea5d66d42e29fcf050b7d1c33cf6b)) + +## Refactor + +- **core:** Move `setVoiceState` to `GuildsAPI` (#9228) ([dff131e](https://github.com/discordjs/discord.js/commit/dff131e8e4c24356d534a3dd42b33886ad30239f)) + +## Typings + +- **MappedEvents:** Add `GuildAuditLogEntryCreate` (#9175) ([3492b19](https://github.com/discordjs/discord.js/commit/3492b194b5aabfb6214aa985667f5ed7188fa6e8)) +- Fix `GuildsAPI#getMembers` return type (#9037) ([158db47](https://github.com/discordjs/discord.js/commit/158db474b7514e9ff6ba6f48a89ad71c97a7088a)) + +# [@discordjs/core@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.2.0...@discordjs/core@0.3.0) - (2022-12-16) + +## Bug Fixes + +- **core:** Instantiate/export role connections ([166f742](https://github.com/discordjs/discord.js/commit/166f742d02d475a5044f935ee638ae1e25075b9c)) + +# [@discordjs/core@0.2.0](https://github.com/discordjs/discord.js/tree/@discordjs/core@0.2.0) - (2022-12-16) + +## Bug Fixes + +- **thread:** `get()` route (#8897) ([3dede75](https://github.com/discordjs/discord.js/commit/3dede75621993428216196c60658e0c482aa9f61)) +- Remove casts when using `makeURLSearchParams()` (#8877) ([7430c8e](https://github.com/discordjs/discord.js/commit/7430c8e4c8e299acf750b46b6146c611b0c4941d)) + +## Features + +- **core:** Add support for role connections (#8930) ([3d6fa24](https://github.com/discordjs/discord.js/commit/3d6fa248c07b2278504bbe8bafa17a3294971fd9)) +- Add links to each routes documentation (#8898) ([73300c7](https://github.com/discordjs/discord.js/commit/73300c75fae7df9af293f7c03b179236679fb753)) +- **interactions:** Add `messageId` parameter to `deleteReply()` (#8896) ([3f555d5](https://github.com/discordjs/discord.js/commit/3f555d5ddf53b778fc0e69e1ff77ec93d876dcdb)) +- Add `@discordjs/core` (#8736) ([2127b32](https://github.com/discordjs/discord.js/commit/2127b32d26dedeb44ec43d16ec2e2046919f9bb0)) diff --git a/packages/core/LICENSE b/packages/core/LICENSE new file mode 100644 index 000000000000..fd65c1f0bd66 --- /dev/null +++ b/packages/core/LICENSE @@ -0,0 +1,191 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2022 Noel Buechler + Copyright 2022 Suneet Tipirneni + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/core/README.md b/packages/core/README.md new file mode 100644 index 000000000000..76db8c52b988 --- /dev/null +++ b/packages/core/README.md @@ -0,0 +1,116 @@ +
+
+

+ discord.js +

+
+

+ Discord server + npm version + npm downloads + Build status + Code coverage +

+

+ Vercel + Cloudflare Workers +

+
+ +## About + +`@discordjs/core` is a thinly abstracted wrapper around the "core" components of the Discord API: REST, and gateway. + +## Installation + +**Node.js 16.9.0 or newer is required.** + +```sh +npm install @discordjs/core +yarn add @discordjs/core +pnpm add @discordjs/core +``` + +## Example usage + +```ts +import { REST } from '@discordjs/rest'; +import { WebSocketManager } from '@discordjs/ws'; +import { GatewayDispatchEvents, GatewayIntentBits, InteractionType, MessageFlags, Client } from '@discordjs/core'; + +// Create REST and WebSocket managers directly +const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN); + +const gateway = new WebSocketManager({ + token: process.env.DISCORD_TOKEN, + intents: GatewayIntentBits.GuildMessages | GatewayIntentBits.MessageContent, + rest, +}); + +// Create a client to emit relevant events. +const client = new Client({ rest, gateway }); + +// Listen for interactions +// Each event contains an `api` prop along with the event data that allows you to interface with the Discord REST API +client.on(GatewayDispatchEvents.InteractionCreate, async ({ data: interaction, api }) => { + if (interaction.type !== InteractionType.ApplicationCommand || interaction.data.name !== 'ping') { + return; + } + + await api.interactions.reply(interaction.id, interaction.token, { content: 'Pong!', flags: MessageFlags.Ephemeral }); +}); + +// Listen for the ready event +client.once(GatewayDispatchEvents.Ready, () => console.log('Ready!')); + +// Start the WebSocket connection. +gateway.connect(); +``` + +## Independent REST API Usage + +```ts +// Create REST instance +const rest = new REST({ version: '10' }).setToken(token); + +// Pass into API +const api = new API(rest); + +// Fetch a guild using the API wrapper +const guild = await api.guilds.get('1234567891011'); +``` + +## Links + +- [Website][website] ([source][website-source]) +- [Documentation][documentation] +- [Guide][guide] ([source][guide-source]) + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. +- [discord.js Discord server][discord] +- [Discord API Discord server][discord-api] +- [GitHub][source] +- [npm][npm] +- [Related libraries][related-libs] + +## Contributing + +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. +See [the contribution guide][contributing] if you'd like to submit a PR. + +## Help + +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. + +[website]: https://discord.js.org +[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website +[documentation]: https://discord.js.org/docs/packages/core/stable +[guide]: https://discordjs.guide/ +[guide-source]: https://github.com/discordjs/guide +[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html +[discord]: https://discord.gg/djs +[discord-api]: https://discord.gg/discord-api +[source]: https://github.com/discordjs/discord.js/tree/main/packages/core +[npm]: https://www.npmjs.com/package/@discordjs/core +[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries +[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md diff --git a/packages/core/api-extractor-docs.json b/packages/core/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/core/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/core/api-extractor.json b/packages/core/api-extractor.json new file mode 100644 index 000000000000..66d1b5841b6b --- /dev/null +++ b/packages/core/api-extractor.json @@ -0,0 +1,6 @@ +{ + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/core" + } +} diff --git a/packages/core/cliff.toml b/packages/core/cliff.toml new file mode 100644 index 000000000000..7bd3fccda592 --- /dev/null +++ b/packages/core/cliff.toml @@ -0,0 +1,63 @@ +[changelog] +header = """ +# Changelog + +All notable changes to this project will be documented in this file.\n +""" +body = """ +{% if version %}\ + # [{{ version | trim_start_matches(pat="v") }}]\ + {% if previous %}\ + {% if previous.version %}\ + (https://github.com/discordjs/discord.js/compare/{{ previous.version }}...{{ version }})\ + {% else %}\ + (https://github.com/discordjs/discord.js/tree/{{ version }})\ + {% endif %}\ + {% endif %} \ + - ({{ timestamp | date(format="%Y-%m-%d") }}) +{% else %}\ + # [unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ## {{ group | upper_first }} + {% for commit in commits %} + - {% if commit.scope %}\ + **{{commit.scope}}:** \ + {% endif %}\ + {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/discordjs/discord.js/commit/{{ commit.id }}))\ + {% if commit.breaking %}\ + {% for breakingChange in commit.footers %}\ + \n{% raw %} {% endraw %}- **{{ breakingChange.token }}{{ breakingChange.separator }}** {{ breakingChange.value }}\ + {% endfor %}\ + {% endif %}\ + {% endfor %} +{% endfor %}\n +""" +trim = true +footer = "" + +[git] +conventional_commits = true +filter_unconventional = true +commit_parsers = [ + { message = "^feat", group = "Features"}, + { message = "^fix", group = "Bug Fixes"}, + { message = "^docs", group = "Documentation"}, + { message = "^perf", group = "Performance"}, + { message = "^refactor", group = "Refactor"}, + { message = "^typings", group = "Typings"}, + { message = "^types", group = "Typings"}, + { message = ".*deprecated", body = ".*deprecated", group = "Deprecation"}, + { message = "^revert", skip = true}, + { message = "^style", group = "Styling"}, + { message = "^test", group = "Testing"}, + { message = "^chore", skip = true}, + { message = "^ci", skip = true}, + { message = "^build", skip = true}, + { body = ".*security", group = "Security"}, +] +filter_commits = true +tag_pattern = "@discordjs/core@[0-9]*" +ignore_tags = "" +topo_order = true +sort_commits = "newest" diff --git a/packages/core/docs/README.md b/packages/core/docs/README.md new file mode 100644 index 000000000000..9570088cc4ca --- /dev/null +++ b/packages/core/docs/README.md @@ -0,0 +1 @@ +## [View the documentation here.](https://discord.js.org/docs/packages/core/main) diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 000000000000..74cb23034ebe --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,86 @@ +{ + "name": "@discordjs/core", + "version": "0.6.0", + "description": "A thinly abstracted wrapper around the rest API, and gateway.", + "scripts": { + "test": "vitest run", + "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", + "lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --format=pretty", + "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", + "prepack": "yarn build && yarn lint", + "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/core/*'", + "release": "cliff-jumper" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "typings": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./http-only": { + "types": "./dist/http-only.d.ts", + "import": "./dist/http-only.mjs", + "require": "./dist/http-only.js" + } + }, + "directories": { + "lib": "src", + "test": "__tests__" + }, + "files": [ + "dist" + ], + "contributors": [ + "Crawl ", + "SpaceEEC ", + "Vlad Frangu ", + "Aura Román ", + "Suneet Tipirneni " + ], + "license": "Apache-2.0", + "keywords": [], + "repository": { + "type": "git", + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/core" + }, + "bugs": { + "url": "https://github.com/discordjs/discord.js/issues" + }, + "homepage": "https://discord.js.org", + "dependencies": { + "@discordjs/rest": "workspace:^", + "@discordjs/util": "workspace:^", + "@discordjs/ws": "workspace:^", + "@sapphire/snowflake": "^3.5.1", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "^0.37.42" + }, + "devDependencies": { + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "18.16.14", + "@vitest/coverage-c8": "^0.31.1", + "cross-env": "^7.0.3", + "esbuild-plugin-version-injector": "^1.1.0", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" + }, + "engines": { + "node": ">=16.9.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/core/src/Gateway.ts b/packages/core/src/Gateway.ts new file mode 100644 index 000000000000..f9c3778bbd42 --- /dev/null +++ b/packages/core/src/Gateway.ts @@ -0,0 +1,12 @@ +import type { Awaitable } from '@discordjs/util'; +import type { ManagerShardEventsMap, WebSocketShardEvents } from '@discordjs/ws'; +import type { GatewaySendPayload } from 'discord-api-types/v10'; + +export interface Gateway { + getShardCount(): Awaitable; + on( + event: WebSocketShardEvents.Dispatch, + listener: (...params: ManagerShardEventsMap[WebSocketShardEvents.Dispatch]) => Awaitable, + ): this; + send(shardId: number, payload: GatewaySendPayload): Awaitable; +} diff --git a/packages/core/src/api/applicationCommands.ts b/packages/core/src/api/applicationCommands.ts new file mode 100644 index 000000000000..a1083ceb020d --- /dev/null +++ b/packages/core/src/api/applicationCommands.ts @@ -0,0 +1,334 @@ +/* eslint-disable jsdoc/check-param-names */ + +import { makeURLSearchParams, type RequestData, type REST } from '@discordjs/rest'; +import { + Routes, + type RESTGetAPIApplicationCommandPermissionsResult, + type RESTGetAPIApplicationCommandResult, + type RESTGetAPIApplicationCommandsQuery, + type RESTGetAPIApplicationCommandsResult, + type RESTGetAPIApplicationGuildCommandResult, + type RESTGetAPIApplicationGuildCommandsQuery, + type RESTGetAPIApplicationGuildCommandsResult, + type RESTGetAPIGuildApplicationCommandsPermissionsResult, + type RESTPatchAPIApplicationCommandJSONBody, + type RESTPatchAPIApplicationCommandResult, + type RESTPatchAPIApplicationGuildCommandJSONBody, + type RESTPatchAPIApplicationGuildCommandResult, + type RESTPostAPIApplicationCommandsJSONBody, + type RESTPostAPIApplicationCommandsResult, + type RESTPostAPIApplicationGuildCommandsJSONBody, + type RESTPostAPIApplicationGuildCommandsResult, + type RESTPutAPIApplicationCommandPermissionsJSONBody, + type RESTPutAPIApplicationCommandPermissionsResult, + type RESTPutAPIApplicationCommandsJSONBody, + type RESTPutAPIApplicationCommandsResult, + type RESTPutAPIApplicationGuildCommandsJSONBody, + type RESTPutAPIApplicationGuildCommandsResult, + type Snowflake, +} from 'discord-api-types/v10'; + +export class ApplicationCommandsAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches all global commands for a application + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands} + * @param applicationId - The application id to fetch commands for + * @param query - The query options to use when fetching commands + * @param options - The options to use when fetching commands + */ + public async getGlobalCommands( + applicationId: Snowflake, + query: RESTGetAPIApplicationCommandsQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.applicationCommands(applicationId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Creates a new global command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} + * @param applicationId - The application id to create the command for + * @param body - The data to use when creating the command + * @param options - The options to use when creating the command + */ + public async createGlobalCommand( + applicationId: Snowflake, + body: RESTPostAPIApplicationCommandsJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.applicationCommands(applicationId), { + body, + signal, + }) as Promise; + } + + /** + * Fetches a global command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command} + * @param applicationId - The application id to fetch the command from + * @param commandId - The command id to fetch + * @param options - The options to use when fetching the command + */ + public async getGlobalCommand( + applicationId: Snowflake, + commandId: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.applicationCommand(applicationId, commandId), { + signal, + }) as Promise; + } + + /** + * Edits a global command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command} + * @param applicationId - The application id of the command + * @param commandId - The id of the command to edit + * @param body - The data to use when editing the command + * @param options - The options for editing the command + */ + public async editGlobalCommand( + applicationId: Snowflake, + commandId: Snowflake, + body: RESTPatchAPIApplicationCommandJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.patch(Routes.applicationCommand(applicationId, commandId), { + body, + signal, + }) as Promise; + } + + /** + * Deletes a global command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command} + * @param applicationId - The application id of the command + * @param commandId - The id of the command to delete + * @param options - The options for deleting a command + */ + public async deleteGlobalCommand( + applicationId: Snowflake, + commandId: Snowflake, + { signal }: Pick = {}, + ) { + await this.rest.delete(Routes.applicationCommand(applicationId, commandId), { signal }); + } + + /** + * Overwrites global commands + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands} + * @param applicationId - The application id to overwrite commands for + * @param body - The data to use when overwriting commands + * @param options - The options for overwriting commands + */ + public async bulkOverwriteGlobalCommands( + applicationId: Snowflake, + body: RESTPutAPIApplicationCommandsJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.put(Routes.applicationCommands(applicationId), { + body, + signal, + }) as Promise; + } + + /** + * Fetches all commands for a guild + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands} + * @param applicationId - The application id to fetch commands for + * @param guildId - The guild id to fetch commands for + * @param query - The data to use when fetching commands + * @param options - The options to use when fetching commands + */ + public async getGuildCommands( + applicationId: Snowflake, + guildId: Snowflake, + query: RESTGetAPIApplicationGuildCommandsQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.applicationGuildCommands(applicationId, guildId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Creates a new command for a guild + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command} + * @param applicationId - The application id to create the command for + * @param guildId - The guild id to create the command for + * @param body - The data to use when creating the command + * @param options - The options to use when creating the command + */ + public async createGuildCommand( + applicationId: Snowflake, + guildId: Snowflake, + body: RESTPostAPIApplicationGuildCommandsJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.applicationGuildCommands(applicationId, guildId), { + body, + signal, + }) as Promise; + } + + /** + * Fetches a guild command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command} + * @param applicationId - The application id to fetch the command from + * @param guildId - The guild id to fetch the command from + * @param commandId - The command id to fetch + * @param options - The options to use when fetching the command + */ + public async getGuildCommand( + applicationId: Snowflake, + guildId: Snowflake, + commandId: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.applicationGuildCommand(applicationId, guildId, commandId), { + signal, + }) as Promise; + } + + /** + * Edits a guild command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command} + * @param applicationId - The application id of the command + * @param guildId - The guild id of the command + * @param commandId - The command id to edit + * @param body - The data to use when editing the command + * @param options - The options to use when editing the command + */ + public async editGuildCommand( + applicationId: Snowflake, + guildId: Snowflake, + commandId: Snowflake, + body: RESTPatchAPIApplicationGuildCommandJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.patch(Routes.applicationGuildCommand(applicationId, guildId, commandId), { + body, + signal, + }) as Promise; + } + + /** + * Deletes a guild command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command} + * @param applicationId - The application id of the command + * @param guildId - The guild id of the command + * @param commandId - The id of the command to delete + * @param options - The options for deleting the command + */ + public async deleteGuildCommand( + applicationId: Snowflake, + guildId: Snowflake, + commandId: Snowflake, + { signal }: Pick = {}, + ) { + await this.rest.delete(Routes.applicationGuildCommand(applicationId, guildId, commandId), { signal }); + } + + /** + * Bulk overwrites guild commands + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands} + * @param applicationId - The application id to overwrite commands for + * @param guildId - The guild id to overwrite commands for + * @param body - The data to use when overwriting commands + * @param options - The options to use when overwriting the commands + */ + public async bulkOverwriteGuildCommands( + applicationId: Snowflake, + guildId: Snowflake, + body: RESTPutAPIApplicationGuildCommandsJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.put(Routes.applicationGuildCommands(applicationId, guildId), { + body, + signal, + }) as Promise; + } + + /** + * Fetches the permissions for a guild command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions} + * @param applicationId - The application id to get the permissions for + * @param guildId - The guild id of the command + * @param commandId - The command id to get the permissions for + * @param options - The option for fetching the command + */ + public async getGuildCommandPermissions( + applicationId: Snowflake, + guildId: Snowflake, + commandId: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.applicationCommandPermissions(applicationId, guildId, commandId), { + signal, + }) as Promise; + } + + /** + * Fetches all permissions for all commands in a guild + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions} + * @param applicationId - The application id to get the permissions for + * @param guildId - The guild id to get the permissions for + * @param options - The options for fetching permissions + */ + public async getGuildCommandsPermissions( + applicationId: Snowflake, + guildId: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildApplicationCommandsPermissions(applicationId, guildId), { + signal, + }) as Promise; + } + + /** + * Edits the permissions for a guild command + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions} + * @param userToken - The token of the user to edit permissions on behalf of + * @param applicationId - The application id to edit the permissions for + * @param guildId - The guild id to edit the permissions for + * @param commandId - The id of the command to edit the permissions for + * @param body - The data to use when editing the permissions + * @param options - The options to use when editing the permissions + */ + public async editGuildCommandPermissions( + userToken: string, + applicationId: Snowflake, + guildId: Snowflake, + commandId: Snowflake, + body: RESTPutAPIApplicationCommandPermissionsJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.put(Routes.applicationCommandPermissions(applicationId, guildId, commandId), { + headers: { Authorization: `Bearer ${userToken.replace('Bearer ', '')}` }, + auth: false, + body, + signal, + }) as Promise; + } +} diff --git a/packages/core/src/api/channel.ts b/packages/core/src/api/channel.ts new file mode 100644 index 000000000000..99b5a9a51928 --- /dev/null +++ b/packages/core/src/api/channel.ts @@ -0,0 +1,468 @@ +/* eslint-disable jsdoc/check-param-names */ + +import { makeURLSearchParams, type RawFile, type REST, type RequestData } from '@discordjs/rest'; +import { + Routes, + type RESTDeleteAPIChannelResult, + type RESTGetAPIChannelInvitesResult, + type RESTGetAPIChannelMessageReactionUsersQuery, + type RESTGetAPIChannelMessageReactionUsersResult, + type RESTGetAPIChannelMessageResult, + type RESTGetAPIChannelMessagesQuery, + type RESTGetAPIChannelMessagesResult, + type RESTGetAPIChannelPinsResult, + type RESTGetAPIChannelResult, + type RESTGetAPIChannelThreadsArchivedQuery, + type RESTGetAPIChannelUsersThreadsArchivedResult, + type RESTGetAPIChannelWebhooksResult, + type RESTPatchAPIChannelMessageJSONBody, + type RESTPatchAPIChannelJSONBody, + type RESTPatchAPIChannelMessageResult, + type RESTPatchAPIChannelResult, + type RESTPostAPIChannelFollowersResult, + type RESTPostAPIChannelInviteJSONBody, + type RESTPostAPIChannelInviteResult, + type RESTPostAPIChannelMessageCrosspostResult, + type RESTPostAPIChannelMessageJSONBody, + type RESTPostAPIChannelMessageResult, + type Snowflake, +} from 'discord-api-types/v10'; + +export class ChannelsAPI { + public constructor(private readonly rest: REST) {} + + /** + * Sends a message in a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#create-message} + * @param channelId - The id of the channel to send the message in + * @param body - The data to use when sending the message + * @param options - The options to use when sending the message + */ + public async createMessage( + channelId: Snowflake, + { files, ...body }: RESTPostAPIChannelMessageJSONBody & { files?: RawFile[] }, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.channelMessages(channelId), { + files, + body, + signal, + }) as Promise; + } + + /** + * Edits a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to edit + * @param body - The data to use when editing the message + * @param options - The options to use when editing the message + */ + public async editMessage( + channelId: Snowflake, + messageId: Snowflake, + { files, ...body }: RESTPatchAPIChannelMessageJSONBody & { files?: RawFile[] }, + { signal }: Pick = {}, + ) { + return this.rest.patch(Routes.channelMessage(channelId, messageId), { + files, + body, + signal, + }) as Promise; + } + + /** + * Fetches the reactions for a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to get the reactions for + * @param emoji - The emoji to get the reactions for + * @param query - The query options to use when fetching the reactions + * @param options - The options for fetching the message reactions + */ + public async getMessageReactions( + channelId: Snowflake, + messageId: Snowflake, + emoji: string, + query: RESTGetAPIChannelMessageReactionUsersQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Deletes a reaction for the current user + * + * @see {@link https://discord.com/developers/docs/resources/channel#delete-own-reaction} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to delete the reaction for + * @param emoji - The emoji to delete the reaction for + * @param options - The options for deleting the reaction + */ + public async deleteOwnMessageReaction( + channelId: Snowflake, + messageId: Snowflake, + emoji: string, + { signal }: Pick = {}, + ) { + await this.rest.delete(Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), { + signal, + }); + } + + /** + * Deletes a reaction for a user + * + * @see {@link https://discord.com/developers/docs/resources/channel#delete-user-reaction} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to delete the reaction for + * @param emoji - The emoji to delete the reaction for + * @param userId - The id of the user to delete the reaction for + * @param options - The options for deleting the reaction + */ + public async deleteUserMessageReaction( + channelId: Snowflake, + messageId: Snowflake, + emoji: string, + userId: Snowflake, + { signal }: Pick = {}, + ) { + await this.rest.delete(Routes.channelMessageUserReaction(channelId, messageId, encodeURIComponent(emoji), userId), { + signal, + }); + } + + /** + * Deletes all reactions for a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to delete the reactions for + * @param options - The options for deleting the reactions + */ + public async deleteAllMessageReactions( + channelId: Snowflake, + messageId: Snowflake, + { signal }: Pick = {}, + ) { + await this.rest.delete(Routes.channelMessageAllReactions(channelId, messageId), { signal }); + } + + /** + * Deletes all reactions of an emoji for a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to delete the reactions for + * @param emoji - The emoji to delete the reactions for + * @param options - The options for deleting the reactions + */ + public async deleteAllMessageReactionsForEmoji( + channelId: Snowflake, + messageId: Snowflake, + emoji: string, + { signal }: Pick = {}, + ) { + await this.rest.delete(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), { signal }); + } + + /** + * Adds a reaction to a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#create-reaction} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to add the reaction to + * @param emoji - The emoji to add the reaction with + * @param options - The options for adding the reaction + */ + public async addMessageReaction( + channelId: Snowflake, + messageId: Snowflake, + emoji: string, + { signal }: Pick = {}, + ) { + await this.rest.put(Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)), { signal }); + } + + /** + * Fetches a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-channel} + * @param channelId - The id of the channel + * @param options - The options for fetching the channel + */ + public async get(channelId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.channel(channelId), { signal }) as Promise; + } + + /** + * Edits a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel} + * @param channelId - The id of the channel to edit + * @param body - The new channel data + * @param options - The options for editing the channel + */ + public async edit( + channelId: Snowflake, + body: RESTPatchAPIChannelJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.patch(Routes.channel(channelId), { body, signal }) as Promise; + } + + /** + * Deletes a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel} + * @param channelId - The id of the channel to delete + * @param options - The options for deleting the channel + */ + public async delete(channelId: Snowflake, { signal }: Pick = {}) { + return this.rest.delete(Routes.channel(channelId), { signal }) as Promise; + } + + /** + * Fetches the messages of a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages} + * @param channelId - The id of the channel to fetch messages from + * @param query - The query options to use when fetching messages + * @param options - The options for fetching the messages + */ + public async getMessages( + channelId: Snowflake, + query: RESTGetAPIChannelMessagesQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.channelMessages(channelId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Shows a typing indicator in a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator} + * @param channelId - The id of the channel to show the typing indicator in + * @param options - The options for showing the typing indicator + */ + public async showTyping(channelId: Snowflake, { signal }: Pick = {}) { + await this.rest.post(Routes.channelTyping(channelId), { signal }); + } + + /** + * Fetches the pinned messages of a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages} + * @param channelId - The id of the channel to fetch pinned messages from + * @param options - The options for fetching the pinned messages + */ + public async getPins(channelId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.channelPins(channelId), { signal }) as Promise; + } + + /** + * Pins a message in a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#pin-message} + * @param channelId - The id of the channel to pin the message in + * @param messageId - The id of the message to pin + * @param options - The options for pinning the message + */ + public async pinMessage( + channelId: Snowflake, + messageId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.put(Routes.channelPin(channelId, messageId), { reason, signal }); + } + + /** + * Deletes a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#delete-message} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to delete + * @param options - The options for deleting the message + */ + public async deleteMessage( + channelId: Snowflake, + messageId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.channelMessage(channelId, messageId), { reason, signal }); + } + + /** + * Bulk deletes messages + * + * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages} + * @param channelId - The id of the channel the messages are in + * @param messageIds - The ids of the messages to delete + * @param options - The options for deleting the messages + */ + public async bulkDeleteMessages( + channelId: Snowflake, + messageIds: Snowflake[], + { reason, signal }: Pick = {}, + ): Promise { + await this.rest.post(Routes.channelBulkDelete(channelId), { reason, body: { messages: messageIds }, signal }); + } + + /** + * Fetches a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to fetch + * @param options - The options for fetching the message + */ + public async getMessage(channelId: Snowflake, messageId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.channelMessage(channelId, messageId), { + signal, + }) as Promise; + } + + /** + * Crossposts a message + * + * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message} + * @param channelId - The id of the channel the message is in + * @param messageId - The id of the message to crosspost + * @param options - The options for crossposting the message + */ + public async crosspostMessage( + channelId: Snowflake, + messageId: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.channelMessageCrosspost(channelId, messageId), { + signal, + }) as Promise; + } + + /** + * Unpins a message in a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message} + * @param channelId - The id of the channel to unpin the message in + * @param messageId - The id of the message to unpin + * @param options - The options for unpinning the message + */ + public async unpinMessage( + channelId: Snowflake, + messageId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.channelPin(channelId, messageId), { reason, signal }); + } + + /** + * Follows an announcement channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel} + * @param channelId - The id of the announcement channel to follow + * @param webhookChannelId - The id of the webhook channel to follow the announcements in + * @param options - The options for following the announcement channel + */ + public async followAnnouncements( + channelId: Snowflake, + webhookChannelId: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.channelFollowers(channelId), { + body: { webhook_channel_id: webhookChannelId }, + signal, + }) as Promise; + } + + /** + * Creates a new invite for a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite} + * @param channelId - The id of the channel to create an invite for + * @param body - The data to use when creating the invite + * @param options - The options for creating the invite + */ + public async createInvite( + channelId: Snowflake, + body: RESTPostAPIChannelInviteJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.channelInvites(channelId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Fetches the invites of a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites} + * @param channelId - The id of the channel to fetch invites from + * @param options - The options for fetching the invites + */ + public async getInvites(channelId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.channelInvites(channelId), { signal }) as Promise; + } + + /** + * Fetches the archived threads of a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads} + * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads} + * @param channelId - The id of the channel to fetch archived threads from + * @param archivedStatus - The archived status of the threads to fetch + * @param query - The options to use when fetching archived threads + * @param options - The options for fetching archived threads + */ + public async getArchivedThreads( + channelId: Snowflake, + archivedStatus: 'private' | 'public', + query: RESTGetAPIChannelThreadsArchivedQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.channelThreads(channelId, archivedStatus), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Fetches the private joined archived threads of a channel + * + * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads} + * @param channelId - The id of the channel to fetch joined archived threads from + * @param query - The options to use when fetching joined archived threads + * @param options - The options for fetching joined archived threads + */ + public async getJoinedPrivateArchivedThreads( + channelId: Snowflake, + query: RESTGetAPIChannelThreadsArchivedQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.channelJoinedArchivedThreads(channelId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Fetches the webhooks of a channel + * + * @see {@link https://discord.com/developers/docs/resources/webhook#get-channel-webhooks} + * @param id - The id of the channel + */ + public async getWebhooks(id: Snowflake) { + return this.rest.get(Routes.channelWebhooks(id)) as Promise; + } +} diff --git a/packages/core/src/api/guild.ts b/packages/core/src/api/guild.ts new file mode 100644 index 000000000000..2f74b3caf43b --- /dev/null +++ b/packages/core/src/api/guild.ts @@ -0,0 +1,1232 @@ +/* eslint-disable jsdoc/check-param-names */ + +import { makeURLSearchParams, type REST, type RawFile, type RequestData } from '@discordjs/rest'; +import { Routes } from 'discord-api-types/v10'; +import type { + RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, + RESTPatchAPIGuildVoiceStateCurrentMemberResult, + GuildMFALevel, + GuildWidgetStyle, + RESTGetAPIAuditLogQuery, + RESTGetAPIAuditLogResult, + RESTGetAPIAutoModerationRuleResult, + RESTGetAPIAutoModerationRulesResult, + RESTGetAPIGuildBanResult, + RESTGetAPIGuildBansQuery, + RESTGetAPIGuildBansResult, + RESTGetAPIGuildChannelsResult, + RESTGetAPIGuildEmojiResult, + RESTGetAPIGuildEmojisResult, + RESTGetAPIGuildIntegrationsResult, + RESTGetAPIGuildInvitesResult, + RESTGetAPIGuildMemberResult, + RESTGetAPIGuildMembersResult, + RESTGetAPIGuildMembersQuery, + RESTGetAPIGuildMembersSearchResult, + RESTGetAPIGuildPreviewResult, + RESTGetAPIGuildPruneCountResult, + RESTGetAPIGuildResult, + RESTGetAPIGuildRolesResult, + RESTGetAPIGuildScheduledEventQuery, + RESTGetAPIGuildScheduledEventResult, + RESTGetAPIGuildScheduledEventsQuery, + RESTGetAPIGuildScheduledEventsResult, + RESTGetAPIGuildScheduledEventUsersQuery, + RESTGetAPIGuildScheduledEventUsersResult, + RESTGetAPIGuildStickerResult, + RESTGetAPIGuildStickersResult, + RESTGetAPIGuildTemplatesResult, + RESTGetAPIGuildThreadsResult, + RESTGetAPIGuildVanityUrlResult, + RESTGetAPIGuildVoiceRegionsResult, + RESTGetAPIGuildPruneCountQuery, + RESTPostAPIGuildStickerFormDataBody, + RESTPostAPIGuildStickerResult, + RESTGetAPIGuildMembersSearchQuery, + RESTGetAPIGuildWebhooksResult, + RESTGetAPIGuildWelcomeScreenResult, + RESTGetAPIGuildWidgetImageResult, + RESTGetAPIGuildWidgetJSONResult, + RESTGetAPIGuildWidgetSettingsResult, + RESTGetAPITemplateResult, + RESTPatchAPIAutoModerationRuleJSONBody, + RESTPatchAPIAutoModerationRuleResult, + RESTPatchAPIGuildChannelPositionsJSONBody, + RESTPatchAPIGuildEmojiJSONBody, + RESTPatchAPIGuildEmojiResult, + RESTPatchAPIGuildJSONBody, + RESTPatchAPIGuildMemberJSONBody, + RESTPatchAPIGuildMemberResult, + RESTPatchAPIGuildResult, + RESTPatchAPIGuildRoleJSONBody, + RESTPatchAPIGuildRolePositionsJSONBody, + RESTPatchAPIGuildRolePositionsResult, + RESTPatchAPIGuildRoleResult, + RESTPatchAPIGuildScheduledEventJSONBody, + RESTPatchAPIGuildScheduledEventResult, + RESTPatchAPIGuildStickerJSONBody, + RESTPatchAPIGuildStickerResult, + RESTPatchAPIGuildTemplateJSONBody, + RESTPatchAPIGuildTemplateResult, + RESTPatchAPIGuildVoiceStateUserJSONBody, + RESTPatchAPIGuildWelcomeScreenJSONBody, + RESTPatchAPIGuildWelcomeScreenResult, + RESTPatchAPIGuildWidgetSettingsJSONBody, + RESTPatchAPIGuildWidgetSettingsResult, + RESTPostAPIAutoModerationRuleJSONBody, + RESTPostAPIAutoModerationRuleResult, + RESTPostAPIGuildChannelJSONBody, + RESTPostAPIGuildChannelResult, + RESTPostAPIGuildEmojiJSONBody, + RESTPostAPIGuildEmojiResult, + RESTPostAPIGuildPruneJSONBody, + RESTPostAPIGuildPruneResult, + RESTPostAPIGuildRoleJSONBody, + RESTPostAPIGuildRoleResult, + RESTPostAPIGuildScheduledEventJSONBody, + RESTPostAPIGuildScheduledEventResult, + RESTPostAPIGuildsJSONBody, + RESTPostAPIGuildsMFAResult, + RESTPostAPIGuildsResult, + RESTPostAPIGuildTemplatesJSONBody, + RESTPostAPIGuildTemplatesResult, + RESTPutAPIGuildBanJSONBody, + RESTPutAPIGuildTemplateSyncResult, + Snowflake, +} from 'discord-api-types/v10'; + +export class GuildsAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild} + * @param guildId - The id of the guild + * @param options - The options for fetching the guild + */ + public async get(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guild(guildId), { signal }) as Promise; + } + + /** + * Fetches a guild preview + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview} + * @param guildId - The id of the guild to fetch the preview from + * @param options - The options for fetching the guild preview + */ + public async getPreview(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildPreview(guildId), { + signal, + }) as Promise; + } + + /** + * Creates a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#create-guild} + * @param body - The guild to create + * @param options - The options for creating the guild + */ + public async create(body: RESTPostAPIGuildsJSONBody, { signal }: Pick = {}) { + return this.rest.post(Routes.guilds(), { body, signal }) as Promise; + } + + /** + * Edits a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild} + * @param guildId - The id of the guild to edit + * @param body - The new guild data + * @param options - The options for editing the guild + */ + public async edit( + guildId: Snowflake, + body: RESTPatchAPIGuildJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guild(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Deletes a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild} + * @param guildId - The id of the guild to delete + * @param options - The options for deleting this guild + */ + public async delete(guildId: Snowflake, { signal, reason }: Pick = {}) { + await this.rest.delete(Routes.guild(guildId), { reason, signal }); + } + + /** + * Fetches all the members of a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members} + * @param guildId - The id of the guild + * @param query - The query to use when fetching the guild members + * @param options - The options for fetching the guild members + */ + public async getMembers( + guildId: Snowflake, + query: RESTGetAPIGuildMembersQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildMembers(guildId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Fetches a guild's channels + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels} + * @param guildId - The id of the guild to fetch the channels from + * @param options - The options for fetching the guild channels + */ + public async getChannels(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildChannels(guildId), { + signal, + }) as Promise; + } + + /** + * Creates a guild channel + * + * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel} + * @param guildId - The id of the guild to create the channel in + * @param body - The data to create the new channel + * @param options - The options for creating the guild channel + */ + public async createChannel( + guildId: Snowflake, + body: RESTPostAPIGuildChannelJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.guildChannels(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Edits a guild channel's positions + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions} + * @param guildId - The id of the guild to edit the channel positions from + * @param body - The data to edit the channel positions with + * @param options - The options for editing the guild channel positions + */ + public async setChannelPositions( + guildId: Snowflake, + body: RESTPatchAPIGuildChannelPositionsJSONBody, + { reason, signal }: Pick = {}, + ) { + await this.rest.patch(Routes.guildChannels(guildId), { reason, body, signal }); + } + + /** + * Fetches the active threads in a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads} + * @param guildId - The id of the guild to fetch the active threads from + * @param options - The options for fetching the active threads + */ + public async getActiveThreads(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildActiveThreads(guildId), { signal }) as Promise; + } + + /** + * Fetches a guild member ban + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban} + * @param guildId - The id of the guild to fetch the ban from + * @param userId - The id of the user to fetch the ban + * @param options - The options for fetching the ban + */ + public async getMemberBan(guildId: Snowflake, userId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildBan(guildId, userId), { signal }) as Promise; + } + + /** + * Fetches guild member bans + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans} + * @param guildId - The id of the guild to fetch the bans from + * @param query - The query options for fetching the bans + * @param options - The options for fetching the bans + */ + public async getMemberBans( + guildId: Snowflake, + query: RESTGetAPIGuildBansQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildBans(guildId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Bans a user from a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban} + * @param guildId - The id of the guild to ban the member in + * @param userId - The id of the user to ban + * @param body - The payload for banning the user + * @param options - The options for banning the user + */ + public async banUser( + guildId: Snowflake, + userId: Snowflake, + body: RESTPutAPIGuildBanJSONBody = {}, + { reason, signal }: Pick = {}, + ) { + await this.rest.put(Routes.guildBan(guildId, userId), { reason, body, signal }); + } + + /** + * Unbans a user from a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban} + * @param guildId - The id of the guild to unban the member in + * @param userId - The id of the user to unban + * @param options - The options for unbanning the user + */ + public async unbanUser( + guildId: Snowflake, + userId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildBan(guildId, userId), { reason, signal }); + } + + /** + * Gets all the roles in a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles} + * @param guildId - The id of the guild to fetch the roles from + * @param options - The options for fetching the guild roles + */ + public async getRoles(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildRoles(guildId), { signal }) as Promise; + } + + /** + * Creates a guild role + * + * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role} + * @param guildId - The id of the guild to create the role in + * @param body - The data to create the role with + * @param options - The options for creating the guild role + */ + public async createRole( + guildId: Snowflake, + body: RESTPostAPIGuildRoleJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.guildRoles(guildId), { reason, body, signal }) as Promise; + } + + /** + * Sets role positions in a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions} + * @param guildId - The id of the guild to set role positions for + * @param body - The data for setting a role position + * @param options - The options for setting role positions + */ + public async setRolePositions( + guildId: Snowflake, + body: RESTPatchAPIGuildRolePositionsJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildRoles(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Edits a guild role + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role} + * @param guildId - The id of the guild to edit the role in + * @param roleId - The id of the role to edit + * @param body - data for editing the role + * @param options - The options for editing the guild role + */ + public async editRole( + guildId: Snowflake, + roleId: Snowflake, + body: RESTPatchAPIGuildRoleJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildRole(guildId, roleId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Deletes a guild role + * + * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role} + * @param guildId - The id of the guild to delete the role in + * @param roleId - The id of the role to delete + * @param options - The options for deleting the guild role + */ + public async deleteRole( + guildId: Snowflake, + roleId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildRole(guildId, roleId), { reason, signal }); + } + + /** + * Edits the multi-factor-authentication (MFA) level of a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level} + * @param guildId - The id of the guild to edit the MFA level for + * @param level - The new MFA level + * @param options - The options for editing the MFA level + */ + public async editMFALevel( + guildId: Snowflake, + level: GuildMFALevel, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.guildMFA(guildId), { + reason, + signal, + body: { level }, + }) as Promise; + } + + /** + * Fetch the number of members that can be pruned from a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count} + * @param guildId - The id of the guild to fetch the number of pruned members from + * @param query - The query options for fetching the number of pruned members + * @param options - The options for fetching the number of pruned members + */ + public async getPruneCount( + guildId: Snowflake, + query: RESTGetAPIGuildPruneCountQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildPrune(guildId), { + signal, + query: makeURLSearchParams(query), + }) as Promise; + } + + /** + * Prunes members in a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune} + * @param guildId - The id of the guild to prune members in + * @param body - The options for pruning members + * @param options - The options for initiating the prune + */ + public async beginPrune( + guildId: Snowflake, + body: RESTPostAPIGuildPruneJSONBody = {}, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.guildPrune(guildId), { + body, + reason, + signal, + }) as Promise; + } + + /** + * Fetches voice regions for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions} + * @param guildId - The id of the guild to fetch the voice regions from + * @param options - The options for fetching the voice regions + */ + public async getVoiceRegions(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildVoiceRegions(guildId), { signal }) as Promise; + } + + /** + * Fetches the invites for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites} + * @param guildId - The id of the guild to fetch the invites from + * @param options - The options for fetching the invites + */ + public async getInvites(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildInvites(guildId), { signal }) as Promise; + } + + /** + * Fetches the integrations for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations} + * @param guildId - The id of the guild to fetch the integrations from + * @param options - The options for fetching the integrations + */ + public async getIntegrations(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildIntegrations(guildId), { signal }) as Promise; + } + + /** + * Deletes an integration from a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration} + * @param guildId - The id of the guild to delete the integration from + * @param integrationId - The id of the integration to delete + * @param options - The options for deleting the integration + */ + public async deleteIntegration( + guildId: Snowflake, + integrationId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildIntegration(guildId, integrationId), { reason, signal }); + } + + /** + * Fetches the widget settings for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings} + * @param guildId - The id of the guild to fetch the widget settings from + * @param options - The options for fetching the widget settings + */ + public async getWidgetSettings(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildWidgetSettings(guildId), { + signal, + }) as Promise; + } + + /** + * Edits the widget settings for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget} + * @param guildId - The id of the guild to edit the widget settings from + * @param body - The new widget settings data + * @param options - The options for editing the widget settings + */ + public async editWidgetSettings( + guildId: Snowflake, + body: RESTPatchAPIGuildWidgetSettingsJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildWidgetSettings(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Fetches the widget for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget} + * @param guildId - The id of the guild to fetch the widget from + * @param options - The options for fetching the widget + */ + public async getWidget(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildWidgetJSON(guildId), { signal }) as Promise; + } + + /** + * Fetches the vanity url for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url} + * @param guildId - The id of the guild to fetch the vanity url from + * @param options - The options for fetching the vanity url + */ + public async getVanityURL(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildVanityUrl(guildId), { signal }) as Promise; + } + + /** + * Fetches the widget image for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image} + * @param guildId - The id of the guild to fetch the widget image from + * @param style - The style of the widget image + * @param options - The options for fetching the widget image + */ + public async getWidgetImage( + guildId: Snowflake, + style?: GuildWidgetStyle, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildWidgetImage(guildId), { + query: makeURLSearchParams({ style }), + signal, + }) as Promise; + } + + /** + * Fetches the welcome screen for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen} + * @param guildId - The id of the guild to fetch the welcome screen from + * @param options - The options for fetching the welcome screen + */ + public async getWelcomeScreen(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildWelcomeScreen(guildId), { signal }) as Promise; + } + + /** + * Edits the welcome screen for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen} + * @param guildId - The id of the guild to edit the welcome screen for + * @param body - The new welcome screen data + * @param options - The options for editing the welcome screen + */ + public async editWelcomeScreen( + guildId: Snowflake, + body?: RESTPatchAPIGuildWelcomeScreenJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildWelcomeScreen(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Edits a user's voice state in a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-user-voice-state} + * @param guildId - The id of the guild to edit the current user's voice state in + * @param userId - The id of the user to edit the voice state for + * @param body - The data for editing the voice state + * @param options - The options for editing the voice state + */ + public async editUserVoiceState( + guildId: Snowflake, + userId: Snowflake, + body: RESTPatchAPIGuildVoiceStateUserJSONBody, + { reason, signal }: Pick = {}, + ) { + await this.rest.patch(Routes.guildVoiceState(guildId, userId), { reason, body, signal }); + } + + /** + * Fetches all emojis for a guild + * + * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis} + * @param guildId - The id of the guild to fetch the emojis from + * @param options - The options for fetching the emojis + */ + public async getEmojis(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildEmojis(guildId), { signal }) as Promise; + } + + /** + * Fetches an emoji for a guild + * + * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji} + * @param guildId - The id of the guild to fetch the emoji from + * @param emojiId - The id of the emoji to fetch + * @param options - The options for fetching the emoji + */ + public async getEmoji(guildId: Snowflake, emojiId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildEmoji(guildId, emojiId), { signal }) as Promise; + } + + /** + * Creates a new emoji for a guild + * + * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji} + * @param guildId - The id of the guild to create the emoji from + * @param body - The data for creating the emoji + * @param options - The options for creating the emoji + */ + public async createEmoji( + guildId: Snowflake, + body: RESTPostAPIGuildEmojiJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.guildEmojis(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Edits an emoji for a guild + * + * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji} + * @param guildId - The id of the guild to edit the emoji from + * @param emojiId - The id of the emoji to edit + * @param body - The data for editing the emoji + * @param options - The options for editing the emoji + */ + public async editEmoji( + guildId: Snowflake, + emojiId: Snowflake, + body: RESTPatchAPIGuildEmojiJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildEmoji(guildId, emojiId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Deletes an emoji for a guild + * + * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji} + * @param guildId - The id of the guild to delete the emoji from + * @param emojiId - The id of the emoji to delete + * @param options - The options for deleting the emoji + */ + public async deleteEmoji( + guildId: Snowflake, + emojiId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildEmoji(guildId, emojiId), { reason, signal }); + } + + /** + * Fetches all scheduled events for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild} + * @param guildId - The id of the guild to fetch the scheduled events from + * @param query - The query options for fetching the scheduled events + * @param options - The options for fetching the scheduled events + */ + public async getScheduledEvents( + guildId: Snowflake, + query: RESTGetAPIGuildScheduledEventsQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildScheduledEvents(guildId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Creates a new scheduled event for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event} + * @param guildId - The id of the guild to create the scheduled event from + * @param body - The data to create the event with + * @param options - The options for creating the scheduled event + */ + public async createScheduledEvent( + guildId: Snowflake, + body: RESTPostAPIGuildScheduledEventJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.guildScheduledEvents(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Fetches a scheduled event for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event} + * @param guildId - The id of the guild to fetch the scheduled event from + * @param eventId - The id of the scheduled event to fetch + * @param query - The options for fetching the scheduled event + * @param options - The options for fetching the scheduled event + */ + public async getScheduledEvent( + guildId: Snowflake, + eventId: Snowflake, + query: RESTGetAPIGuildScheduledEventQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildScheduledEvent(guildId, eventId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Edits a scheduled event for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event} + * @param guildId - The id of the guild to edit the scheduled event from + * @param eventId - The id of the scheduled event to edit + * @param body - The new event data + * @param options - The options for editing the scheduled event + */ + public async editScheduledEvent( + guildId: Snowflake, + eventId: Snowflake, + body: RESTPatchAPIGuildScheduledEventJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildScheduledEvent(guildId, eventId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Deletes a scheduled event for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event} + * @param guildId - The id of the guild to delete the scheduled event from + * @param eventId - The id of the scheduled event to delete + * @param options - The options for deleting the scheduled event + */ + public async deleteScheduledEvent( + guildId: Snowflake, + eventId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildScheduledEvent(guildId, eventId), { reason, signal }); + } + + /** + * Gets all users that are interested in a scheduled event + * + * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users} + * @param guildId - The id of the guild to fetch the scheduled event users from + * @param eventId - The id of the scheduled event to fetch the users for + * @param query - The options for fetching the scheduled event users + * @param options - The options for fetching the scheduled event users + */ + public async getScheduledEventUsers( + guildId: Snowflake, + eventId: Snowflake, + query: RESTGetAPIGuildScheduledEventUsersQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildScheduledEventUsers(guildId, eventId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Fetches all the templates for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates} + * @param guildId - The id of the guild to fetch the templates from + * @param options - The options for fetching the templates + */ + public async getTemplates(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildTemplates(guildId), { signal }) as Promise; + } + + /** + * Syncs a template for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-template#sync-guild-template} + * @param guildId - The id of the guild to sync the template from + * @param templateCode - The code of the template to sync + * @param options - The options for syncing the template + */ + public async syncTemplate(guildId: Snowflake, templateCode: string, { signal }: Pick = {}) { + return this.rest.put(Routes.guildTemplate(guildId, templateCode), { + signal, + }) as Promise; + } + + /** + * Edits a template for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template} + * @param guildId - The id of the guild to edit the template from + * @param templateCode - The code of the template to edit + * @param body - The data for editing the template + * @param options - The options for editing the template + */ + public async editTemplate( + guildId: Snowflake, + templateCode: string, + body: RESTPatchAPIGuildTemplateJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildTemplate(guildId, templateCode), { + body, + signal, + }) as Promise; + } + + /** + * Deletes a template for a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild-template#delete-guild-template} + * @param guildId - The id of the guild to delete the template from + * @param templateCode - The code of the template to delete + * @param options - The options for deleting the template + */ + public async deleteTemplate(guildId: Snowflake, templateCode: string, { signal }: Pick = {}) { + await this.rest.delete(Routes.guildTemplate(guildId, templateCode), { signal }); + } + + /** + * Fetches all the stickers for a guild + * + * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers} + * @param guildId - The id of the guild to fetch the stickers from + * @param options - The options for fetching the stickers + */ + public async getStickers(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildStickers(guildId), { signal }) as Promise; + } + + /** + * Fetches a sticker for a guild + * + * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker} + * @param guildId - The id of the guild to fetch the sticker from + * @param stickerId - The id of the sticker to fetch + * @param options - The options for fetching the sticker + */ + public async getSticker(guildId: Snowflake, stickerId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildSticker(guildId, stickerId), { signal }) as Promise; + } + + /** + * Creates a sticker for a guild + * + * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker} + * @param guildId - The id of the guild to create the sticker for + * @param body - The data for creating the sticker + * @param options - The options for creating the sticker + */ + public async createSticker( + guildId: Snowflake, + { file, ...body }: Omit & { file: RawFile }, + { reason, signal }: Pick = {}, + ) { + const fileData = { ...file, key: 'file' }; + + return this.rest.post(Routes.guildStickers(guildId), { + appendToFormData: true, + body, + files: [fileData], + reason, + signal, + }) as Promise; + } + + /** + * Edits a sticker for a guild + * + * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker} + * @param guildId - The id of the guild to edit the sticker from + * @param stickerId - The id of the sticker to edit + * @param body - The data for editing the sticker + * @param options - The options for editing the sticker + */ + public async editSticker( + guildId: Snowflake, + stickerId: Snowflake, + body: RESTPatchAPIGuildStickerJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildSticker(guildId, stickerId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Deletes a sticker for a guild + * + * @see {@link https://discord.com/developers/docs/resources/sticker#delete-guild-sticker} + * @param guildId - The id of the guild to delete the sticker from + * @param stickerId - The id of the sticker to delete + * @param options - The options for deleting the sticker + */ + public async deleteSticker( + guildId: Snowflake, + stickerId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildSticker(guildId, stickerId), { reason, signal }); + } + + /** + * Fetches the audit logs for a guild + * + * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log} + * @param guildId - The id of the guild to fetch the audit logs from + * @param query - The query options for fetching the audit logs + * @param options - The options for fetching the audit logs + */ + public async getAuditLogs( + guildId: Snowflake, + query: RESTGetAPIAuditLogQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildAuditLog(guildId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Fetches all auto moderation rules for a guild + * + * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild} + * @param guildId - The id of the guild to fetch the auto moderation rules from + * @param options - The options for fetching the auto moderation rules + */ + public async getAutoModerationRules(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildAutoModerationRules(guildId), { + signal, + }) as Promise; + } + + /** + * Fetches an auto moderation rule for a guild + * + * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule} + * @param guildId - The id of the guild to fetch the auto moderation rule from + * @param ruleId - The id of the auto moderation rule to fetch + * @param options - The options for fetching the auto moderation rule + */ + public async getAutoModerationRule( + guildId: Snowflake, + ruleId: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildAutoModerationRule(guildId, ruleId), { + signal, + }) as Promise; + } + + /** + * Creates a new auto moderation rule for a guild + * + * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule} + * @param guildId - The id of the guild to create the auto moderation rule from + * @param body - The data for creating the auto moderation rule + * @param options - The options for creating the auto moderation rule + */ + public async createAutoModerationRule( + guildId: Snowflake, + body: RESTPostAPIAutoModerationRuleJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.guildAutoModerationRules(guildId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Edits an auto moderation rule for a guild + * + * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule} + * @param guildId - The id of the guild to edit the auto moderation rule from + * @param ruleId - The id of the auto moderation rule to edit + * @param body - The data for editing the auto moderation rule + * @param options - The options for editing the auto moderation rule + */ + public async editAutoModerationRule( + guildId: Snowflake, + ruleId: Snowflake, + body: RESTPatchAPIAutoModerationRuleJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildAutoModerationRule(guildId, ruleId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Deletes an auto moderation rule for a guild + * + * @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule} + * @param guildId - The id of the guild to delete the auto moderation rule from + * @param ruleId - The id of the auto moderation rule to delete + * @param options - The options for deleting the auto moderation rule + */ + public async deleteAutoModerationRule( + guildId: Snowflake, + ruleId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildAutoModerationRule(guildId, ruleId), { reason, signal }); + } + + /** + * Fetches a guild member + * + * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member} + * @param guildId - The id of the guild + * @param userId - The id of the user + * @param options - The options for fetching the guild member + */ + public async getMember(guildId: Snowflake, userId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.guildMember(guildId, userId), { signal }) as Promise; + } + + /** + * Searches for guild members + * + * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members} + * @param guildId - The id of the guild to search in + * @param query - The query to search for + * @param options - The options for searching for guild members + */ + public async searchForMembers( + guildId: Snowflake, + query: RESTGetAPIGuildMembersSearchQuery, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.guildMembersSearch(guildId), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Edits a guild member + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member} + * @param guildId - The id of the guild + * @param userId - The id of the user + * @param body - The data to use when editing the guild member + * @param options - The options for editing the guild member + */ + public async editMember( + guildId: Snowflake, + userId: Snowflake, + body: RESTPatchAPIGuildMemberJSONBody = {}, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildMember(guildId, userId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Removes a member from a guild + * + * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member} + * @param guildId - The id of the guild + * @param userId - The id of the user + * @param options - The options for removing the guild member + */ + public async removeMember( + guildId: Snowflake, + userId: Snowflake, + { reason, signal }: Pick = {}, + ) { + return this.rest.delete(Routes.guildMember(guildId, userId), { reason, signal }); + } + + /** + * Adds a role to a guild member + * + * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role} + * @param guildId - The id of the guild + * @param userId - The id of the user + * @param roleId - The id of the role + * @param options - The options for adding a role to a guild member + */ + public async addRoleToMember( + guildId: Snowflake, + userId: Snowflake, + roleId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.put(Routes.guildMemberRole(guildId, userId, roleId), { reason, signal }); + } + + /** + * Removes a role from a guild member + * + * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member-role} + * @param guildId - The id of the guild + * @param userId - The id of the user + * @param roleId - The id of the role + * @param options - The options for removing a role from a guild member + */ + public async removeRoleFromMember( + guildId: Snowflake, + userId: Snowflake, + roleId: Snowflake, + { reason, signal }: Pick = {}, + ) { + await this.rest.delete(Routes.guildMemberRole(guildId, userId, roleId), { reason, signal }); + } + + /** + * Fetches a guild template + * + * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template} + * @param templateCode - The code of the template + * @param options - The options for fetching the guild template + */ + public async getTemplate(templateCode: string, { signal }: Pick = {}) { + return this.rest.get(Routes.template(templateCode), { signal }) as Promise; + } + + /** + * Creates a new template + * + * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template} + * @param templateCode - The code of the template + * @param body - The data to use when creating the template + * @param options - The options for creating the template + */ + public async createTemplate( + templateCode: string, + body: RESTPostAPIGuildTemplatesJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.template(templateCode), { body, signal }) as Promise; + } + + /** + * Fetches webhooks for a guild + * + * @see {@link https://discord.com/developers/docs/resources/webhook#get-guild-webhooks} + * @param id - The id of the guild + */ + public async getWebhooks(id: Snowflake) { + return this.rest.get(Routes.guildWebhooks(id)) as Promise; + } + + /** + * Sets the voice state for the current user + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state} + * @param guildId - The id of the guild + * @param body - The options to use when setting the voice state + */ + public async setVoiceState(guildId: Snowflake, body: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody = {}) { + return this.rest.patch(Routes.guildVoiceState(guildId, '@me'), { + body, + }) as Promise; + } +} diff --git a/packages/core/src/api/index.ts b/packages/core/src/api/index.ts new file mode 100644 index 000000000000..01812a65ce72 --- /dev/null +++ b/packages/core/src/api/index.ts @@ -0,0 +1,72 @@ +import type { REST } from '@discordjs/rest'; +import { ApplicationCommandsAPI } from './applicationCommands.js'; +import { ChannelsAPI } from './channel.js'; +import { GuildsAPI } from './guild.js'; +import { InteractionsAPI } from './interactions.js'; +import { InvitesAPI } from './invite.js'; +import { OAuth2API } from './oauth2.js'; +import { RoleConnectionsAPI } from './roleConnections.js'; +import { StageInstancesAPI } from './stageInstances.js'; +import { StickersAPI } from './sticker.js'; +import { ThreadsAPI } from './thread.js'; +import { UsersAPI } from './user.js'; +import { VoiceAPI } from './voice.js'; +import { WebhooksAPI } from './webhook.js'; + +export * from './applicationCommands.js'; +export * from './channel.js'; +export * from './guild.js'; +export * from './interactions.js'; +export * from './invite.js'; +export * from './oauth2.js'; +export * from './roleConnections.js'; +export * from './stageInstances.js'; +export * from './sticker.js'; +export * from './thread.js'; +export * from './user.js'; +export * from './voice.js'; +export * from './webhook.js'; + +export class API { + public readonly applicationCommands: ApplicationCommandsAPI; + + public readonly channels: ChannelsAPI; + + public readonly guilds: GuildsAPI; + + public readonly interactions: InteractionsAPI; + + public readonly invites: InvitesAPI; + + public readonly oauth2: OAuth2API; + + public readonly roleConnections: RoleConnectionsAPI; + + public readonly stageInstances: StageInstancesAPI; + + public readonly stickers: StickersAPI; + + public readonly threads: ThreadsAPI; + + public readonly users: UsersAPI; + + public readonly voice: VoiceAPI; + + public readonly webhooks: WebhooksAPI; + + public constructor(public readonly rest: REST) { + this.applicationCommands = new ApplicationCommandsAPI(rest); + this.channels = new ChannelsAPI(rest); + this.guilds = new GuildsAPI(rest); + this.invites = new InvitesAPI(rest); + this.roleConnections = new RoleConnectionsAPI(rest); + this.oauth2 = new OAuth2API(rest); + this.stageInstances = new StageInstancesAPI(rest); + this.stickers = new StickersAPI(rest); + this.threads = new ThreadsAPI(rest); + this.users = new UsersAPI(rest); + this.voice = new VoiceAPI(rest); + this.webhooks = new WebhooksAPI(rest); + this.interactions = new InteractionsAPI(rest, this.webhooks); + } +} diff --git a/packages/core/src/api/interactions.ts b/packages/core/src/api/interactions.ts new file mode 100644 index 000000000000..21a5066f9d7c --- /dev/null +++ b/packages/core/src/api/interactions.ts @@ -0,0 +1,248 @@ +/* eslint-disable jsdoc/check-param-names */ + +import type { RawFile, RequestData, REST } from '@discordjs/rest'; +import { InteractionResponseType, Routes } from 'discord-api-types/v10'; +import type { + APICommandAutocompleteInteractionResponseCallbackData, + APIInteractionResponseCallbackData, + APIModalInteractionResponseCallbackData, + RESTGetAPIWebhookWithTokenMessageResult, + Snowflake, + APIInteractionResponseDeferredChannelMessageWithSource, +} from 'discord-api-types/v10'; +import type { WebhooksAPI } from './webhook.js'; + +export class InteractionsAPI { + public constructor(private readonly rest: REST, private readonly webhooks: WebhooksAPI) {} + + /** + * Replies to an interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} + * @param interactionId - The id of the interaction + * @param interactionToken - The token of the interaction + * @param body - The callback data to use when replying + * @param options - The options to use when replying + */ + public async reply( + interactionId: Snowflake, + interactionToken: string, + { files, ...data }: APIInteractionResponseCallbackData & { files?: RawFile[] }, + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { + files, + auth: false, + body: { + type: InteractionResponseType.ChannelMessageWithSource, + data, + }, + signal, + }); + } + + /** + * Defers the reply to an interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} + * @param interactionId - The id of the interaction + * @param interactionToken - The token of the interaction + * @param data - The data to use when deferring the reply + * @param options - The options to use when deferring + */ + public async defer( + interactionId: Snowflake, + interactionToken: string, + data?: APIInteractionResponseDeferredChannelMessageWithSource['data'], + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { + auth: false, + body: { + type: InteractionResponseType.DeferredChannelMessageWithSource, + data, + }, + signal, + }); + } + + /** + * Defers an update from a message component interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} + * @param interactionId - The id of the interaction + * @param interactionToken - The token of the interaction + * @param options - The options to use when deferring + */ + public async deferMessageUpdate( + interactionId: Snowflake, + interactionToken: string, + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { + auth: false, + body: { + type: InteractionResponseType.DeferredMessageUpdate, + }, + signal, + }); + } + + /** + * Reply to a deferred interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} + * @param applicationId - The application id of the interaction + * @param interactionToken - The token of the interaction + * @param body - The callback data to use when replying + * @param options - The options to use when replying + */ + public async followUp( + applicationId: Snowflake, + interactionToken: string, + body: APIInteractionResponseCallbackData & { files?: RawFile[] }, + { signal }: Pick = {}, + ) { + return this.webhooks.execute(applicationId, interactionToken, { ...body, wait: true }, { signal }); + } + + /** + * Edits the initial reply to an interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response} + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message} + * @param applicationId - The application id of the interaction + * @param interactionToken - The token of the interaction + * @param callbackData - The callback data to use when editing the reply + * @param messageId - The id of the message to edit. If omitted, the original reply will be edited + * @param options - The options to use when editing the reply + */ + public async editReply( + applicationId: Snowflake, + interactionToken: string, + callbackData: APIInteractionResponseCallbackData & { files?: RawFile[] }, + messageId?: Snowflake | '@original', + { signal }: Pick = {}, + ) { + return this.webhooks.editMessage(applicationId, interactionToken, messageId ?? '@original', callbackData, { + signal, + }); + } + + /** + * Fetches the initial reply to an interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response} + * @param applicationId - The application id of the interaction + * @param interactionToken - The token of the interaction + * @param options - The options to use when fetching the reply + */ + public async getOriginalReply( + applicationId: Snowflake, + interactionToken: string, + { signal }: Pick = {}, + ) { + return this.webhooks.getMessage( + applicationId, + interactionToken, + '@original', + {}, + { signal }, + ) as Promise; + } + + /** + * Deletes the initial reply to an interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response} + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message} + * @param applicationId - The application id of the interaction + * @param interactionToken - The token of the interaction + * @param messageId - The id of the message to delete. If omitted, the original reply will be deleted + * @param options - The options to use when deleting the reply + */ + public async deleteReply( + applicationId: Snowflake, + interactionToken: string, + messageId?: Snowflake | '@original', + { signal }: Pick = {}, + ) { + await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? '@original', {}, { signal }); + } + + /** + * Updates the the message the component interaction was triggered on + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} + * @param interactionId - The id of the interaction + * @param interactionToken - The token of the interaction + * @param callbackData - The callback data to use when updating the interaction + * @param options - The options to use when updating the interaction + */ + public async updateMessage( + interactionId: Snowflake, + interactionToken: string, + { files, ...data }: APIInteractionResponseCallbackData & { files?: RawFile[] }, + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { + files, + auth: false, + body: { + type: InteractionResponseType.UpdateMessage, + data, + }, + signal, + }); + } + + /** + * Sends an autocomplete response to an interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} + * @param interactionId - The id of the interaction + * @param interactionToken - The token of the interaction + * @param callbackData - The callback data for the autocomplete response + * @param options - The options to use when sending the autocomplete response + */ + public async createAutocompleteResponse( + interactionId: Snowflake, + interactionToken: string, + callbackData: APICommandAutocompleteInteractionResponseCallbackData, + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { + auth: false, + body: { + type: InteractionResponseType.ApplicationCommandAutocompleteResult, + data: callbackData, + }, + signal, + }); + } + + /** + * Sends a modal response to an interaction + * + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response} + * @param interactionId - The id of the interaction + * @param interactionToken - The token of the interaction + * @param callbackData - The modal callback data to send + * @param options - The options to use when sending the modal + */ + public async createModal( + interactionId: Snowflake, + interactionToken: string, + callbackData: APIModalInteractionResponseCallbackData, + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { + auth: false, + body: { + type: InteractionResponseType.Modal, + data: callbackData, + }, + signal, + }); + } +} diff --git a/packages/core/src/api/invite.ts b/packages/core/src/api/invite.ts new file mode 100644 index 000000000000..39ce1a9b2214 --- /dev/null +++ b/packages/core/src/api/invite.ts @@ -0,0 +1,34 @@ +/* eslint-disable jsdoc/check-param-names */ + +import { makeURLSearchParams, type RequestData, type REST } from '@discordjs/rest'; +import { Routes, type RESTGetAPIInviteQuery, type RESTGetAPIInviteResult } from 'discord-api-types/v10'; + +export class InvitesAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches an invite + * + * @see {@link https://discord.com/developers/docs/resources/invite#get-invite} + * @param code - The invite code + * @param query - The options to use when fetching the invite + * @param options - The options to use when fetching the invite + */ + public async get(code: string, query: RESTGetAPIInviteQuery = {}, { signal }: Pick = {}) { + return this.rest.get(Routes.invite(code), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Deletes an invite + * + * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite} + * @param code - The invite code + * @param options - The options to use when deleting the invite + */ + public async delete(code: string, { reason, signal }: Pick = {}) { + await this.rest.delete(Routes.invite(code), { reason, signal }); + } +} diff --git a/packages/core/src/api/oauth2.ts b/packages/core/src/api/oauth2.ts new file mode 100644 index 000000000000..c47903b04e0d --- /dev/null +++ b/packages/core/src/api/oauth2.ts @@ -0,0 +1,122 @@ +/* eslint-disable jsdoc/check-param-names */ + +import { URL } from 'node:url'; +import { type RequestData, type REST, makeURLSearchParams } from '@discordjs/rest'; +import { + Routes, + RouteBases, + type RESTOAuth2AuthorizationQuery, + type RESTPostOAuth2RefreshTokenURLEncodedData, + type RESTPostOAuth2RefreshTokenResult, + type RESTPostOAuth2ClientCredentialsURLEncodedData, + type RESTPostOAuth2ClientCredentialsResult, + type RESTGetAPIOAuth2CurrentAuthorizationResult, + type RESTGetAPIOAuth2CurrentApplicationResult, + type RESTPostOAuth2AccessTokenURLEncodedData, + type RESTPostOAuth2AccessTokenResult, +} from 'discord-api-types/v10'; + +export class OAuth2API { + public constructor(private readonly rest: REST) {} + + /** + * Creates an OAuth2 authorization URL given the options + * + * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-authorization-url-example} + * @param options - The options for creating the authorization URL + */ + public generateAuthorizationURL(options: RESTOAuth2AuthorizationQuery) { + const url = new URL(`${RouteBases.api}${Routes.oauth2Authorization()}`); + url.search = makeURLSearchParams(options).toString(); + return url.toString(); + } + + /** + * Performs an OAuth2 token exchange, giving you an access token + * + * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-exchange-example} + * @param body - The body of the token exchange request + * @param options - The options for the token exchange request + */ + public async tokenExchange( + body: RESTPostOAuth2AccessTokenURLEncodedData, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.oauth2TokenExchange(), { + body: makeURLSearchParams(body), + passThroughBody: true, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + signal, + }) as Promise; + } + + /** + * Refreshes an OAuth2 access token, giving you a new one + * + * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example} + * @param body - The options for the refresh token request + * @param options - The options for the refresh token request + */ + public async refreshToken( + body: RESTPostOAuth2RefreshTokenURLEncodedData, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.oauth2TokenExchange(), { + body: makeURLSearchParams(body), + passThroughBody: true, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + signal, + }) as Promise; + } + + /** + * Fetches the bearer token for the current application + * + * @remarks + * This is primarily used for testing purposes + * @see {@link https://discord.com/developers/docs/topics/oauth2#client-credentials-grant} + * @param body - The options for the client credentials grant request + * @param options - The options for the client credentials grant request + */ + public async getToken( + body: RESTPostOAuth2ClientCredentialsURLEncodedData, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.oauth2TokenExchange(), { + body: makeURLSearchParams(body), + passThroughBody: true, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + signal, + }) as Promise; + } + + /** + * Fetches the current bot's application information + * + * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information} + * @param options - The options for the current bot application information request + */ + public async getCurrentBotApplicationInformation({ signal }: Pick = {}) { + return this.rest.get(Routes.oauth2CurrentApplication(), { + signal, + }) as Promise; + } + + /** + * Fetches the current authorization information + * + * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information} + * @param options - The options for the current authorization information request + */ + public async getCurrentAuthorizationInformation({ signal }: Pick = {}) { + return this.rest.get(Routes.oauth2CurrentAuthorization(), { + signal, + }) as Promise; + } +} diff --git a/packages/core/src/api/roleConnections.ts b/packages/core/src/api/roleConnections.ts new file mode 100644 index 000000000000..065444aa6993 --- /dev/null +++ b/packages/core/src/api/roleConnections.ts @@ -0,0 +1,46 @@ +/* eslint-disable jsdoc/check-param-names */ + +import type { RequestData, REST } from '@discordjs/rest'; +import { + Routes, + type RESTGetAPIApplicationRoleConnectionMetadataResult, + type RESTPutAPIApplicationRoleConnectionMetadataResult, + type RESTPutAPIApplicationRoleConnectionMetadataJSONBody, + type Snowflake, +} from 'discord-api-types/v10'; + +export class RoleConnectionsAPI { + public constructor(private readonly rest: REST) {} + + /** + * Gets the role connection metadata records for the application + * + * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records} + * @param applicationId - The id of the application to get role connection metadata records for + * @param options - The options to use when fetching the role connection metadata records + */ + public async getMetadataRecords(applicationId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.applicationRoleConnectionMetadata(applicationId), { + signal, + }) as Promise; + } + + /** + * Updates the role connection metadata records for the application + * + * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records} + * @param applicationId - The id of the application to update role connection metadata records for + * @param body - The new role connection metadata records + * @param options - The options to use when updating the role connection metadata records + */ + public async updateMetadataRecords( + applicationId: Snowflake, + body: RESTPutAPIApplicationRoleConnectionMetadataJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.put(Routes.applicationRoleConnectionMetadata(applicationId), { + body, + signal, + }) as Promise; + } +} diff --git a/packages/core/src/api/stageInstances.ts b/packages/core/src/api/stageInstances.ts new file mode 100644 index 000000000000..a43df7fc9f79 --- /dev/null +++ b/packages/core/src/api/stageInstances.ts @@ -0,0 +1,76 @@ +/* eslint-disable jsdoc/check-param-names */ + +import type { RequestData, REST } from '@discordjs/rest'; +import { + type Snowflake, + type RESTGetAPIStageInstanceResult, + type RESTPatchAPIStageInstanceJSONBody, + type RESTPatchAPIStageInstanceResult, + type RESTPostAPIStageInstanceJSONBody, + type RESTPostAPIStageInstanceResult, + Routes, +} from 'discord-api-types/v10'; + +export class StageInstancesAPI { + public constructor(private readonly rest: REST) {} + + /** + * Creates a new stage instance + * + * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance} + * @param body - The data to use when creating the new stage instance + * @param options - The options for creating the new stage instance + */ + public async create( + body: RESTPostAPIStageInstanceJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.stageInstances(), { + body, + reason, + signal, + }) as Promise; + } + + /** + * Fetches a stage instance + * + * @see {@link https://discord.com/developers/docs/resources/stage-instance#get-stage-instance} + * @param channelId - The id of the channel + * @param options - The options for fetching the stage instance + */ + public async get(channelId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.stageInstance(channelId), { signal }) as Promise; + } + + /** + * Edits a stage instance + * + * @see {@link https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance} + * @param channelId - The id of the channel + * @param body - The new stage instance data + * @param options - The options for editing the stage instance + */ + public async edit( + channelId: Snowflake, + body: RESTPatchAPIStageInstanceJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.stageInstance(channelId), { + body, + reason, + signal, + }) as Promise; + } + + /** + * Deletes a stage instance + * + * @see {@link https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance} + * @param channelId - The id of the channel + * @param options - The options for deleting the stage instance + */ + public async delete(channelId: Snowflake, { reason, signal }: Pick = {}) { + await this.rest.delete(Routes.stageInstance(channelId), { reason, signal }); + } +} diff --git a/packages/core/src/api/sticker.ts b/packages/core/src/api/sticker.ts new file mode 100644 index 000000000000..fa53428bd1b8 --- /dev/null +++ b/packages/core/src/api/sticker.ts @@ -0,0 +1,34 @@ +/* eslint-disable jsdoc/check-param-names */ + +import type { RequestData, REST } from '@discordjs/rest'; +import { + Routes, + type RESTGetAPIStickerResult, + type RESTGetNitroStickerPacksResult, + type Snowflake, +} from 'discord-api-types/v10'; + +export class StickersAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches all of the nitro sticker packs + * + * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs} + * @param options - The options to use when fetching the sticker packs + */ + public async getNitroStickers({ signal }: Pick = {}) { + return this.rest.get(Routes.nitroStickerPacks(), { signal }) as Promise; + } + + /** + * Fetches a sticker + * + * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker} + * @param stickerId - The id of the sticker + * @param options - The options to use when fetching the sticker + */ + public async get(stickerId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.sticker(stickerId), { signal }) as Promise; + } +} diff --git a/packages/core/src/api/thread.ts b/packages/core/src/api/thread.ts new file mode 100644 index 000000000000..c9dd0014129e --- /dev/null +++ b/packages/core/src/api/thread.ts @@ -0,0 +1,146 @@ +/* eslint-disable jsdoc/check-param-names */ + +import type { RawFile, RequestData, REST } from '@discordjs/rest'; +import { + Routes, + type APIThreadChannel, + type APIThreadMember, + type RESTGetAPIChannelThreadMembersResult, + type RESTPostAPIChannelThreadsJSONBody, + type RESTPostAPIChannelThreadsResult, + type RESTPostAPIGuildForumThreadsJSONBody, + type Snowflake, +} from 'discord-api-types/v10'; + +export interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody { + message: RESTPostAPIGuildForumThreadsJSONBody['message'] & { files?: RawFile[] }; +} + +export class ThreadsAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches a thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-channel} + * @param threadId - The id of the thread + * @param options - The options to use when fetching the thread + */ + public async get(threadId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.channel(threadId), { signal }) as Promise; + } + + /** + * Creates a new thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message} + * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message} + * @param channelId - The id of the channel to start the thread in + * @param body - The data to use when starting the thread + * @param messageId - The id of the message to start the thread from + * @param options - The options to use when starting the thread + */ + public async create( + channelId: Snowflake, + body: RESTPostAPIChannelThreadsJSONBody, + messageId?: Snowflake, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.threads(channelId, messageId), { + body, + signal, + }) as Promise; + } + + /** + * Creates a new forum post + * + * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel} + * @param channelId - The id of the forum channel to start the thread in + * @param body - The data to use when starting the thread + * @param options - The options to use when starting the thread + */ + public async createForumThread( + channelId: Snowflake, + { message, ...optionsBody }: StartForumThreadOptions, + { signal }: Pick = {}, + ) { + const { files, ...messageBody } = message; + + const body = { + ...optionsBody, + message: messageBody, + }; + + return this.rest.post(Routes.threads(channelId), { files, body, signal }) as Promise; + } + + /** + * Adds the current user to a thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#join-thread} + * @param threadId - The id of the thread to join + * @param options - The options to use when joining the thread + */ + public async join(threadId: Snowflake, { signal }: Pick = {}) { + await this.rest.put(Routes.threadMembers(threadId, '@me'), { signal }); + } + + /** + * Adds a member to a thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member} + * @param threadId - The id of the thread to add the member to + * @param userId - The id of the user to add to the thread + * @param options - The options to use when adding the member to the thread + */ + public async addMember(threadId: Snowflake, userId: Snowflake, { signal }: Pick = {}) { + await this.rest.put(Routes.threadMembers(threadId, userId), { signal }); + } + + /** + * Removes the current user from a thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#leave-thread} + * @param threadId - The id of the thread to leave + * @param options - The options to use when leaving the thread + */ + public async leave(threadId: Snowflake, { signal }: Pick = {}) { + await this.rest.delete(Routes.threadMembers(threadId, '@me'), { signal }); + } + + /** + * Removes a member from a thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member} + * @param threadId - The id of the thread to remove the member from + * @param userId - The id of the user to remove from the thread + * @param options - The options to use when removing the member from the thread + */ + public async removeMember(threadId: Snowflake, userId: Snowflake, { signal }: Pick = {}) { + await this.rest.delete(Routes.threadMembers(threadId, userId), { signal }); + } + + /** + * Fetches a member of a thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member} + * @param threadId - The id of the thread to fetch the member from + * @param userId - The id of the user + * @param options - The options to use when fetching the member + */ + public async getMember(threadId: Snowflake, userId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.threadMembers(threadId, userId), { signal }) as Promise; + } + + /** + * Fetches all members of a thread + * + * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members} + * @param threadId - The id of the thread to fetch the members from + * @param options - The options to use when fetching the members + */ + public async getAllMembers(threadId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.threadMembers(threadId), { signal }) as Promise; + } +} diff --git a/packages/core/src/api/user.ts b/packages/core/src/api/user.ts new file mode 100644 index 000000000000..9a907f950854 --- /dev/null +++ b/packages/core/src/api/user.ts @@ -0,0 +1,169 @@ +/* eslint-disable jsdoc/check-param-names */ + +import { makeURLSearchParams, type RequestData, type REST } from '@discordjs/rest'; +import { + Routes, + type RESTGetAPICurrentUserApplicationRoleConnectionResult, + type RESTGetAPICurrentUserConnectionsResult, + type RESTGetAPICurrentUserGuildsQuery, + type RESTGetAPICurrentUserGuildsResult, + type RESTGetAPICurrentUserResult, + type RESTGetAPIUserResult, + type RESTGetCurrentUserGuildMemberResult, + type RESTPatchAPICurrentUserJSONBody, + type RESTPatchAPICurrentUserResult, + type RESTPatchAPIGuildMemberJSONBody, + type RESTPatchAPIGuildMemberResult, + type RESTPostAPICurrentUserCreateDMChannelResult, + type RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, + type RESTPutAPICurrentUserApplicationRoleConnectionResult, + type Snowflake, +} from 'discord-api-types/v10'; + +export class UsersAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches a user by their id + * + * @see {@link https://discord.com/developers/docs/resources/user#get-user} + * @param userId - The id of the user to fetch + * @param options - The options to use when fetching the user + */ + public async get(userId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.user(userId), { signal }) as Promise; + } + + /** + * Returns the user object of the requester's account + * + * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} + * @param options - The options to use when fetching the current user + */ + public async getCurrent({ signal }: Pick = {}) { + return this.rest.get(Routes.user('@me'), { signal }) as Promise; + } + + /** + * Returns a list of partial guild objects the current user is a member of + * + * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} + * @param query - The query options to use when fetching the current user's guilds + * @param options - The options to use when fetching the guilds + */ + public async getGuilds(query: RESTGetAPICurrentUserGuildsQuery = {}, { signal }: Pick = {}) { + return this.rest.get(Routes.userGuilds(), { + query: makeURLSearchParams(query), + signal, + }) as Promise; + } + + /** + * Leaves the guild with the given id + * + * @see {@link https://discord.com/developers/docs/resources/user#leave-guild} + * @param guildId - The id of the guild + * @param options - The options for leaving the guild + */ + public async leaveGuild(guildId: Snowflake, { signal }: Pick = {}) { + await this.rest.delete(Routes.userGuild(guildId), { signal }); + } + + /** + * Edits the current user + * + * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user} + * @param body - The new data for the current user + * @param options - The options for editing the user + */ + public async edit(body: RESTPatchAPICurrentUserJSONBody, { signal }: Pick = {}) { + return this.rest.patch(Routes.user('@me'), { body, signal }) as Promise; + } + + /** + * Fetches the guild member for the current user + * + * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} + * @param guildId - The id of the guild + * @param options - The options for fetching the guild member + */ + public async getGuildMember(guildId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.userGuildMember(guildId), { signal }) as Promise; + } + + /** + * Edits the guild member for the current user + * + * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member} + * @param guildId - The id of the guild + * @param body - The new data for the guild member + * @param options - The options for editing the guild member + */ + public async editCurrentGuildMember( + guildId: Snowflake, + body: RESTPatchAPIGuildMemberJSONBody = {}, + { reason, signal }: Pick = {}, + ) { + return this.rest.patch(Routes.guildMember(guildId, '@me'), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Opens a new DM channel with a user + * + * @see {@link https://discord.com/developers/docs/resources/user#create-dm} + * @param userId - The id of the user to open a DM channel with + * @param options - The options for opening the DM + */ + public async createDM(userId: Snowflake, { signal }: Pick = {}) { + return this.rest.post(Routes.userChannels(), { + body: { recipient_id: userId }, + signal, + }) as Promise; + } + + /** + * Gets the current user's connections + * + * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} + * @param options - The options for fetching the user's connections + */ + public async getConnections({ signal }: Pick = {}) { + return this.rest.get(Routes.userConnections(), { signal }) as Promise; + } + + /** + * Gets the current user's active application role connection + * + * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection} + * @param applicationId - The id of the application + * @param options - The options for fetching the role connections + */ + public async getApplicationRoleConnection(applicationId: Snowflake, { signal }: Pick = {}) { + return this.rest.get(Routes.userApplicationRoleConnection(applicationId), { + signal, + }) as Promise; + } + + /** + * Updates the current user's application role connection + * + * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection} + * @param applicationId - The id of the application + * @param body - The data to use when updating the application role connection + * @param options - The options to use when updating the application role connection + */ + public async updateApplicationRoleConnection( + applicationId: Snowflake, + body: RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, + { signal }: Pick = {}, + ) { + return this.rest.put(Routes.userApplicationRoleConnection(applicationId), { + body, + signal, + }) as Promise; + } +} diff --git a/packages/core/src/api/voice.ts b/packages/core/src/api/voice.ts new file mode 100644 index 000000000000..88945de105b7 --- /dev/null +++ b/packages/core/src/api/voice.ts @@ -0,0 +1,18 @@ +/* eslint-disable jsdoc/check-param-names */ + +import type { RequestData, REST } from '@discordjs/rest'; +import { Routes, type RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10'; + +export class VoiceAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches all voice regions + * + * @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions} + * @param options - The options to use when fetching the voice regions + */ + public async getVoiceRegions({ signal }: Pick = {}) { + return this.rest.get(Routes.voiceRegions(), { signal }) as Promise; + } +} diff --git a/packages/core/src/api/webhook.ts b/packages/core/src/api/webhook.ts new file mode 100644 index 000000000000..6f986198c8ef --- /dev/null +++ b/packages/core/src/api/webhook.ts @@ -0,0 +1,284 @@ +/* eslint-disable jsdoc/check-param-names */ + +import { makeURLSearchParams, type RequestData, type RawFile, type REST } from '@discordjs/rest'; +import { + Routes, + type RESTGetAPIWebhookWithTokenMessageQuery, + type RESTGetAPIWebhookWithTokenMessageResult, + type RESTGetAPIWebhookResult, + type RESTPatchAPIWebhookJSONBody, + type RESTPatchAPIWebhookResult, + type RESTPatchAPIWebhookWithTokenMessageJSONBody, + type RESTPatchAPIWebhookWithTokenMessageResult, + type RESTPostAPIChannelWebhookJSONBody, + type RESTPostAPIChannelWebhookResult, + type RESTPostAPIWebhookWithTokenGitHubQuery, + type RESTPostAPIWebhookWithTokenJSONBody, + type RESTPostAPIWebhookWithTokenQuery, + type RESTPostAPIWebhookWithTokenSlackQuery, + type RESTPostAPIWebhookWithTokenWaitResult, + type Snowflake, +} from 'discord-api-types/v10'; + +export class WebhooksAPI { + public constructor(private readonly rest: REST) {} + + /** + * Fetches a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook} + * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param options - The options to use when fetching the webhook + */ + public async get(id: Snowflake, token?: string, { signal }: Pick = {}) { + return this.rest.get(Routes.webhook(id, token), { signal }) as Promise; + } + + /** + * Creates a new webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook} + * @param channelId - The id of the channel to create the webhook in + * @param body - The data to use when creating the webhook + * @param options - The options to use when creating the webhook + */ + public async create( + channelId: Snowflake, + body: RESTPostAPIChannelWebhookJSONBody, + { reason, signal }: Pick = {}, + ) { + return this.rest.post(Routes.channelWebhooks(channelId), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Edits a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook} + * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token} + * @param id - The id of the webhook to edit + * @param body - The new webhook data + * @param options - The options to use when editing the webhook + */ + public async edit( + id: Snowflake, + body: RESTPatchAPIWebhookJSONBody, + { token, reason, signal }: Pick & { token?: string | undefined } = {}, + ) { + return this.rest.patch(Routes.webhook(id, token), { + reason, + body, + signal, + }) as Promise; + } + + /** + * Deletes a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook} + * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token} + * @param id - The id of the webhook to delete + * @param options - The options to use when deleting the webhook + */ + public async delete( + id: Snowflake, + { token, reason, signal }: Pick & { token?: string | undefined } = {}, + ) { + await this.rest.delete(Routes.webhook(id, token), { reason, signal }); + } + + /** + * Executes a webhook and returns the created message + * + * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param body - The data to use when executing the webhook + * @param options - The options to use when executing the webhook + */ + public async execute( + id: Snowflake, + token: string, + body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait: true }, + options?: Pick, + ): Promise; + + /** + * Executes a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param body - The data to use when executing the webhook + * @param options - The options to use when executing the webhook + */ + public async execute( + id: Snowflake, + token: string, + body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait?: false }, + options?: Pick, + ): Promise; + + /** + * Executes a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param body - The data to use when executing the webhook + * @param options - The options to use when executing the webhook + */ + public async execute( + id: Snowflake, + token: string, + { + wait, + thread_id, + files, + ...body + }: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[] }, + { signal }: Pick = {}, + ) { + return this.rest.post(Routes.webhook(id, token), { + query: makeURLSearchParams({ wait, thread_id }), + files, + body, + auth: false, + signal, + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + }) as Promise; + } + + /** + * Executes a slack webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param body - The data to use when executing the webhook + * @param query - The query options to use when executing the webhook + * @param options - The options to use when executing the webhook + */ + public async executeSlack( + id: Snowflake, + token: string, + body: unknown, + query: RESTPostAPIWebhookWithTokenSlackQuery = {}, + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.webhookPlatform(id, token, 'slack'), { + query: makeURLSearchParams(query), + body, + auth: false, + signal, + }); + } + + /** + * Executes a github webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param body - The data to use when executing the webhook + * @param query - The options to use when executing the webhook + * @param options - The options to use when executing the webhook + */ + public async executeGitHub( + id: Snowflake, + token: string, + body: unknown, + query: RESTPostAPIWebhookWithTokenGitHubQuery = {}, + { signal }: Pick = {}, + ) { + await this.rest.post(Routes.webhookPlatform(id, token, 'github'), { + query: makeURLSearchParams(query), + body, + signal, + auth: false, + }); + } + + /** + * Fetches an associated message from a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param messageId - The id of the message to fetch + * @param query - The query options to use when fetching the message + * @param options - The options to use when fetching the message + */ + public async getMessage( + id: Snowflake, + token: string, + messageId: Snowflake, + query: RESTGetAPIWebhookWithTokenMessageQuery = {}, + { signal }: Pick = {}, + ) { + return this.rest.get(Routes.webhookMessage(id, token, messageId), { + query: makeURLSearchParams(query), + auth: false, + signal, + }) as Promise; + } + + /** + * Edits an associated message from a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param messageId - The id of the message to edit + * @param body - The data to use when editing the message + * @param options - The options to use when editing the message + */ + public async editMessage( + id: Snowflake, + token: string, + messageId: Snowflake, + { + thread_id, + files, + ...body + }: RESTPatchAPIWebhookWithTokenMessageJSONBody & { files?: RawFile[]; thread_id?: string }, + { signal }: Pick = {}, + ) { + return this.rest.patch(Routes.webhookMessage(id, token, messageId), { + query: makeURLSearchParams({ thread_id }), + auth: false, + body, + signal, + files, + }) as Promise; + } + + /** + * Deletes an associated message from a webhook + * + * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message} + * @param id - The id of the webhook + * @param token - The token of the webhook + * @param messageId - The id of the message to delete + * @param query - The options to use when deleting the message + * @param options - The options to use when deleting the message + */ + public async deleteMessage( + id: Snowflake, + token: string, + messageId: Snowflake, + query: { thread_id?: Snowflake } = {}, + { signal }: Pick = {}, + ) { + await this.rest.delete(Routes.webhookMessage(id, token, messageId), { + query: makeURLSearchParams(query), + auth: false, + signal, + }); + } +} diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts new file mode 100644 index 000000000000..5ff88d2fec94 --- /dev/null +++ b/packages/core/src/client.ts @@ -0,0 +1,288 @@ +import { setTimeout } from 'node:timers'; +import type { REST } from '@discordjs/rest'; +import { calculateShardId } from '@discordjs/util'; +import { WebSocketShardEvents } from '@discordjs/ws'; +import { DiscordSnowflake } from '@sapphire/snowflake'; +import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter'; +import { + GatewayDispatchEvents, + GatewayOpcodes, + type GatewayApplicationCommandPermissionsUpdateDispatchData, + type GatewayAutoModerationActionExecutionDispatchData, + type GatewayAutoModerationRuleCreateDispatchData, + type GatewayAutoModerationRuleDeleteDispatchData, + type GatewayAutoModerationRuleUpdateDispatchData, + type GatewayChannelCreateDispatchData, + type GatewayChannelDeleteDispatchData, + type GatewayChannelPinsUpdateDispatchData, + type GatewayChannelUpdateDispatchData, + type GatewayGuildAuditLogEntryCreateDispatchData, + type GatewayGuildBanAddDispatchData, + type GatewayGuildBanRemoveDispatchData, + type GatewayGuildCreateDispatchData, + type GatewayGuildDeleteDispatchData, + type GatewayGuildEmojisUpdateDispatchData, + type GatewayGuildIntegrationsUpdateDispatchData, + type GatewayGuildMemberAddDispatchData, + type GatewayGuildMemberRemoveDispatchData, + type GatewayGuildMemberUpdateDispatchData, + type GatewayGuildMembersChunkDispatchData, + type GatewayGuildRoleCreateDispatchData, + type GatewayGuildRoleDeleteDispatchData, + type GatewayGuildRoleUpdateDispatchData, + type GatewayGuildScheduledEventCreateDispatchData, + type GatewayGuildScheduledEventDeleteDispatchData, + type GatewayGuildScheduledEventUpdateDispatchData, + type GatewayGuildScheduledEventUserAddDispatchData, + type GatewayGuildScheduledEventUserRemoveDispatchData, + type GatewayGuildStickersUpdateDispatchData, + type GatewayGuildUpdateDispatchData, + type GatewayIntegrationCreateDispatchData, + type GatewayIntegrationDeleteDispatchData, + type GatewayIntegrationUpdateDispatchData, + type GatewayInteractionCreateDispatchData, + type GatewayInviteCreateDispatchData, + type GatewayInviteDeleteDispatchData, + type GatewayMessageCreateDispatchData, + type GatewayMessageDeleteBulkDispatchData, + type GatewayMessageDeleteDispatchData, + type GatewayMessageReactionAddDispatchData, + type GatewayMessageReactionRemoveAllDispatchData, + type GatewayMessageReactionRemoveDispatchData, + type GatewayMessageReactionRemoveEmojiDispatchData, + type GatewayMessageUpdateDispatchData, + type GatewayPresenceUpdateData, + type GatewayPresenceUpdateDispatchData, + type GatewayReadyDispatchData, + type GatewayRequestGuildMembersData, + type GatewayStageInstanceCreateDispatchData, + type GatewayStageInstanceDeleteDispatchData, + type GatewayStageInstanceUpdateDispatchData, + type GatewayThreadCreateDispatchData, + type GatewayThreadDeleteDispatchData, + type GatewayThreadListSyncDispatchData, + type GatewayThreadMemberUpdateDispatchData, + type GatewayThreadMembersUpdateDispatchData, + type GatewayThreadUpdateDispatchData, + type GatewayTypingStartDispatchData, + type GatewayUserUpdateDispatchData, + type GatewayVoiceServerUpdateDispatchData, + type GatewayVoiceStateUpdateData, + type GatewayVoiceStateUpdateDispatchData, + type GatewayWebhooksUpdateDispatchData, +} from 'discord-api-types/v10'; +import type { Gateway } from './Gateway.js'; +import { API } from './api/index.js'; + +export interface IntrinsicProps { + /** + * The REST API + */ + api: API; + /** + * The id of the shard that emitted the event + */ + shardId: number; +} + +export interface WithIntrinsicProps extends IntrinsicProps { + data: T; +} + +export interface MappedEvents { + [GatewayDispatchEvents.ApplicationCommandPermissionsUpdate]: [ + WithIntrinsicProps, + ]; + [GatewayDispatchEvents.AutoModerationActionExecution]: [ + WithIntrinsicProps, + ]; + [GatewayDispatchEvents.AutoModerationRuleCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.AutoModerationRuleDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.AutoModerationRuleUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ChannelCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ChannelDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ChannelPinsUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ChannelUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildAuditLogEntryCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildBanAdd]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildBanRemove]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildEmojisUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildIntegrationsUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildMemberAdd]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildMemberRemove]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildMemberUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildMembersChunk]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildRoleCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildRoleDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildRoleUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildScheduledEventCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildScheduledEventDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildScheduledEventUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildScheduledEventUserAdd]: [ + WithIntrinsicProps, + ]; + [GatewayDispatchEvents.GuildScheduledEventUserRemove]: [ + WithIntrinsicProps, + ]; + [GatewayDispatchEvents.GuildStickersUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.GuildUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.IntegrationCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.IntegrationDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.IntegrationUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.InteractionCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.InviteCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.InviteDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.MessageCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.MessageDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.MessageDeleteBulk]: [WithIntrinsicProps]; + [GatewayDispatchEvents.MessageReactionAdd]: [WithIntrinsicProps]; + [GatewayDispatchEvents.MessageReactionRemove]: [WithIntrinsicProps]; + [GatewayDispatchEvents.MessageReactionRemoveAll]: [WithIntrinsicProps]; + [GatewayDispatchEvents.MessageReactionRemoveEmoji]: [ + WithIntrinsicProps, + ]; + [GatewayDispatchEvents.MessageUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.PresenceUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.Ready]: [WithIntrinsicProps]; + [GatewayDispatchEvents.Resumed]: [WithIntrinsicProps]; + [GatewayDispatchEvents.StageInstanceCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.StageInstanceDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.StageInstanceUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ThreadCreate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ThreadDelete]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ThreadListSync]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ThreadMemberUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ThreadMembersUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.ThreadUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.TypingStart]: [WithIntrinsicProps]; + [GatewayDispatchEvents.UserUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.VoiceServerUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.VoiceStateUpdate]: [WithIntrinsicProps]; + [GatewayDispatchEvents.WebhooksUpdate]: [WithIntrinsicProps]; +} + +export type ManagerShardEventsMap = { + [K in keyof MappedEvents]: MappedEvents[K]; +}; + +export interface ClientOptions { + gateway: Gateway; + rest: REST; +} + +export interface RequestGuildMembersResult { + members: GatewayGuildMembersChunkDispatchData['members']; + nonce: NonNullable; + notFound: NonNullable; + presences: NonNullable; +} + +export class Client extends AsyncEventEmitter { + public readonly rest: REST; + + public readonly gateway: Gateway; + + public readonly api: API; + + public constructor({ rest, gateway }: ClientOptions) { + super(); + this.rest = rest; + this.gateway = gateway; + this.api = new API(rest); + + this.gateway.on(WebSocketShardEvents.Dispatch, ({ data: dispatch, shardId }) => { + // @ts-expect-error event props can't be resolved properly, but they are correct + this.emit(dispatch.t, this.wrapIntrinsicProps(dispatch.d, shardId)); + }); + } + + /** + * Requests guild members from the gateway. + * + * @see {@link https://discord.com/developers/docs/topics/gateway-events#request-guild-members} + * @param options - The options for the request + * @param timeout - The timeout for waiting for each guild members chunk event + */ + public async requestGuildMembers(options: GatewayRequestGuildMembersData, timeout = 10_000) { + const shardId = calculateShardId(options.guild_id, await this.gateway.getShardCount()); + const nonce = options.nonce ?? DiscordSnowflake.generate().toString(); + + const promise = new Promise((resolve, reject) => { + const members: RequestGuildMembersResult['members'] = []; + const notFound: RequestGuildMembersResult['notFound'] = []; + const presences: RequestGuildMembersResult['presences'] = []; + + const timer = setTimeout(() => { + reject(new Error('Request timed out')); + }, timeout); + + const handler = ({ data }: MappedEvents[GatewayDispatchEvents.GuildMembersChunk][0]) => { + timer.refresh(); + + if (data.nonce !== nonce) return; + + members.push(...data.members); + if ('presences' in data) presences.push(...data.presences); + if ('not_found' in data) notFound.push(...data.not_found); + + if (data.chunk_index >= data.chunk_count - 1) { + this.off(GatewayDispatchEvents.GuildMembersChunk, handler); + resolve({ members, nonce, notFound, presences }); + } + }; + + this.on(GatewayDispatchEvents.GuildMembersChunk, handler); + }); + + await this.gateway.send(shardId, { + op: GatewayOpcodes.RequestGuildMembers, + // eslint-disable-next-line id-length + d: { + ...options, + nonce, + }, + }); + + return promise; + } + + /** + * Updates the voice state of the bot user + * + * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-voice-state} + * @param options - The options for updating the voice state + */ + public async updateVoiceState(options: GatewayVoiceStateUpdateData) { + const shardId = calculateShardId(options.guild_id, await this.gateway.getShardCount()); + + await this.gateway.send(shardId, { + op: GatewayOpcodes.VoiceStateUpdate, + // eslint-disable-next-line id-length + d: options, + }); + } + + /** + * Updates the presence of the bot user + * + * @param shardId - The id of the shard to update the presence in + * @param options - The options for updating the presence + */ + public async updatePresence(shardId: number, options: GatewayPresenceUpdateData) { + await this.gateway.send(shardId, { + op: GatewayOpcodes.PresenceUpdate, + // eslint-disable-next-line id-length + d: options, + }); + } + + private wrapIntrinsicProps(obj: T, shardId: number): WithIntrinsicProps { + return { + api: this.api, + shardId, + data: obj, + }; + } +} diff --git a/packages/core/src/http-only/index.ts b/packages/core/src/http-only/index.ts new file mode 100644 index 000000000000..7af0961f7a1b --- /dev/null +++ b/packages/core/src/http-only/index.ts @@ -0,0 +1,11 @@ +export * from '../api/index.js'; +export * from '../util/index.js'; + +export * from 'discord-api-types/v10'; + +/** + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/core/#readme | @discordjs/core} version + * that you are currently using. + */ +// This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts new file mode 100644 index 000000000000..67a4ce0478e1 --- /dev/null +++ b/packages/core/src/index.ts @@ -0,0 +1,12 @@ +export * from './api/index.js'; +export * from './client.js'; +export * from './util/index.js'; + +export * from 'discord-api-types/v10'; + +/** + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/core/#readme | @discordjs/core} version + * that you are currently using. + */ +// This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/core/src/util/files.ts b/packages/core/src/util/files.ts new file mode 100644 index 000000000000..7f22fb07434c --- /dev/null +++ b/packages/core/src/util/files.ts @@ -0,0 +1,29 @@ +import type { RawFile } from '@discordjs/rest'; +import type { APIInteractionResponseCallbackData } from 'discord-api-types/v10'; + +export interface DescriptiveRawFile extends RawFile { + description?: string; +} + +/** + * A utility function to create a form data payload given an array of file buffers + * + * @param files - The files to create a form data payload for + * @param options - The additional options for the form data payload + */ +export function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData) { + const body = { + ...options, + attachments: files.map((file, index) => ({ + id: index.toString(), + description: file.description, + })), + }; + + const outputFiles = files.map((file, index) => ({ + name: file.name ?? index.toString(), + data: file.data, + })); + + return { body, files: outputFiles }; +} diff --git a/packages/core/src/util/index.ts b/packages/core/src/util/index.ts new file mode 100644 index 000000000000..f2891a7c9727 --- /dev/null +++ b/packages/core/src/util/index.ts @@ -0,0 +1 @@ +export * from './files.js'; diff --git a/packages/core/tsconfig.docs.json b/packages/core/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/core/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/core/tsconfig.eslint.json b/packages/core/tsconfig.eslint.json new file mode 100644 index 000000000000..d04d4be3aedc --- /dev/null +++ b/packages/core/tsconfig.eslint.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "**/*.js", + "**/*.mjs", + "**/*.jsx", + "**/*.test.ts", + "**/*.test.js", + "**/*.test.mjs", + "**/*.spec.ts", + "**/*.spec.js", + "**/*.spec.mjs" + ], + "exclude": [] +} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 000000000000..fd8b5e417b9f --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*.ts"] +} diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts new file mode 100644 index 000000000000..55ec6123cb89 --- /dev/null +++ b/packages/core/tsup.config.ts @@ -0,0 +1,10 @@ +import { esbuildPluginVersionInjector } from 'esbuild-plugin-version-injector'; +import { createTsupConfig } from '../../tsup.config.js'; + +export default createTsupConfig({ + entry: { + index: 'src/index.ts', + 'http-only': 'src/http-only/index.ts', + }, + esbuildPlugins: [esbuildPluginVersionInjector()], +}); diff --git a/packages/create-discord-bot/.cliff-jumperrc.json b/packages/create-discord-bot/.cliff-jumperrc.json new file mode 100644 index 000000000000..651043614a50 --- /dev/null +++ b/packages/create-discord-bot/.cliff-jumperrc.json @@ -0,0 +1,5 @@ +{ + "name": "create-discord-bot", + "packagePath": "packages/create-discord-bot", + "tagTemplate": "{{name}}/{{new-version}}" +} diff --git a/packages/create-discord-bot/.eslintignore b/packages/create-discord-bot/.eslintignore new file mode 100644 index 000000000000..1521c8b7652b --- /dev/null +++ b/packages/create-discord-bot/.eslintignore @@ -0,0 +1 @@ +dist diff --git a/packages/create-discord-bot/.eslintrc.json b/packages/create-discord-bot/.eslintrc.json new file mode 100644 index 000000000000..99ef7cec8051 --- /dev/null +++ b/packages/create-discord-bot/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../../.eslintrc.json" +} diff --git a/packages/create-discord-bot/.gitignore b/packages/create-discord-bot/.gitignore new file mode 100644 index 000000000000..376d3bf0926d --- /dev/null +++ b/packages/create-discord-bot/.gitignore @@ -0,0 +1,23 @@ +# Packages +node_modules + +# Log files +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Env +.env +!template/JavaScript/.env +!template/TypeScript/.env + +# Dist +dist + +# Miscellaneous +.tmp diff --git a/packages/create-discord-bot/.lintstagedrc.js b/packages/create-discord-bot/.lintstagedrc.js new file mode 100644 index 000000000000..dc17706a55ac --- /dev/null +++ b/packages/create-discord-bot/.lintstagedrc.js @@ -0,0 +1 @@ +module.exports = require('../../.lintstagedrc.json'); diff --git a/packages/scripts/src/template/default/.prettierignore b/packages/create-discord-bot/.prettierignore similarity index 100% rename from packages/scripts/src/template/default/.prettierignore rename to packages/create-discord-bot/.prettierignore diff --git a/packages/create-discord-bot/.prettierrc.js b/packages/create-discord-bot/.prettierrc.js new file mode 100644 index 000000000000..f004026c7647 --- /dev/null +++ b/packages/create-discord-bot/.prettierrc.js @@ -0,0 +1 @@ +module.exports = require('../../.prettierrc.json'); diff --git a/packages/create-discord-bot/CHANGELOG.md b/packages/create-discord-bot/CHANGELOG.md new file mode 100644 index 000000000000..307fe56c0979 --- /dev/null +++ b/packages/create-discord-bot/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +# [0.1.0](https://github.com/discordjs/discord.js/tree/0.1.0) - (2023-05-07) + +## Features + +- Create-discord-bot (#9420) ([f83a8a5](https://github.com/discordjs/discord.js/commit/f83a8a58c99532131848f9d89cec58ae5cd5d138)) + diff --git a/packages/create-discord-bot/LICENSE b/packages/create-discord-bot/LICENSE new file mode 100644 index 000000000000..6b2a810a6aed --- /dev/null +++ b/packages/create-discord-bot/LICENSE @@ -0,0 +1,190 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2023 Noel Buechler + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/create-discord-bot/README.md b/packages/create-discord-bot/README.md new file mode 100644 index 000000000000..e14603e4d810 --- /dev/null +++ b/packages/create-discord-bot/README.md @@ -0,0 +1,44 @@ +
+
+

+ discord.js +

+
+

+ Discord server + Build status +

+

+ Vercel + Cloudflare Workers +

+
+ +## About + +`npx create-discord-bot ./your/chosen/directory/`. It's as easy as that to create a simple Discord bot to begin your journey with the Discord API. + +## Links + +- [Guide] ([source][guide-source]) + - Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. +- [discord.js Discord server][discord] +- [Discord API Discord server][discord-api] +- [GitHub][source] + +## Contributing + +Before creating an issue, please ensure that it hasn't already been reported/suggested. +See [the contribution guide][contributing] if you'd like to submit a pull request. + +## Help + +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js server][discord]. + +[guide]: https://discordjs.guide/ +[guide-source]: https://github.com/discordjs/guide +[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html +[discord]: https://discord.gg/djs +[discord-api]: https://discord.gg/discord-api +[source]: https://github.com/discordjs/discord.js/tree/main/packages/create-discord-bot +[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md diff --git a/packages/create-discord-bot/api-extractor.json b/packages/create-discord-bot/api-extractor.json new file mode 100644 index 000000000000..5ddfb3668c6c --- /dev/null +++ b/packages/create-discord-bot/api-extractor.json @@ -0,0 +1,6 @@ +{ + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/create-discord-bot" + } +} diff --git a/packages/create-discord-bot/cliff.toml b/packages/create-discord-bot/cliff.toml new file mode 100644 index 000000000000..143043f0a990 --- /dev/null +++ b/packages/create-discord-bot/cliff.toml @@ -0,0 +1,63 @@ +[changelog] +header = """ +# Changelog + +All notable changes to this project will be documented in this file.\n +""" +body = """ +{% if version %}\ + # [{{ version | trim_start_matches(pat="v") }}]\ + {% if previous %}\ + {% if previous.version %}\ + (https://github.com/discordjs/discord.js/compare/{{ previous.version }}...{{ version }})\ + {% else %}\ + (https://github.com/discordjs/discord.js/tree/{{ version }})\ + {% endif %}\ + {% endif %} \ + - ({{ timestamp | date(format="%Y-%m-%d") }}) +{% else %}\ + # [unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ## {{ group | upper_first }} + {% for commit in commits %} + - {% if commit.scope %}\ + **{{commit.scope}}:** \ + {% endif %}\ + {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/discordjs/discord.js/commit/{{ commit.id }}))\ + {% if commit.breaking %}\ + {% for breakingChange in commit.footers %}\ + \n{% raw %} {% endraw %}- **{{ breakingChange.token }}{{ breakingChange.separator }}** {{ breakingChange.value }}\ + {% endfor %}\ + {% endif %}\ + {% endfor %} +{% endfor %}\n +""" +trim = true +footer = "" + +[git] +conventional_commits = true +filter_unconventional = true +commit_parsers = [ + { message = "^feat", group = "Features"}, + { message = "^fix", group = "Bug Fixes"}, + { message = "^docs", group = "Documentation"}, + { message = "^perf", group = "Performance"}, + { message = "^refactor", group = "Refactor"}, + { message = "^typings", group = "Typings"}, + { message = "^types", group = "Typings"}, + { message = ".*deprecated", body = ".*deprecated", group = "Deprecation"}, + { message = "^revert", skip = true}, + { message = "^style", group = "Styling"}, + { message = "^test", group = "Testing"}, + { message = "^chore", skip = true}, + { message = "^ci", skip = true}, + { message = "^build", skip = true}, + { body = ".*security", group = "Security"}, +] +filter_commits = true +tag_pattern = "create-discord-bot@[0-9]*" +ignore_tags = "" +topo_order = true +sort_commits = "newest" diff --git a/packages/create-discord-bot/package.json b/packages/create-discord-bot/package.json new file mode 100644 index 000000000000..3aaa2939f4c0 --- /dev/null +++ b/packages/create-discord-bot/package.json @@ -0,0 +1,73 @@ +{ + "name": "create-discord-bot", + "version": "0.1.0", + "description": "A simple way to create a startup Discord bot.", + "scripts": { + "build": "tsup", + "lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --format=pretty", + "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty", + "prepack": "yarn build && yarn lint", + "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/create-discord-bot/*'", + "release": "cliff-jumper" + }, + "bin": "./dist/create-discord-bot.mjs", + "directories": { + "lib": "src" + }, + "files": [ + "dist", + "template" + ], + "contributors": [ + "Crawl ", + "SpaceEEC ", + "Vlad Frangu ", + "Aura Román ", + "Jiralite " + ], + "license": "Apache-2.0", + "keywords": [ + "discord", + "discord-api", + "discord.js", + "create-bot", + "init-bot", + "init-discord", + "boilerplate" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/discordjs/discord.js.git", + "directory": "packages/create-discord-bot" + }, + "bugs": { + "url": "https://github.com/discordjs/discord.js/issues" + }, + "homepage": "https://discord.js.org", + "dependencies": { + "chalk": "^5.2.0", + "commander": "^10.0.1", + "validate-npm-package-name": "^5.0.0" + }, + "devDependencies": { + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "16.18.32", + "@types/validate-npm-package-name": "^4.0.0", + "@vitest/coverage-c8": "^0.31.1", + "cross-env": "^7.0.3", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "typescript": "^5.0.4", + "vitest": "^0.31.1" + }, + "engines": { + "node": ">=18.16.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/create-discord-bot/src/create-discord-bot.ts b/packages/create-discord-bot/src/create-discord-bot.ts new file mode 100755 index 000000000000..82abf8848c4d --- /dev/null +++ b/packages/create-discord-bot/src/create-discord-bot.ts @@ -0,0 +1,70 @@ +#!/usr/bin/env node + +// eslint-disable-next-line n/shebang +import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import { URL } from 'node:url'; +import chalk from 'chalk'; +import { program } from 'commander'; +import validateProjectName from 'validate-npm-package-name'; +import { install, resolvePackageManager } from './helpers/packageManager.js'; +import { GUIDE_URL } from './util/constants.js'; + +program + .description('Create a basic discord.js bot.') + .option('--typescript', 'Whether to use the TypeScript template.') + .argument('', 'The directory where this will be created.') + .parse(); + +const { typescript } = program.opts(); +const [directory] = program.args; + +if (!directory) { + console.error(chalk.red('Please specify the project directory.')); + process.exit(1); +} + +const root = path.resolve(directory); +const directoryName = path.basename(root); + +if (existsSync(root) && readdirSync(root).length > 0) { + console.error(chalk.red(`The directory ${chalk.yellow(`"${directoryName}"`)} is not empty.`)); + console.error(chalk.red(`Please specify an empty directory.`)); + process.exit(1); +} + +// We'll use the directory name as the project name. Check npm name validity. +const validationResult = validateProjectName(directoryName); + +if (!validationResult.validForNewPackages) { + console.error( + chalk.red( + `Cannot create a project named ${chalk.yellow(`"${directoryName}"`)} due to npm naming restrictions.\n\nErrors:`, + ), + ); + + for (const error of [...(validationResult.errors ?? []), ...(validationResult.warnings ?? [])]) { + console.error(chalk.red(`- ${error}`)); + } + + console.error(chalk.red('\nSee https://docs.npmjs.com/cli/configuring-npm/package-json for more details.')); + process.exit(1); +} + +if (!existsSync(root)) { + mkdirSync(root, { recursive: true }); +} + +console.log(`Creating ${directoryName} in ${chalk.green(root)}.`); +cpSync(new URL(`../template/${typescript ? 'TypeScript' : 'JavaScript'}`, import.meta.url), root, { recursive: true }); + +process.chdir(root); + +const newPackageJSON = readFileSync('./package.json', { encoding: 'utf8' }).replace('[REPLACE-NAME]', directoryName); +writeFileSync('./package.json', newPackageJSON); + +const packageManager = resolvePackageManager(); +install(packageManager); +console.log(chalk.green('All done! Be sure to read through the discord.js guide for help on your journey.')); +console.log(`Link: ${chalk.cyan(GUIDE_URL)}`); diff --git a/packages/create-discord-bot/src/helpers/packageManager.ts b/packages/create-discord-bot/src/helpers/packageManager.ts new file mode 100644 index 000000000000..cc524bf50027 --- /dev/null +++ b/packages/create-discord-bot/src/helpers/packageManager.ts @@ -0,0 +1,67 @@ +import { execSync } from 'node:child_process'; +import process from 'node:process'; +import chalk from 'chalk'; +import { DEFAULT_PACKAGE_MANAGER } from '../util/constants.js'; + +/** + * A union of supported package managers. + */ +export type PackageManager = 'npm' | 'pnpm' | 'yarn'; + +/** + * Resolves the package manager from `npm_config_user_agent`. + */ +export function resolvePackageManager(): PackageManager { + const npmConfigUserAgent = process.env.npm_config_user_agent; + + // If this is not present, return the default package manager. + if (!npmConfigUserAgent) { + return DEFAULT_PACKAGE_MANAGER; + } + + if (npmConfigUserAgent.startsWith('npm')) { + return 'npm'; + } + + if (npmConfigUserAgent.startsWith('yarn')) { + return 'yarn'; + } + + if (npmConfigUserAgent.startsWith('pnpm')) { + return 'pnpm'; + } + + console.error( + chalk.yellow( + `Detected an unsupported package manager (${npmConfigUserAgent}). Falling back to ${DEFAULT_PACKAGE_MANAGER}.`, + ), + ); + + // Fallback to the default package manager. + return DEFAULT_PACKAGE_MANAGER; +} + +/** + * Installs with a provided package manager. + * + * @param packageManager - The package manager to use + */ +export function install(packageManager: PackageManager) { + let installCommand; + + switch (packageManager) { + case 'npm': + case 'pnpm': + installCommand = `${packageManager} install`; + break; + case 'yarn': + installCommand = packageManager; + break; + } + + console.log(`Installing dependencies with ${packageManager}...`); + + execSync(installCommand, { + stdio: 'inherit', + }); +} diff --git a/packages/create-discord-bot/src/util/constants.ts b/packages/create-discord-bot/src/util/constants.ts new file mode 100644 index 000000000000..7366008dfe2e --- /dev/null +++ b/packages/create-discord-bot/src/util/constants.ts @@ -0,0 +1,9 @@ +/** + * The default package manager. + */ +export const DEFAULT_PACKAGE_MANAGER = 'npm' as const; + +/** + * The URL to the guide. + */ +export const GUIDE_URL = 'https://guide.discordjs.dev' as const; diff --git a/packages/create-discord-bot/template/JavaScript/.env b/packages/create-discord-bot/template/JavaScript/.env new file mode 100644 index 000000000000..47b0cab27b11 --- /dev/null +++ b/packages/create-discord-bot/template/JavaScript/.env @@ -0,0 +1 @@ +DISCORD_TOKEN= diff --git a/packages/create-discord-bot/template/JavaScript/.eslintrc.json b/packages/create-discord-bot/template/JavaScript/.eslintrc.json new file mode 100644 index 000000000000..d5666a755790 --- /dev/null +++ b/packages/create-discord-bot/template/JavaScript/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": ["neon/common", "neon/node", "neon/prettier"] +} diff --git a/packages/create-discord-bot/template/JavaScript/.prettierrc.json b/packages/create-discord-bot/template/JavaScript/.prettierrc.json new file mode 100644 index 000000000000..eba3f4077964 --- /dev/null +++ b/packages/create-discord-bot/template/JavaScript/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "printWidth": 120, + "useTabs": true, + "singleQuote": true, + "quoteProps": "as-needed", + "trailingComma": "all", + "endOfLine": "lf" +} diff --git a/packages/create-discord-bot/template/JavaScript/package.json b/packages/create-discord-bot/template/JavaScript/package.json new file mode 100644 index 000000000000..0a8e2cf79c63 --- /dev/null +++ b/packages/create-discord-bot/template/JavaScript/package.json @@ -0,0 +1,21 @@ +{ + "name": "[REPLACE-NAME]", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": { + "lint": "prettier --check . && eslint src --ext .js,.cjs --format=pretty", + "format": "prettier --write . && eslint src --ext .js,.cjs --fix --format=pretty", + "start": "node --require dotenv/config src/index.js" + }, + "dependencies": { + "discord.js": "^14.11.0", + "dotenv": "^16.0.3" + }, + "devDependencies": { + "eslint": "^8.40.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8" + } +} diff --git a/packages/create-discord-bot/template/JavaScript/src/events/ready.js b/packages/create-discord-bot/template/JavaScript/src/events/ready.js new file mode 100644 index 000000000000..679048d900ac --- /dev/null +++ b/packages/create-discord-bot/template/JavaScript/src/events/ready.js @@ -0,0 +1,9 @@ +import { Events } from 'discord.js'; + +export default { + name: Events.ClientReady, + once: true, + async execute(client) { + console.log(`Ready! Logged in as ${client.user.tag}`); + }, +}; diff --git a/packages/create-discord-bot/template/JavaScript/src/index.js b/packages/create-discord-bot/template/JavaScript/src/index.js new file mode 100644 index 000000000000..8505443386af --- /dev/null +++ b/packages/create-discord-bot/template/JavaScript/src/index.js @@ -0,0 +1,14 @@ +import { readdir } from 'node:fs/promises'; +import { URL } from 'node:url'; +import { Client, GatewayIntentBits } from 'discord.js'; + +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); +const eventsPath = new URL('events/', import.meta.url); +const eventFiles = await readdir(eventsPath).then((files) => files.filter((file) => file.endsWith('.js'))); + +for (const file of eventFiles) { + const event = (await import(new URL(file, eventsPath).toString())).default; + client[event.once ? 'once' : 'on'](event.name, async (...args) => event.execute(...args)); +} + +void client.login(); diff --git a/packages/create-discord-bot/template/TypeScript/.env b/packages/create-discord-bot/template/TypeScript/.env new file mode 100644 index 000000000000..47b0cab27b11 --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/.env @@ -0,0 +1 @@ +DISCORD_TOKEN= diff --git a/packages/create-discord-bot/template/TypeScript/.eslintrc.json b/packages/create-discord-bot/template/TypeScript/.eslintrc.json new file mode 100644 index 000000000000..f6842f3ba949 --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "root": true, + "extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"], + "parserOptions": { + "project": ["./tsconfig.eslint.json"] + }, + "ignorePatterns": ["dist/*"] +} diff --git a/packages/create-discord-bot/template/TypeScript/.prettierrc.json b/packages/create-discord-bot/template/TypeScript/.prettierrc.json new file mode 100644 index 000000000000..eba3f4077964 --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "printWidth": 120, + "useTabs": true, + "singleQuote": true, + "quoteProps": "as-needed", + "trailingComma": "all", + "endOfLine": "lf" +} diff --git a/packages/create-discord-bot/template/TypeScript/package.json b/packages/create-discord-bot/template/TypeScript/package.json new file mode 100644 index 000000000000..bd2bc5ac2c06 --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/package.json @@ -0,0 +1,25 @@ +{ + "name": "[REPLACE-NAME]", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": { + "test": "tsc", + "lint": "prettier --check . && eslint ./src --ext .ts --format=pretty", + "format": "prettier --write . && eslint ./src --ext .ts --fix --format=pretty", + "start": "node --require dotenv/config dist/index.js" + }, + "dependencies": { + "discord.js": "^14.11.0", + "dotenv": "^16.0.3" + }, + "devDependencies": { + "@sapphire/ts-config": "^4.0.0", + "@types/node": "^18.15.3", + "eslint": "^8.40.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "typescript": "^5.0.4" + } +} diff --git a/packages/create-discord-bot/template/TypeScript/src/events/index.ts b/packages/create-discord-bot/template/TypeScript/src/events/index.ts new file mode 100644 index 000000000000..c4c59332e2fc --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/src/events/index.ts @@ -0,0 +1,7 @@ +import type { ClientEvents } from 'discord.js'; + +export interface Event { + execute(...parameters: ClientEvents[T]): Promise | void; + name: T; + once?: boolean; +} diff --git a/packages/create-discord-bot/template/TypeScript/src/events/ready.ts b/packages/create-discord-bot/template/TypeScript/src/events/ready.ts new file mode 100644 index 000000000000..830fb3525b63 --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/src/events/ready.ts @@ -0,0 +1,10 @@ +import { Events } from 'discord.js'; +import type { Event } from './index.js'; + +export default { + name: Events.ClientReady, + once: true, + async execute(client) { + console.log(`Ready! Logged in as ${client.user.tag}`); + }, +} satisfies Event<'ready'>; diff --git a/packages/create-discord-bot/template/TypeScript/src/index.ts b/packages/create-discord-bot/template/TypeScript/src/index.ts new file mode 100644 index 000000000000..553d573291bb --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/src/index.ts @@ -0,0 +1,18 @@ +import { readdir } from 'node:fs/promises'; +import { URL } from 'node:url'; +import { Client, GatewayIntentBits } from 'discord.js'; +import type { Event } from './events/index.js'; + +const client = new Client({ intents: [GatewayIntentBits.Guilds] }); +const eventsPath = new URL('events/', import.meta.url); + +const eventFiles = await readdir(eventsPath).then((files) => + files.filter((file) => file.endsWith('.js') && file !== 'index.js'), +); + +for (const file of eventFiles) { + const event: Event = (await import(new URL(file, eventsPath).toString())).default; + client[event.once ? 'once' : 'on'](event.name, async (...args) => event.execute(...args)); +} + +void client.login(); diff --git a/packages/create-discord-bot/template/TypeScript/tsconfig.eslint.json b/packages/create-discord-bot/template/TypeScript/tsconfig.eslint.json new file mode 100644 index 000000000000..11bd8eafeed5 --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/tsconfig.eslint.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true + }, + "include": ["**/*.ts", "**/*.js", "**/*.test.ts", "**/*.test.js"], + "exclude": [] +} diff --git a/packages/create-discord-bot/template/TypeScript/tsconfig.json b/packages/create-discord-bot/template/TypeScript/tsconfig.json new file mode 100644 index 000000000000..961c0d5b0b7f --- /dev/null +++ b/packages/create-discord-bot/template/TypeScript/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@sapphire/ts-config/extra-strict", + "compilerOptions": { + "declaration": false, + "declarationMap": false, + "module": "ESNext", + "moduleResolution": "NodeNext", + "target": "ESNext", + "outDir": "dist" + } +} diff --git a/packages/create-discord-bot/tsconfig.docs.json b/packages/create-discord-bot/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/create-discord-bot/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/create-discord-bot/tsconfig.eslint.json b/packages/create-discord-bot/tsconfig.eslint.json new file mode 100644 index 000000000000..d04d4be3aedc --- /dev/null +++ b/packages/create-discord-bot/tsconfig.eslint.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "**/*.js", + "**/*.mjs", + "**/*.jsx", + "**/*.test.ts", + "**/*.test.js", + "**/*.test.mjs", + "**/*.spec.ts", + "**/*.spec.js", + "**/*.spec.mjs" + ], + "exclude": [] +} diff --git a/packages/create-discord-bot/tsconfig.json b/packages/create-discord-bot/tsconfig.json new file mode 100644 index 000000000000..fd8b5e417b9f --- /dev/null +++ b/packages/create-discord-bot/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*.ts"] +} diff --git a/packages/create-discord-bot/tsup.config.ts b/packages/create-discord-bot/tsup.config.ts new file mode 100644 index 000000000000..bf763be19640 --- /dev/null +++ b/packages/create-discord-bot/tsup.config.ts @@ -0,0 +1,9 @@ +import { createTsupConfig } from '../../tsup.config.js'; + +export default createTsupConfig({ + entry: ['src/create-discord-bot.ts'], + dts: false, + format: 'esm', + minify: true, + sourcemap: false, +}); diff --git a/packages/discord.js/.eslintignore b/packages/discord.js/.eslintignore index 92d358b3473b..b91919e38cd0 100644 --- a/packages/discord.js/.eslintignore +++ b/packages/discord.js/.eslintignore @@ -1 +1 @@ -/typings/**/* +typings diff --git a/packages/discord.js/.gitignore b/packages/discord.js/.gitignore index 1781cfe4afe2..ca1826cebb42 100644 --- a/packages/discord.js/.gitignore +++ b/packages/discord.js/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -16,12 +16,12 @@ pids test/auth.json test/auth.js -# Dist -dist/ +# Docs docs/**/* !docs/index.json +!docs/logo.svg +!docs/README.md # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp diff --git a/packages/discord.js/.prettierignore b/packages/discord.js/.prettierignore index 8b94c7d45e03..e1ae1cb02494 100644 --- a/packages/discord.js/.prettierignore +++ b/packages/discord.js/.prettierignore @@ -1,8 +1,3 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +docs/docs.json +CHANGELOG.md diff --git a/packages/discord.js/CHANGELOG.md b/packages/discord.js/CHANGELOG.md index 468b22d28193..d605cc9f49fe 100644 --- a/packages/discord.js/CHANGELOG.md +++ b/packages/discord.js/CHANGELOG.md @@ -2,6 +2,2867 @@ All notable changes to this project will be documented in this file. +# [14.11.0](https://github.com/discordjs/discord.js/compare/14.10.2...14.11.0) - (2023-05-06) + +## Bug Fixes + +- **WebSocketManager:** Properly emit shard error events (#9521) ([e627468](https://github.com/discordjs/discord.js/commit/e6274681fd10b0d75e1d3b448c94b50ec6810367)) +- **WebSocketManager:** Emit raw ws events again (#9502) ([c429763](https://github.com/discordjs/discord.js/commit/c429763be8e94f0f0cbc630e8bb1d415d46f1465)) + +## Documentation + +- **Client:** Update Sapphire's snowflake utility links (#9501) ([1b7981e](https://github.com/discordjs/discord.js/commit/1b7981e4696b8ae74ceffa876fc0a9be7d0b9f93)) + +## Features + +- **Guild:** Safety alerts channel and mention raid protection (#8959) ([6b2c3fb](https://github.com/discordjs/discord.js/commit/6b2c3fb9d0571de808e990cf064f73240ab93451)) + +## Performance + +- **Role:** Linear speed position getter (#9493) ([8e9a2b4](https://github.com/discordjs/discord.js/commit/8e9a2b4630f78bb9e45345ec2a16812bfac70a20)) + +## Refactor + +- **GuildChannel:** Simplify constructor (#9499) ([f2ad076](https://github.com/discordjs/discord.js/commit/f2ad0762c521422ab64e5b10344a6fd67961031b)) + +## Typings + +- **StringSelectMenuComponentData:** `options` is required (#9515) ([d7b18f0](https://github.com/discordjs/discord.js/commit/d7b18f0681d4147ff192c98108c035d6d0f96cce)) + +# [14.10.2](https://github.com/discordjs/discord.js/compare/14.10.1...14.10.2) - (2023-05-01) + +## Bug Fixes + +- Correct `isJSONEncodable()` import (#9495) ([201b002](https://github.com/discordjs/discord.js/commit/201b002ad405b845ace5f708077c1f157bb4126d)) +- **Client:** `generateInvite()` scope validation (#9492) ([b327f49](https://github.com/discordjs/discord.js/commit/b327f4925ff557e0aa8273d7f017aa616226ca06)) + +# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01) + +## Bug Fixes + +- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211)) + +## Refactor + +- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc)) + +# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01) + +## Bug Fixes + +- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9)) +- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c)) +- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224)) +- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53)) +- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd)) +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a)) +- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894)) +- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9)) +- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34)) +- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847)) +- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e)) +- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329)) +- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741)) +- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0)) +- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183)) + +## Features + +- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b)) +- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f)) +- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353)) + +## Performance + +- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571)) + +## Refactor + +- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7)) +- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c)) + +## Typings + +- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc)) +- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6)) +- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149)) + +# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01) + +## Bug Fixes + +- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5)) +- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de)) +- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7)) +- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27)) +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) +- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8)) +- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6)) +- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc)) +- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8)) +- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b)) + +## Documentation + +- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4)) +- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333)) +- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd)) +- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7)) +- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33)) +- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7)) +- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac)) + +## Features + +- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c)) +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) +- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55)) + +## Refactor + +- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7)) +- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327)) + +# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12) + +## Bug Fixes + +- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8)) +- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b)) +- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c)) +- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef)) +- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d)) +- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95)) +- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474)) +- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d)) +- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c)) +- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332)) +- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51)) +- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed)) +- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703)) +- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514)) +- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b)) +- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9)) +- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7)) +- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465)) +- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4)) +- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e)) +- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c)) + +## Documentation + +- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef)) +- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db)) +- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26)) +- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63)) +- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96)) +- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa)) +- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881)) +- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f)) +- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e)) +- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38)) +- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2)) +- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864)) + +## Features + +- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71)) +- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda)) +- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d)) +- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b)) +- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1)) +- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b)) +- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553)) +- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753)) +- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034)) +- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6)) +- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2)) +- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47)) +- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f)) +- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713)) +- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a)) +- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31)) +- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8)) +- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e)) +- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) +- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb)) +- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92)) +- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7)) +- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea)) +- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff)) +- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87)) +- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b)) +- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82)) +- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +## Typings + +- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a)) +- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277)) +- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b)) +- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f)) +- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26)) +- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85)) +- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e)) +- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de)) +- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a)) +- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda)) +- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c)) + +# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01) + +## Bug Fixes + +- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0)) + +# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28) + +## Bug Fixes + +- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6)) +- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29)) +- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee)) +- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b)) +- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d)) +- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7)) +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Documentation + +- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65)) +- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07)) +- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e)) +- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe)) +- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126)) +- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2)) +- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43)) + +## Features + +- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719)) +- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0)) +- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a)) +- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685)) +- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba)) +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) +- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba)) +- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d)) +- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8)) +- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5)) + +## Refactor + +- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d)) + +# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10) + +## Bug Fixes + +- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842)) +- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012)) +- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65)) +- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c)) +- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d)) +- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf)) + +## Documentation + +- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e)) +- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08)) +- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e)) + +## Features + +- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5)) +- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260)) +- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3)) +- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8)) + +## Refactor + +- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb)) + +## Typings + +- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a)) +- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27)) +- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc)) + +# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25) + +## Bug Fixes + +- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac)) +- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388)) +- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d)) +- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc)) +- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7)) +- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265)) + +## Documentation + +- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50)) +- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666)) + +## Features + +- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5)) + +## Refactor + +- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb)) + +## Typings + +- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff)) +- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3)) + +# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21) + +## Bug Fixes + +- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff)) +- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f)) +- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb)) +- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9)) + +## Documentation + +- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74)) +- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58)) +- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739)) +- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5)) +- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68)) +- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0)) + +## Features + +- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851)) +- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5)) +- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f)) +- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df)) +- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4)) +- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060)) +- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4)) +- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db)) + +## Refactor + +- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3)) +- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8)) +- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67)) + +## Typings + +- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c)) +- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d)) +- Ensure events possess `Client` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e)) +- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9)) +- **ThreadChannel:** `fetchStarterMessage` must return a `Message` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e)) +- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3)) + +# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22) + +## Bug Fixes + +- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9)) +- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8)) +- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc)) + +## Documentation + +- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86)) + +## Features + +- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc)) +- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7)) +- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166)) + +## Refactor + +- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25)) + +## Typings + +- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136)) +- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87)) +- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d)) +- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b)) +- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7)) +- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f)) +- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77)) +- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91)) +- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba)) + +# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10) + +## Bug Fixes + +- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06)) +- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710)) +- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534)) +- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82)) +- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40)) +- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c)) +- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609)) + +## Documentation + +- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5)) +- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209)) +- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9)) + +## Features + +- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d)) + +## Typings + +- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f)) +- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634)) +- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c)) + +# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30) + +## Bug Fixes + +- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852)) + +## Documentation + +- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871)) + +# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29) + +## Bug Fixes + +- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084)) +- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e)) +- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd)) +- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e)) +- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21)) +- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348)) +- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0)) +- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d)) + +## Documentation + +- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174)) +- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8)) +- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d)) +- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f)) +- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646)) +- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc)) + +## Features + +- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1)) +- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0)) +- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff)) + +## Refactor + +- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467)) +- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407)) + +## Typings + +- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a)) + +# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19) + +## Bug Fixes + +- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e)) + +# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18) + +## Bug Fixes + +- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00)) + +# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17) + +## Bug Fixes + +- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890)) +- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f)) +- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d)) +- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9)) +- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4)) +- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0)) +- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a)) +- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff)) +- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d)) +- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc)) +- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4)) +- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07)) +- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87)) +- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e)) +- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26)) +- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1)) +- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a)) +- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9)) +- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd)) +- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3)) +- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada)) +- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea)) +- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2)) +- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126)) +- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec)) +- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604)) +- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101)) +- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695)) +- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c)) +- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a)) +- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e)) +- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21)) +- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f)) +- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f)) +- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63)) +- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009)) +- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14)) +- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a)) +- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8)) +- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f)) +- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba)) +- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3)) +- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22)) +- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1)) +- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88)) +- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986)) +- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253)) +- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e)) +- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a)) +- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398)) +- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390)) +- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0)) +- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd)) +- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199)) +- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445)) +- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526)) +- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594)) +- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d)) +- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce)) +- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a)) +- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69)) +- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b)) +- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4)) +- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0)) +- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4)) +- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1)) +- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d)) +- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b)) +- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe)) +- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591)) +- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf)) +- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610)) +- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917)) +- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e)) +- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645)) +- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1)) +- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9)) +- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495)) +- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a)) +- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58)) +- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141)) +- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04)) +- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31)) +- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b)) +- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381)) +- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7)) +- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382)) +- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6)) +- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e)) +- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de)) +- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283)) +- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a)) +- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4)) +- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c)) +- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d)) +- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630)) +- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc)) +- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd)) +- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a)) +- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197)) +- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad)) +- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee)) +- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113)) +- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e)) +- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6)) +- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a)) +- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784)) +- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5)) +- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34)) +- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0)) +- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236)) + +## Deprecation + +- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1)) + +## Documentation + +- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3)) +- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413)) +- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e)) +- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912)) +- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838)) +- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6)) +- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc)) +- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f)) +- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0)) +- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5)) +- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737)) +- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087)) +- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f)) +- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880)) +- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111)) +- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2)) +- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1)) +- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0)) +- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf)) +- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b)) +- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42)) +- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b)) +- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f)) +- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3)) +- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9)) +- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7)) +- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945)) +- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989)) +- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9)) +- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac)) +- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d)) +- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9)) +- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512)) +- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2)) +- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693)) +- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24)) +- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d)) +- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd)) +- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011)) +- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3)) +- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7)) +- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0)) +- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35)) +- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457)) +- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25)) +- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19)) +- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840)) +- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a)) +- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3)) +- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6)) + +## Features + +- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25)) +- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c)) +- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8)) +- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525)) +- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9)) +- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02)) +- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304)) +- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7)) +- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21)) +- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc)) +- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86)) +- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee)) +- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864)) +- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f)) +- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f)) +- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25)) +- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab)) +- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557)) +- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48)) +- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585)) +- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b)) +- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c)) +- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22)) +- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04)) +- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53)) +- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3)) +- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d)) +- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917)) +- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5)) +- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d)) +- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742)) +- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532)) +- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65)) +- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f)) +- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3)) +- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2)) +- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105)) +- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40)) +- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6)) +- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c)) +- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6)) +- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a)) +- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b)) +- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0)) +- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a)) + - **Co-authored-by:** Antonio Román +- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835)) +- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb)) +- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0)) +- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9)) +- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3)) +- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f)) +- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29)) +- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7)) +- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c)) +- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8)) +- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f)) +- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0)) +- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62)) +- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80)) +- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d)) +- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0)) +- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11)) +- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654)) +- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1)) +- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438)) +- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0)) +- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027)) +- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e)) +- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1)) + +## Refactor + +- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b)) +- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae)) +- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303)) +- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c)) +- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b)) +- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd)) +- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853)) +- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2)) +- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b)) +- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5)) +- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211)) +- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419)) +- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb)) +- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00)) +- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4)) +- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026)) +- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb)) +- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd)) +- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a)) +- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06)) +- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f)) +- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee)) +- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267)) +- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139)) +- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4)) +- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57)) +- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c)) +- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079)) +- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3)) +- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36)) +- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8)) +- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2)) +- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0)) +- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e)) +- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15)) +- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886)) +- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78)) +- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a)) +- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1)) +- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d)) +- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509)) +- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844)) +- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d)) +- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8)) +- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e)) +- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9)) +- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca)) +- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4)) +- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0)) +- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851)) +- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497)) +- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257)) +- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2)) +- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b)) +- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21)) +- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f)) +- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403)) +- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66)) +- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd)) +- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b)) +- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0)) +- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5)) +- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d)) +- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1)) +- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d)) +- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732)) +- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3)) +- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5)) +- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75)) +- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e)) +- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239)) +- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722)) +- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061)) +- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d)) +- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c)) +- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1)) +- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e)) +- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79)) +- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7)) +- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05)) +- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211)) + +## Styling + +- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629)) + +## Typings + +- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf)) +- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0)) +- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a)) +- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153)) +- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9)) +- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a)) +- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18)) +- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899)) +- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d)) +- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982)) +- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c)) +- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200)) +- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895)) +- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202)) +- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b)) +- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b)) +- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db)) +- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6)) +- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c)) +- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4)) +- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb)) +- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c)) +- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769)) +- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd)) +- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf)) +- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4)) +- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1)) +- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437)) +- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3)) +- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6)) +- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2)) +- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8)) +- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c)) +- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7)) +- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91)) +- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9)) +- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3)) +- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36)) +- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55)) +- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6)) +- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664)) +- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9)) +- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355)) +- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9)) +- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638)) +- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d)) +- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5)) +- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296)) +- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321)) +- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4)) +- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab)) +- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3)) +- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8)) +- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7)) +- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6)) +- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35)) +- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04)) +- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef)) +- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0)) +- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811)) +- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf)) +- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc)) +- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b)) +- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de)) +- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef)) +- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c)) +- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598)) +- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707)) +- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0)) + +# [14.10.2](https://github.com/discordjs/discord.js/compare/14.10.1...14.10.2) - (2023-05-01) + +## Bug Fixes + +- Correct `isJSONEncodable()` import (#9495) ([201b002](https://github.com/discordjs/discord.js/commit/201b002ad405b845ace5f708077c1f157bb4126d)) +- **Client:** `generateInvite()` scope validation (#9492) ([b327f49](https://github.com/discordjs/discord.js/commit/b327f4925ff557e0aa8273d7f017aa616226ca06)) + +# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01) + +## Bug Fixes + +- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211)) + +## Refactor + +- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc)) + +# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01) + +## Bug Fixes + +- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9)) +- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c)) +- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224)) +- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53)) +- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd)) +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a)) +- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894)) +- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9)) +- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34)) +- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847)) +- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e)) +- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329)) +- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741)) +- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0)) +- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183)) + +## Features + +- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b)) +- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f)) +- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353)) + +## Performance + +- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571)) + +## Refactor + +- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7)) +- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c)) + +## Typings + +- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc)) +- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6)) +- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149)) + +# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01) + +## Bug Fixes + +- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5)) +- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de)) +- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7)) +- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27)) +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) +- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8)) +- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6)) +- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc)) +- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8)) +- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b)) + +## Documentation + +- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4)) +- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333)) +- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd)) +- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7)) +- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33)) +- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7)) +- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac)) + +## Features + +- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c)) +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) +- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55)) + +## Refactor + +- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7)) +- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327)) + +# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12) + +## Bug Fixes + +- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8)) +- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b)) +- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c)) +- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef)) +- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d)) +- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95)) +- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474)) +- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d)) +- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c)) +- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332)) +- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51)) +- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed)) +- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703)) +- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514)) +- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b)) +- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9)) +- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7)) +- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465)) +- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4)) +- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e)) +- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c)) + +## Documentation + +- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef)) +- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db)) +- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26)) +- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63)) +- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96)) +- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa)) +- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881)) +- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f)) +- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e)) +- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38)) +- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2)) +- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864)) + +## Features + +- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71)) +- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda)) +- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d)) +- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b)) +- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1)) +- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b)) +- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553)) +- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753)) +- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034)) +- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6)) +- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2)) +- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47)) +- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f)) +- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713)) +- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a)) +- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31)) +- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8)) +- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e)) +- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) +- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb)) +- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92)) +- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7)) +- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea)) +- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff)) +- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87)) +- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b)) +- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82)) +- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +## Typings + +- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a)) +- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277)) +- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b)) +- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f)) +- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26)) +- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85)) +- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e)) +- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de)) +- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a)) +- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda)) +- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c)) + +# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01) + +## Bug Fixes + +- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0)) + +# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28) + +## Bug Fixes + +- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6)) +- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29)) +- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee)) +- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b)) +- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d)) +- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7)) +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Documentation + +- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65)) +- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07)) +- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e)) +- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe)) +- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126)) +- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2)) +- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43)) + +## Features + +- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719)) +- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0)) +- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a)) +- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685)) +- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba)) +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) +- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba)) +- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d)) +- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8)) +- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5)) + +## Refactor + +- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d)) + +# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10) + +## Bug Fixes + +- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842)) +- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012)) +- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65)) +- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c)) +- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d)) +- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf)) + +## Documentation + +- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e)) +- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08)) +- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e)) + +## Features + +- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5)) +- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260)) +- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3)) +- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8)) + +## Refactor + +- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb)) + +## Typings + +- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a)) +- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27)) +- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc)) + +# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25) + +## Bug Fixes + +- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac)) +- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388)) +- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d)) +- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc)) +- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7)) +- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265)) + +## Documentation + +- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50)) +- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666)) + +## Features + +- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5)) + +## Refactor + +- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb)) + +## Typings + +- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff)) +- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3)) + +# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21) + +## Bug Fixes + +- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff)) +- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f)) +- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb)) +- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9)) + +## Documentation + +- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74)) +- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58)) +- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739)) +- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5)) +- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68)) +- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0)) + +## Features + +- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851)) +- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5)) +- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f)) +- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df)) +- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4)) +- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060)) +- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4)) +- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db)) + +## Refactor + +- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3)) +- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8)) +- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67)) + +## Typings + +- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c)) +- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d)) +- Ensure events possess `Client` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e)) +- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9)) +- **ThreadChannel:** `fetchStarterMessage` must return a `Message` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e)) +- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3)) + +# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22) + +## Bug Fixes + +- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9)) +- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8)) +- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc)) + +## Documentation + +- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86)) + +## Features + +- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc)) +- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7)) +- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166)) + +## Refactor + +- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25)) + +## Typings + +- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136)) +- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87)) +- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d)) +- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b)) +- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7)) +- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f)) +- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77)) +- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91)) +- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba)) + +# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10) + +## Bug Fixes + +- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06)) +- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710)) +- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534)) +- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82)) +- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40)) +- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c)) +- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609)) + +## Documentation + +- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5)) +- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209)) +- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9)) + +## Features + +- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d)) + +## Typings + +- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f)) +- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634)) +- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c)) + +# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30) + +## Bug Fixes + +- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852)) + +## Documentation + +- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871)) + +# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29) + +## Bug Fixes + +- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084)) +- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e)) +- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd)) +- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e)) +- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21)) +- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348)) +- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0)) +- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d)) + +## Documentation + +- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174)) +- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8)) +- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d)) +- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f)) +- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646)) +- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc)) + +## Features + +- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1)) +- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0)) +- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff)) + +## Refactor + +- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467)) +- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407)) + +## Typings + +- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a)) + +# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19) + +## Bug Fixes + +- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e)) + +# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18) + +## Bug Fixes + +- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00)) + +# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17) + +## Bug Fixes + +- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890)) +- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f)) +- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d)) +- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9)) +- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4)) +- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0)) +- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a)) +- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff)) +- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d)) +- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc)) +- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4)) +- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07)) +- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87)) +- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e)) +- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26)) +- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1)) +- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a)) +- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9)) +- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd)) +- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3)) +- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada)) +- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea)) +- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2)) +- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126)) +- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec)) +- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604)) +- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101)) +- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695)) +- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c)) +- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a)) +- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e)) +- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21)) +- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f)) +- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f)) +- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63)) +- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009)) +- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14)) +- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a)) +- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8)) +- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f)) +- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba)) +- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3)) +- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22)) +- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1)) +- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88)) +- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986)) +- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253)) +- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e)) +- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a)) +- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398)) +- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390)) +- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0)) +- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd)) +- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199)) +- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445)) +- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526)) +- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594)) +- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d)) +- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce)) +- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a)) +- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69)) +- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b)) +- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4)) +- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0)) +- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4)) +- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1)) +- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d)) +- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b)) +- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe)) +- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591)) +- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf)) +- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610)) +- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917)) +- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e)) +- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645)) +- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1)) +- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9)) +- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495)) +- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a)) +- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58)) +- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141)) +- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04)) +- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31)) +- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b)) +- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381)) +- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7)) +- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382)) +- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6)) +- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e)) +- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de)) +- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283)) +- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a)) +- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4)) +- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c)) +- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d)) +- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630)) +- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc)) +- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd)) +- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a)) +- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197)) +- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad)) +- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee)) +- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113)) +- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e)) +- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6)) +- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a)) +- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784)) +- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5)) +- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34)) +- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0)) +- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236)) + +## Deprecation + +- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1)) + +## Documentation + +- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3)) +- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413)) +- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e)) +- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912)) +- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838)) +- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6)) +- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc)) +- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f)) +- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0)) +- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5)) +- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737)) +- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087)) +- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f)) +- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880)) +- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111)) +- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2)) +- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1)) +- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0)) +- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf)) +- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b)) +- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42)) +- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b)) +- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f)) +- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3)) +- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9)) +- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7)) +- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945)) +- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989)) +- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9)) +- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac)) +- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d)) +- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9)) +- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512)) +- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2)) +- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693)) +- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24)) +- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d)) +- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd)) +- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011)) +- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3)) +- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7)) +- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0)) +- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35)) +- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457)) +- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25)) +- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19)) +- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840)) +- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a)) +- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3)) +- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6)) + +## Features + +- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25)) +- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c)) +- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8)) +- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525)) +- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9)) +- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02)) +- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304)) +- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7)) +- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21)) +- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc)) +- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86)) +- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee)) +- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864)) +- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f)) +- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f)) +- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25)) +- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab)) +- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557)) +- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48)) +- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585)) +- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b)) +- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c)) +- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22)) +- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04)) +- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53)) +- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3)) +- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d)) +- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917)) +- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5)) +- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d)) +- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742)) +- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532)) +- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65)) +- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f)) +- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3)) +- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2)) +- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105)) +- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40)) +- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6)) +- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c)) +- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6)) +- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a)) +- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b)) +- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0)) +- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a)) + - **Co-authored-by:** Antonio Román +- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835)) +- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb)) +- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0)) +- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9)) +- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3)) +- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f)) +- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29)) +- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7)) +- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c)) +- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8)) +- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f)) +- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0)) +- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62)) +- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80)) +- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d)) +- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0)) +- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11)) +- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654)) +- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1)) +- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438)) +- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0)) +- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027)) +- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e)) +- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1)) + +## Refactor + +- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b)) +- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae)) +- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303)) +- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c)) +- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b)) +- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd)) +- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853)) +- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2)) +- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b)) +- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5)) +- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211)) +- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419)) +- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb)) +- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00)) +- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4)) +- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026)) +- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb)) +- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd)) +- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a)) +- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06)) +- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f)) +- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee)) +- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267)) +- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139)) +- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4)) +- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57)) +- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c)) +- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079)) +- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3)) +- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36)) +- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8)) +- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2)) +- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0)) +- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e)) +- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15)) +- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886)) +- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78)) +- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a)) +- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1)) +- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d)) +- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509)) +- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844)) +- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d)) +- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8)) +- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e)) +- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9)) +- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca)) +- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4)) +- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0)) +- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851)) +- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497)) +- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257)) +- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2)) +- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b)) +- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21)) +- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f)) +- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403)) +- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66)) +- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd)) +- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b)) +- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0)) +- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5)) +- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d)) +- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1)) +- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d)) +- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732)) +- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3)) +- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5)) +- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75)) +- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e)) +- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239)) +- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722)) +- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061)) +- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d)) +- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c)) +- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1)) +- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e)) +- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79)) +- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7)) +- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05)) +- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211)) + +## Styling + +- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629)) + +## Typings + +- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf)) +- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0)) +- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a)) +- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153)) +- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9)) +- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a)) +- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18)) +- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899)) +- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d)) +- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982)) +- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c)) +- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200)) +- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895)) +- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202)) +- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b)) +- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b)) +- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db)) +- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6)) +- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c)) +- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4)) +- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb)) +- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c)) +- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769)) +- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd)) +- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf)) +- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4)) +- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1)) +- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437)) +- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3)) +- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6)) +- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2)) +- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8)) +- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c)) +- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7)) +- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91)) +- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9)) +- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3)) +- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36)) +- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55)) +- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6)) +- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664)) +- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9)) +- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355)) +- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9)) +- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638)) +- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d)) +- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5)) +- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296)) +- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321)) +- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4)) +- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab)) +- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3)) +- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8)) +- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7)) +- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6)) +- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35)) +- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04)) +- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef)) +- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0)) +- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811)) +- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf)) +- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc)) +- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b)) +- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de)) +- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef)) +- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c)) +- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598)) +- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707)) +- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0)) + +# [14.10.1](https://github.com/discordjs/discord.js/compare/14.10.0...14.10.1) - (2023-05-01) + +## Bug Fixes + +- **Client:** Spelling of InvalidScopesWithPermissions ([ac9bf3a](https://github.com/discordjs/discord.js/commit/ac9bf3ac06ec78dbaca2ce4a82cceb0d82484211)) + +## Refactor + +- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc)) + +# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01) + +## Bug Fixes + +- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9)) +- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c)) +- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224)) +- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53)) +- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd)) +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a)) +- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894)) +- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9)) +- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34)) +- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847)) +- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e)) +- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329)) +- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741)) +- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0)) +- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183)) + +## Features + +- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b)) +- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f)) +- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353)) + +## Performance + +- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571)) + +## Refactor + +- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7)) +- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c)) + +## Typings + +- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc)) +- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6)) +- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149)) + +# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01) + +## Bug Fixes + +- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5)) +- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de)) +- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7)) +- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27)) +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) +- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8)) +- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6)) +- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc)) +- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8)) +- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b)) + +## Documentation + +- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4)) +- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333)) +- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd)) +- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7)) +- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33)) +- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7)) +- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac)) + +## Features + +- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c)) +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) +- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55)) + +## Refactor + +- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7)) +- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327)) + +# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12) + +## Bug Fixes + +- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8)) +- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b)) +- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c)) +- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef)) +- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d)) +- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95)) +- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474)) +- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d)) +- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c)) +- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332)) +- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51)) +- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed)) +- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703)) +- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514)) +- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b)) +- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9)) +- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7)) +- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465)) +- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4)) +- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e)) +- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c)) + +## Documentation + +- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef)) +- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db)) +- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26)) +- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63)) +- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96)) +- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa)) +- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881)) +- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f)) +- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e)) +- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38)) +- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2)) +- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864)) + +## Features + +- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71)) +- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda)) +- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d)) +- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b)) +- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1)) +- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b)) +- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553)) +- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753)) +- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034)) +- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6)) +- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2)) +- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47)) +- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f)) +- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713)) +- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a)) +- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31)) +- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8)) +- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e)) +- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) +- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb)) +- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92)) +- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7)) +- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea)) +- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff)) +- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87)) +- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b)) +- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82)) +- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +## Typings + +- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a)) +- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277)) +- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b)) +- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f)) +- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26)) +- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85)) +- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e)) +- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de)) +- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a)) +- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda)) +- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c)) + +# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01) + +## Bug Fixes + +- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0)) + +# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28) + +## Bug Fixes + +- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6)) +- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29)) +- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee)) +- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b)) +- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d)) +- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7)) +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Documentation + +- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65)) +- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07)) +- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e)) +- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe)) +- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126)) +- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2)) +- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43)) + +## Features + +- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719)) +- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0)) +- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a)) +- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685)) +- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba)) +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) +- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba)) +- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d)) +- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8)) +- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5)) + +## Refactor + +- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d)) + +# [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10) + +## Bug Fixes + +- **ClientOptions:** Make `ClientOptions#intents` returns an IntentsBitField (#8617) ([4c2955a](https://github.com/discordjs/discord.js/commit/4c2955a5de6779c29c09e63ba9ad2b235904f842)) +- Correctly construct a builder (#8727) ([e548e6a](https://github.com/discordjs/discord.js/commit/e548e6a10b7e1720f5e8f3c859b0b64d5134a012)) +- **Components:** Error with unknown components (#8724) ([6fd331d](https://github.com/discordjs/discord.js/commit/6fd331dd528e78fd023c908bd58af3faa9ed6c65)) +- **Client:** Don't auth for webhook fetches with token (#8709) ([01d75c8](https://github.com/discordjs/discord.js/commit/01d75c8b8b14f33c95a4da83a8494db848beeb8c)) +- Re-export util (#8699) ([a306219](https://github.com/discordjs/discord.js/commit/a306219673335584accd2ff77ab34d2812ef6c5d)) +- Throw discord.js errors correctly (#8697) ([ace974f](https://github.com/discordjs/discord.js/commit/ace974fc1fdbc5bcaa0d7f6f6d17de185c9f9cbf)) + +## Documentation + +- **Utils:** Remove `private` from `parseEmoji` (#8718) ([a31e605](https://github.com/discordjs/discord.js/commit/a31e605e09064a300e31a3c91466b613654ba98e)) +- Update UserContextMenuCommandInteraction documentation (#8717) ([7556db2](https://github.com/discordjs/discord.js/commit/7556db243d9480949835668fcb5724fdd5d70e08)) +- Fix `AwaitMessageComponentOptions` typedef (#8696) ([9effd82](https://github.com/discordjs/discord.js/commit/9effd82abe82ba71ae627673da21ba07e1ede23e)) + +## Features + +- **Util:** Escape more markdown characters (#8701) ([7b8966b](https://github.com/discordjs/discord.js/commit/7b8966bca156db79933403289741893a6e10ccd5)) +- **GuildChannelManager:** Allow creating channels with a default auto archive duration (#8693) ([628759b](https://github.com/discordjs/discord.js/commit/628759bcff8b0d4c77926cee2b8c18d8fdb4c260)) +- Add `@discordjs/util` (#8591) ([b2ec865](https://github.com/discordjs/discord.js/commit/b2ec865765bf94181473864a627fb63ea8173fd3)) +- **ForumChannel:** Add `defaultSortOrder` (#8633) ([883f6e9](https://github.com/discordjs/discord.js/commit/883f6e9202a559c986f4b15fccb422b5aea7bea8)) + +## Refactor + +- Rename Error to DiscordjsError internally (#8706) ([aec44a0](https://github.com/discordjs/discord.js/commit/aec44a0c93f620b22242f35e626d817e831fc8cb)) + +## Typings + +- Fix events augmentation (#8681) ([ac83ada](https://github.com/discordjs/discord.js/commit/ac83ada306ec153c13260d2bd53e4d704884b68a)) +- **Message:** Remove `& this` from `#inGuild` typeguard (#8704) ([c0f7a1a](https://github.com/discordjs/discord.js/commit/c0f7a1a89a4cf62edc7065bd200b2ce4018e0a27)) +- **ModalBuilder:** Fix constructor typings (#8690) ([2ea2a85](https://github.com/discordjs/discord.js/commit/2ea2a85e6335d57f44689f9b6e284129104de8fc)) + +# [14.5.0](https://github.com/discordjs/discord.js/compare/14.4.0...14.5.0) - (2022-09-25) + +## Bug Fixes + +- **ThreadChannel:** Add forum channel to parent (#8664) ([0126d9b](https://github.com/discordjs/discord.js/commit/0126d9b810a156c4bf1b8b93f2121f3319855bac)) +- **GuildChannelManager:** Allow creating webhooks on forums (#8661) ([16fcdc3](https://github.com/discordjs/discord.js/commit/16fcdc36877d1a65ce9995c9fe3502aa268c9388)) +- **ForumChannel:** Implement missing properties and methods (#8662) ([8622939](https://github.com/discordjs/discord.js/commit/862293922924f453f69b0b0f8efe87ddebbd387d)) +- RepliableInteraction respect cached generic (#8667) ([578bc95](https://github.com/discordjs/discord.js/commit/578bc951bdcdc21ec5aee86e7a47a17e8c867dfc)) +- **ThreadChannel:** Allow editing flags (#8671) ([1244854](https://github.com/discordjs/discord.js/commit/1244854e1365d7e4a8d01703a7ec13610ed100c7)) +- **GuildChannelManager:** Typo in `flags` property name when editing (#8669) ([fc8ed81](https://github.com/discordjs/discord.js/commit/fc8ed816e643754a938211a17b41a2cec95df265)) + +## Documentation + +- Fix duplicate typedefs (#8677) ([d79aa2d](https://github.com/discordjs/discord.js/commit/d79aa2d0d0b186bd28cbfc82f3d6ecf3deb41c50)) +- **ForumChannel:** Add `@implements` (#8678) ([8ca407e](https://github.com/discordjs/discord.js/commit/8ca407e089c3050b61a51a52b9100e4613ad1666)) + +## Features + +- **GuildChannelManager:** Allow editing `flags` (#8637) ([abb7226](https://github.com/discordjs/discord.js/commit/abb7226af3445f5b724815bb2f7a121a52a563b5)) + +## Refactor + +- **GuildBanManager:** Add deprecation warning for `deleteMessageDays` (#8659) ([e993122](https://github.com/discordjs/discord.js/commit/e9931229ae62a120ae0761ee2a2c10ea0cb1a6fb)) + +## Typings + +- **GuildChannelManager:** Handle forum channel overload (#8660) ([1486bc9](https://github.com/discordjs/discord.js/commit/1486bc9336369d229972df5e28b9428365b92bff)) +- **Caches:** Allow `GuildForumThreadManager` and `GuildTextThreadManager` (#8665) ([2487e3b](https://github.com/discordjs/discord.js/commit/2487e3bf76260a4a2fbf375e0b01a43f347922a3)) + +# [14.4.0](https://github.com/discordjs/discord.js/compare/14.3.0...14.4.0) - (2022-09-21) + +## Bug Fixes + +- Correct applied tags type (#8641) ([f6f15d8](https://github.com/discordjs/discord.js/commit/f6f15d8e877d4ffbe908a093e64809ef9015e0ff)) +- **ThreadChannel:** Make `fetchStarterMessage()` work in forum posts (#8638) ([a7f816e](https://github.com/discordjs/discord.js/commit/a7f816eeb7fa1e193cf0901efbdcaf629f72465f)) +- Update `messageCount`/`totalMessageSent` on message events (#8635) ([145eb2f](https://github.com/discordjs/discord.js/commit/145eb2fc5db5ca739aa9782d5ec5210f81a6aeeb)) +- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9)) + +## Documentation + +- Correctly overwrite `setRTCRegion` method (#8642) ([f049734](https://github.com/discordjs/discord.js/commit/f0497343f1193635b260b9e2085cac7b43991f74)) +- **GuildTextThreadManager:** Document correct `@extend` (#8639) ([802b239](https://github.com/discordjs/discord.js/commit/802b2394b08151faab6810695fd5c8f27ce84d58)) +- Fix regexps incorrectly being called global (#8624) ([fc9653f](https://github.com/discordjs/discord.js/commit/fc9653f5aea4013da15fb8de0a4452400eaa7739)) +- Update misleading `Client#guildMemberAvailable` event description (#8626) ([22ac6b4](https://github.com/discordjs/discord.js/commit/22ac6b4660db6b02f62b9851e9e3bcfe5fb506b5)) +- **Options:** Update DefaultMakeCacheSettings (#8585) ([3252332](https://github.com/discordjs/discord.js/commit/32523325c6610e95fe3ffcc31d005b3418c6bc68)) +- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0)) + +## Features + +- **Widget:** Allow forum channels (#8645) ([b106956](https://github.com/discordjs/discord.js/commit/b1069563086fc616fe21abb789f28f69e57c8851)) +- **WelcomeChannel:** Add forum channel as a type (#8643) ([6f1f465](https://github.com/discordjs/discord.js/commit/6f1f465a77e362e20ec50067be0e634d35946ba5)) +- Allow forum channels in webhook update event (#8646) ([5048a3d](https://github.com/discordjs/discord.js/commit/5048a3d17ace22336e74451d30b513b3db42a26f)) +- Add support for guild forums (#7791) ([8a8d519](https://github.com/discordjs/discord.js/commit/8a8d519c9c4c082370fc6935b56dafb525b873df)) +- **GuildBanManager#create:** Add `deleteMessageSeconds` (#8326) ([03fb5b0](https://github.com/discordjs/discord.js/commit/03fb5b0a2f45275dec7885175ad691a1d9c449c4)) +- Add typeguard to BaseInteraction#isRepliable (#8565) ([55c3ee2](https://github.com/discordjs/discord.js/commit/55c3ee20ae700e78d18a3c4c04b6a7426cffc060)) +- **Integration:** Add `scopes` (#8483) ([8b3d006](https://github.com/discordjs/discord.js/commit/8b3d0061180cfd5d9ba8beae3e8d623b5ce43ea4)) +- Add `chatInputApplicationCommandMention` formatter (#8546) ([d08a57c](https://github.com/discordjs/discord.js/commit/d08a57cadd9d69a734077cc1902d931ab10336db)) + +## Refactor + +- Replace usage of deprecated `ChannelType`s (#8625) ([669c3cd](https://github.com/discordjs/discord.js/commit/669c3cd2566eac68ef38ab522dd6378ba761e8b3)) +- Split message send/edit types/documentation (#8590) ([8e1afae](https://github.com/discordjs/discord.js/commit/8e1afaebdb686033555ca58e53f34bb97f7369c8)) +- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67)) + +## Typings + +- Narrow channel type in thread managers (#8640) ([14bbc91](https://github.com/discordjs/discord.js/commit/14bbc9150a748e7ac1660c2375c7f065fcc55a6c)) +- **interactions:** Pass `Cached` type to return type of methods (#8619) ([053da5b](https://github.com/discordjs/discord.js/commit/053da5bc91d5cfa8d842b13b0b05083d2f7f086d)) +- Ensure events possess `Client` (#8612) ([a9f003a](https://github.com/discordjs/discord.js/commit/a9f003ac9b56d31166cbf353d02140dad0b2517e)) +- **GuildChannelManager:** Correct `fetch` return type (#8549) ([1d4cdee](https://github.com/discordjs/discord.js/commit/1d4cdee321ab25bb0f109d55a000582825dd79f9)) +- **ThreadChannel:** `fetchStarterMessage` must return a `Message` (#8560) ([b9c62ac](https://github.com/discordjs/discord.js/commit/b9c62ac0f0f534c33f9913135095f8b3d98ec05e)) +- **webhook:** Avatar can be null (#8541) ([f77612a](https://github.com/discordjs/discord.js/commit/f77612a55e9c593a21bc27e58c9fbd03d85787e3)) + +# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22) + +## Bug Fixes + +- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9)) +- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8)) +- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc)) + +## Documentation + +- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86)) + +## Features + +- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc)) +- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7)) +- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166)) + +## Refactor + +- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25)) + +## Typings + +- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136)) +- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87)) +- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d)) +- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b)) +- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7)) +- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f)) +- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77)) +- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91)) +- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba)) + +# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10) + +## Bug Fixes + +- **ThreadChannel:** Handle possibly `null` parent (#8466) ([afa27b1](https://github.com/discordjs/discord.js/commit/afa27b15c5b92bc8d55b8285834d8e03f6692d06)) +- Remove DM channels from `Client#messageDeleteBulk`'s types (#8460) ([6c6fe74](https://github.com/discordjs/discord.js/commit/6c6fe74dd84859c5319efa999404e8168f189710)) +- **Transformers:** Do not transform `Date` objects (#8463) ([0e2a095](https://github.com/discordjs/discord.js/commit/0e2a09571c8e5ee61153b04e45334a226a1b4534)) +- **ModalSubmitInteraction:** Allow deferUpdate (#8455) ([0fab869](https://github.com/discordjs/discord.js/commit/0fab869e5179dca7ddec75b5519615278e51ad82)) +- **Guild:** Unable to fetch templates (#8420) ([aac8acc](https://github.com/discordjs/discord.js/commit/aac8acc22be7d7af99933ef099eca7deda43cb40)) +- **MessageMentions:** Infinite loop in `parsedUsers` getter (#8430) ([b8a3136](https://github.com/discordjs/discord.js/commit/b8a31360a220e3d796f5381bd215d30a379ecb7c)) +- **DataResolver:** Make `Buffer` from string (#8416) ([e72b986](https://github.com/discordjs/discord.js/commit/e72b986939e2958547c0e54d6d27472c8d111609)) + +## Documentation + +- Change registration example to use global commands (#8454) ([64a4041](https://github.com/discordjs/discord.js/commit/64a4041a05e9514334a9f9e1f38a1ea18bb676d5)) +- **Colors:** Provide enum descriptions (#8437) ([6ef4754](https://github.com/discordjs/discord.js/commit/6ef4754d40c5ec65715fc1e00e643c52fe0a6209)) +- **AttachmentBuilder:** Fix #8407 (#8421) ([5b053cf](https://github.com/discordjs/discord.js/commit/5b053cf82ec2f2b717a490485af052dc956fe3c9)) + +## Features + +- **Guild:** Add `max_video_channel_users` (#8423) ([3a96ce7](https://github.com/discordjs/discord.js/commit/3a96ce7970947f6268c21a1323d986aac8cb736d)) + +## Typings + +- **Message:** Correct `bulkDelete` return type (#8465) ([c5b96a1](https://github.com/discordjs/discord.js/commit/c5b96a185cb8ba836b7cd10526c14059866f218f)) +- Fix missing types for mentionable options (#8443) ([452e94f](https://github.com/discordjs/discord.js/commit/452e94fd3ecc12de9e3408982c5c7fd931bae634)) +- **ApplicationCommandOption:** Add `ApplicationCommandBooleanOption` (#8434) ([38275fc](https://github.com/discordjs/discord.js/commit/38275fc53d633ce77ed2b142aff788dcbd4fad8c)) + +# [14.1.2](https://github.com/discordjs/discord.js/compare/14.1.1...14.1.2) - (2022-07-30) + +## Bug Fixes + +- **errors:** Error codes (#8398) ([480c85c](https://github.com/discordjs/discord.js/commit/480c85c9c3d129204b3399ed726a4e570e0b2852)) + +## Documentation + +- **Embed:** Ensure height and width are numbers (#8396) ([fca3dad](https://github.com/discordjs/discord.js/commit/fca3dada2a565eecfc7e5275cc9317df1d261871)) + +# [14.1.0](https://github.com/discordjs/discord.js/compare/14.0.3...14.1.0) - (2022-07-29) + +## Bug Fixes + +- **MessageMentions:** `ignoreRepliedUser` option in `has()` (#8202) ([b4e2c0c](https://github.com/discordjs/discord.js/commit/b4e2c0c4d5538b945f9d597c6410a6f84b315084)) +- **GuildChannelManager:** Allow unsetting rtcRegion (#8359) ([a7d49e5](https://github.com/discordjs/discord.js/commit/a7d49e56fc7c34d2e4548d9e5bf0aec45273506e)) +- **ThreadChannel:** Omit webhook fetching (#8351) ([3839958](https://github.com/discordjs/discord.js/commit/3839958e3f682c715f1017da05436d2fe34900fd)) +- **GuildAuditLogsEntry:** Replace OverwriteType with AuditLogOptionsType (#8345) ([58c1b51](https://github.com/discordjs/discord.js/commit/58c1b51c5ceab137ad9851919b338419eeeab69e)) +- **ShardClientUtil#_respond:** Construct global error (#8348) ([8e520f9](https://github.com/discordjs/discord.js/commit/8e520f946a5b9f93a939290facf4ccca2c05ff21)) +- **Presence:** Do not return NaN for activity timestamp (#8340) ([df42fdf](https://github.com/discordjs/discord.js/commit/df42fdfc421f1190f0a2267a66efd3c921ec2348)) +- **Client:** Omit private properties from toJSON (#8337) ([830c670](https://github.com/discordjs/discord.js/commit/830c670c61dcb17d8ab2a894a3203c68917d27e0)) +- **ApplicationCommandManager:** Allow passing 0n to defaultMemberPermissions (#8311) ([1fb7b30](https://github.com/discordjs/discord.js/commit/1fb7b30963cfe7ea4c05b1f3b42171c879c46a1d)) + +## Documentation + +- **InteractionResponses:** Add `showModal()` return type (#8376) ([0b61dbf](https://github.com/discordjs/discord.js/commit/0b61dbf720e844322b066e30080c3537ab3d8174)) +- **WebhookClient:** Document working options (#8375) ([ba6797e](https://github.com/discordjs/discord.js/commit/ba6797e74209161b64c412de1b6f307cb28736b8)) +- **Message:** Document gateway intent for content (#8364) ([2130aae](https://github.com/discordjs/discord.js/commit/2130aae3210a8eaf91c5ccae5463940d49052c7d)) +- Use info blocks for requirements (#8361) ([80b9738](https://github.com/discordjs/discord.js/commit/80b9738957ebf5b6eb7c9858cec0fb1c897d0a1f)) +- **WebhookClient:** Make constructor a union (#8370) ([e9920a9](https://github.com/discordjs/discord.js/commit/e9920a9c98ffb78bd7d0ae00d486476367296646)) +- Update docs and examples to PascalCase links (#8305) ([34ba9d1](https://github.com/discordjs/discord.js/commit/34ba9d1c4c80eff7e6ac199a40232d07491432cc)) + +## Features + +- Add channel & message URL formatters (#8371) ([a7deb8f](https://github.com/discordjs/discord.js/commit/a7deb8f89830ead6185c5fb46a49688b6d209ed1)) +- Restore missing typeguards (#8328) ([77ed407](https://github.com/discordjs/discord.js/commit/77ed407f6aadb68e729470c5269e9b526cb1b3f0)) +- **GuildMember:** Add dmChannel getter (#8281) ([4fc2c60](https://github.com/discordjs/discord.js/commit/4fc2c60a3bb43671b4b0202ae75eab42aba163ff)) + +## Refactor + +- Deprecate `Formatter` class (#8373) ([7fd9ed8](https://github.com/discordjs/discord.js/commit/7fd9ed8f13d17ce7e98e34f7454d9047054d8467)) +- **PermissionOverwriteManager:** Use `OverwriteType` (#8374) ([6d24805](https://github.com/discordjs/discord.js/commit/6d248051cfd431e9cb1c65cb98f56aa0a6556407)) + +## Typings + +- **GuildAuditLogsEntryExtraField:** Use `AuditLogOptionsType` (#8349) ([200ab91](https://github.com/discordjs/discord.js/commit/200ab91f527d8a5706d277b89a975096f75d141a)) + +# [14.0.3](https://github.com/discordjs/discord.js/compare/14.0.2...14.0.3) - (2022-07-19) + +## Bug Fixes + +- **Components:** Support emoji id strings (#8310) ([660e212](https://github.com/discordjs/discord.js/commit/660e212e83df026c684ee2cda7fb4e98870f342e)) + +# [14.0.2](https://github.com/discordjs/discord.js/compare/14.0.1...14.0.2) - (2022-07-18) + +## Bug Fixes + +- **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00)) + +# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17) + +## Bug Fixes + +- **GuildMemberManager:** Allow setting own nickname (#8066) ([52a9e21](https://github.com/discordjs/discord.js/commit/52a9e213c2dc13ee52ee0234593fdce392f43890)) +- **PermissionOverwriteManager:** Mutates user (#8283) ([3bf30b1](https://github.com/discordjs/discord.js/commit/3bf30b1e6d2d6f583f7069a1e24e7842d59fab2f)) +- **GuildChannelManager:** Access `resolveId` correctly (#8296) ([3648f6d](https://github.com/discordjs/discord.js/commit/3648f6d567cd834c301de913ce19f786a265240d)) +- **GuildChannelManager:** Edit lockPermissions (#8269) ([7876548](https://github.com/discordjs/discord.js/commit/787654816d2b6a5168d199d32cdaeb4ef6d270b9)) +- **`SelectMenuBuilder`:** Properly accept `SelectMenuOptionBuilder`s (#8174) ([31d5930](https://github.com/discordjs/discord.js/commit/31d593046466438c55f5784b0f2098e233c5edc4)) +- Remove global flag on regular expressions (#8177) ([cdd9214](https://github.com/discordjs/discord.js/commit/cdd9214212892e30b3eaa161837c37516c5bcaa0)) +- **MessagePayload:** Guard against `repliedUser` property (#8211) ([fa010b5](https://github.com/discordjs/discord.js/commit/fa010b516254c4ab2762278817f31bf289f0ab6a)) +- **ApplicationCommandManager:** Explicitly allow passing builders to methods (#8209) ([50d55bd](https://github.com/discordjs/discord.js/commit/50d55bd6b819307c86701f4808c087f359c6ccff)) +- **GuildMemberRemove:** Remove member's presence (#8181) ([11b1739](https://github.com/discordjs/discord.js/commit/11b173931968c548f8504649ae7090865892e62d)) +- Edit() data can be partial and `defaultMemberPermissions` can be `null` (#8163) ([0ffbef5](https://github.com/discordjs/discord.js/commit/0ffbef506a97a0bf22cb134fc007c2aec29cbffc)) +- **WebSocketShard:** Keep an error handler on connections (#8150) ([c34c02a](https://github.com/discordjs/discord.js/commit/c34c02ab8d119bf16d8d14d125a9b650b4bb18f4)) +- **DJSError:** Error code validation (#8149) ([31f6582](https://github.com/discordjs/discord.js/commit/31f658247fe0e1047897edab629643d140e77e07)) +- **vcs:** Nsfw property (#8132) ([2eeaad6](https://github.com/discordjs/discord.js/commit/2eeaad6f27fdf8868364fa95ed20755ee09bda87)) +- **WebSocketManager:** Correct error name (#8138) ([db2b033](https://github.com/discordjs/discord.js/commit/db2b0333d912fe83381db2ffe16829d7d03d6c2e)) +- **WebSocketShard:** Disconnected casing (#8117) ([23e183a](https://github.com/discordjs/discord.js/commit/23e183a9ac7aaa3bca2bc4eb8634d1738ec34a26)) +- **webhooks:** Revert webhook caching (and returning Message) (#8038) ([d54bf5d](https://github.com/discordjs/discord.js/commit/d54bf5d286f4057db130901591b192fd4d1668c1)) +- **ApplicationCommand:** Remove `autocomplete` check at the top level and correctly check for `dmPermission` (#8100) ([0a44b05](https://github.com/discordjs/discord.js/commit/0a44b05db83948857afbe18471e7a867da47177a)) +- **ApplicationCommand:** Fix default member permissions assignment (#8067) ([96053ba](https://github.com/discordjs/discord.js/commit/96053babe1bd65ebe1fc6a261f5eb052906afdb9)) +- **scripts:** Read directory and rerun (#8065) ([f527dea](https://github.com/discordjs/discord.js/commit/f527dea36ead194aaae1bf5da1e953df59d692fd)) +- Select menu options to accept both rest and array (#8032) ([fbe67e1](https://github.com/discordjs/discord.js/commit/fbe67e102502b4b49690cbf8ff891ead2232ecf3)) +- **CommandInteractionOptionResolver:** Handle autocompletion interactions (#8058) ([d8077c6](https://github.com/discordjs/discord.js/commit/d8077c6839dc8ceb57d3c3a86bf9746be2a91ada)) +- **scripts:** Add quotes around blob arguments (#8054) ([598f61b](https://github.com/discordjs/discord.js/commit/598f61b992fab1b3fdcab8ff960366f7af0b37ea)) +- **Message:** Force fetching (#8047) ([f2b267c](https://github.com/discordjs/discord.js/commit/f2b267c079dd8aa7277910471f3db2f88af6efb2)) +- **Attachment:** Do not destructure `data` (#8041) ([1afae90](https://github.com/discordjs/discord.js/commit/1afae909d72e648cf48d63d7de2708737a78c126)) +- **DirectoryChannel:** Type `name` and handle `url` (#8023) ([86d8fbc](https://github.com/discordjs/discord.js/commit/86d8fbc023e3925e8f86799d6ebf2d423f7bf2ec)) +- Readd `isThread` type guard (#8019) ([f8ed71b](https://github.com/discordjs/discord.js/commit/f8ed71bfca6e47e3d44ad063e23804354bd23604)) +- Add static method `from` in builders (#7990) ([ad36c0b](https://github.com/discordjs/discord.js/commit/ad36c0be7744ea4214ccf345fe80a5a1a9e89101)) +- Typings (#7965) ([7a1095b](https://github.com/discordjs/discord.js/commit/7a1095b66be3c5d81185e026281e2908c10c1695)) +- **GuildAuditLogs:** Cache guild scheduled events (#7951) ([2f03f9a](https://github.com/discordjs/discord.js/commit/2f03f9ad3f63abee5b5c46d02f1afa8885e8977c)) +- Make sure action row builders create djs builders (#7945) ([adf461b](https://github.com/discordjs/discord.js/commit/adf461baf49be754c7a10c61faf1ef3df333413a)) +- **TextBasedChannel#bulkDelete:** Return deleted message (#7943) ([191510b](https://github.com/discordjs/discord.js/commit/191510b7f87903e4bd93b891649cb290fd50c47e)) +- Remove trailing invites on channel deletion (#7932) ([5e9b757](https://github.com/discordjs/discord.js/commit/5e9b757a3733e6526770eb60a15072612294eb21)) +- **DataResolver:** Fix check for readable streams (#7928) ([28172ca](https://github.com/discordjs/discord.js/commit/28172ca7b57357436d3252ec01ec17dad865d87f)) +- **AuditLog:** Default changes to empty array (#7880) ([19eaed6](https://github.com/discordjs/discord.js/commit/19eaed63905367ef4604366b8839023384524d1f)) +- **Util:** Flatten ignoring certain fields (#7773) ([df64d3e](https://github.com/discordjs/discord.js/commit/df64d3ea382c07e66bc7cc8877ee430206c31d63)) +- Possibly missing (#7829) ([6239d83](https://github.com/discordjs/discord.js/commit/6239d83c4d5f0a396678410d7fef35e39ed29009)) +- `endReason` not being properly set in base Collector (#7833) ([0c18dab](https://github.com/discordjs/discord.js/commit/0c18dab1280205b8855d17d075b7421860d59c14)) +- **SelectMenuBuilder:** Options array (#7826) ([3617093](https://github.com/discordjs/discord.js/commit/361709332bdc871822c2b9919f14fd090d68666a)) +- **Activity:** Platform type (#7805) ([4ac91c6](https://github.com/discordjs/discord.js/commit/4ac91c61d08111ae4d49d1e64caf94e6e49832c8)) +- **ApplicationCommand:** Equal nameLocalizations and descriptionLocalizations (#7802) ([4972bd8](https://github.com/discordjs/discord.js/commit/4972bd87c17cbc6a94c9608ba2ab39c475f9921f)) +- **InteractionResponses:** Use optional chaining on nullable property (#7812) ([c5fb548](https://github.com/discordjs/discord.js/commit/c5fb54852906898ffb19282dd60168dfc6fb2eba)) +- **MessageManager:** Allow caching option of an unspecified limit (#7763) ([1b2d8de](https://github.com/discordjs/discord.js/commit/1b2d8decb638faeae8184119c5cedfcdaf9485e3)) +- **builders:** Add constructor default param (#7788) ([c286650](https://github.com/discordjs/discord.js/commit/c2866504a3824005fe756556fec4b349898b7d22)) +- **MessagePayload:** ResolveBody check body instead of data (#7738) ([3db20ab](https://github.com/discordjs/discord.js/commit/3db20abdd2d502a1ed457842181b164dc6390ba1)) +- **ActionRow:** ToJSON should include components (#7739) ([ebb4dfa](https://github.com/discordjs/discord.js/commit/ebb4dfa262adb2086c83db487002bb2e1ed5ab88)) +- Prevent `NaN` for nullable timestamps (#7750) ([8625d81](https://github.com/discordjs/discord.js/commit/8625d817145eb642aeb0da05184352f438586986)) +- **InteractionCreateAction:** Ensure text-based channel for caching messages (#7755) ([25fdb38](https://github.com/discordjs/discord.js/commit/25fdb3894d33dc395a376a3d962a063eb5735253)) +- Pass `force` correctly (#7721) ([402514f](https://github.com/discordjs/discord.js/commit/402514ff323ccf1f8c95d295f044cf0bb5547c2e)) +- Support reason in setRTCRegion helpers (#7723) ([905a6a1](https://github.com/discordjs/discord.js/commit/905a6a11663f9469ada67f8310a969453ffc5b2a)) +- **GuildMemberManager:** Return type can be null (#7680) ([74bf7d5](https://github.com/discordjs/discord.js/commit/74bf7d57ab959eb820ab1c213ac86ab1ea660398)) +- **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390)) +- Audit log static reference (#7703) ([85e531f](https://github.com/discordjs/discord.js/commit/85e531f22d7a8f8ad043647ce445726ae0df26c0)) +- Handle possibly missing property (#7641) ([0c32332](https://github.com/discordjs/discord.js/commit/0c32332a5aacbbb6c415da75c166d09cfdb34bbd)) +- **util:** Allow `escapeInlineCode` to escape double backtics (#7638) ([d5369a5](https://github.com/discordjs/discord.js/commit/d5369a56e3fcf50513f3bc582552c2838b04d199)) +- **GuildEditData:** Some fields can be null (#7632) ([4d2b559](https://github.com/discordjs/discord.js/commit/4d2b55955d1a3ff05c3047599232becdc3f2c445)) +- TOKEN_INVALID error not thrown at login with invalid token (#7630) ([cd79bef](https://github.com/discordjs/discord.js/commit/cd79bef2547594f4d0c744faa8fa67fb9fd61526)) +- **GuildScheduledEvent:** Handle missing `image` (#7625) ([c684ac5](https://github.com/discordjs/discord.js/commit/c684ac55e1d225740e67ab7bd5643de1b35f4594)) +- **guild:** Throw if ownerId falsey (#7575) ([98177aa](https://github.com/discordjs/discord.js/commit/98177aa38d3d6516d4c5354d6c7edea925dc881d)) +- Remove Modal export (#7654) ([87a6b84](https://github.com/discordjs/discord.js/commit/87a6b8445bfbf3981cd39813fe961dfa1c7f2bce)) +- **Embed:** Fix incorrect destructuring import (#7615) ([cbdb408](https://github.com/discordjs/discord.js/commit/cbdb408dffd1c7f2193c15989528a3de5fd9f13a)) +- **ThreadMembersUpdate:** Only emit added & removed thread members (#7539) ([c12d61a](https://github.com/discordjs/discord.js/commit/c12d61a3421afcdc41f77c0fddde4efbb257fa69)) +- **Util:** EscapeInlineCode properly (#7587) ([851f380](https://github.com/discordjs/discord.js/commit/851f380eb10d23ffd08e8b845aed4039abbcd03b)) +- **GuildStickerManager:** Correctly access guild ID (#7605) ([4b08d9b](https://github.com/discordjs/discord.js/commit/4b08d9b376bda7a7f4bb3fb8c555d25cca648de4)) +- **MessageManager:** Pin route (#7610) ([cb566c8](https://github.com/discordjs/discord.js/commit/cb566c8b6abff489a944db7952e5c5a48e0c98b0)) +- Handle partial data for `Typing#user` (#7542) ([c6cb5e9](https://github.com/discordjs/discord.js/commit/c6cb5e9ebbf46d81404119a6aa11bb8ebb17d5a4)) +- **guild:** Fix typo accessing user instead of users (#7537) ([8203c5d](https://github.com/discordjs/discord.js/commit/8203c5d843f2431c0f49023282f1bf73d85881d1)) +- **test:** `MessageActionRow` to `ActionRow` (#7523) ([d1d1b07](https://github.com/discordjs/discord.js/commit/d1d1b076bebf7cb706b2436a40d87c6efaed1e1d)) +- **MessagePayload:** Don't set reply flags to target flags (#7514) ([4f30652](https://github.com/discordjs/discord.js/commit/4f306521d829fef21ebd70557b37f8199b82572b)) +- **invite:** Add back channelId property (#7501) ([78aa36f](https://github.com/discordjs/discord.js/commit/78aa36f9f5913b86c82376ecdf20653b15340bbe)) +- Properly serialize `undefined` values (#7497) ([8dbd345](https://github.com/discordjs/discord.js/commit/8dbd34544cbeb499282f01dda9d35ed9bca93591)) +- Allow unsafe embeds to be serialized (#7494) ([942ea1a](https://github.com/discordjs/discord.js/commit/942ea1acbfb49289ccb3a1882b5a2da0a7d0bccf)) +- Attachment types (#7478) ([395a68f](https://github.com/discordjs/discord.js/commit/395a68ff49c622d5136d6b775beaf8e88a2d8610)) +- Use case converter for json component serialization (#7464) ([2d45544](https://github.com/discordjs/discord.js/commit/2d4554440ed9329a5876a9c674c3eb2de0f2f917)) +- **GuildAuditLogs:** Typings and consistency (#7445) ([c1b27f8](https://github.com/discordjs/discord.js/commit/c1b27f8eed8ea04a48bc106453892bddcdc6b73e)) +- **dataresolver:** Ensure fetched file is convert to a buffer (#7457) ([9311fa7](https://github.com/discordjs/discord.js/commit/9311fa7b42b2b5a74e411aa263daa4fbfc270645)) +- **messagepayload:** ResolveFile property names (#7458) ([a8106f7](https://github.com/discordjs/discord.js/commit/a8106f7c586f0ecac76e7f72c53b0da215a6fbf1)) +- **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9)) +- **threads:** Require being sendable to be unarchivable (#7406) ([861f0e2](https://github.com/discordjs/discord.js/commit/861f0e2134662ab64a11d313130aff58b413d495)) +- **guildmember:** Check if member has administrator permission (#7384) ([81d8b54](https://github.com/discordjs/discord.js/commit/81d8b54ff6b98b0e7ee2c57eaee6bc0b707e135a)) +- **guild:** Remove `maximumPresences` default value (#7440) ([55b388a](https://github.com/discordjs/discord.js/commit/55b388a763dc7223e88b62ae928fe85fe8b8fe58)) +- **guildchannelmanager:** Edit always sets parent to null (#7446) ([b97aedd](https://github.com/discordjs/discord.js/commit/b97aedd8e15f9358960cb59403f3a8ea24b87141)) +- **guildmember:** Make `pending` nullable (#7401) ([fe11ff5](https://github.com/discordjs/discord.js/commit/fe11ff5f6e85571a981e90eba5b9f3bda7a2cd04)) +- **clientpresence:** Fix used opcodes (#7415) ([a921ec7](https://github.com/discordjs/discord.js/commit/a921ec7dc525c58d40b4678e66270f9238abed31)) +- Correctly export UnsafeSelectMenuComponent from builders (#7421) ([aadfbda](https://github.com/discordjs/discord.js/commit/aadfbda586d57a7b775ad26c201f0dc34618180b)) +- MessageReaction.me being false when it shouldn't (#7378) ([04502ce](https://github.com/discordjs/discord.js/commit/04502ce702da53c4b00bf391d0fd936746851381)) +- Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7)) +- **messagementions:** Fix `has` method (#7292) ([3a5ab2c](https://github.com/discordjs/discord.js/commit/3a5ab2c4e54de4e67ab6e323d7eac86482da7382)) +- **guildmembermanager:** Use rest in edit (#7356) ([00ce1c5](https://github.com/discordjs/discord.js/commit/00ce1c56ac224691a8691a3525cb14ae002319c6)) +- **typings:** Mark `RESTOptions` as Partial in `ClientOptions` (#7349) ([e1ecc1a](https://github.com/discordjs/discord.js/commit/e1ecc1a80a9358cdbafbe8542c40b9de8cad467e)) +- **Webhook:** Use correct method name (#7348) ([11e5e5a](https://github.com/discordjs/discord.js/commit/11e5e5ac5b70138f56332eb3e61a42443670b0de)) +- **thread:** Don't assign directly to getters (#7346) ([2db0cdd](https://github.com/discordjs/discord.js/commit/2db0cdd357c3a02decb4fd4168db87888efba283)) +- Missed enums and typings from #7290 (#7331) ([47633f0](https://github.com/discordjs/discord.js/commit/47633f0fd2435d6d8c694d8d37b26039a7b3797a)) +- **guildchannelmanager:** Remove reverse enum lookup (#7304) ([857bba4](https://github.com/discordjs/discord.js/commit/857bba448029f3f070c67fb40b59a3a2a2e5c6f4)) +- Import `clear{Timeout,Interval}` from `node:timers` (#7269) ([8ddd44e](https://github.com/discordjs/discord.js/commit/8ddd44ed85b32c86243efe0ec35b283eaaa8212c)) +- **ApplicationCommand:** Use new ApplicationCommandOptionType enums (#7257) ([06f5210](https://github.com/discordjs/discord.js/commit/06f5210f58bbba6102173033a9f1e6fb004fdf5d)) +- Use enums from discord-api-types (#7258) ([f284a46](https://github.com/discordjs/discord.js/commit/f284a4641fd68de9190bda97ec1eab0981149630)) +- **exports:** Export ApplicationCommandType properly (#7256) ([f753882](https://github.com/discordjs/discord.js/commit/f75388259262bf6b4a64375b97800bd72378f3bc)) +- **Shard:** EventEmitter listener warning (#7240) ([ff3a8b8](https://github.com/discordjs/discord.js/commit/ff3a8b83234d3826fc49c5a8c3cb52ef9f281ffd)) +- **timestamps:** Account for timestamps of 0 when creating Dates (#7226) ([a8509c9](https://github.com/discordjs/discord.js/commit/a8509c91ca0147393b407221405b6b917677961a)) +- **MessageEmbed:** CreatedAt field can be zero (#7218) ([37cad54](https://github.com/discordjs/discord.js/commit/37cad54dbdade39607397b8ad697eca94f1b7197)) +- **BaseClient:** Do not append default options if provided is not an object (#6453) ([b92a7d7](https://github.com/discordjs/discord.js/commit/b92a7d72332c35b607db54aa6aca24b8e10e00ad)) +- Snowflakeutil import (#7219) ([962f4bf](https://github.com/discordjs/discord.js/commit/962f4bf88211dbfb5ad0295a9467dede1e2688ee)) +- **Role:** Remove unused process (#7215) ([63034b4](https://github.com/discordjs/discord.js/commit/63034b44c9849087e391684d9b6c0c6ae9a21113)) +- **WebhookClient:** Updated webhook url regex (#6804) ([1c615d1](https://github.com/discordjs/discord.js/commit/1c615d1bb2606d5f19e55076d4ecab95c619518e)) +- **Sweepers:** Add sweepStickers function (#7213) ([95f8375](https://github.com/discordjs/discord.js/commit/95f8375d425f58f501f32ead03f7927e6596f8e6)) +- **InteractionCreate:** Use ChatInputCommandInteraction instead (#7210) ([49dada3](https://github.com/discordjs/discord.js/commit/49dada35f92470d3e4426362510847b93dd42d1a)) +- **Structues:** Rename old module's name (#7207) ([fbef454](https://github.com/discordjs/discord.js/commit/fbef45489457a2198357dc4dd303740d79036784)) +- **WebSocket:** Remove application command handler (#7202) ([033151c](https://github.com/discordjs/discord.js/commit/033151cf92fe43536b8a4c0f4d7d9ed75a2095c5)) +- **User:** `bannerURL()` should not throw when not present (#6789) ([3872acf](https://github.com/discordjs/discord.js/commit/3872acfeb8390f6f7202d69cf1f7f8616a7b0b34)) +- **VoiceState:** Ensure `suppress` & `streaming` have proper fallback values (#6377) ([a0d5f13](https://github.com/discordjs/discord.js/commit/a0d5f13dd9b27c44f5183a2a9af4c4fdecb312c0)) +- **sweepers:** Provide default for object param (#7182) ([ae2f013](https://github.com/discordjs/discord.js/commit/ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236)) + +## Deprecation + +- **Caching:** Clean up deprecated cache sweeping (#7118) ([12ffa06](https://github.com/discordjs/discord.js/commit/12ffa069aa8b247e945fef16a543f41c2c391bf1)) + +## Documentation + +- Align webhook method return types with implementation (#8253) ([5aeed99](https://github.com/discordjs/discord.js/commit/5aeed9935058241648507d7f651679226a89dbb3)) +- Remove `@private` constructor documentation (#8255) ([452dec5](https://github.com/discordjs/discord.js/commit/452dec57ca422f5e7424a0f0e78c3e152717f413)) +- **ApplicationCommand:** Add `min_length` and `max_length` to ApplicationCommandOptionData (#8239) ([43f62bb](https://github.com/discordjs/discord.js/commit/43f62bb6678ec332795c8cfbe0c01854b95aa61e)) +- **MessageInteraction#commandName:** Updated description (#8212) ([ab238a9](https://github.com/discordjs/discord.js/commit/ab238a9046e0201dbd4755fa41fa69c44b186912)) +- Add missing `@extends` (#8205) ([e0c8282](https://github.com/discordjs/discord.js/commit/e0c82824905dcebf62c2d1afcc5e5590a5594838)) +- **Constants:** Fix SweeperKeys type (#8157) ([af04992](https://github.com/discordjs/discord.js/commit/af04992ed3c2617fda686c2bc7338dcada283dc6)) +- **Channels:** Internally document channel creation (#8154) ([5e5853a](https://github.com/discordjs/discord.js/commit/5e5853a4e885c47e3dde519761dd59a5ec0e06fc)) +- Update threads to use `ThreadAutoArchiveDuration` (#8153) ([ee36d60](https://github.com/discordjs/discord.js/commit/ee36d60dc6714c83569a20716fa8ca8e1bd7de4f)) +- **APITypes:** Remove duplicate type definition (#8144) ([a061233](https://github.com/discordjs/discord.js/commit/a0612335101c7ce2a07d95da4b79f0d4a2b1a6a0)) +- Document missing type definitions (#8130) ([203bc4a](https://github.com/discordjs/discord.js/commit/203bc4a2cf0c2d90a003093318aa0741605610f5)) +- **InteractionResponse:** Fix return (#8141) ([f1ac17c](https://github.com/discordjs/discord.js/commit/f1ac17c961cf95d99e205133605d10d8be5bd737)) +- **PermissionsBitField:** Fix `@name` of bitfield (#8115) ([3a77ce0](https://github.com/discordjs/discord.js/commit/3a77ce0b18c60a0b21ba088590ff89f2ace94087)) +- `TextBasedChannel` -> `TextBasedChannels` typos (#8110) ([db663a5](https://github.com/discordjs/discord.js/commit/db663a55c2ed2faf61e217009158da50dfcf274f)) +- Remove `number`s from enums (#8098) ([0a138da](https://github.com/discordjs/discord.js/commit/0a138dab95a86512f08ac3be356f77f38f2ea880)) +- **GuildAuditLogs:** Fix and reimplement type definitions (#8108) ([4155136](https://github.com/discordjs/discord.js/commit/415513696c7b7e139d1b958e480bf0c7e4d14111)) +- **WebSocketOptions:** Add `version` to docs and typings (#8050) ([386c41f](https://github.com/discordjs/discord.js/commit/386c41f24fb3c9d06967d9c1881a57645c3a71f2)) +- **BaseGuildTextChannel:** Update `setType()`'s parameter type (#8088) ([9c0f190](https://github.com/discordjs/discord.js/commit/9c0f190de1f743d9bd597ffd656503c672db71c1)) +- Update outdated examples (#8081) ([51eadf3](https://github.com/discordjs/discord.js/commit/51eadf37371a6138847efdb4b5b81ee132001cf0)) +- **ThreadMemberManager:** Require `member` in `FetchThreadMemberOptions` (#8079) ([552ec72](https://github.com/discordjs/discord.js/commit/552ec72542ec3b2b3ebf35c9fd84ab502dd746cf)) +- **AutocompleteInteraction:** Change useless log in responds example (#8077) ([ac7bf69](https://github.com/discordjs/discord.js/commit/ac7bf692bfce8204e278205dde811515a51f154b)) +- Description and missing `@typedef` fixes (#8087) ([a2eebf6](https://github.com/discordjs/discord.js/commit/a2eebf6c66f3e4c96ece9d2ae2a1133c84257f42)) +- Ignore docs of unexported functions (#8051) ([94bdcac](https://github.com/discordjs/discord.js/commit/94bdcaca62414a77d4ee0b8b79752a2be937320b)) +- **ClientOptions:** Fix closeTimeout default (#8049) ([b2eea1c](https://github.com/discordjs/discord.js/commit/b2eea1c900ba73d4b98b72f5c196f51e27d3ab8f)) +- **DirectoryChannel:** Extend `Channel` (#8022) ([f3f34f0](https://github.com/discordjs/discord.js/commit/f3f34f07b3b396015b130b8e9d938a3eec688fc3)) +- **Attachment:** Remove constructor doc (#8009) ([0a7953e](https://github.com/discordjs/discord.js/commit/0a7953e46310c77483d277539b47f1a7ab051fd9)) +- **VoiceChannel:** Annotate that it is implementing TextBasedChannel (#8007) ([5987dbe](https://github.com/discordjs/discord.js/commit/5987dbe5cff6991ae6905b0387411fa042d3e9b7)) +- Add missing discord-api-types external types (#8001) ([546d486](https://github.com/discordjs/discord.js/commit/546d48655f36ed9a6c6c5ce3c2eabcca1a86a945)) +- **InteractionResponses:** Replace outdated Embed example for reply (#7875) ([d308c66](https://github.com/discordjs/discord.js/commit/d308c66eeca6bdc3471637ae3aaaaa0a2f5c9989)) +- Require parameter (#7838) ([f4ccc67](https://github.com/discordjs/discord.js/commit/f4ccc6772c15e32489ca22fb2c3e803b85d4dbf9)) +- **ApplicationCommand:** Fix and improve localization docs (#7804) ([61a44c5](https://github.com/discordjs/discord.js/commit/61a44c509c40abaf7ffb95b10942889cbbf155ac)) +- **ApplicationCommand:** Fix ApplicationCommandOptionChoice (#7794) ([f1d0084](https://github.com/discordjs/discord.js/commit/f1d0084da26b0111ca029c789ad9e8e6c2882b4d)) +- Add back static properties and methods (#7706) ([520f471](https://github.com/discordjs/discord.js/commit/520f471ac56cbc01402b79197333a8a34c4ac5c9)) +- **InteractionCollector:** Document channel option type (#7551) ([e787cd5](https://github.com/discordjs/discord.js/commit/e787cd5fa5d013319347392ee4f799a677f6f512)) +- Correctly type getters (#7500) ([ffecf08](https://github.com/discordjs/discord.js/commit/ffecf084956f954cf10e1b844e00326e443a86f2)) +- ApplicationCommandData typedef (#7389) ([d32db88](https://github.com/discordjs/discord.js/commit/d32db8833e1058fb36f2e83af79d5353a9f2f693)) +- **channel:** Fix `isDMBased` docs (#7411) ([f2a7a9f](https://github.com/discordjs/discord.js/commit/f2a7a9f1b30af272a6a8d81825d09f84e749cc24)) +- **messageattachment:** Fix `contentType` docs (#7413) ([2800e07](https://github.com/discordjs/discord.js/commit/2800e07e5974e07b9f8ce043722b9b99a5bcc80d)) +- Add supported option types for autocomplete (#7368) ([8bb3751](https://github.com/discordjs/discord.js/commit/8bb37513400d646d784d59875d6b6a6ec10160cd)) +- Add external builder docs links (#7390) ([0b866c9](https://github.com/discordjs/discord.js/commit/0b866c9fb284971113e288e52327d4506db28011)) +- Add EnumResolvers (#7353) ([72767a1](https://github.com/discordjs/discord.js/commit/72767a1059526bdf617e80d5a9e5da1fbd2936d3)) +- **locales:** Update Discord API docs link (#7266) ([b640272](https://github.com/discordjs/discord.js/commit/b6402723c31bed3c49f8b8cde873b65b9f373fd7)) +- **StageInstance:** Deprecate discoverableDisabled (#7179) ([bd33ebb](https://github.com/discordjs/discord.js/commit/bd33ebb507eab36bc2219103dbd1e0217b9f38c0)) +- **shardingmanager:** Fix type of `execArgv` option (#7284) ([e65da44](https://github.com/discordjs/discord.js/commit/e65da44d9c564d1ffcb0f4df2bcdaf0ce0636f35)) +- **interaction:** Add locale list link (#7261) ([37ec0bd](https://github.com/discordjs/discord.js/commit/37ec0bda6df75fb1dc69b7a1eafbb8ea19e68457)) +- Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25)) +- Fix command interaction docs (#7212) ([137ea24](https://github.com/discordjs/discord.js/commit/137ea249df3aa6b8375ecb42aa456a6fdb811f19)) +- **TextBasedChannel:** Fixed syntax error in examples (#7163) ([b454740](https://github.com/discordjs/discord.js/commit/b454740ae87b6c3c13536181965519c7277e5840)) +- **TextBasedChannel:** Fix #createMessageComponentCollector description (#7168) ([d4e6e03](https://github.com/discordjs/discord.js/commit/d4e6e0370857dff00185d59faf8aaac12b343a7a)) +- Fixes the examples for kick and ban (#7170) ([db669b8](https://github.com/discordjs/discord.js/commit/db669b897132ec458d50ca6c1e3afa761e98ffc3)) +- **RoleManager:** Fix incorrect example (#7174) ([f79ea67](https://github.com/discordjs/discord.js/commit/f79ea67d3a9ba134a9acef0a443bd089c4e173a6)) + +## Features + +- **builder:** Add max min length in string option (#8214) ([96c8d21](https://github.com/discordjs/discord.js/commit/96c8d21f95eb366c46ae23505ba9054f44821b25)) +- **applicationCommand:** Add max min length in string option (#8215) ([94ee60d](https://github.com/discordjs/discord.js/commit/94ee60d3d438f6657bdef51471528769af09624c)) +- Add website documentation early mvp (#8183) ([d95197c](https://github.com/discordjs/discord.js/commit/d95197cc78593df4d0a8d1cc492b0e41b4ab58b8)) +- **BaseInteraction:** Add support for `app_permissions` (#8194) ([002d6a5](https://github.com/discordjs/discord.js/commit/002d6a5aede3d1c0e08bd58eeef38a3b9202f525)) +- **util:** ParseWebhookURL (#8166) ([c4653f9](https://github.com/discordjs/discord.js/commit/c4653f97b1529eb0b99fccdba67c37eb4f467ff9)) +- **AutocompleteInteraction:** Add `commandGuildId` (#8086) ([10a6c42](https://github.com/discordjs/discord.js/commit/10a6c4287dd45a30290814e50fa29a086f85da02)) +- **guild:** Add support for setting MFA level (#8024) ([c5176be](https://github.com/discordjs/discord.js/commit/c5176be14b697ff506eb973c4119644eab544304)) +- **vcs:** Add missing property and methods (#8002) ([0415300](https://github.com/discordjs/discord.js/commit/0415300243877ddbcb501c0a26b1ff65618a1da7)) +- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21)) +- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc)) +- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86)) +- Backport handle zombie connection (#7626) ([e1176fa](https://github.com/discordjs/discord.js/commit/e1176faa27898d4f127c293c099201cb294e10ee)) +- **CommandInteraction:** Add 'commandGuildId' (#8018) ([aa59a40](https://github.com/discordjs/discord.js/commit/aa59a409b36c7ef7018d1785d2dba4da17b57864)) +- Allow builders to accept rest params and arrays (#7874) ([ad75be9](https://github.com/discordjs/discord.js/commit/ad75be9a9cf90c8624495df99b75177e6c24022f)) +- **MessageReaction:** Add react method (#7810) ([a328778](https://github.com/discordjs/discord.js/commit/a3287782b57c28b94c390c24e7d5f2d8c303301f)) +- **Collector:** Add `ignore` event (#7644) ([5244fe3](https://github.com/discordjs/discord.js/commit/5244fe3c1cd400985b00e95d8e5ec73823cf4f25)) +- **GuildMemberManager:** Add `GuildMemberManager#fetchMe()` (#7526) ([349766d](https://github.com/discordjs/discord.js/commit/349766dd6925e2d5e5597cc78c73e46f17c56eab)) +- **guildChannelManager:** Add `videoQualityMode` option for `create()` (#7980) ([cdd2ba0](https://github.com/discordjs/discord.js/commit/cdd2ba036ab1559783eb067786c52aff61807557)) +- **EnumResolvers:** Remove Enumresolvers (#7876) ([76694c1](https://github.com/discordjs/discord.js/commit/76694c1497de1b083a792fd1fda20f0eace50c48)) +- Move `me` to `GuildMemberManager` manager (#7669) ([aed687b](https://github.com/discordjs/discord.js/commit/aed687b09f87862eb2f33fb9f95b2cbd0b770585)) +- **rest:** Use undici (#7747) ([d1ec8c3](https://github.com/discordjs/discord.js/commit/d1ec8c37ffb7fe3b63eaa8c382f22ca1fb348c9b)) +- **VoiceChannel:** Add support for text in voice (#6921) ([4ba0f56](https://github.com/discordjs/discord.js/commit/4ba0f56b6af64bac30eea807fb3e9f3c41c3c83c)) +- **SelectMenu:** Allow emojis in options and option constructors (#7797) ([f22245e](https://github.com/discordjs/discord.js/commit/f22245e9d072ac4ef63b0ae0d84d5ba94608ce22)) +- Allow `createMessageComponentCollector` without using `fetchReply` (#7623) ([a58556a](https://github.com/discordjs/discord.js/commit/a58556adc02b2b9239c8f277a4387c743c9d6f04)) +- Add guild directory support (#6788) ([b01f414](https://github.com/discordjs/discord.js/commit/b01f4147d4f3bca021bc269c9f06463f06e3db53)) +- **GuildBanManager:** Support pagination results (#7734) ([fc2a8bb](https://github.com/discordjs/discord.js/commit/fc2a8bb6750919ecd6ee7c872df05f4b677ff5d3)) +- **CommandInteraction:** Add support for localized slash commands (#7684) ([01a423d](https://github.com/discordjs/discord.js/commit/01a423d110cfcddb3d794fcc32579a1547dd472d)) +- Allow emoji strings to be passed through constructors (#7718) ([0faac04](https://github.com/discordjs/discord.js/commit/0faac04b69f1dda3dc860cd584af100e36a40917)) +- **StageInstanceManager:** Add `sendStartNotification` option to create (#7730) ([29f8807](https://github.com/discordjs/discord.js/commit/29f88079559cc02ccfef7a7c16458d481e573fb5)) +- Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d)) +- **modal:** Add `awaitModalSubmit` (#7751) ([3037fca](https://github.com/discordjs/discord.js/commit/3037fca196a0f9238d53bb51394daf737bbf3742)) +- **Actions:** Add parent structure to events parameters (#7577) ([3f3e432](https://github.com/discordjs/discord.js/commit/3f3e4327c86da86734c19a96e97115bd505b4532)) +- Export `UnsafeModalBuilder` and `UnsafeTextInputBuilder` (#7628) ([6fec252](https://github.com/discordjs/discord.js/commit/6fec25239dfed46a30826d38dc97f3680f24ec65)) +- **VoiceChannel:** Support `video_quality_mode` (#7722) ([3b3dabf](https://github.com/discordjs/discord.js/commit/3b3dabf3da2e2f24b81967d68b581d7f7452273f)) +- Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3)) +- **embed:** Remove Embed.setColor (#7662) ([9b0d8cb](https://github.com/discordjs/discord.js/commit/9b0d8cb2d8f7b55753de584eb3a3f347f87596c2)) +- **StageInstance:** Add support for associated guild event (#7576) ([3dff31f](https://github.com/discordjs/discord.js/commit/3dff31f63fe4afdcc818193d737e1917f1ac8105)) +- **VoiceState:** Add edit method (#7569) ([b162f27](https://github.com/discordjs/discord.js/commit/b162f27e46524bfc64515969d753c6e8f30e6c40)) +- **ModalSubmitInteraction:** Add boolean properties (#7596) ([8907390](https://github.com/discordjs/discord.js/commit/89073903a253d9408839573502c72cae93fe70b6)) +- Add Modals and Text Inputs (#7023) ([ed92015](https://github.com/discordjs/discord.js/commit/ed920156344233241a21b0c0b99736a3a855c23c)) +- **discord.js:** Partial transition to undici (#7482) ([5158332](https://github.com/discordjs/discord.js/commit/51583320d3b0f6452cd96bad1021f2a57e4cc6f6)) +- **message:** Add `reason` on pin and unpin (#7520) ([00728f7](https://github.com/discordjs/discord.js/commit/00728f72b36123b607502624b4b02a02ee524d4a)) +- Re-export AuditLogEvent enum (#7528) ([6a2fa70](https://github.com/discordjs/discord.js/commit/6a2fa70b8e79a460be38916eeb605976ad6fe68b)) +- **options:** Add support for custom JSON transformers (#7476) ([dee27db](https://github.com/discordjs/discord.js/commit/dee27db35af379b0835f9fd5cc19563f7bf3dfc0)) +- Add CategoryChannelChildManager (#7320) ([5cf5071](https://github.com/discordjs/discord.js/commit/5cf5071061760c2f9c1e36d7648aef544b03323a)) + - **Co-authored-by:** Antonio Román +- Attachment application command option type (#7200) ([0034396](https://github.com/discordjs/discord.js/commit/003439671d359dcfe481446ef12b90bd71c57835)) +- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb)) +- **scheduledevents:** Add image option (#7436) ([fbc71ef](https://github.com/discordjs/discord.js/commit/fbc71ef6b668c4b1e2b065d9b65541d9303db0a0)) +- Add methods to managers (#7300) ([dd751ae](https://github.com/discordjs/discord.js/commit/dd751ae19da196cc2f90ccd35c7d8e99878daaf9)) +- **channel:** Add .url getter (#7402) ([f59d630](https://github.com/discordjs/discord.js/commit/f59d6305cb0cd0d154a909f18be76407c4d452d3)) +- **components:** Add unsafe message component builders (#7387) ([6b6222b](https://github.com/discordjs/discord.js/commit/6b6222bf513d1ee8cd98fba0ad313def560b864f)) +- **thread:** Add `newlyCreated` to `threadCreate` event (#7386) ([51beda5](https://github.com/discordjs/discord.js/commit/51beda56f74e44ed013b5d25044b8d5fd1978b29)) +- **channel:** Add isDMBased typeguard (#7362) ([388f535](https://github.com/discordjs/discord.js/commit/388f53550cca7ded7350a050fda03c36e4c1fdf7)) +- **`Interaction`:** Add `.commandType` property to `CommandInteraction` and `AutocompleteInteraction` (#7357) ([567db60](https://github.com/discordjs/discord.js/commit/567db60475c8704661b2e788c9905ef364d6c00c)) +- **scheduledevent:** Add support for event cover images (#7337) ([355f579](https://github.com/discordjs/discord.js/commit/355f579771771a28a293c327a38574c8918d18f8)) +- **enumResolvers:** Strengthen typings (#7344) ([9a566e8](https://github.com/discordjs/discord.js/commit/9a566e8068f28fce87c07861ef1d2877c6ae105f)) +- Allow setting message flags when sending (#7312) ([706db92](https://github.com/discordjs/discord.js/commit/706db9228a91ef42e49d2ec749eac153b9ef75d0)) +- **minor:** Add application_id to Webhook (#7317) ([5ccdb0a](https://github.com/discordjs/discord.js/commit/5ccdb0ab266e4f74c331386ac2d6dd32bc225c62)) +- **threadchannel:** Add `createdTimestamp` field (#7306) ([9a16234](https://github.com/discordjs/discord.js/commit/9a1623425ae2d69f5c16f0096af4951ff5096e80)) +- **GuildPreview:** Add stickers (#7152) ([cf25de9](https://github.com/discordjs/discord.js/commit/cf25de9373df98b3c1cd0ca0a092d9dc8172929d)) +- Enum resolvers & internal enum string removal (#7290) ([213acd7](https://github.com/discordjs/discord.js/commit/213acd799738b888d550cdf3f08906764f8288e0)) +- **guildemojimanager:** Add `delete` and `edit` methods (#7286) ([9181a31](https://github.com/discordjs/discord.js/commit/9181a31e0ba330502052c94da544bb15c8b66f11)) +- **interaction:** Add `isRepliable` type guard (#7259) ([da05a88](https://github.com/discordjs/discord.js/commit/da05a8856b11cc1bf0df424c88a1cf9573e5b654)) +- **Channel:** Improve typeguards (#6957) ([37a22e0](https://github.com/discordjs/discord.js/commit/37a22e04c27724c2a65b05c701e3000ba3653ba1)) +- Add Locales to Interactions (#7131) ([9052e32](https://github.com/discordjs/discord.js/commit/9052e321d1c9c8841962d4e8dc5d9e060b104438)) +- **Permissions:** Remove deprecated thread-related permissions (#6755) ([ab3ff5a](https://github.com/discordjs/discord.js/commit/ab3ff5a262caf7d6225b8d6b54ab2c6b6613c0d0)) +- **VoiceRegion:** Remove the unsent vip field (#6759) ([caaef53](https://github.com/discordjs/discord.js/commit/caaef53dd97ecac9f714072ddba5ae9a99ab1027)) +- **richpresenceassets:** Add YouTube and custom image support (#7184) ([d06d70c](https://github.com/discordjs/discord.js/commit/d06d70ccf26c04c1122fac8430922588a489f95e)) +- **Collector:** Yield all collected values (#7073) ([2b480cb](https://github.com/discordjs/discord.js/commit/2b480cb14e6f52855efcb372da7fb455c15b13b1)) + +## Refactor + +- **Util:** Rename `fetchRecommendedShards` (#8298) ([cafde77](https://github.com/discordjs/discord.js/commit/cafde77d73452d729ba8e2cb1cac3f14235b889b)) +- **Embed:** Add all the types (#8254) ([64f8140](https://github.com/discordjs/discord.js/commit/64f814066cc4adebaca47eb8d7a2040a8df399ae)) +- **rest:** Add content-type(s) to uploads (#8290) ([103a358](https://github.com/discordjs/discord.js/commit/103a3584c95a7b7f57fa62d47b86520d5ec32303)) +- Make `GuildAuditLogsEntry.action` return an `AuditLogEvent` (#8256) ([f0b68d5](https://github.com/discordjs/discord.js/commit/f0b68d57368d7ac3db97925df68c11a945ccd84c)) +- **builder:** Remove `unsafe*Builder`s (#8074) ([a4d1862](https://github.com/discordjs/discord.js/commit/a4d18629828234f43f03d1bd4851d4b727c6903b)) +- Make `ShardEvents` the events of `Shard` (#8185) ([c5750d5](https://github.com/discordjs/discord.js/commit/c5750d59f529ab48a5bc88a73a1c449ef6ddbffd)) +- **Util:** Make single `replace` call in `cleanContent` (#8210) ([6b20645](https://github.com/discordjs/discord.js/commit/6b206457400ce31d566b02a0c135042afb540853)) +- **ApplicationCommandManager:** Use `makeURLSearchParams` (#8196) ([cb3dca4](https://github.com/discordjs/discord.js/commit/cb3dca4ae029724421f3d04a784ace0ae2de75e2)) +- Use `Base` prefix for channel and interaction base classes (#8099) ([e24970e](https://github.com/discordjs/discord.js/commit/e24970e3c3d24f71ba711e59666cd8a49a33e33b)) +- **Constants:** Remove leftover code (#8156) ([cd17aad](https://github.com/discordjs/discord.js/commit/cd17aad720430d23af51c364caeb8b22bf6cb6b5)) +- Errors (#8068) ([e68effa](https://github.com/discordjs/discord.js/commit/e68effa822f064a324ed5b92e797c9fc3ce5e211)) +- **ClientOptions:** Remove `$` prefix from `ws.properties` keys (#8094) ([90a98fe](https://github.com/discordjs/discord.js/commit/90a98fee16b7d1d06768461f4e85127c0edf8419)) +- Use `GuildFeature` enum (#8101) ([e5ec1c4](https://github.com/discordjs/discord.js/commit/e5ec1c4dbc3fa54b2c43d1fec24932d7363e17cb)) +- **util:** Make utility functions top level (#8052) ([e53d162](https://github.com/discordjs/discord.js/commit/e53d1621986035b0c92a1782f6e013d408480e00)) +- **ApplicationCommand:** Permissions v2 (#7857) ([c7391db](https://github.com/discordjs/discord.js/commit/c7391db11b3efd4b1a6904affb26887ad06d6db4)) +- ***:** Include name/reason/etc fields into options/data params (#8026) ([9c8b310](https://github.com/discordjs/discord.js/commit/9c8b3102ce00d1f2c1255c150fb3030f8b6dd026)) +- **ThreadMemberManager:** Consistent thread member fetching (#8021) ([da9107c](https://github.com/discordjs/discord.js/commit/da9107c007536952107bd92943b6c714538d5aeb)) +- **interactions:** Remove redundant interaction typeguards (#8027) ([f57d676](https://github.com/discordjs/discord.js/commit/f57d6768ad24f6e37dc598f9c93709449d3bc4dd)) +- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a)) +- **channel:** Remove redundant channel type guards (#8012) ([70c733b](https://github.com/discordjs/discord.js/commit/70c733bb9a5bde0f79e6bea0bdc416458bda4c06)) +- Always return `Message` instances in interactions (#7917) ([9720e55](https://github.com/discordjs/discord.js/commit/9720e555340431c3b3ad7bd670ad0ac7eee8865f)) +- **attachment:** Don't return attachment builders from API (#7852) ([dfadcbc](https://github.com/discordjs/discord.js/commit/dfadcbc2fd50be64c8a0c1cae3be10f83678c5ee)) +- Clean up modal submissions (#7994) ([643dab3](https://github.com/discordjs/discord.js/commit/643dab3b1b5305d002fcefed62755bbe11fc3267)) +- **ThreadChannel:** Remove `MAX` helper from threads (#7846) ([dfd9eb2](https://github.com/discordjs/discord.js/commit/dfd9eb20b2d3e0e7db26744b1f15134ac6eda139)) +- **Activity:** Remove undocumented properties (#7844) ([5ba7740](https://github.com/discordjs/discord.js/commit/5ba7740fcfefda1eeba81ace4e6351eac02522a4)) +- **MessageAttachment:** Use `Attachment` instead (#7691) ([ab4c608](https://github.com/discordjs/discord.js/commit/ab4c608b97ff319935e1a7f23564622bfd7ddd57)) +- **Util:** Remove splitting (#7780) ([54e5629](https://github.com/discordjs/discord.js/commit/54e56299865a6746744544ba25d5540a1166d27c)) +- Tidy up builders and components (#7711) ([96a0d83](https://github.com/discordjs/discord.js/commit/96a0d83a1366703ecae40b5e0d5171be9123d079)) +- Remove nickname parsing (#7736) ([78a3afc](https://github.com/discordjs/discord.js/commit/78a3afcd7fdac358e06764cc0d675e1215c785f3)) +- Remove store channels (#7634) ([aedddb8](https://github.com/discordjs/discord.js/commit/aedddb875e740e1f1bd77f06ce1b361fd3b7bc36)) +- **IntegrationApplication:** Remove `summary` (#7729) ([eb6b472](https://github.com/discordjs/discord.js/commit/eb6b472f72488cad7e96befccc00270cf6dc01b8)) +- **GuildAuditLogs:** Remove build (#7704) ([cedd053](https://github.com/discordjs/discord.js/commit/cedd0536baa1301984daf89dfda4e63a7be595a2)) +- **InteractionCollector:** Simplify constructor logic (#7667) ([07b23a9](https://github.com/discordjs/discord.js/commit/07b23a99c7088a7c740f23051f3f755f091519b0)) +- Remove undocumented checks (#7637) ([9a6e691](https://github.com/discordjs/discord.js/commit/9a6e691eaa6c3d133098b2734414590cb838de2e)) +- Allow builders to accept emoji strings (#7616) ([fb9a9c2](https://github.com/discordjs/discord.js/commit/fb9a9c221121ee1c7986f9c775b77b9691a0ae15)) +- Use `static` fields (#7701) ([e805777](https://github.com/discordjs/discord.js/commit/e805777a7a81d1dc7a2edd9741ecb04e685a3886)) +- **EmbedBuilder:** Allow hex strings in setColor (#7673) ([f472975](https://github.com/discordjs/discord.js/commit/f4729759f600372455f062c75859f084e23a5d78)) +- Don't return builders from API data (#7584) ([549716e](https://github.com/discordjs/discord.js/commit/549716e4fcec89ca81216a6d22aa8e623175e37a)) +- **embed:** Allow hex strings in `setColor()` (#7593) ([79d6c04](https://github.com/discordjs/discord.js/commit/79d6c0489c3d563fdd05de63c4fcf93a6deefce1)) +- **InteractionResponses:** Use ClientOptions.jsonTransformer (#7599) ([fac55bc](https://github.com/discordjs/discord.js/commit/fac55bcfd1e8b76aae1273415f74fa6de7aca66d)) +- Deprecate invite stage instance (#7437) ([d2bc9d4](https://github.com/discordjs/discord.js/commit/d2bc9d444f42a70a3c4cc4c68eb107bcaebec509)) +- **guild:** Move `premiumSubscriptionCount` to `AnonymousGuild` (#7451) ([6d3da22](https://github.com/discordjs/discord.js/commit/6d3da226d3c003d137639e719394a807330e4844)) +- **actions:** Use optional chaining (#7460) ([d1bb362](https://github.com/discordjs/discord.js/commit/d1bb36256f2f86022884e6ee9e05b0536cb6384d)) +- **guildbanmanager:** Rename days option to deleteMessageDays (#7447) ([0dfdb2c](https://github.com/discordjs/discord.js/commit/0dfdb2cf11e236e67dd34277108973b5b79790a8)) +- Make public builder props getters (#7422) ([e8252ed](https://github.com/discordjs/discord.js/commit/e8252ed3b981a4b7e4013f12efadd2f5d9318d3e)) +- Remove redundant API defaults (#7449) ([532846b](https://github.com/discordjs/discord.js/commit/532846b1f8260d85022a022d093553310052afc9)) +- Allow discord.js builders to accept camelCase (#7424) ([94bf727](https://github.com/discordjs/discord.js/commit/94bf727cc3a2f11c88e95cdb151b235f775cd1ca)) +- Replace `WSCodes`, `WSEvents`, and `InviteScopes` with `discord-api-types` equivalent (#7409) ([cc25455](https://github.com/discordjs/discord.js/commit/cc25455d2c75177e3eddc880b7fd53cb122387c4)) +- Make constants enums top level and `PascalCase` (#7379) ([d8184f9](https://github.com/discordjs/discord.js/commit/d8184f94dd08daab37195f52828e06af5ed1c1e0)) +- **`Bitfield`:** Use discord-api-types enums instead (#7313) ([fbb1d03](https://github.com/discordjs/discord.js/commit/fbb1d0328bcd517027ad2eedb8753d17489ed851)) +- Use `@discordjs/rest` (#7298) ([ec0fba1](https://github.com/discordjs/discord.js/commit/ec0fba1ed0d3c5b1bb18171ece6fe5ee42d48497)) +- Switch to /builders `Embed` (#7067) ([d2d3a80](https://github.com/discordjs/discord.js/commit/d2d3a80c556a104099a1ddb1b24f1b921c553257)) +- Remove transformPermissions (#7303) ([b4ed8fd](https://github.com/discordjs/discord.js/commit/b4ed8fd3ed953085cd908b2845d4384c8555d3a2)) +- Remove VoiceChannel#editable (#7291) ([164589c](https://github.com/discordjs/discord.js/commit/164589c5516a847457444d11098981d557b6778b)) +- Remove boolean option for `Webhook#fetchMessage` (#7293) ([347ff80](https://github.com/discordjs/discord.js/commit/347ff80bbc9bc5243b7f68ba5d745782eadeba21)) +- **subcommandgroup:** Required default to false (#7217) ([6112767](https://github.com/discordjs/discord.js/commit/6112767128a664f32205425f52ba52220d57834f)) +- **invite:** Make `channel` and `inviter` getters (#7278) ([18b0ed4](https://github.com/discordjs/discord.js/commit/18b0ed4cbe8285637a971c7c99ee49d18060a403)) +- Remove required from getMember (#7188) ([c90e47f](https://github.com/discordjs/discord.js/commit/c90e47f90403e5b1b3499b213dcdf2704fd96b66)) +- Remove djs components and use /builders components instead (#7252) ([101d7c5](https://github.com/discordjs/discord.js/commit/101d7c5ffa03edcf8cb8a0647b77d5c9a38e4bdd)) +- Default *URL methods to animated hash (#7149) ([7c07976](https://github.com/discordjs/discord.js/commit/7c07976018728154be0ce0314d3e8dfe8eb9ed5b)) +- Use setPosition inside edit (#7263) ([0b23b7f](https://github.com/discordjs/discord.js/commit/0b23b7f0394a20596c8d85b82870c3f35ea6b0e0)) +- Don't disable import order lint (#7262) ([0a5d5f3](https://github.com/discordjs/discord.js/commit/0a5d5f38c0b1a249fa2efe16f3b601c90622a4d5)) +- Remove discord.js enums and use discord-api-types enums instead (#7077) ([aa6d1c7](https://github.com/discordjs/discord.js/commit/aa6d1c74de01dd9a8f020c43fb2c193c4729df8d)) +- **application:** Remove fetchAssets (#7250) ([1479e40](https://github.com/discordjs/discord.js/commit/1479e40bcecc4c28ecb9f05fa4fbbdfe3bd387e1)) +- PresenceUpdate and demuxProbe (#7248) ([1745973](https://github.com/discordjs/discord.js/commit/174597302408f13c5bb685e2fb02ae2137cb481d)) +- **embeds:** Don't create new embed instances when unnecessary (#7227) ([822dc67](https://github.com/discordjs/discord.js/commit/822dc678da626de7b4fb22a747cd3cd2e8376732)) +- **GuildMember:** Throw better errors on #kickable and #bannable (#7137) ([4fd127e](https://github.com/discordjs/discord.js/commit/4fd127e79edfa1851f8a10242838f9d7aa68c8c3)) +- **SnowflakeUtil:** Switch to `@sapphire/snowflake` (#7079) ([e082dfb](https://github.com/discordjs/discord.js/commit/e082dfb1584926e4c05face5966d16e4a2921bc5)) +- **InteractionCreate:** Remove interaction event (#6326) ([ae876d9](https://github.com/discordjs/discord.js/commit/ae876d962453ccf843f8e6f70666a98a3173bb75)) +- **MessageCreate:** Remove message event (#6324) ([171e917](https://github.com/discordjs/discord.js/commit/171e917fb96b6bf39a6ad70e83be646f72fe451e)) +- **integration:** Turn undefined into null and consistency (#7209) ([13eb782](https://github.com/discordjs/discord.js/commit/13eb78256da901e6c3c405f546f36617ef5e8239)) +- Remove `deleted` field (#7092) ([cee7fd1](https://github.com/discordjs/discord.js/commit/cee7fd181c464e44eabf20b511d12589f2453722)) +- **Dates:** Save timestamps everywhere and use Date.parse (#7108) ([55e21f5](https://github.com/discordjs/discord.js/commit/55e21f53663a91863c63b6d9f3a8c35564664061)) +- **RoleManager:** Remove `comparePositions()` (#7201) ([fbbac27](https://github.com/discordjs/discord.js/commit/fbbac279789427b2c36869dc47b65fb08431e14d)) +- Better Command Terminology (#7197) ([b7856e7](https://github.com/discordjs/discord.js/commit/b7856e7809ff6fa21fe00286f885808535624f7c)) +- **Actions:** Remove deleted maps (#7076) ([5022b14](https://github.com/discordjs/discord.js/commit/5022b14da09e9b421f947e9bc385a0574cbf07d1)) +- **Client:** Remove applicationCommand events (#6492) ([6085b4f](https://github.com/discordjs/discord.js/commit/6085b4f72723d4ff82f7fea504241d14c94af21e)) +- Remove `Util.removeMentions()` (#6530) ([0c24cc8](https://github.com/discordjs/discord.js/commit/0c24cc8ec0d818315cc8f8bcf74fce060847ac79)) +- **Constants:** Change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) ([75616a3](https://github.com/discordjs/discord.js/commit/75616a305f9af33013486b13a872a39212101ce7)) +- **Guild:** Remove deprecated setXPositions methods (#6897) ([43e5e3c](https://github.com/discordjs/discord.js/commit/43e5e3c339a96fa895267d4538eee1d5e5843d05)) +- **UserFlags:** Update flag names (#6938) ([b246fc4](https://github.com/discordjs/discord.js/commit/b246fc4101b8e4957ffd1af8e2e4986a020ca211)) + +## Styling + +- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629)) + +## Typings + +- **GuildFeature:** Allow feature strings to be passed (#8264) ([b7d4e55](https://github.com/discordjs/discord.js/commit/b7d4e55419207d4e25f5c40cab221c7c04a617bf)) +- **CategoryChannelChildManager:** Fix Holds type (#8288) ([33a7a5c](https://github.com/discordjs/discord.js/commit/33a7a5cbdc00d2a5034dc1ec91fec5da7042f9d0)) +- Remove `MemberMention` (#8292) ([bf65b37](https://github.com/discordjs/discord.js/commit/bf65b37d1a9ea8417e26ad4afacea1eb45a0ff5a)) +- **GuildMemberManager:** Fix placement for `fetchMe()` (#8258) ([7525615](https://github.com/discordjs/discord.js/commit/75256153a9923d94ca709a37aaccc48dfb43c153)) +- Convert `Events` to an enum (#8246) ([feb3bdd](https://github.com/discordjs/discord.js/commit/feb3bdda0a3c3da80378c8cbcafca2968551eef9)) +- **GuildMemberManager:** Non-void return of `edit()` (#8186) ([c7a205f](https://github.com/discordjs/discord.js/commit/c7a205f7b992eea43af13a4638e2a03db7bc0d8a)) +- Add missing shard types (#8180) ([27d8deb](https://github.com/discordjs/discord.js/commit/27d8deb4716a87704370a95103b16fa1b763de18)) +- Implement `GuildChannelEditOptions` (#8184) ([b83e0c0](https://github.com/discordjs/discord.js/commit/b83e0c0caffc2b767aa1ba4412580970a6901899)) +- **Status:** Add missing members (#8179) ([8421f92](https://github.com/discordjs/discord.js/commit/8421f9203bd2d85ef8e64c3fb9a991c74223a75d)) +- **GuildScheduledEvent#scheduledStartAt:** Should be nullish (#8111) ([65dc8d6](https://github.com/discordjs/discord.js/commit/65dc8d677ee81469c0eeb4ecdd83fe2f68cc8982)) +- Fix modal builder constructor data type (#8143) ([7279f9c](https://github.com/discordjs/discord.js/commit/7279f9c31b14bc1e78c63b7298e80e37ca5dfe0c)) +- Use `ThreadAutoArchiveDuration` from discord-api-types (#8145) ([a3799f9](https://github.com/discordjs/discord.js/commit/a3799f9ebb027904830457119708d550e2009200)) +- **Shard#reconnecting:** Fix event name (#8118) ([95e6d6e](https://github.com/discordjs/discord.js/commit/95e6d6ede03c4fb92a8d8027a085e84b043fd895)) +- **ApplicationCommand:** Fix typo in setDMPermission (#8097) ([4df491c](https://github.com/discordjs/discord.js/commit/4df491ce8578a1b01ee8412a4df8137a302e7202)) +- Fix `setType()` parameter and `ChannelData.type` (#8089) ([b4e28a8](https://github.com/discordjs/discord.js/commit/b4e28a8ff6bf165c54a8726d3bc3a3cc0c1e469b)) +- Fix `ApplicationCommandPermissionsUpdate` event typings (#8071) ([9964454](https://github.com/discordjs/discord.js/commit/9964454c2944a0523399481a5f609144486e549b)) +- **AutocompleteOption:** Fix and improve types (#8069) ([476b7d5](https://github.com/discordjs/discord.js/commit/476b7d519c719152ea04e207f6dd09bb23e733db)) +- **ThreadMemberManager:** Fix return type of fetching members with no arguments (#8060) ([2392a6f](https://github.com/discordjs/discord.js/commit/2392a6f5de2efcf6b326173d26295c928b94adb6)) +- Remove isAutocomplete typeguard from typings (#8063) ([c0f079d](https://github.com/discordjs/discord.js/commit/c0f079d2325a636c83ac676c525bfa89ce308b3c)) +- **AttachmentBuilder:** Fix data type (#8016) ([7fa698d](https://github.com/discordjs/discord.js/commit/7fa698d23e548987762c4c66c96c510d9ea56eb4)) +- **modal:** Fix `showModal()` typings (#8014) ([0ccc243](https://github.com/discordjs/discord.js/commit/0ccc243c8ffbf852660c899cc2ad47bd5ebb65cb)) +- Fix some attachment related typings (#8013) ([6aa6232](https://github.com/discordjs/discord.js/commit/6aa623240ee94b117c7e69c1d09b50923a8f7a4c)) +- **AttachmentBuilder:** Remove name parameter from constructor (#8008) ([6266b0c](https://github.com/discordjs/discord.js/commit/6266b0c1e323f9522010f90f34ce6f17fcb6e769)) +- Add types to `EventEmitter` static methods (#7986) ([d60c464](https://github.com/discordjs/discord.js/commit/d60c464e618e4159d2656e7832798909832f33cd)) +- Nullify `guildScheduledEventUpdate`'s old parameter (#7955) ([fdeac9d](https://github.com/discordjs/discord.js/commit/fdeac9d9fba06c532eca296ddd8479047bc732bf)) +- Make `CacheType` generic more accurate for return values (#7868) ([e07b910](https://github.com/discordjs/discord.js/commit/e07b910e684bc3cf71fb93417951ad42351bace4)) +- **guildScheduledEvent:** Mark `entityMetadata` as nullable (#7908) ([64bdf53](https://github.com/discordjs/discord.js/commit/64bdf53116945ffb51764bb8ec539d530aefcfb1)) +- **discord.js:** Export missing enums (#7864) ([5eeef3f](https://github.com/discordjs/discord.js/commit/5eeef3f708eb900ec994d837fb4cd414a4f4b437)) +- Fix return type of `toString()` on channels (#7836) ([ece6289](https://github.com/discordjs/discord.js/commit/ece628986c7eb1a66f46076d8f8518c9ff00aaf3)) +- **Message#activity:** Make `partyId` optional and use enum for `type` (#7845) ([bfeaf85](https://github.com/discordjs/discord.js/commit/bfeaf856f76eb7cb756ac55aac13636ccdb345b6)) +- Cleanup *Data type definitions (#7716) ([585169f](https://github.com/discordjs/discord.js/commit/585169f2f097ffb1940d17f549e4290aa55acde2)) +- Fix BooleanCache never resolving to true (#7809) ([440ac24](https://github.com/discordjs/discord.js/commit/440ac243ca1d6f8cd04603e63e3f2f6ea1722ee8)) +- **CommandInteraction:** Add awaitModalSubmit (#7811) ([a6d9ce5](https://github.com/discordjs/discord.js/commit/a6d9ce57c6cae90d0afc60010cad44fdc2c2d06c)) +- **ThreadChannel:** Fix autoArchiveDuration types (#7816) ([0857476](https://github.com/discordjs/discord.js/commit/08574763eb665b5a43ccfb826929f1e3f0d1c3a7)) +- Add missing typing (#7781) ([f094e33](https://github.com/discordjs/discord.js/commit/f094e338617a1a3c9f48a325e4b8e9b5a405aa91)) +- **VoiceChannel:** Nullify property (#7793) ([446eb39](https://github.com/discordjs/discord.js/commit/446eb390ce58b7e7f60e297b25f53773a55f7fb9)) +- **ModalSubmitInteraction:** Message (#7705) ([b577bcc](https://github.com/discordjs/discord.js/commit/b577bcc1df5c6424fef9984e19a5f11c77371cf3)) +- **Embed:** Add missing getters and add video to EmbedData (#7728) ([fd1dc72](https://github.com/discordjs/discord.js/commit/fd1dc72c0a77dbe18753d8db22972dfa5fe4ab36)) +- **ModalSubmitInteraction:** Fix `components` type (#7732) ([6f4e97b](https://github.com/discordjs/discord.js/commit/6f4e97bfafe4a058f6ec85d321676401d701ee55)) +- **interactionCollector:** Filter should have a collected argument (#7753) ([e4f2705](https://github.com/discordjs/discord.js/commit/e4f27051ca921d299c302b600a8c2917e9356ef6)) +- Fix regressions (#7649) ([5748dbe](https://github.com/discordjs/discord.js/commit/5748dbe08783beb80c526de38ccd105eb0e82664)) +- **Constants:** Add `NonSystemMessageTypes` (#7678) ([9afc030](https://github.com/discordjs/discord.js/commit/9afc03054e4c8973702d6c18e618643f76382dd9)) +- Fix auto archive duration type (#7688) ([8e3b2d7](https://github.com/discordjs/discord.js/commit/8e3b2d7abd38136534969cf77c6a748ee3a20355)) +- **InteractionResponseFields:** Add webhook (#7597) ([daf2829](https://github.com/discordjs/discord.js/commit/daf2829cb58d1a44cb1f1ece21e428d1a23e99c9)) +- **Embed:** Add forgotten `footer` type (#7665) ([8fb9816](https://github.com/discordjs/discord.js/commit/8fb98165a9d098ab316475d6baacb015783eb638)) +- **ColorResolvable:** Simplify string types (#7643) ([2297c2b](https://github.com/discordjs/discord.js/commit/2297c2b9479ace16f5f7155479605a4ac2718e3d)) +- Allow component classes in action row data (#7614) ([230c0c4](https://github.com/discordjs/discord.js/commit/230c0c4cb137882ff7bab783a4aeaa83ae941de5)) +- **ActionRow:** Allow components to be passed to constructors (#7531) ([e71c76c](https://github.com/discordjs/discord.js/commit/e71c76c7f795837dbcc3576e507bd286640b4296)) +- **showModal:** Align types with the documentation (#7600) ([0d7e4ed](https://github.com/discordjs/discord.js/commit/0d7e4edd969513692c061c107be4bbe7e4b54321)) +- Modals type and doc fixes (#7608) ([93854a8](https://github.com/discordjs/discord.js/commit/93854a8013d07234cb849bfcbfa99f74a4c3cdb4)) +- **InteractionResponseFields:** Add boolean properties (#7565) ([53defb8](https://github.com/discordjs/discord.js/commit/53defb82e36108468e35077b887ee28b811891ab)) +- Allow raw components for reply and message options (#7573) ([2d4971b](https://github.com/discordjs/discord.js/commit/2d4971b032a01c05b55c93d6475e61b0d25d69d3)) +- Fix component *Data types (#7536) ([a8321d8](https://github.com/discordjs/discord.js/commit/a8321d8026df2e6a09d867939986bf77f894f3a8)) +- Use discord-api-types `Locale` (#7541) ([8346003](https://github.com/discordjs/discord.js/commit/83460037be840ba623f3b02a3e6f218943f9d2b7)) +- **anychannel:** Add PartialGroupDMChannel (#7472) ([cf66930](https://github.com/discordjs/discord.js/commit/cf669301c7be8eaecf91d7f764eccc67d7a5b4c6)) +- Remove `ApplicationCommandInteractionOptionResolver` (#7491) ([71f4fa8](https://github.com/discordjs/discord.js/commit/71f4fa82ed6206d6843345a5394119f2a728aa35)) +- **embed:** Fix timestamp allowed types (#7470) ([7959a68](https://github.com/discordjs/discord.js/commit/7959a68d8ec600af248f5506f39871cae7eeeb04)) +- Remove duplicate rate limit for thread creation (#7465) ([2d2de1d](https://github.com/discordjs/discord.js/commit/2d2de1d3fd15a098d69e09710e9a7a3352234fef)) +- Correct types for InteractionCollector guild and channel (#7452) ([6ce906a](https://github.com/discordjs/discord.js/commit/6ce906a02fcb051cb6df3e9f453ba9f53db03bd0)) +- Fix `GuildAuditLogsTypes` keys & typos (#7423) ([3d8c776](https://github.com/discordjs/discord.js/commit/3d8c77600be51a86a99b526078bb1b1fcb9a0811)) +- Remove duplicate `GuildChannelOverwriteOptions` interface (#7428) ([83458ff](https://github.com/discordjs/discord.js/commit/83458ff7c782b8efdaaac931d2dee1764dad25bf)) +- Use `GuildFeature` enum from `discord-api-types` (#7397) ([a7b80b9](https://github.com/discordjs/discord.js/commit/a7b80b9d9bf4902bd85b592986771eadf7a765dc)) +- Fix *BitField.Flags properties (#7363) ([e6a26d2](https://github.com/discordjs/discord.js/commit/e6a26d25b3cf8dfcc8aa8997b021f1774f3b754b)) +- Fix MessageMentions channel types (#7316) ([c05b388](https://github.com/discordjs/discord.js/commit/c05b38873bb3c37c6e4ebcb6b6373a8858cc03de)) +- Fix channel create overloads (#7294) ([1c6c944](https://github.com/discordjs/discord.js/commit/1c6c9449ad68601c6c98748d73be8114401d38ef)) +- Fix regressions and inconsistencies (#7260) ([26a9dc3](https://github.com/discordjs/discord.js/commit/26a9dc32062cd071917bbe7264050315b4d6dd3c)) +- **interaction:** Remove renamed typeguards (#7220) ([68b9564](https://github.com/discordjs/discord.js/commit/68b9564f1821726377a1e929a3ca1fc65b4ad598)) +- AssertType -> expectType ([3f36746](https://github.com/discordjs/discord.js/commit/3f36746561a40cd61a7cd2e054b7ef80d58fc707)) +- Fix cache types resolving to `never` (#7164) ([c978dbb](https://github.com/discordjs/discord.js/commit/c978dbb6233bcd85408caf0bca7619c9c5d508f0)) + +# [14.10.0](https://github.com/discordjs/discord.js/compare/14.9.0...14.10.0) - (2023-05-01) + +## Bug Fixes + +- **ShardClientUtil:** Fix client event names (#9474) ([ad217cc](https://github.com/discordjs/discord.js/commit/ad217cc7604dda6a33df73db82799fd5bb4e85a9)) +- **BaseClient:** Prevent user agent mutation (#9425) ([217e5d8](https://github.com/discordjs/discord.js/commit/217e5d81005a2506c96335f7fb96fa21d7dbb04c)) +- **BitField:** Use only enum names in iterating (#9357) ([40d07fb](https://github.com/discordjs/discord.js/commit/40d07fbbbd51d62793d9ea541f41f157b5dad224)) +- Use new permission name (#9274) ([d2d27ce](https://github.com/discordjs/discord.js/commit/d2d27ce7346bc37b34938c84bd3b106a4fa51f53)) +- **Message#editable:** Fix permissions check in locked threads (#9319) ([d4c1fec](https://github.com/discordjs/discord.js/commit/d4c1fecbe264bc52a70aaf0ec303d35e2f15bbcd)) +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- **AutoModerationRule:** Update docs (#9464) ([1b15d31](https://github.com/discordjs/discord.js/commit/1b15d31b5ae1b1739716fab00b18083c1d7d389a)) +- **APITypes:** Document role & user select menu components (#9435) ([c6ca5a8](https://github.com/discordjs/discord.js/commit/c6ca5a83e7b72613f95c2145606a1330f64ae894)) +- **BaseMessageOptions:** Fix embeds and components (#9437) ([5c52bb9](https://github.com/discordjs/discord.js/commit/5c52bb95906250518a8813820d543f43dd7abdf9)) +- **InteractionResponses:** ShowModal docs change (#9434) ([7d34100](https://github.com/discordjs/discord.js/commit/7d341000d44b762a2fe0434a6b518f7d63539d34)) +- Use ESM code in examples (#9427) ([ce287f2](https://github.com/discordjs/discord.js/commit/ce287f21d1540da7f17cac8a57dc33a67f391ef3)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- **Options:** Fix links and invalid syntax (#9322) ([86e5f5a](https://github.com/discordjs/discord.js/commit/86e5f5a119c6d2588b988a33236d358ded357847)) +- Cleanup MessageCreateOptions and MessageReplyOptions (#9283) ([300059c](https://github.com/discordjs/discord.js/commit/300059cb266e6cca42c30ee7f997c48ab2cc565e)) +- **Events:** Document auto moderation events (#9342) ([79bcdfa](https://github.com/discordjs/discord.js/commit/79bcdfa767e7e842164e1174b6f4834ed731d329)) +- Add `SnowflakeUtil` (#9371) ([8ffcf77](https://github.com/discordjs/discord.js/commit/8ffcf77840b62590fcb4731380d28b22d0b98741)) +- Use stable tag (#9343) ([c0f2dd7](https://github.com/discordjs/discord.js/commit/c0f2dd713151a29c98e1eebad66721a208be1fc0)) +- Remove `JSONEncondable` (#9344) ([b2eec5f](https://github.com/discordjs/discord.js/commit/b2eec5f9fcf37ebb3b7f87a67a6ee3160c182183)) + +## Features + +- **Attachment:** Voice messages (#9392) ([3e01f91](https://github.com/discordjs/discord.js/commit/3e01f91bbba2cbacacc6c921ed664752f679960b)) +- **BaseInteraction:** Support new channel payload (#9337) ([29389e3](https://github.com/discordjs/discord.js/commit/29389e39f479b832e54c7cb3ddd363aebe99674f)) +- **RoleTagData:** Add guildConnections (#9366) ([2dddbe1](https://github.com/discordjs/discord.js/commit/2dddbe1f321f2e2722dba4a28f7d18384cf50353)) + +## Performance + +- **RoleManager:** Dont call Role#position getter twice per role (#9352) ([bfee6c8](https://github.com/discordjs/discord.js/commit/bfee6c8d889502ea39ad919dd9b1e6253a2af571)) + +## Refactor + +- **WebSocketManager:** Use /ws package internally (#9099) ([a9e0de4](https://github.com/discordjs/discord.js/commit/a9e0de4288ea39a6a089b8379dcd44ac0053dac7)) +- Remove `fromInteraction` in internal channel creation (#9335) ([794abe8](https://github.com/discordjs/discord.js/commit/794abe8450bae000cd0544922cdf53e7b3e4c59c)) + +## Typings + +- **AutoModerationActionMetadataOptions:** Make channel property optional (#9460) ([d26df5f](https://github.com/discordjs/discord.js/commit/d26df5fabaf227fb9d10ba5cc1ab326de55aadbc)) +- **CategoryChannel:** Ensure `parent` and `parentId` are `null` (#9327) ([8218ffc](https://github.com/discordjs/discord.js/commit/8218ffc78d23234b32c05a97fde2f4bea64d7aa6)) +- **GuildTextBasedChannel:** Remove unnecessary exclusion of forum channels (#9326) ([7ff3d52](https://github.com/discordjs/discord.js/commit/7ff3d528d942a0daa990194915ff8328dec99149)) + +# [14.9.0](https://github.com/discordjs/discord.js/compare/14.8.0...14.9.0) - (2023-04-01) + +## Bug Fixes + +- Add support for new guild feature `GUILD_WEB_PAGE_VANITY_URL` (#9219) ([de1aac6](https://github.com/discordjs/discord.js/commit/de1aac674acb3830124646fcd52cdd98cdb71ba5)) +- Resolving string bitfield (#9262) ([7987565](https://github.com/discordjs/discord.js/commit/79875658cf4a8daa25210c2c620c73a710ca22de)) +- **AutocompleteInteraction:** Send `name_localizations` correctly (#9238) ([1864d37](https://github.com/discordjs/discord.js/commit/1864d37d36e53d127e74b6969a5f542193bfc3c7)) +- Keep symbols in actions manager (#9293) ([984bd55](https://github.com/discordjs/discord.js/commit/984bd55b437507e7ebfdf09ac944c8eba0340d27)) +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) +- **ClientUser:** No mutation on edit (#9259) ([abd6ae9](https://github.com/discordjs/discord.js/commit/abd6ae9fc8ea03722e8b36e29c3fdc1c2cfc93e8)) +- **Message#editable:** Update editable check in threads locked (#9216) ([22e880a](https://github.com/discordjs/discord.js/commit/22e880aaa0d8c644fc8d16a524d17f4f53a056f6)) +- **ThreadManager:** Add `members` and conditionally include `hasMore` (#9164) ([e9a8eb3](https://github.com/discordjs/discord.js/commit/e9a8eb323f3a554dc8f9dab361cd1bac7b88e1cc)) +- **ThreadManager:** Respect `cache` and `force` in fetching (#9239) ([cc57563](https://github.com/discordjs/discord.js/commit/cc57563e73d78a0d71d1444d1ee8215a26a81fa8)) +- **TextBasedChannelTypes:** Add `GuildStageVoice` (#9232) ([51edba7](https://github.com/discordjs/discord.js/commit/51edba78bc4d4cb44b4dd2b79e4bbc515dc46f5b)) + +## Documentation + +- Describe private properties (#8879) ([2792e48](https://github.com/discordjs/discord.js/commit/2792e48119f1cf5fa7d5e6b63369457b0719d4e4)) +- Differ `User#send` (#9251) ([384b4d1](https://github.com/discordjs/discord.js/commit/384b4d10e8642f0f280ea1651f33cd378c341333)) +- Fix compare position example (#9272) ([d16114c](https://github.com/discordjs/discord.js/commit/d16114c52646ca92c53f9b44a0dd10af98dbddcd)) +- **Role:** Fix example for `comparePositionTo()` (#9270) ([bc641fa](https://github.com/discordjs/discord.js/commit/bc641fa9360b851642bc51839cef6bd5600d71f7)) +- Add more examples (#9252) ([bf507ab](https://github.com/discordjs/discord.js/commit/bf507ab2659d95e2991e83293b3834f21283ff33)) +- **FetchArchivedThreadOptions:** `before` respects `archive_timestamp`, not creation timestamp (#9240) ([178c8dc](https://github.com/discordjs/discord.js/commit/178c8dcfeea1c4a6a32835baea389f25feefbac7)) +- Update `APISelectMenuComponent` (#9235) ([56cf138](https://github.com/discordjs/discord.js/commit/56cf138e029e7884a4e7efb606055687ca67b4ac)) + +## Features + +- **Guild:** Add `max_stage_video_channel_users` (#8422) ([34bc36a](https://github.com/discordjs/discord.js/commit/34bc36ac4b04ad033d0dcc3d2701fcf2e682743c)) +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) +- Add GuildBasedTextChannelTypes (#9234) ([5f93dcc](https://github.com/discordjs/discord.js/commit/5f93dcce466286f0fdead8faf4131e98d1c9db55)) + +## Refactor + +- Call `GuildBanManager#create()` directly (#9263) ([f340f3b](https://github.com/discordjs/discord.js/commit/f340f3b1fd719e8f7cf6fa28a41835bc16039fc7)) +- **FetchThreadsOptions:** Remove `active` (#9241) ([519e163](https://github.com/discordjs/discord.js/commit/519e163f8aa3b55420f86d2d60c2584b3a2eb327)) + +# [14.8.0](https://github.com/discordjs/discord.js/compare/14.7.1...14.8.0) - (2023-03-12) + +## Bug Fixes + +- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8)) +- **Actions:** Inject built data by using a symbol (#9203) ([a63ac88](https://github.com/discordjs/discord.js/commit/a63ac88fcca5b61209892a6e560e35d58f5adc3b)) +- **Message#deletable:** Add check for deletable message types (#9168) ([e78b8ad](https://github.com/discordjs/discord.js/commit/e78b8ad3fb6692cba2c565b508254c723f185f0c)) +- **Message:** `bulkDeletable` permissions should be retrieved later for DMs (#9146) ([a9495bd](https://github.com/discordjs/discord.js/commit/a9495bd8f014c8021a214b83ffc531a2af5defef)) +- **AutoModerationActionExecution:** Transform `action` (#9111) ([9156a28](https://github.com/discordjs/discord.js/commit/9156a2889cd0946dfd0b30a5f8365abfbc377b3d)) +- **MessageReaction:** `toJSON()` infinite recursion (#9070) ([f268e1d](https://github.com/discordjs/discord.js/commit/f268e1d9798744e169ae87089ea2e1f214364d95)) +- **ThreadChannel:** Insert starter message from threads created in forum channels (#9100) ([0b76ab4](https://github.com/discordjs/discord.js/commit/0b76ab4c403dd646c71482856ab993b263b7c474)) +- **ApplicationRoleConnectionMetadata:** Export the class correctly (#9076) ([071516c](https://github.com/discordjs/discord.js/commit/071516c35239bd4e1cae572c855d86b335c8536d)) +- Don't auth for interaction `showModal()` (#9046) ([b803a9a](https://github.com/discordjs/discord.js/commit/b803a9a899aaa75a3ea2bc6623c6afb28f495e8c)) +- **WebSocketShard:** Zombie connection fix (#8989) ([876b181](https://github.com/discordjs/discord.js/commit/876b1813128ec702d3ef1e7b0074a4613e88c332)) +- Keep other properties in triggerMetadata (#8977) ([d8dd197](https://github.com/discordjs/discord.js/commit/d8dd197a936dfffc05f9e5bc3184ec9022c56b51)) +- **escapeX:** Emojis with underlines (#8945) ([07b597d](https://github.com/discordjs/discord.js/commit/07b597df16b9412c23ec2387d54564e4d1bcf7ed)) +- **WebSocketShard:** Either start close timeout or emit destroyed but never both (#8956) ([43ce2a5](https://github.com/discordjs/discord.js/commit/43ce2a572eb8977b6994680171ac0c5f9bda1703)) +- **DMChannel:** `recipientId` edge case (#8950) ([7ce9909](https://github.com/discordjs/discord.js/commit/7ce990954e2f73d7a996df0afa42ab287cb12514)) +- Return only boolean for `disabled` (#8965) ([6614603](https://github.com/discordjs/discord.js/commit/66146033268a4db1279b2eaee4bd418f326c0d4b)) +- Export missing `escapeX()` functions (#8944) ([25c27ea](https://github.com/discordjs/discord.js/commit/25c27eac1417e75c9b601b17cf177b1f47b699a9)) +- **WebSocketShard:** Only cleanup the connection if a connection still exists (#8946) ([5eab5fc](https://github.com/discordjs/discord.js/commit/5eab5fc06ca6be36ecf1557f2ad29a670d4d5ae7)) +- Add `@discordjs/formatters` to dependency list (#8939) ([18b3a19](https://github.com/discordjs/discord.js/commit/18b3a19810a6436fa8bb4b490ec5137eaecbd465)) +- **resolveColor:** Invalid colors (#8933) ([c76e170](https://github.com/discordjs/discord.js/commit/c76e17078602914c3e1d227a3acc98eaa99c18d4)) +- **WebSocketShard:** Clear listeners on reconnect (#8927) ([aa8c57d](https://github.com/discordjs/discord.js/commit/aa8c57dab60104549e28451abf35c0387595d67e)) +- Re-export formatters (#8909) ([b14604a](https://github.com/discordjs/discord.js/commit/b14604abdecca575b1fca693c1593e3585bcca8c)) + +## Documentation + +- **MessageManager:** Add clarification to fetch messages (#9222) ([f5ec1ca](https://github.com/discordjs/discord.js/commit/f5ec1cada5ebf0ca4093bdfc81aaf56900c794ef)) +- Make interactionResponse as optional (#9179) ([664cccb](https://github.com/discordjs/discord.js/commit/664cccb2706db33635aa2556954de57f93b3d3db)) +- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26)) +- **chatInputApplicationCommandMention:** Parameters are not nullable (#9091) ([6f78e82](https://github.com/discordjs/discord.js/commit/6f78e8285b3ce762de010e68d49b377a47dc5a63)) +- No `@type` description and reveal info block (#9097) ([405f940](https://github.com/discordjs/discord.js/commit/405f9400e8e3ffea9f3847ab5abb431a34538a96)) +- **ThreadEditOptions:** Move info tag back to `invitable` (#9020) ([f3fe3ce](https://github.com/discordjs/discord.js/commit/f3fe3ced622676b406a62b43f085aedde7a621aa)) +- Fix a typo in the MentionableSelectMenuInteraction link (#9000) ([6d7a143](https://github.com/discordjs/discord.js/commit/6d7a143667f33ef2ea45d8016ac4738237707881)) +- **ApplicationRoleConnectionMetadata:** Add documentation (#8976) ([2e22b31](https://github.com/discordjs/discord.js/commit/2e22b31892d9b858fcb24fa580b486b4154e823f)) +- Fix malformed overridden documentation (#8954) ([0b8b114](https://github.com/discordjs/discord.js/commit/0b8b114761f961a2bf8e5aae342ed711b154a89e)) +- **GuildForumThreadManager:** Fix `sticker` type (#8940) ([dd62be0](https://github.com/discordjs/discord.js/commit/dd62be077d3e4fbd73a0c10ca344d93d3d19fa38)) +- Fix deprecated links (#8907) ([976b234](https://github.com/discordjs/discord.js/commit/976b234e9dc9999e5dee47b58c85afbc1cd494c2)) +- **UserFlagsBitField:** Make `.Flags` static (#8902) ([c48ff5e](https://github.com/discordjs/discord.js/commit/c48ff5e4205899e3b6cd35812ca857236bef6864)) + +## Features + +- **Collector:** Add lastCollectedTimestamp (#9044) ([4458a13](https://github.com/discordjs/discord.js/commit/4458a13925164762b519ded1037ae8775d879f71)) +- **StageChannel:** Add messages (#9134) ([ffdb197](https://github.com/discordjs/discord.js/commit/ffdb197f988657100e2a9ff0ca17b759339a1dda)) +- **AutoModerationActionExecution:** Add `channel`, `user` and `member` getters (#9142) ([095bd77](https://github.com/discordjs/discord.js/commit/095bd77515aa31bb0e95a350b4355980fea9268d)) +- **AutoModeration:** Support `custom_message` (#9171) ([c1000b8](https://github.com/discordjs/discord.js/commit/c1000b86ed6d5413afcd6ee7e80505e5a845430b)) +- **ThreadMemberManager:** Support pagination fetching (#9035) ([765d5a3](https://github.com/discordjs/discord.js/commit/765d5a3b2d5529c3a2a4b29512f6932264443ed1)) +- **InteractionResponse:** Add new methods (#9132) ([dc9924f](https://github.com/discordjs/discord.js/commit/dc9924fb5f24c8dac963d6b86ba279a89545e73b)) +- **GuildMember:** Add `flags` (#9087) ([76b2116](https://github.com/discordjs/discord.js/commit/76b21162aca7cd4897826437da3063524e1e7553)) +- **Client:** `guildAuditLogEntryCreate` event (#9058) ([9439107](https://github.com/discordjs/discord.js/commit/9439107a1d6a9b77b5f991973d96bc6100da4753)) +- Add role subscription data (#9025) ([1ba22f4](https://github.com/discordjs/discord.js/commit/1ba22f4c9e4173f8866339d3eadb2939d4b32034)) +- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6)) +- **GuildAuditLogs:** Support `after` (#9011) ([0076589](https://github.com/discordjs/discord.js/commit/0076589ccc93e09d77a448874d1ceff5d0e91aa2)) +- Add role subscriptions (#8915) ([3407e1e](https://github.com/discordjs/discord.js/commit/3407e1eea3c8d5629465553f342ac30ceae27a47)) +- Add `not_found` to guild member chunk data (#8975) ([be294ea](https://github.com/discordjs/discord.js/commit/be294eaf9901ea139ce485deeec9178959ffa91f)) +- **ClientApplication:** Add role connections (#8855) ([22e2bbb](https://github.com/discordjs/discord.js/commit/22e2bbb0d24e3f30516f262308d5786f2f666713)) +- **CommandInteractionOptionResolver:** Add `channelTypes` option to `getChannel` (#8934) ([429dbcc](https://github.com/discordjs/discord.js/commit/429dbccc85cabd9986b2e8bf443bf384e4ddc61a)) +- **ForumChannel:** Add `defaultForumLayout` (#8895) ([cbafd47](https://github.com/discordjs/discord.js/commit/cbafd479b331633ed97f7b1a22ef03c6a2f4cf31)) +- Add support for nsfw commands (#7976) ([7a51344](https://github.com/discordjs/discord.js/commit/7a5134459c5f06864bf74631d83b96d9c21b72d8)) +- **InteractionResponse:** CreatedTimestamp (#8917) ([627511d](https://github.com/discordjs/discord.js/commit/627511d6522f772b84c25e6a3f6da06b06bb912e)) +- **Guild:** Add disableInvites method (#8801) ([45faa19](https://github.com/discordjs/discord.js/commit/45faa199820e7c4ccdb2997c7e3b353f566d2312)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) +- **GuildMemberManager:** Tidy up fetching guild members (#8972) ([4e0e125](https://github.com/discordjs/discord.js/commit/4e0e1250399aa12c340ac92a86ec2c05704fe2bb)) +- **BitField:** Reverse iterator/toArray responsibilities (#9118) ([f70df91](https://github.com/discordjs/discord.js/commit/f70df910ed12e397066d0bdb27343af21ead4d92)) +- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7)) +- Use `deprecate()` directly (#9026) ([1c871b5](https://github.com/discordjs/discord.js/commit/1c871b5b576dddef12c5afacecf416dbd6243dea)) +- **Guild:** Destructure object in guild editing (#8971) ([d3e9f2a](https://github.com/discordjs/discord.js/commit/d3e9f2a355a1f5272d62a507eb6ecd8808904fff)) +- **GuildManager:** Better handling of creation code (#8974) ([d7a09f6](https://github.com/discordjs/discord.js/commit/d7a09f6fcee30c31b4418166bf7bf9e894841f87)) +- **sharding:** Use switch statement (#8928) ([6540914](https://github.com/discordjs/discord.js/commit/6540914b4a7f244f5e40fe2a3b7e73986763d81b)) +- Use consistent naming for options (#8901) ([a7b55c1](https://github.com/discordjs/discord.js/commit/a7b55c1460cf63fb482f7d05657120eec96bee82)) +- **CommandInteractionOptionResolver:** Loosen mentionable checks (#8910) ([1b151db](https://github.com/discordjs/discord.js/commit/1b151db59c4340417f8a28a88064f45336ac8c78)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +## Typings + +- Allow sending messages with `SuppressNotifications` flag (#9177) ([71a427f](https://github.com/discordjs/discord.js/commit/71a427f6322be76fe2d1cb265de09f171b1b354a)) +- Remove `EscapeMarkdownOptions` (#9153) ([fd0246c](https://github.com/discordjs/discord.js/commit/fd0246ca4c75e60d8e117d9ac5af7067c7a63277)) +- **Attachment:** Make `attachment` private (#8982) ([da23cd5](https://github.com/discordjs/discord.js/commit/da23cd5d69de4856d075f00738f75c68c555ae5b)) +- Fix type of Attachment#name (#9101) ([4e0a89f](https://github.com/discordjs/discord.js/commit/4e0a89f58f43f362bfde80d8319dce767c62850f)) +- Allow builders to set channel types in discord.js (#8990) ([7dec892](https://github.com/discordjs/discord.js/commit/7dec892218f7b470a5f8e78732a524a53da24d26)) +- Swap message reaction and emoji identifier types (#8969) ([ad49845](https://github.com/discordjs/discord.js/commit/ad4984526020f2baeefaeeebbded66c6848c4b85)) +- **widget:** Add missing `name` (#8978) ([898b5ac](https://github.com/discordjs/discord.js/commit/898b5ac416cbbb415b125bb27221d0901fdd180e)) +- Use StringSelectMenuOptionBuilder (#8949) ([bec51de](https://github.com/discordjs/discord.js/commit/bec51de1038c35c6edaaa13934781758fe1951de)) +- Fix actions type in automod (#8962) ([5915f39](https://github.com/discordjs/discord.js/commit/5915f39810b712c05a46fa21ab4e12b4cfa3c25a)) +- Subcommand group `options` is required (#8966) ([5dc5e90](https://github.com/discordjs/discord.js/commit/5dc5e902688fc563087cd5061dcb59dd68fd4eda)) +- Add generic to `ActionRowBuilder.from()` (#8414) ([153352a](https://github.com/discordjs/discord.js/commit/153352ad7a1ccb4a9461523cf2597d81df93b69c)) + +# [14.7.1](https://github.com/discordjs/discord.js/compare/14.7.0...14.7.1) - (2022-12-01) + +## Bug Fixes + +- Prevent crash on no select menu option (#8881) ([11d195d](https://github.com/discordjs/discord.js/commit/11d195d04ff57d51adb0f0d3a0a7342f9e34aba0)) + +# [14.7.0](https://github.com/discordjs/discord.js/compare/14.6.0...14.7.0) - (2022-11-28) + +## Bug Fixes + +- **MessageMentions:** Add `InGuild` generic (#8828) ([f982803](https://github.com/discordjs/discord.js/commit/f9828034cd21e6f702762a46923e0f42115596f6)) +- **Activity:** Fix equals() not checking for differing emoji (#8841) ([7e06f68](https://github.com/discordjs/discord.js/commit/7e06f68185423ba7cb310220b213f445b6571e29)) +- Fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) ([d0c8256](https://github.com/discordjs/discord.js/commit/d0c82561b8a1765a1daa362ca903f3ffb3fa33ee)) +- **escapeMarkdown:** Fix double escaping (#8798) ([d6873b7](https://github.com/discordjs/discord.js/commit/d6873b7159352479475b3a0daa215bddbdd3a79b)) +- **Transfomers:** Call `.toJSON` in `toSnakeCase` (#8790) ([017f9b1](https://github.com/discordjs/discord.js/commit/017f9b1ed4014dc1db0b78c1a77e463b4403de5d)) +- Censor token in debug output (#8764) ([53d8e87](https://github.com/discordjs/discord.js/commit/53d8e87d7f3a329608250656950bd0a200adb1c7)) +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Documentation + +- Describe InteractionEditReplyOptions (#8840) ([cb77fd0](https://github.com/discordjs/discord.js/commit/cb77fd02d083438de2aff6f0769baf7d1797bc65)) +- **AutoModerationRuleManager:** Describe cache (#8848) ([d275480](https://github.com/discordjs/discord.js/commit/d2754802cc3479e6288cdbfcd48c76bf57e09a07)) +- Fix message action row components (#8819) ([65bc0ad](https://github.com/discordjs/discord.js/commit/65bc0adbf4d7870d33b92585ca18f964f24bc84e)) +- Specify `ActionRowBuilder` for `components` (#8834) ([8ed5c1b](https://github.com/discordjs/discord.js/commit/8ed5c1beb622f71ce0bd89e4cbeff50e464da8fe)) +- Add `@extends` for select menu classes (#8824) ([09f65b7](https://github.com/discordjs/discord.js/commit/09f65b724b0d2f36bbe89b83570c0d18093b5126)) +- Make WebSocketShard.lastPingTimestamp public (#8768) ([68c9cb3](https://github.com/discordjs/discord.js/commit/68c9cb37bc3df6326b720291827ea477e421faf2)) +- **MessageReplyOptions:** Remove duplicate stickers field (#8766) ([6e348ff](https://github.com/discordjs/discord.js/commit/6e348ffd1d8db8d8ad2da7823460814695e01a43)) + +## Features + +- **Webhook:** Add `channel` property (#8812) ([decbce4](https://github.com/discordjs/discord.js/commit/decbce401062af75f633e6acacc88207b115a719)) +- Auto Moderation (#7938) ([fd4ba5e](https://github.com/discordjs/discord.js/commit/fd4ba5eaba66898699127fc0d5f0ab52c18e3db0)) +- **SelectMenuInteractions:** Add `values` property (#8805) ([b2fabd1](https://github.com/discordjs/discord.js/commit/b2fabd130a76ea54cfbfa1b871ef8659513c2c7a)) +- **ThreadChannel:** Add a helper for pin and unpin (#8786) ([e74aa7f](https://github.com/discordjs/discord.js/commit/e74aa7f6b0fe04e3473fc4a62a73a7db87307685)) +- Add `Message#bulkDeletable` (#8760) ([ff85481](https://github.com/discordjs/discord.js/commit/ff85481d3e7cd6f7c5e38edbe43b27b104e82fba)) +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) +- **InteractionResponses:** Add message parameter (#8773) ([8b400ca](https://github.com/discordjs/discord.js/commit/8b400ca975c6bad00060b9c67068f42bd53524ba)) +- Support resume urls (#8784) ([88cd9d9](https://github.com/discordjs/discord.js/commit/88cd9d906074eb79e85df0ef49287f11133d2e0d)) +- Allow deletion of ephemeral messages (#8774) ([fc10774](https://github.com/discordjs/discord.js/commit/fc107744618857bf28c2167f204253baf690ede8)) +- **GuildChannelManager:** Add `.addFollower()` method (#8567) ([caeb1cb](https://github.com/discordjs/discord.js/commit/caeb1cbfdb2f2f007252c4d7e9f47a575c24bcb5)) + +## Refactor + +- **Embed:** Use `embedLength` function from builders (#8735) ([cb3826c](https://github.com/discordjs/discord.js/commit/cb3826ce6dbcd3cf7ab639af6cdfcea80336aa1d)) + # [14.6.0](https://github.com/discordjs/discord.js/compare/14.5.0...14.6.0) - (2022-10-10) ## Bug Fixes @@ -230,7 +3091,7 @@ All notable changes to this project will be documented in this file. - **DataResolver#resolveImage:** Adjust to updated resolveFile (#8308) ([3a7e93d](https://github.com/discordjs/discord.js/commit/3a7e93df576172c797f1d8bd6483234bb6af2d00)) -# [14.0.0](https://github.com/discordjs/discord.js/tree/14.0.0) - (2022-07-17) +# [14.0.0](https://github.com/discordjs/discord.js/compare/9.3.1...14.0.0) - (2022-07-17) ## Bug Fixes diff --git a/packages/discord.js/README.md b/packages/discord.js/README.md index 173a1ee5fabe..f70fc9360660 100644 --- a/packages/discord.js/README.md +++ b/packages/discord.js/README.md @@ -13,6 +13,7 @@

Vercel + Cloudflare Workers

@@ -30,7 +31,7 @@ discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install discord.js yarn add discord.js pnpm add discord.js @@ -39,7 +40,6 @@ pnpm add discord.js ### Optional packages - [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`) -- [erlpack](https://github.com/discord/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install discord/erlpack`) - [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection (`npm install bufferutil`) - [utf-8-validate](https://www.npmjs.com/package/utf-8-validate) in combination with `bufferutil` for much faster WebSocket processing (`npm install utf-8-validate`) - [@discordjs/voice](https://www.npmjs.com/package/@discordjs/voice) for interacting with the Discord Voice API (`npm install @discordjs/voice`) @@ -48,7 +48,7 @@ pnpm add discord.js Install discord.js: -```sh-session +```sh npm install discord.js yarn add discord.js pnpm add discord.js @@ -57,7 +57,7 @@ pnpm add discord.js Register a slash command against the Discord API: ```js -const { REST, Routes } = require('discord.js'); +import { REST, Routes } from 'discord.js'; const commands = [ { @@ -68,23 +68,21 @@ const commands = [ const rest = new REST({ version: '10' }).setToken(TOKEN); -(async () => { - try { - console.log('Started refreshing application (/) commands.'); +try { + console.log('Started refreshing application (/) commands.'); - await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands }); + await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands }); - console.log('Successfully reloaded application (/) commands.'); - } catch (error) { - console.error(error); - } -})(); + console.log('Successfully reloaded application (/) commands.'); +} catch (error) { + console.error(error); +} ``` Afterwards we can create a quite simple example bot: ```js -const { Client, GatewayIntentBits } = require('discord.js'); +import { Client, GatewayIntentBits } from 'discord.js'; const client = new Client({ intents: [GatewayIntentBits.Guilds] }); client.on('ready', () => { @@ -107,7 +105,7 @@ client.login(TOKEN); - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -126,12 +124,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs +[documentation]: https://discord.js.org/docs/packages/discord.js/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/discord.js/cliff.toml b/packages/discord.js/cliff.toml index 19b7166c64d1..c1fd5351a88f 100644 --- a/packages/discord.js/cliff.toml +++ b/packages/discord.js/cliff.toml @@ -60,5 +60,5 @@ filter_commits = true tag_pattern = "[0-9]*" skip_tags = "v[0-9]*|@discordjs*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/discord.js/docs/README.md b/packages/discord.js/docs/README.md index b5ac7978f77d..978bafce93ae 100644 --- a/packages/discord.js/docs/README.md +++ b/packages/discord.js/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs) +## [View the documentation here.](https://discord.js.org/docs/packages/discord.js/main) diff --git a/packages/discord.js/package.json b/packages/discord.js/package.json index 48f3461df95c..fb9c83048da1 100644 --- a/packages/discord.js/package.json +++ b/packages/discord.js/package.json @@ -1,6 +1,6 @@ { "name": "discord.js", - "version": "14.6.0", + "version": "14.11.0", "description": "A powerful library for interacting with the Discord API", "scripts": { "test": "yarn docs:test && yarn test:typescript", @@ -42,7 +42,8 @@ ], "repository": { "type": "git", - "url": "https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/discord.js" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" @@ -51,29 +52,32 @@ "dependencies": { "@discordjs/builders": "workspace:^", "@discordjs/collection": "workspace:^", + "@discordjs/formatters": "workspace:^", "@discordjs/rest": "workspace:^", "@discordjs/util": "workspace:^", - "@sapphire/snowflake": "^3.2.2", - "@types/ws": "^8.5.3", - "discord-api-types": "^0.37.15", + "@discordjs/ws": "workspace:^", + "@sapphire/snowflake": "^3.5.1", + "@types/ws": "^8.5.4", + "discord-api-types": "^0.37.42", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", - "tslib": "^2.4.0", - "undici": "^5.11.0", - "ws": "^8.9.0" + "tslib": "^2.5.2", + "undici": "^5.22.1", + "ws": "^8.13.0" }, "devDependencies": { "@discordjs/docgen": "workspace:^", - "@favware/cliff-jumper": "^1.8.8", - "@types/node": "16.11.68", + "@favware/cliff-jumper": "^2.0.0", + "@types/node": "16.18.32", "dtslint": "^4.2.1", - "eslint": "^8.25.0", - "eslint-formatter-pretty": "^4.1.0", - "jest": "^29.2.1", - "prettier": "^2.7.1", - "tsd": "^0.24.1", + "eslint": "^8.41.0", + "eslint-formatter-pretty": "^5.0.0", + "jest": "^29.5.0", + "prettier": "^2.8.8", + "tsd": "^0.28.1", "tslint": "^6.1.3", - "typescript": "^4.8.4" + "turbo": "^1.9.8", + "typescript": "^5.0.4" }, "engines": { "node": ">=16.9.0" diff --git a/packages/discord.js/scripts/generateRequires.mjs b/packages/discord.js/scripts/generateRequires.mjs index 70ff058e8f1c..b6e28db8a2f6 100644 --- a/packages/discord.js/scripts/generateRequires.mjs +++ b/packages/discord.js/scripts/generateRequires.mjs @@ -19,7 +19,18 @@ async function writeWebsocketHandlerImports() { } async function writeClientActionImports() { - const lines = ["'use strict';\n", 'class ActionsManager {', ' constructor(client) {', ' this.client = client;\n']; + const lines = [ + "'use strict';\n", + 'class ActionsManager {', + ' // These symbols represent fully built data that we inject at times when calling actions manually.', + ' // Action#getUser, for example, will return the injected data (which is assumed to be a built structure)', + ' // instead of trying to make it from provided data', + " injectedUser = Symbol('djs.actions.injectedUser');", + " injectedChannel = Symbol('djs.actions.injectedChannel');", + " injectedMessage = Symbol('djs.actions.injectedMessage');\n", + ' constructor(client) {', + ' this.client = client;\n', + ]; const actionsDirectory = new URL('../src/client/actions', import.meta.url); for (const file of (await readdir(actionsDirectory)).sort()) { diff --git a/packages/discord.js/src/WebSocket.js b/packages/discord.js/src/WebSocket.js deleted file mode 100644 index efbd6f9a9587..000000000000 --- a/packages/discord.js/src/WebSocket.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -let erlpack; -const { Buffer } = require('node:buffer'); - -try { - erlpack = require('erlpack'); - if (!erlpack.pack) erlpack = null; -} catch {} // eslint-disable-line no-empty - -exports.WebSocket = require('ws'); - -const ab = new TextDecoder(); - -exports.encoding = erlpack ? 'etf' : 'json'; - -exports.pack = erlpack ? erlpack.pack : JSON.stringify; - -exports.unpack = (data, type) => { - if (exports.encoding === 'json' || type === 'json') { - if (typeof data !== 'string') { - data = ab.decode(data); - } - return JSON.parse(data); - } - if (!Buffer.isBuffer(data)) data = Buffer.from(new Uint8Array(data)); - return erlpack.unpack(data); -}; - -exports.create = (gateway, query = {}, ...args) => { - const [g, q] = gateway.split('?'); - query.encoding = exports.encoding; - query = new URLSearchParams(query); - if (q) new URLSearchParams(q).forEach((v, k) => query.set(k, v)); - const ws = new exports.WebSocket(`${g}?${query}`, ...args); - return ws; -}; - -for (const state of ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']) exports[state] = exports.WebSocket[state]; diff --git a/packages/discord.js/src/client/BaseClient.js b/packages/discord.js/src/client/BaseClient.js index 60068e164259..91c6afac3677 100644 --- a/packages/discord.js/src/client/BaseClient.js +++ b/packages/discord.js/src/client/BaseClient.js @@ -22,7 +22,15 @@ class BaseClient extends EventEmitter { * The options the client was instantiated with * @type {ClientOptions} */ - this.options = mergeDefault(Options.createDefault(), options); + this.options = mergeDefault(Options.createDefault(), { + ...options, + rest: { + ...options.rest, + userAgentAppendix: options.rest?.userAgentAppendix + ? `${Options.userAgentAppendix} ${options.rest.userAgentAppendix}` + : undefined, + }, + }); /** * The REST manager of the client @@ -71,5 +79,5 @@ module.exports = BaseClient; /** * @external REST - * @see {@link https://discord.js.org/#/docs/rest/main/class/REST} + * @see {@link https://discord.js.org/docs/packages/rest/stable/REST:Class} */ diff --git a/packages/discord.js/src/client/Client.js b/packages/discord.js/src/client/Client.js index f9a91f6dd46e..07d15c973f6d 100644 --- a/packages/discord.js/src/client/Client.js +++ b/packages/discord.js/src/client/Client.js @@ -226,7 +226,7 @@ class Client extends BaseClient { await this.ws.connect(); return this.token; } catch (error) { - this.destroy(); + await this.destroy(); throw error; } } @@ -242,13 +242,13 @@ class Client extends BaseClient { /** * Logs out, terminates the connection to Discord, and destroys the client. - * @returns {void} + * @returns {Promise} */ - destroy() { + async destroy() { super.destroy(); this.sweepers.destroy(); - this.ws.destroy(); + await this.ws.destroy(); this.token = null; this.rest.setToken(null); } @@ -307,7 +307,7 @@ class Client extends BaseClient { * .catch(console.error); */ async fetchWebhook(id, token) { - const data = await this.rest.get(Routes.webhook(id, token), { auth: typeof token === 'undefined' }); + const data = await this.rest.get(Routes.webhook(id, token), { auth: token === undefined }); return new Webhook(this, { token, ...data }); } @@ -411,7 +411,7 @@ class Client extends BaseClient { if (!this.application) throw new DiscordjsError(ErrorCodes.ClientNotReady, 'generate an invite link'); const { scopes } = options; - if (typeof scopes === 'undefined') { + if (scopes === undefined) { throw new DiscordjsTypeError(ErrorCodes.InvalidMissingScopes); } if (!Array.isArray(scopes)) { @@ -420,6 +420,9 @@ class Client extends BaseClient { if (!scopes.some(scope => [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands].includes(scope))) { throw new DiscordjsTypeError(ErrorCodes.InvalidMissingScopes); } + if (!scopes.includes(OAuth2Scopes.Bot) && options.permissions) { + throw new DiscordjsTypeError(ErrorCodes.InvalidScopesWithPermissions); + } const validScopes = Object.values(OAuth2Scopes); const invalidScope = scopes.find(scope => !validScopes.includes(scope)); if (invalidScope) { @@ -485,7 +488,7 @@ class Client extends BaseClient { * @private */ _validateOptions(options = this.options) { - if (typeof options.intents === 'undefined') { + if (options.intents === undefined) { throw new DiscordjsTypeError(ErrorCodes.ClientMissingIntents); } else { options.intents = new IntentsBitField(options.intents).freeze(); @@ -512,11 +515,41 @@ class Client extends BaseClient { if (typeof options.failIfNotExists !== 'boolean') { throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'failIfNotExists', 'a boolean'); } + if ( + (typeof options.allowedMentions !== 'object' && options.allowedMentions !== undefined) || + options.allowedMentions === null + ) { + throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'allowedMentions', 'an object'); + } + if (typeof options.presence !== 'object' || options.presence === null) { + throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'presence', 'an object'); + } + if (typeof options.ws !== 'object' || options.ws === null) { + throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'ws', 'an object'); + } + if (typeof options.rest !== 'object' || options.rest === null) { + throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'rest', 'an object'); + } + if (typeof options.jsonTransformer !== 'function') { + throw new DiscordjsTypeError(ErrorCodes.ClientInvalidOption, 'jsonTransformer', 'a function'); + } } } module.exports = Client; +/** + * @class SnowflakeUtil + * @classdesc This class is an alias for {@link https://www.npmjs.com/package/@sapphire/snowflake @sapphire/snowflake}'s + * `DiscordSnowflake` class. + * + * Check their documentation + * {@link https://www.sapphirejs.dev/docs/Documentation/api-utilities/classes/sapphire_snowflake.Snowflake here} + * ({@link https://www.sapphirejs.dev/docs/Guide/utilities/snowflake guide}) + * to see what you can do. + * @hideconstructor + */ + /** * A {@link https://developer.twitter.com/en/docs/twitter-ids Twitter snowflake}, * except the epoch is 2015-01-01T00:00:00.000Z. @@ -544,15 +577,15 @@ module.exports = Client; /** * @external Collection - * @see {@link https://discord.js.org/#/docs/collection/main/class/Collection} + * @see {@link https://discord.js.org/docs/packages/collection/stable/Collection:Class} */ /** * @external ImageURLOptions - * @see {@link https://discord.js.org/#/docs/rest/main/typedef/ImageURLOptions} + * @see {@link https://discord.js.org/docs/packages/rest/stable/ImageURLOptions:Interface} */ /** * @external BaseImageURLOptions - * @see {@link https://discord.js.org/#/docs/rest/main/typedef/BaseImageURLOptions} + * @see {@link https://discord.js.org/docs/packages/rest/stable/BaseImageURLOptions:Interface} */ diff --git a/packages/discord.js/src/client/WebhookClient.js b/packages/discord.js/src/client/WebhookClient.js index 70ae4e97ba45..5bb6412674f5 100644 --- a/packages/discord.js/src/client/WebhookClient.js +++ b/packages/discord.js/src/client/WebhookClient.js @@ -68,7 +68,7 @@ class WebhookClient extends BaseClient { /* eslint-disable no-empty-function, valid-jsdoc */ /** * Sends a message with this webhook. - * @param {string|MessagePayload|WebhookCreateMessageOptions} options The content for the reply + * @param {string|MessagePayload|WebhookMessageCreateOptions} options The content for the reply * @returns {Promise} */ send() {} @@ -84,7 +84,7 @@ class WebhookClient extends BaseClient { /** * Edits a message that was sent by this webhook. * @param {MessageResolvable} message The message to edit - * @param {string|MessagePayload|WebhookEditMessageOptions} options The options to provide + * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide * @returns {Promise} Returns the message edited by this webhook */ editMessage() {} diff --git a/packages/discord.js/src/client/actions/Action.js b/packages/discord.js/src/client/actions/Action.js index 7f055301266e..540a3fe85bac 100644 --- a/packages/discord.js/src/client/actions/Action.js +++ b/packages/discord.js/src/client/actions/Action.js @@ -34,7 +34,7 @@ class GenericAction { getChannel(data) { const id = data.channel_id ?? data.id; return ( - data.channel ?? + data[this.client.actions.injectedChannel] ?? this.getPayload( { id, @@ -51,7 +51,7 @@ class GenericAction { getMessage(data, channel, cache) { const id = data.message_id ?? data.id; return ( - data.message ?? + data[this.client.actions.injectedMessage] ?? this.getPayload( { id, @@ -86,7 +86,7 @@ class GenericAction { getUser(data) { const id = data.user_id; - return data.user ?? this.getPayload({ id }, this.client.users, id, Partials.User); + return data[this.client.actions.injectedUser] ?? this.getPayload({ id }, this.client.users, id, Partials.User); } getUserFromMember(data) { diff --git a/packages/discord.js/src/client/actions/ActionsManager.js b/packages/discord.js/src/client/actions/ActionsManager.js index 0ab0be1a0f58..301a6a966b46 100644 --- a/packages/discord.js/src/client/actions/ActionsManager.js +++ b/packages/discord.js/src/client/actions/ActionsManager.js @@ -1,13 +1,25 @@ 'use strict'; class ActionsManager { + // These symbols represent fully built data that we inject at times when calling actions manually. + // Action#getUser, for example, will return the injected data (which is assumed to be a built structure) + // instead of trying to make it from provided data + injectedUser = Symbol('djs.actions.injectedUser'); + injectedChannel = Symbol('djs.actions.injectedChannel'); + injectedMessage = Symbol('djs.actions.injectedMessage'); + constructor(client) { this.client = client; this.register(require('./ApplicationCommandPermissionsUpdate')); + this.register(require('./AutoModerationActionExecution')); + this.register(require('./AutoModerationRuleCreate')); + this.register(require('./AutoModerationRuleDelete')); + this.register(require('./AutoModerationRuleUpdate')); this.register(require('./ChannelCreate')); this.register(require('./ChannelDelete')); this.register(require('./ChannelUpdate')); + this.register(require('./GuildAuditLogEntryCreate')); this.register(require('./GuildBanAdd')); this.register(require('./GuildBanRemove')); this.register(require('./GuildChannelsPositionUpdate')); diff --git a/packages/discord.js/src/client/actions/AutoModerationActionExecution.js b/packages/discord.js/src/client/actions/AutoModerationActionExecution.js new file mode 100644 index 000000000000..ad601167c41f --- /dev/null +++ b/packages/discord.js/src/client/actions/AutoModerationActionExecution.js @@ -0,0 +1,26 @@ +'use strict'; + +const Action = require('./Action'); +const AutoModerationActionExecution = require('../../structures/AutoModerationActionExecution'); +const Events = require('../../util/Events'); + +class AutoModerationActionExecutionAction extends Action { + handle(data) { + const { client } = this; + const guild = client.guilds.cache.get(data.guild_id); + + if (guild) { + /** + * Emitted whenever an auto moderation rule is triggered. + * This event requires the {@link PermissionFlagsBits.ManageGuild} permission. + * @event Client#autoModerationActionExecution + * @param {AutoModerationActionExecution} autoModerationActionExecution The data of the execution + */ + client.emit(Events.AutoModerationActionExecution, new AutoModerationActionExecution(data, guild)); + } + + return {}; + } +} + +module.exports = AutoModerationActionExecutionAction; diff --git a/packages/discord.js/src/client/actions/AutoModerationRuleCreate.js b/packages/discord.js/src/client/actions/AutoModerationRuleCreate.js new file mode 100644 index 000000000000..775b1d370cf5 --- /dev/null +++ b/packages/discord.js/src/client/actions/AutoModerationRuleCreate.js @@ -0,0 +1,27 @@ +'use strict'; + +const Action = require('./Action'); +const Events = require('../../util/Events'); + +class AutoModerationRuleCreateAction extends Action { + handle(data) { + const { client } = this; + const guild = client.guilds.cache.get(data.guild_id); + + if (guild) { + const autoModerationRule = guild.autoModerationRules._add(data); + + /** + * Emitted whenever an auto moderation rule is created. + * This event requires the {@link PermissionFlagsBits.ManageGuild} permission. + * @event Client#autoModerationRuleCreate + * @param {AutoModerationRule} autoModerationRule The created auto moderation rule + */ + client.emit(Events.AutoModerationRuleCreate, autoModerationRule); + } + + return {}; + } +} + +module.exports = AutoModerationRuleCreateAction; diff --git a/packages/discord.js/src/client/actions/AutoModerationRuleDelete.js b/packages/discord.js/src/client/actions/AutoModerationRuleDelete.js new file mode 100644 index 000000000000..641822c24b2a --- /dev/null +++ b/packages/discord.js/src/client/actions/AutoModerationRuleDelete.js @@ -0,0 +1,31 @@ +'use strict'; + +const Action = require('./Action'); +const Events = require('../../util/Events'); + +class AutoModerationRuleDeleteAction extends Action { + handle(data) { + const { client } = this; + const guild = client.guilds.cache.get(data.guild_id); + + if (guild) { + const autoModerationRule = guild.autoModerationRules.cache.get(data.id); + + if (autoModerationRule) { + guild.autoModerationRules.cache.delete(autoModerationRule.id); + + /** + * Emitted whenever an auto moderation rule is deleted. + * This event requires the {@link PermissionFlagsBits.ManageGuild} permission. + * @event Client#autoModerationRuleDelete + * @param {AutoModerationRule} autoModerationRule The deleted auto moderation rule + */ + client.emit(Events.AutoModerationRuleDelete, autoModerationRule); + } + } + + return {}; + } +} + +module.exports = AutoModerationRuleDeleteAction; diff --git a/packages/discord.js/src/client/actions/AutoModerationRuleUpdate.js b/packages/discord.js/src/client/actions/AutoModerationRuleUpdate.js new file mode 100644 index 000000000000..56e39568c5c7 --- /dev/null +++ b/packages/discord.js/src/client/actions/AutoModerationRuleUpdate.js @@ -0,0 +1,29 @@ +'use strict'; + +const Action = require('./Action'); +const Events = require('../../util/Events'); + +class AutoModerationRuleUpdateAction extends Action { + handle(data) { + const { client } = this; + const guild = client.guilds.cache.get(data.guild_id); + + if (guild) { + const oldAutoModerationRule = guild.autoModerationRules.cache.get(data.id)?._clone() ?? null; + const newAutoModerationRule = guild.autoModerationRules._add(data); + + /** + * Emitted whenever an auto moderation rule gets updated. + * This event requires the {@link PermissionFlagsBits.ManageGuild} permission. + * @event Client#autoModerationRuleUpdate + * @param {?AutoModerationRule} oldAutoModerationRule The auto moderation rule before the update + * @param {AutoModerationRule} newAutoModerationRule The auto moderation rule after the update + */ + client.emit(Events.AutoModerationRuleUpdate, oldAutoModerationRule, newAutoModerationRule); + } + + return {}; + } +} + +module.exports = AutoModerationRuleUpdateAction; diff --git a/packages/discord.js/src/client/actions/GuildAuditLogEntryCreate.js b/packages/discord.js/src/client/actions/GuildAuditLogEntryCreate.js new file mode 100644 index 000000000000..fa16de60b88e --- /dev/null +++ b/packages/discord.js/src/client/actions/GuildAuditLogEntryCreate.js @@ -0,0 +1,29 @@ +'use strict'; + +const Action = require('./Action'); +const GuildAuditLogsEntry = require('../../structures/GuildAuditLogsEntry'); +const Events = require('../../util/Events'); + +class GuildAuditLogEntryCreateAction extends Action { + handle(data) { + const client = this.client; + const guild = client.guilds.cache.get(data.guild_id); + let auditLogEntry; + + if (guild) { + auditLogEntry = new GuildAuditLogsEntry(guild, data); + + /** + * Emitted whenever a guild audit log entry is created. + * @event Client#guildAuditLogEntryCreate + * @param {GuildAuditLogsEntry} auditLogEntry The entry that was created + * @param {Guild} guild The guild where the entry was created + */ + client.emit(Events.GuildAuditLogEntryCreate, auditLogEntry, guild); + } + + return { auditLogEntry }; + } +} + +module.exports = GuildAuditLogEntryCreateAction; diff --git a/packages/discord.js/src/client/actions/InteractionCreate.js b/packages/discord.js/src/client/actions/InteractionCreate.js index c079121c7f6f..434fb0c0689c 100644 --- a/packages/discord.js/src/client/actions/InteractionCreate.js +++ b/packages/discord.js/src/client/actions/InteractionCreate.js @@ -20,7 +20,7 @@ class InteractionCreateAction extends Action { const client = this.client; // Resolve and cache partial channels for Interaction#channel getter - const channel = this.getChannel(data); + const channel = data.channel && this.getChannel(data.channel); // Do not emit this for interactions that cache messages that are non-text-based. let InteractionClass; diff --git a/packages/discord.js/src/client/actions/InviteCreate.js b/packages/discord.js/src/client/actions/InviteCreate.js index 340be8052add..dc03f07a2315 100644 --- a/packages/discord.js/src/client/actions/InviteCreate.js +++ b/packages/discord.js/src/client/actions/InviteCreate.js @@ -15,8 +15,7 @@ class InviteCreateAction extends Action { /** * Emitted when an invite is created. - * This event requires either the {@link PermissionFlagsBits.ManageGuild} permission or the - * {@link PermissionFlagsBits.ManageChannels} permission for the channel. + * This event requires the {@link PermissionFlagsBits.ManageChannels} permission for the channel. * @event Client#inviteCreate * @param {Invite} invite The invite that was created */ diff --git a/packages/discord.js/src/client/actions/InviteDelete.js b/packages/discord.js/src/client/actions/InviteDelete.js index 39a93039bdf8..58be00c81c96 100644 --- a/packages/discord.js/src/client/actions/InviteDelete.js +++ b/packages/discord.js/src/client/actions/InviteDelete.js @@ -17,8 +17,7 @@ class InviteDeleteAction extends Action { /** * Emitted when an invite is deleted. - * This event requires either the {@link PermissionFlagsBits.ManageGuild} permission or the - * {@link PermissionFlagsBits.ManageChannels} permission for the channel. + * This event requires the {@link PermissionFlagsBits.ManageChannels} permission for the channel. * @event Client#inviteDelete * @param {Invite} invite The invite that was deleted */ diff --git a/packages/discord.js/src/client/actions/WebhooksUpdate.js b/packages/discord.js/src/client/actions/WebhooksUpdate.js index ab10cd244adb..914b03fb2f01 100644 --- a/packages/discord.js/src/client/actions/WebhooksUpdate.js +++ b/packages/discord.js/src/client/actions/WebhooksUpdate.js @@ -10,7 +10,8 @@ class WebhooksUpdate extends Action { /** * Emitted whenever a channel has its webhooks changed. * @event Client#webhookUpdate - * @param {TextChannel|NewsChannel|VoiceChannel|ForumChannel} channel The channel that had a webhook update + * @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel} channel + * The channel that had a webhook update */ if (channel) client.emit(Events.WebhooksUpdate, channel); } diff --git a/packages/discord.js/src/client/websocket/WebSocketManager.js b/packages/discord.js/src/client/websocket/WebSocketManager.js index f96cdf12e5af..e3a2ec749778 100644 --- a/packages/discord.js/src/client/websocket/WebSocketManager.js +++ b/packages/discord.js/src/client/websocket/WebSocketManager.js @@ -1,10 +1,16 @@ 'use strict'; const EventEmitter = require('node:events'); +const process = require('node:process'); const { setImmediate } = require('node:timers'); -const { setTimeout: sleep } = require('node:timers/promises'); const { Collection } = require('@discordjs/collection'); -const { GatewayCloseCodes, GatewayDispatchEvents, Routes } = require('discord-api-types/v10'); +const { + WebSocketManager: WSWebSocketManager, + WebSocketShardEvents: WSWebSocketShardEvents, + CompressionMethod, + CloseCodes, +} = require('@discordjs/ws'); +const { GatewayCloseCodes, GatewayDispatchEvents } = require('discord-api-types/v10'); const WebSocketShard = require('./WebSocketShard'); const PacketHandlers = require('./handlers'); const { DiscordjsError, ErrorCodes } = require('../../errors'); @@ -12,6 +18,12 @@ const Events = require('../../util/Events'); const Status = require('../../util/Status'); const WebSocketShardEvents = require('../../util/WebSocketShardEvents'); +let zlib; + +try { + zlib = require('zlib-sync'); +} catch {} // eslint-disable-line no-empty + const BeforeReadyWhitelist = [ GatewayDispatchEvents.Ready, GatewayDispatchEvents.Resumed, @@ -22,15 +34,17 @@ const BeforeReadyWhitelist = [ GatewayDispatchEvents.GuildMemberRemove, ]; -const unrecoverableErrorCodeMap = { - [GatewayCloseCodes.AuthenticationFailed]: ErrorCodes.TokenInvalid, - [GatewayCloseCodes.InvalidShard]: ErrorCodes.ShardingInvalid, - [GatewayCloseCodes.ShardingRequired]: ErrorCodes.ShardingRequired, - [GatewayCloseCodes.InvalidIntents]: ErrorCodes.InvalidIntents, - [GatewayCloseCodes.DisallowedIntents]: ErrorCodes.DisallowedIntents, -}; +const WaitingForGuildEvents = [GatewayDispatchEvents.GuildCreate, GatewayDispatchEvents.GuildDelete]; -const UNRESUMABLE_CLOSE_CODES = [1000, GatewayCloseCodes.AlreadyAuthenticated, GatewayCloseCodes.InvalidSeq]; +const UNRESUMABLE_CLOSE_CODES = [ + CloseCodes.Normal, + GatewayCloseCodes.AlreadyAuthenticated, + GatewayCloseCodes.InvalidSeq, +]; + +const reasonIsDeprecated = 'the reason property is deprecated, use the code property to determine the reason'; +let deprecationEmittedForInvalidSessionEvent = false; +let deprecationEmittedForDestroyedEvent = false; /** * The WebSocket manager for this client. @@ -56,27 +70,12 @@ class WebSocketManager extends EventEmitter { */ this.gateway = null; - /** - * The amount of shards this manager handles - * @private - * @type {number} - */ - this.totalShards = this.client.options.shards.length; - /** * A collection of all shards this manager handles * @type {Collection} */ this.shards = new Collection(); - /** - * An array of shards to be connected or that need to reconnect - * @type {Set} - * @private - * @name WebSocketManager#shardQueue - */ - Object.defineProperty(this, 'shardQueue', { value: new Set(), writable: true }); - /** * An array of queued events before this WebSocketManager became ready * @type {Object[]} @@ -99,11 +98,11 @@ class WebSocketManager extends EventEmitter { this.destroyed = false; /** - * If this manager is currently reconnecting one or multiple shards - * @type {boolean} + * The internal WebSocketManager from `@discordjs/ws`. + * @type {WSWebSocketManager} * @private */ - this.reconnecting = false; + this._ws = null; } /** @@ -119,11 +118,14 @@ class WebSocketManager extends EventEmitter { /** * Emits a debug message. * @param {string} message The debug message - * @param {?WebSocketShard} [shard] The shard that emitted this message, if any + * @param {?number} [shardId] The id of the shard that emitted this message, if any * @private */ - debug(message, shard) { - this.client.emit(Events.Debug, `[WS => ${shard ? `Shard ${shard.id}` : 'Manager'}] ${message}`); + debug(message, shardId) { + this.client.emit( + Events.Debug, + `[WS => ${typeof shardId === 'number' ? `Shard ${shardId}` : 'Manager'}] ${message}`, + ); } /** @@ -132,11 +134,37 @@ class WebSocketManager extends EventEmitter { */ async connect() { const invalidToken = new DiscordjsError(ErrorCodes.TokenInvalid); + const { shards, shardCount, intents, ws } = this.client.options; + if (this._ws && this._ws.options.token !== this.client.token) { + await this._ws.destroy({ code: CloseCodes.Normal, reason: 'Login with differing token requested' }); + this._ws = null; + } + if (!this._ws) { + const wsOptions = { + intents: intents.bitfield, + rest: this.client.rest, + token: this.client.token, + largeThreshold: ws.large_threshold, + version: ws.version, + shardIds: shards === 'auto' ? null : shards, + shardCount: shards === 'auto' ? null : shardCount, + initialPresence: ws.presence, + retrieveSessionInfo: shardId => this.shards.get(shardId).sessionInfo, + updateSessionInfo: (shardId, sessionInfo) => { + this.shards.get(shardId).sessionInfo = sessionInfo; + }, + compression: zlib ? CompressionMethod.ZlibStream : null, + }; + if (ws.buildStrategy) wsOptions.buildStrategy = ws.buildStrategy; + this._ws = new WSWebSocketManager(wsOptions); + this.attachEvents(); + } + const { url: gatewayURL, shards: recommendedShards, session_start_limit: sessionStartLimit, - } = await this.client.rest.get(Routes.gatewayBot()).catch(error => { + } = await this._ws.fetchGatewayInformation().catch(error => { throw error.status === 401 ? invalidToken : error; }); @@ -152,156 +180,131 @@ class WebSocketManager extends EventEmitter { this.gateway = `${gatewayURL}/`; - let { shards } = this.client.options; - - if (shards === 'auto') { - this.debug(`Using the recommended shard count provided by Discord: ${recommendedShards}`); - this.totalShards = this.client.options.shardCount = recommendedShards; - shards = this.client.options.shards = Array.from({ length: recommendedShards }, (_, i) => i); - } - - this.totalShards = shards.length; - this.debug(`Spawning shards: ${shards.join(', ')}`); - this.shardQueue = new Set(shards.map(id => new WebSocketShard(this, id))); - - return this.createShards(); - } - - /** - * Handles the creation of a shard. - * @returns {Promise} - * @private - */ - async createShards() { - // If we don't have any shards to handle, return - if (!this.shardQueue.size) return false; - - const [shard] = this.shardQueue; - - this.shardQueue.delete(shard); - - if (!shard.eventsAttached) { - shard.on(WebSocketShardEvents.AllReady, unavailableGuilds => { - /** - * Emitted when a shard turns ready. - * @event Client#shardReady - * @param {number} id The shard id that turned ready - * @param {?Set} unavailableGuilds Set of unavailable guild ids, if any - */ - this.client.emit(Events.ShardReady, shard.id, unavailableGuilds); - - if (!this.shardQueue.size) this.reconnecting = false; - this.checkShardsReady(); - }); + this.client.options.shardCount = await this._ws.getShardCount(); + this.client.options.shards = await this._ws.getShardIds(); + this.totalShards = this.client.options.shards.length; + for (const id of this.client.options.shards) { + if (!this.shards.has(id)) { + const shard = new WebSocketShard(this, id); + this.shards.set(id, shard); - shard.on(WebSocketShardEvents.Close, event => { - if (event.code === 1_000 ? this.destroyed : event.code in unrecoverableErrorCodeMap) { + shard.on(WebSocketShardEvents.AllReady, unavailableGuilds => { /** - * Emitted when a shard's WebSocket disconnects and will no longer reconnect. - * @event Client#shardDisconnect - * @param {CloseEvent} event The WebSocket close event - * @param {number} id The shard id that disconnected + * Emitted when a shard turns ready. + * @event Client#shardReady + * @param {number} id The shard id that turned ready + * @param {?Set} unavailableGuilds Set of unavailable guild ids, if any */ - this.client.emit(Events.ShardDisconnect, event, shard.id); - this.debug(GatewayCloseCodes[event.code], shard); - return; - } + this.client.emit(Events.ShardReady, shard.id, unavailableGuilds); - if (UNRESUMABLE_CLOSE_CODES.includes(event.code)) { - // These event codes cannot be resumed - shard.sessionId = null; - } - - /** - * Emitted when a shard is attempting to reconnect or re-identify. - * @event Client#shardReconnecting - * @param {number} id The shard id that is attempting to reconnect - */ - this.client.emit(Events.ShardReconnecting, shard.id); - - this.shardQueue.add(shard); - - if (shard.sessionId) this.debug(`Session id is present, attempting an immediate reconnect...`, shard); - this.reconnect(); - }); - - shard.on(WebSocketShardEvents.InvalidSession, () => { - this.client.emit(Events.ShardReconnecting, shard.id); - }); - - shard.on(WebSocketShardEvents.Destroyed, () => { - this.debug('Shard was destroyed but no WebSocket connection was present! Reconnecting...', shard); - - this.client.emit(Events.ShardReconnecting, shard.id); + this.checkShardsReady(); + }); + shard.status = Status.Connecting; + } + } - this.shardQueue.add(shard); - this.reconnect(); - }); + await this._ws.connect(); - shard.eventsAttached = true; - } + this.shards.forEach(shard => { + if (shard.listenerCount(WebSocketShardEvents.InvalidSession) > 0 && !deprecationEmittedForInvalidSessionEvent) { + process.emitWarning( + 'The WebSocketShard#invalidSession event is deprecated and will never emit.', + 'DeprecationWarning', + ); - this.shards.set(shard.id, shard); - - try { - await shard.connect(); - } catch (error) { - if (error?.code && error.code in unrecoverableErrorCodeMap) { - throw new DiscordjsError(unrecoverableErrorCodeMap[error.code]); - // Undefined if session is invalid, error event for regular closes - } else if (!error || error.code) { - this.debug('Failed to connect to the gateway, requeueing...', shard); - this.shardQueue.add(shard); - } else { - throw error; + deprecationEmittedForInvalidSessionEvent = true; } - } - // If we have more shards, add a 5s delay - if (this.shardQueue.size) { - this.debug(`Shard Queue Size: ${this.shardQueue.size}; continuing in 5 seconds...`); - await sleep(5_000); - return this.createShards(); - } + if (shard.listenerCount(WebSocketShardEvents.Destroyed) > 0 && !deprecationEmittedForDestroyedEvent) { + process.emitWarning( + 'The WebSocketShard#destroyed event is deprecated and will never emit.', + 'DeprecationWarning', + ); - return true; + deprecationEmittedForDestroyedEvent = true; + } + }); } /** - * Handles reconnects for this manager. + * Attaches event handlers to the internal WebSocketShardManager from `@discordjs/ws`. * @private - * @returns {Promise} */ - async reconnect() { - if (this.reconnecting || this.status !== Status.Ready) return false; - this.reconnecting = true; - try { - await this.createShards(); - } catch (error) { - this.debug(`Couldn't reconnect or fetch information about the gateway. ${error}`); - if (error.httpStatus !== 401) { - this.debug(`Possible network error occurred. Retrying in 5s...`); - await sleep(5_000); - this.reconnecting = false; - return this.reconnect(); + attachEvents() { + this._ws.on(WSWebSocketShardEvents.Debug, ({ message, shardId }) => this.debug(message, shardId)); + this._ws.on(WSWebSocketShardEvents.Dispatch, ({ data, shardId }) => { + this.client.emit(Events.Raw, data, shardId); + this.emit(data.t, data.d, shardId); + const shard = this.shards.get(shardId); + this.handlePacket(data, shard); + if (shard.status === Status.WaitingForGuilds && WaitingForGuildEvents.includes(data.t)) { + shard.gotGuild(data.d.id); } - // If we get an error at this point, it means we cannot reconnect anymore - if (this.client.listenerCount(Events.Invalidated)) { + }); + + this._ws.on(WSWebSocketShardEvents.Ready, ({ data, shardId }) => { + this.shards.get(shardId).onReadyPacket(data); + }); + + this._ws.on(WSWebSocketShardEvents.Closed, ({ code, shardId }) => { + const shard = this.shards.get(shardId); + shard.emit(WebSocketShardEvents.Close, { code, reason: reasonIsDeprecated, wasClean: true }); + if (UNRESUMABLE_CLOSE_CODES.includes(code) && this.destroyed) { + shard.status = Status.Disconnected; /** - * Emitted when the client's session becomes invalidated. - * You are expected to handle closing the process gracefully and preventing a boot loop - * if you are listening to this event. - * @event Client#invalidated + * Emitted when a shard's WebSocket disconnects and will no longer reconnect. + * @event Client#shardDisconnect + * @param {CloseEvent} event The WebSocket close event + * @param {number} id The shard id that disconnected */ - this.client.emit(Events.Invalidated); - // Destroy just the shards. This means you have to handle the cleanup yourself - this.destroy(); + this.client.emit(Events.ShardDisconnect, { code, reason: reasonIsDeprecated, wasClean: true }, shardId); + this.debug(GatewayCloseCodes[code], shardId); + return; + } + + this.shards.get(shardId).status = Status.Connecting; + /** + * Emitted when a shard is attempting to reconnect or re-identify. + * @event Client#shardReconnecting + * @param {number} id The shard id that is attempting to reconnect + */ + this.client.emit(Events.ShardReconnecting, shardId); + }); + this._ws.on(WSWebSocketShardEvents.Hello, ({ shardId }) => { + const shard = this.shards.get(shardId); + if (shard.sessionInfo) { + shard.closeSequence = shard.sessionInfo.sequence; + shard.status = Status.Resuming; } else { - this.client.destroy(); + shard.status = Status.Identifying; } - } finally { - this.reconnecting = false; - } - return true; + }); + + this._ws.on(WSWebSocketShardEvents.Resumed, ({ shardId }) => { + const shard = this.shards.get(shardId); + shard.status = Status.Ready; + /** + * Emitted when the shard resumes successfully + * @event WebSocketShard#resumed + */ + shard.emit(WebSocketShardEvents.Resumed); + }); + + this._ws.on(WSWebSocketShardEvents.HeartbeatComplete, ({ heartbeatAt, latency, shardId }) => { + this.debug(`Heartbeat acknowledged, latency of ${latency}ms.`, shardId); + const shard = this.shards.get(shardId); + shard.lastPingTimestamp = heartbeatAt; + shard.ping = latency; + }); + + this._ws.on(WSWebSocketShardEvents.Error, ({ error, shardId }) => { + /** + * Emitted whenever a shard's WebSocket encounters a connection error. + * @event Client#shardError + * @param {Error} error The encountered error + * @param {number} shardId The shard that encountered this error + */ + this.client.emit(Events.ShardError, error, shardId); + }); } /** @@ -310,20 +313,19 @@ class WebSocketManager extends EventEmitter { * @private */ broadcast(packet) { - for (const shard of this.shards.values()) shard.send(packet); + for (const shardId of this.shards.keys()) this._ws.send(shardId, packet); } /** * Destroys this manager and all its shards. * @private */ - destroy() { + async destroy() { if (this.destroyed) return; // TODO: Make a util for getting a stack this.debug(`Manager was destroyed. Called by:\n${new Error().stack}`); this.destroyed = true; - this.shardQueue.clear(); - for (const shard of this.shards.values()) shard.destroy({ closeCode: 1_000, reset: true, emit: false, log: false }); + await this._ws?.destroy({ code: CloseCodes.Normal }); } /** diff --git a/packages/discord.js/src/client/websocket/WebSocketShard.js b/packages/discord.js/src/client/websocket/WebSocketShard.js index 1f7a9da86127..05bc2253d295 100644 --- a/packages/discord.js/src/client/websocket/WebSocketShard.js +++ b/packages/discord.js/src/client/websocket/WebSocketShard.js @@ -1,22 +1,13 @@ 'use strict'; const EventEmitter = require('node:events'); -const { setTimeout, setInterval, clearTimeout, clearInterval } = require('node:timers'); -const { GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes } = require('discord-api-types/v10'); -const WebSocket = require('../../WebSocket'); -const Events = require('../../util/Events'); +const process = require('node:process'); +const { setTimeout, clearTimeout } = require('node:timers'); +const { GatewayIntentBits } = require('discord-api-types/v10'); const Status = require('../../util/Status'); const WebSocketShardEvents = require('../../util/WebSocketShardEvents'); -const STATUS_KEYS = Object.keys(Status); -const CONNECTION_STATE = Object.keys(WebSocket.WebSocket); - -let zlib; - -try { - zlib = require('zlib-sync'); -} catch {} // eslint-disable-line no-empty - +let deprecationEmittedForImportant = false; /** * Represents a Shard's WebSocket connection * @extends {EventEmitter} @@ -43,13 +34,6 @@ class WebSocketShard extends EventEmitter { */ this.status = Status.Idle; - /** - * The current sequence of the shard - * @type {number} - * @private - */ - this.sequence = -1; - /** * The sequence of the shard after close * @type {number} @@ -57,20 +41,6 @@ class WebSocketShard extends EventEmitter { */ this.closeSequence = 0; - /** - * The current session id of the shard - * @type {?string} - * @private - */ - this.sessionId = null; - - /** - * The resume url for this shard - * @type {?string} - * @private - */ - this.resumeURL = null; - /** * The previous heartbeat ping of the shard * @type {number} @@ -83,81 +53,6 @@ class WebSocketShard extends EventEmitter { */ this.lastPingTimestamp = -1; - /** - * If we received a heartbeat ack back. Used to identify zombie connections - * @type {boolean} - * @private - */ - this.lastHeartbeatAcked = true; - - /** - * Used to prevent calling {@link WebSocketShard#event:close} twice while closing or terminating the WebSocket. - * @type {boolean} - * @private - */ - this.closeEmitted = false; - - /** - * Contains the rate limit queue and metadata - * @name WebSocketShard#ratelimit - * @type {Object} - * @private - */ - Object.defineProperty(this, 'ratelimit', { - value: { - queue: [], - total: 120, - remaining: 120, - time: 60e3, - timer: null, - }, - }); - - /** - * The WebSocket connection for the current shard - * @name WebSocketShard#connection - * @type {?WebSocket} - * @private - */ - Object.defineProperty(this, 'connection', { value: null, writable: true }); - - /** - * @external Inflate - * @see {@link https://www.npmjs.com/package/zlib-sync} - */ - - /** - * The compression to use - * @name WebSocketShard#inflate - * @type {?Inflate} - * @private - */ - Object.defineProperty(this, 'inflate', { value: null, writable: true }); - - /** - * The HELLO timeout - * @name WebSocketShard#helloTimeout - * @type {?NodeJS.Timeout} - * @private - */ - Object.defineProperty(this, 'helloTimeout', { value: null, writable: true }); - - /** - * The WebSocket timeout. - * @name WebSocketShard#wsCloseTimeout - * @type {?NodeJS.Timeout} - * @private - */ - Object.defineProperty(this, 'wsCloseTimeout', { value: null, writable: true }); - - /** - * If the manager attached its event handlers on the shard - * @name WebSocketShard#eventsAttached - * @type {boolean} - * @private - */ - Object.defineProperty(this, 'eventsAttached', { value: false, writable: true }); - /** * A set of guild ids this shard expects to receive * @name WebSocketShard#expectedGuilds @@ -175,12 +70,17 @@ class WebSocketShard extends EventEmitter { Object.defineProperty(this, 'readyTimeout', { value: null, writable: true }); /** - * Time when the WebSocket connection was opened - * @name WebSocketShard#connectedAt - * @type {number} + * @external SessionInfo + * @see {@link https://discord.js.org/docs/packages/ws/stable/SessionInfo:Interface} + */ + + /** + * The session info used by `@discordjs/ws` package. + * @name WebSocketShard#sessionInfo + * @type {?SessionInfo} * @private */ - Object.defineProperty(this, 'connectedAt', { value: 0, writable: true }); + Object.defineProperty(this, 'sessionInfo', { value: null, writable: true }); } /** @@ -189,161 +89,7 @@ class WebSocketShard extends EventEmitter { * @private */ debug(message) { - this.manager.debug(message, this); - } - - /** - * Connects the shard to the gateway. - * @private - * @returns {Promise} A promise that will resolve if the shard turns ready successfully, - * or reject if we couldn't connect - */ - connect() { - const { client } = this.manager; - - if (this.connection?.readyState === WebSocket.OPEN && this.status === Status.Ready) { - return Promise.resolve(); - } - - const gateway = this.resumeURL ?? this.manager.gateway; - - return new Promise((resolve, reject) => { - const cleanup = () => { - this.removeListener(WebSocketShardEvents.Close, onClose); - this.removeListener(WebSocketShardEvents.Ready, onReady); - this.removeListener(WebSocketShardEvents.Resumed, onResumed); - this.removeListener(WebSocketShardEvents.InvalidSession, onInvalidOrDestroyed); - this.removeListener(WebSocketShardEvents.Destroyed, onInvalidOrDestroyed); - }; - - const onReady = () => { - cleanup(); - resolve(); - }; - - const onResumed = () => { - cleanup(); - resolve(); - }; - - const onClose = event => { - cleanup(); - reject(event); - }; - - const onInvalidOrDestroyed = () => { - cleanup(); - // eslint-disable-next-line prefer-promise-reject-errors - reject(); - }; - - this.once(WebSocketShardEvents.Ready, onReady); - this.once(WebSocketShardEvents.Resumed, onResumed); - this.once(WebSocketShardEvents.Close, onClose); - this.once(WebSocketShardEvents.InvalidSession, onInvalidOrDestroyed); - this.once(WebSocketShardEvents.Destroyed, onInvalidOrDestroyed); - - if (this.connection?.readyState === WebSocket.OPEN) { - this.debug('An open connection was found, attempting an immediate identify.'); - this.identify(); - return; - } - - if (this.connection) { - this.debug(`A connection object was found. Cleaning up before continuing. - State: ${CONNECTION_STATE[this.connection.readyState]}`); - this.destroy({ emit: false }); - } - - const wsQuery = { v: client.options.ws.version }; - - if (zlib) { - this.inflate = new zlib.Inflate({ - chunkSize: 65535, - flush: zlib.Z_SYNC_FLUSH, - to: WebSocket.encoding === 'json' ? 'string' : '', - }); - wsQuery.compress = 'zlib-stream'; - } - - this.debug( - `[CONNECT] - Gateway : ${gateway} - Version : ${client.options.ws.version} - Encoding : ${WebSocket.encoding} - Compression: ${zlib ? 'zlib-stream' : 'none'}`, - ); - - this.status = this.status === Status.Disconnected ? Status.Reconnecting : Status.Connecting; - this.setHelloTimeout(); - - this.connectedAt = Date.now(); - - // Adding a handshake timeout to just make sure no zombie connection appears. - const ws = (this.connection = WebSocket.create(gateway, wsQuery, { handshakeTimeout: 30_000 })); - ws.onopen = this.onOpen.bind(this); - ws.onmessage = this.onMessage.bind(this); - ws.onerror = this.onError.bind(this); - ws.onclose = this.onClose.bind(this); - }); - } - - /** - * Called whenever a connection is opened to the gateway. - * @private - */ - onOpen() { - this.debug(`[CONNECTED] Took ${Date.now() - this.connectedAt}ms`); - this.status = Status.Nearly; - } - - /** - * Called whenever a message is received. - * @param {MessageEvent} event Event received - * @private - */ - onMessage({ data }) { - let raw; - if (data instanceof ArrayBuffer) data = new Uint8Array(data); - if (zlib) { - const l = data.length; - const flush = - l >= 4 && data[l - 4] === 0x00 && data[l - 3] === 0x00 && data[l - 2] === 0xff && data[l - 1] === 0xff; - - this.inflate.push(data, flush && zlib.Z_SYNC_FLUSH); - if (!flush) return; - raw = this.inflate.result; - } else { - raw = data; - } - let packet; - try { - packet = WebSocket.unpack(raw); - } catch (err) { - this.manager.client.emit(Events.ShardError, err, this.id); - return; - } - this.manager.client.emit(Events.Raw, packet, this.id); - if (packet.op === GatewayOpcodes.Dispatch) this.manager.emit(packet.t, packet.d, this.id); - this.onPacket(packet); - } - - /** - * Called whenever an error occurs with the WebSocket. - * @param {ErrorEvent} event The error that occurred - * @private - */ - onError(event) { - const error = event?.error ?? event; - if (!error) return; - - /** - * Emitted whenever a shard's WebSocket encounters a connection error. - * @event Client#shardError - * @param {Error} error The encountered error - * @param {number} shardId The shard that encountered this error - */ - this.manager.client.emit(Events.ShardError, error, this.id); + this.manager.debug(message, this.id); } /** @@ -351,39 +97,11 @@ class WebSocketShard extends EventEmitter { * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent} */ - /** - * @external ErrorEvent - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent} - */ - - /** - * @external MessageEvent - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent} - */ - - /** - * Called whenever a connection to the gateway is closed. - * @param {CloseEvent} event Close event that was received - * @private - */ - onClose(event) { - this.closeEmitted = true; - if (this.sequence !== -1) this.closeSequence = this.sequence; - this.sequence = -1; - this.setHeartbeatTimer(-1); - this.setHelloTimeout(-1); - // Clearing the WebSocket close timeout as close was emitted. - this.setWsCloseTimeout(-1); - // If we still have a connection object, clean up its listeners - if (this.connection) this._cleanupConnection(); - this.status = Status.Disconnected; - this.emitClose(event); - } - /** * This method is responsible to emit close event for this shard. * This method helps the shard reconnect. * @param {CloseEvent} [event] Close event that was received + * @deprecated */ emitClose( event = { @@ -404,94 +122,37 @@ class WebSocketShard extends EventEmitter { */ this.emit(WebSocketShardEvents.Close, event); } + /** - * Called whenever a packet is received. + * Called when the shard receives the READY payload. * @param {Object} packet The received packet * @private */ - onPacket(packet) { + onReadyPacket(packet) { if (!packet) { this.debug(`Received broken packet: '${packet}'.`); return; } - switch (packet.t) { - case GatewayDispatchEvents.Ready: - /** - * Emitted when the shard receives the READY payload and is now waiting for guilds - * @event WebSocketShard#ready - */ - this.emit(WebSocketShardEvents.Ready); - - this.sessionId = packet.d.session_id; - this.resumeURL = packet.d.resume_gateway_url; - this.expectedGuilds = new Set(packet.d.guilds.map(d => d.id)); - this.status = Status.WaitingForGuilds; - this.debug(`[READY] Session ${this.sessionId} | Resume url ${this.resumeURL}.`); - this.lastHeartbeatAcked = true; - this.sendHeartbeat('ReadyHeartbeat'); - break; - case GatewayDispatchEvents.Resumed: { - /** - * Emitted when the shard resumes successfully - * @event WebSocketShard#resumed - */ - this.emit(WebSocketShardEvents.Resumed); - - this.status = Status.Ready; - const replayed = packet.s - this.closeSequence; - this.debug(`[RESUMED] Session ${this.sessionId} | Replayed ${replayed} events.`); - this.lastHeartbeatAcked = true; - this.sendHeartbeat('ResumeHeartbeat'); - break; - } - } + /** + * Emitted when the shard receives the READY payload and is now waiting for guilds + * @event WebSocketShard#ready + */ + this.emit(WebSocketShardEvents.Ready); - if (packet.s > this.sequence) this.sequence = packet.s; + this.expectedGuilds = new Set(packet.guilds.map(d => d.id)); + this.status = Status.WaitingForGuilds; + } - switch (packet.op) { - case GatewayOpcodes.Hello: - this.setHelloTimeout(-1); - this.setHeartbeatTimer(packet.d.heartbeat_interval); - this.identify(); - break; - case GatewayOpcodes.Reconnect: - this.debug('[RECONNECT] Discord asked us to reconnect'); - this.destroy({ closeCode: 4_000 }); - break; - case GatewayOpcodes.InvalidSession: - this.debug(`[INVALID SESSION] Resumable: ${packet.d}.`); - // If we can resume the session, do so immediately - if (packet.d) { - this.identifyResume(); - return; - } - // Reset the sequence - this.sequence = -1; - // Reset the session id as it's invalid - this.sessionId = null; - // Set the status to reconnecting - this.status = Status.Reconnecting; - // Finally, emit the INVALID_SESSION event - /** - * Emitted when the session has been invalidated. - * @event WebSocketShard#invalidSession - */ - this.emit(WebSocketShardEvents.InvalidSession); - break; - case GatewayOpcodes.HeartbeatAck: - this.ackHeartbeat(); - break; - case GatewayOpcodes.Heartbeat: - this.sendHeartbeat('HeartbeatRequest', true); - break; - default: - this.manager.handlePacket(packet, this); - if (this.status === Status.WaitingForGuilds && packet.t === GatewayDispatchEvents.GuildCreate) { - this.expectedGuilds.delete(packet.d.id); - this.checkReady(); - } - } + /** + * Called when a GuildCreate or GuildDelete for this shard was sent after READY payload was received, + * but before we emitted the READY event. + * @param {Snowflake} guildId the id of the Guild sent in the payload + * @private + */ + gotGuild(guildId) { + this.expectedGuilds.delete(guildId); + this.checkReady(); } /** @@ -538,7 +199,6 @@ class WebSocketShard extends EventEmitter { ); this.readyTimeout = null; - this.status = Status.Ready; this.emit(WebSocketShardEvents.AllReady, this.expectedGuilds); @@ -547,187 +207,6 @@ class WebSocketShard extends EventEmitter { ).unref(); } - /** - * Sets the HELLO packet timeout. - * @param {number} [time] If set to -1, it will clear the hello timeout - * @private - */ - setHelloTimeout(time) { - if (time === -1) { - if (this.helloTimeout) { - this.debug('Clearing the HELLO timeout.'); - clearTimeout(this.helloTimeout); - this.helloTimeout = null; - } - return; - } - this.debug('Setting a HELLO timeout for 20s.'); - this.helloTimeout = setTimeout(() => { - this.debug('Did not receive HELLO in time. Destroying and connecting again.'); - this.destroy({ reset: true, closeCode: 4009 }); - }, 20_000).unref(); - } - - /** - * Sets the WebSocket Close timeout. - * This method is responsible for detecting any zombie connections if the WebSocket fails to close properly. - * @param {number} [time] If set to -1, it will clear the timeout - * @private - */ - setWsCloseTimeout(time) { - if (this.wsCloseTimeout) { - this.debug('[WebSocket] Clearing the close timeout.'); - clearTimeout(this.wsCloseTimeout); - } - if (time === -1) { - this.wsCloseTimeout = null; - return; - } - this.wsCloseTimeout = setTimeout(() => { - this.setWsCloseTimeout(-1); - this.debug(`[WebSocket] Close Emitted: ${this.closeEmitted}`); - // Check if close event was emitted. - if (this.closeEmitted) { - this.debug( - `[WebSocket] was closed. | WS State: ${ - CONNECTION_STATE[this.connection?.readyState ?? WebSocket.CLOSED] - } | Close Emitted: ${this.closeEmitted}`, - ); - // Setting the variable false to check for zombie connections. - this.closeEmitted = false; - return; - } - - this.debug( - `[WebSocket] did not close properly, assuming a zombie connection.\nEmitting close and reconnecting again.`, - ); - - this.emitClose(); - // Setting the variable false to check for zombie connections. - this.closeEmitted = false; - }, time).unref(); - } - - /** - * Sets the heartbeat timer for this shard. - * @param {number} time If -1, clears the interval, any other number sets an interval - * @private - */ - setHeartbeatTimer(time) { - if (time === -1) { - if (this.heartbeatInterval) { - this.debug('Clearing the heartbeat interval.'); - clearInterval(this.heartbeatInterval); - this.heartbeatInterval = null; - } - return; - } - this.debug(`Setting a heartbeat interval for ${time}ms.`); - // Sanity checks - if (this.heartbeatInterval) clearInterval(this.heartbeatInterval); - this.heartbeatInterval = setInterval(() => this.sendHeartbeat(), time).unref(); - } - - /** - * Sends a heartbeat to the WebSocket. - * If this shard didn't receive a heartbeat last time, it will destroy it and reconnect - * @param {string} [tag='HeartbeatTimer'] What caused this heartbeat to be sent - * @param {boolean} [ignoreHeartbeatAck] If we should send the heartbeat forcefully. - * @private - */ - sendHeartbeat( - tag = 'HeartbeatTimer', - ignoreHeartbeatAck = [Status.WaitingForGuilds, Status.Identifying, Status.Resuming].includes(this.status), - ) { - if (ignoreHeartbeatAck && !this.lastHeartbeatAcked) { - this.debug(`[${tag}] Didn't process heartbeat ack yet but we are still connected. Sending one now.`); - } else if (!this.lastHeartbeatAcked) { - this.debug( - `[${tag}] Didn't receive a heartbeat ack last time, assuming zombie connection. Destroying and reconnecting. - Status : ${STATUS_KEYS[this.status]} - Sequence : ${this.sequence} - Connection State: ${this.connection ? CONNECTION_STATE[this.connection.readyState] : 'No Connection??'}`, - ); - - this.destroy({ reset: true, closeCode: 4009 }); - return; - } - - this.debug(`[${tag}] Sending a heartbeat.`); - this.lastHeartbeatAcked = false; - this.lastPingTimestamp = Date.now(); - this.send({ op: GatewayOpcodes.Heartbeat, d: this.sequence }, true); - } - - /** - * Acknowledges a heartbeat. - * @private - */ - ackHeartbeat() { - this.lastHeartbeatAcked = true; - const latency = Date.now() - this.lastPingTimestamp; - this.debug(`Heartbeat acknowledged, latency of ${latency}ms.`); - this.ping = latency; - } - - /** - * Identifies the client on the connection. - * @private - * @returns {void} - */ - identify() { - return this.sessionId ? this.identifyResume() : this.identifyNew(); - } - - /** - * Identifies as a new connection on the gateway. - * @private - */ - identifyNew() { - const { client } = this.manager; - if (!client.token) { - this.debug('[IDENTIFY] No token available to identify a new session.'); - return; - } - - this.status = Status.Identifying; - - // Clone the identify payload and assign the token and shard info - const d = { - ...client.options.ws, - intents: client.options.intents.bitfield, - token: client.token, - shard: [this.id, Number(client.options.shardCount)], - }; - - this.debug(`[IDENTIFY] Shard ${this.id}/${client.options.shardCount} with intents: ${d.intents}`); - this.send({ op: GatewayOpcodes.Identify, d }, true); - } - - /** - * Resumes a session on the gateway. - * @private - */ - identifyResume() { - if (!this.sessionId) { - this.debug('[RESUME] No session id was present; identifying as a new session.'); - this.identifyNew(); - return; - } - - this.status = Status.Resuming; - - this.debug(`[RESUME] Session ${this.sessionId}, sequence ${this.closeSequence}`); - - const d = { - token: this.manager.client.token, - session_id: this.sessionId, - seq: this.closeSequence, - }; - - this.send({ op: GatewayOpcodes.Resume, d }, true); - } - /** * Adds a packet to the queue to be sent to the gateway. * If you use this method, make sure you understand that you need to provide @@ -735,163 +214,17 @@ class WebSocketShard extends EventEmitter { * Do not use this method if you don't know what you're doing. * @param {Object} data The full packet to send * @param {boolean} [important=false] If this packet should be added first in queue + * This parameter is **deprecated**. Important payloads are determined by their opcode instead. */ send(data, important = false) { - this.ratelimit.queue[important ? 'unshift' : 'push'](data); - this.processQueue(); - } - - /** - * Sends data, bypassing the queue. - * @param {Object} data Packet to send - * @returns {void} - * @private - */ - _send(data) { - if (this.connection?.readyState !== WebSocket.OPEN) { - this.debug( - `Tried to send packet '${JSON.stringify(data).replaceAll( - this.manager.client.token, - this.manager.client._censoredToken, - )}' but no WebSocket is available!`, - ); - this.destroy({ closeCode: 4_000 }); - return; - } - - this.connection.send(WebSocket.pack(data), err => { - if (err) this.manager.client.emit(Events.ShardError, err, this.id); - }); - } - - /** - * Processes the current WebSocket queue. - * @returns {void} - * @private - */ - processQueue() { - if (this.ratelimit.remaining === 0) return; - if (this.ratelimit.queue.length === 0) return; - if (this.ratelimit.remaining === this.ratelimit.total) { - this.ratelimit.timer = setTimeout(() => { - this.ratelimit.remaining = this.ratelimit.total; - this.processQueue(); - }, this.ratelimit.time).unref(); - } - while (this.ratelimit.remaining > 0) { - const item = this.ratelimit.queue.shift(); - if (!item) return; - this._send(item); - this.ratelimit.remaining--; - } - } - - /** - * Destroys this shard and closes its WebSocket connection. - * @param {Object} [options={ closeCode: 1000, reset: false, emit: true, log: true }] Options for destroying the shard - * @private - */ - destroy({ closeCode = 1_000, reset = false, emit = true, log = true } = {}) { - if (log) { - this.debug(`[DESTROY] - Close Code : ${closeCode} - Reset : ${reset} - Emit DESTROYED: ${emit}`); - } - - // Step 0: Remove all timers - this.setHeartbeatTimer(-1); - this.setHelloTimeout(-1); - - this.debug( - `[WebSocket] Destroy: Attempting to close the WebSocket. | WS State: ${ - CONNECTION_STATE[this.connection?.readyState ?? WebSocket.CLOSED] - }`, - ); - // Step 1: Close the WebSocket connection, if any, otherwise, emit DESTROYED - if (this.connection) { - // If the connection is currently opened, we will (hopefully) receive close - if (this.connection.readyState === WebSocket.OPEN) { - this.connection.close(closeCode); - this.debug(`[WebSocket] Close: Tried closing. | WS State: ${CONNECTION_STATE[this.connection.readyState]}`); - } else { - // Connection is not OPEN - this.debug(`WS State: ${CONNECTION_STATE[this.connection.readyState]}`); - // Remove listeners from the connection - this._cleanupConnection(); - // Attempt to close the connection just in case - try { - this.connection.close(closeCode); - } catch (err) { - this.debug( - `[WebSocket] Close: Something went wrong while closing the WebSocket: ${ - err.message || err - }. Forcefully terminating the connection | WS State: ${CONNECTION_STATE[this.connection.readyState]}`, - ); - this.connection.terminate(); - } - // Emit the destroyed event if needed - if (emit) this._emitDestroyed(); - } - } else if (emit) { - // We requested a destroy, but we had no connection. Emit destroyed - this._emitDestroyed(); - } - - if (this.connection?.readyState === WebSocket.CLOSING || this.connection?.readyState === WebSocket.CLOSED) { - this.closeEmitted = false; - this.debug( - `[WebSocket] Adding a WebSocket close timeout to ensure a correct WS reconnect. - Timeout: ${this.manager.client.options.closeTimeout}ms`, + if (important && !deprecationEmittedForImportant) { + process.emitWarning( + 'Sending important payloads explicitly is deprecated. They are determined by their opcode implicitly now.', + 'DeprecationWarning', ); - this.setWsCloseTimeout(this.manager.client.options.closeTimeout); - } - - // Step 2: Null the connection object - this.connection = null; - - // Step 3: Set the shard status to disconnected - this.status = Status.Disconnected; - - // Step 4: Cache the old sequence (use to attempt a resume) - if (this.sequence !== -1) this.closeSequence = this.sequence; - - // Step 5: Reset the sequence, resume url and session id if requested - if (reset) { - this.sequence = -1; - this.sessionId = null; - this.resumeURL = null; + deprecationEmittedForImportant = true; } - - // Step 6: reset the rate limit data - this.ratelimit.remaining = this.ratelimit.total; - this.ratelimit.queue.length = 0; - if (this.ratelimit.timer) { - clearTimeout(this.ratelimit.timer); - this.ratelimit.timer = null; - } - } - - /** - * Cleans up the WebSocket connection listeners. - * @private - */ - _cleanupConnection() { - this.connection.onopen = this.connection.onclose = this.connection.onmessage = null; - this.connection.onerror = () => null; - } - - /** - * Emits the DESTROYED event on the shard - * @private - */ - _emitDestroyed() { - /** - * Emitted when a shard is destroyed, but no WebSocket connection was present. - * @private - * @event WebSocketShard#destroyed - */ - this.emit(WebSocketShardEvents.Destroyed); + this.manager._ws.send(this.id, data); } } diff --git a/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js new file mode 100644 index 000000000000..22463b6e1eee --- /dev/null +++ b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = (client, packet) => { + client.actions.AutoModerationActionExecution.handle(packet.d); +}; diff --git a/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js new file mode 100644 index 000000000000..af64b9cbcc98 --- /dev/null +++ b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = (client, packet) => { + client.actions.AutoModerationRuleCreate.handle(packet.d); +}; diff --git a/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js new file mode 100644 index 000000000000..56ec504a9460 --- /dev/null +++ b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = (client, packet) => { + client.actions.AutoModerationRuleDelete.handle(packet.d); +}; diff --git a/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js new file mode 100644 index 000000000000..3caf6ba55028 --- /dev/null +++ b/packages/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = (client, packet) => { + client.actions.AutoModerationRuleUpdate.handle(packet.d); +}; diff --git a/packages/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js b/packages/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js new file mode 100644 index 000000000000..8623141669eb --- /dev/null +++ b/packages/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = (client, packet) => { + client.actions.GuildAuditLogEntryCreate.handle(packet.d); +}; diff --git a/packages/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js b/packages/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js index 6f7ca7efd4e8..2f61a1ea2c27 100644 --- a/packages/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js +++ b/packages/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js @@ -18,6 +18,8 @@ module.exports = (client, { d: data }) => { * @typedef {Object} GuildMembersChunk * @property {number} index Index of the received chunk * @property {number} count Number of chunks the client should receive + * @property {Array<*>} notFound An array of whatever could not be found + * when using {@link GatewayOpcodes.RequestGuildMembers} * @property {?string} nonce Nonce for this chunk */ @@ -29,8 +31,9 @@ module.exports = (client, { d: data }) => { * @param {GuildMembersChunk} chunk Properties of the received chunk */ client.emit(Events.GuildMembersChunk, members, guild, { - count: data.chunk_count, index: data.chunk_index, + count: data.chunk_count, + notFound: data.not_found, nonce: data.nonce, }); }; diff --git a/packages/discord.js/src/client/websocket/handlers/RESUMED.js b/packages/discord.js/src/client/websocket/handlers/RESUMED.js index 39824bc9242d..27ed7ddc5df3 100644 --- a/packages/discord.js/src/client/websocket/handlers/RESUMED.js +++ b/packages/discord.js/src/client/websocket/handlers/RESUMED.js @@ -3,7 +3,7 @@ const Events = require('../../../util/Events'); module.exports = (client, packet, shard) => { - const replayed = shard.sequence - shard.closeSequence; + const replayed = shard.sessionInfo.sequence - shard.closeSequence; /** * Emitted when a shard resumes successfully. * @event Client#shardResume diff --git a/packages/discord.js/src/client/websocket/handlers/index.js b/packages/discord.js/src/client/websocket/handlers/index.js index c6b6bf53b4d6..f175dbe22d9b 100644 --- a/packages/discord.js/src/client/websocket/handlers/index.js +++ b/packages/discord.js/src/client/websocket/handlers/index.js @@ -2,10 +2,15 @@ const handlers = Object.fromEntries([ ['APPLICATION_COMMAND_PERMISSIONS_UPDATE', require('./APPLICATION_COMMAND_PERMISSIONS_UPDATE')], + ['AUTO_MODERATION_ACTION_EXECUTION', require('./AUTO_MODERATION_ACTION_EXECUTION')], + ['AUTO_MODERATION_RULE_CREATE', require('./AUTO_MODERATION_RULE_CREATE')], + ['AUTO_MODERATION_RULE_DELETE', require('./AUTO_MODERATION_RULE_DELETE')], + ['AUTO_MODERATION_RULE_UPDATE', require('./AUTO_MODERATION_RULE_UPDATE')], ['CHANNEL_CREATE', require('./CHANNEL_CREATE')], ['CHANNEL_DELETE', require('./CHANNEL_DELETE')], ['CHANNEL_PINS_UPDATE', require('./CHANNEL_PINS_UPDATE')], ['CHANNEL_UPDATE', require('./CHANNEL_UPDATE')], + ['GUILD_AUDIT_LOG_ENTRY_CREATE', require('./GUILD_AUDIT_LOG_ENTRY_CREATE')], ['GUILD_BAN_ADD', require('./GUILD_BAN_ADD')], ['GUILD_BAN_REMOVE', require('./GUILD_BAN_REMOVE')], ['GUILD_CREATE', require('./GUILD_CREATE')], diff --git a/packages/discord.js/src/errors/ErrorCodes.js b/packages/discord.js/src/errors/ErrorCodes.js index b5faf0c1cefa..9cd2f4dab36c 100644 --- a/packages/discord.js/src/errors/ErrorCodes.js +++ b/packages/discord.js/src/errors/ErrorCodes.js @@ -13,16 +13,23 @@ * @property {'ApplicationCommandPermissionsTokenMissing'} ApplicationCommandPermissionsTokenMissing * @property {'WSCloseRequested'} WSCloseRequested + * This property is deprecated. * @property {'WSConnectionExists'} WSConnectionExists + * This property is deprecated. * @property {'WSNotOpen'} WSNotOpen + * This property is deprecated. * @property {'ManagerDestroyed'} ManagerDestroyed * @property {'BitFieldInvalid'} BitFieldInvalid * @property {'ShardingInvalid'} ShardingInvalid + * This property is deprecated. * @property {'ShardingRequired'} ShardingRequired + * This property is deprecated. * @property {'InvalidIntents'} InvalidIntents + * This property is deprecated. * @property {'DisallowedIntents'} DisallowedIntents + * This property is deprecated. * @property {'ShardingNoShards'} ShardingNoShards * @property {'ShardingInProcess'} ShardingInProcess * @property {'ShardingInvalidEvalBroadcast'} ShardingInvalidEvalBroadcast @@ -106,7 +113,10 @@ * @property {'EmojiType'} EmojiType * @property {'EmojiManaged'} EmojiManaged + * @property {'MissingManageGuildExpressionsPermission'} MissingManageGuildExpressionsPermission * @property {'MissingManageEmojisAndStickersPermission'} MissingManageEmojisAndStickersPermission + * This property is deprecated. Use `MissingManageGuildExpressionsPermission` instead. + * * @property {'NotGuildSticker'} NotGuildSticker * @property {'ReactionResolveUser'} ReactionResolveUser @@ -135,12 +145,14 @@ * @property {'CommandInteractionOptionEmpty'} CommandInteractionOptionEmpty * @property {'CommandInteractionOptionNoSubcommand'} CommandInteractionOptionNoSubcommand * @property {'CommandInteractionOptionNoSubcommandGroup'} CommandInteractionOptionNoSubcommandGroup + * @property {'CommandInteractionOptionInvalidChannelType'} CommandInteractionOptionInvalidChannelType * @property {'AutocompleteInteractionOptionNoFocusedOption'} AutocompleteInteractionOptionNoFocusedOption * @property {'ModalSubmitInteractionFieldNotFound'} ModalSubmitInteractionFieldNotFound * @property {'ModalSubmitInteractionFieldType'} ModalSubmitInteractionFieldType * @property {'InvalidMissingScopes'} InvalidMissingScopes + * @property {'InvalidScopesWithPermissions'} InvalidScopesWithPermissions * @property {'NotImplemented'} NotImplemented @@ -253,7 +265,9 @@ const keys = [ 'EmojiType', 'EmojiManaged', + 'MissingManageGuildExpressionsPermission', 'MissingManageEmojisAndStickersPermission', + 'NotGuildSticker', 'ReactionResolveUser', @@ -281,12 +295,14 @@ const keys = [ 'CommandInteractionOptionEmpty', 'CommandInteractionOptionNoSubcommand', 'CommandInteractionOptionNoSubcommandGroup', + 'CommandInteractionOptionInvalidChannelType', 'AutocompleteInteractionOptionNoFocusedOption', 'ModalSubmitInteractionFieldNotFound', 'ModalSubmitInteractionFieldType', 'InvalidMissingScopes', + 'InvalidScopesWithPermissions', 'NotImplemented', diff --git a/packages/discord.js/src/errors/Messages.js b/packages/discord.js/src/errors/Messages.js index 24437b5023c9..550219f59ed7 100644 --- a/packages/discord.js/src/errors/Messages.js +++ b/packages/discord.js/src/errors/Messages.js @@ -111,8 +111,11 @@ const Messages = { [DjsErrorCodes.EmojiType]: 'Emoji must be a string or GuildEmoji/ReactionEmoji', [DjsErrorCodes.EmojiManaged]: 'Emoji is managed and has no Author.', + [DjsErrorCodes.MissingManageGuildExpressionsPermission]: guild => + `Client must have Manage Guild Expressions permission in guild ${guild} to see emoji authors.`, [DjsErrorCodes.MissingManageEmojisAndStickersPermission]: guild => `Client must have Manage Emojis and Stickers permission in guild ${guild} to see emoji authors.`, + [DjsErrorCodes.NotGuildSticker]: 'Sticker is a standard (non-guild) sticker and has no author.', [DjsErrorCodes.ReactionResolveUser]: "Couldn't resolve the user id to remove from the reaction.", @@ -145,6 +148,8 @@ const Messages = { `Required option "${name}" is of type: ${type}; expected a non-empty value.`, [DjsErrorCodes.CommandInteractionOptionNoSubcommand]: 'No subcommand specified for interaction.', [DjsErrorCodes.CommandInteractionOptionNoSubcommandGroup]: 'No subcommand group specified for interaction.', + [DjsErrorCodes.CommandInteractionOptionInvalidChannelType]: (name, type, expected) => + `The type of channel of the option "${name}" is: ${type}; expected ${expected}.`, [DjsErrorCodes.AutocompleteInteractionOptionNoFocusedOption]: 'No focused option for autocomplete interaction.', [DjsErrorCodes.ModalSubmitInteractionFieldNotFound]: customId => @@ -153,6 +158,7 @@ const Messages = { `Field with custom id "${customId}" is of type: ${type}; expected ${expected}.`, [DjsErrorCodes.InvalidMissingScopes]: 'At least one valid scope must be provided for the invite', + [DjsErrorCodes.InvalidScopesWithPermissions]: 'Permissions cannot be set without the bot scope.', [DjsErrorCodes.NotImplemented]: (what, name) => `Method ${what} not implemented on ${name}.`, diff --git a/packages/discord.js/src/index.js b/packages/discord.js/src/index.js index 61927e2b964c..c7c530ced537 100644 --- a/packages/discord.js/src/index.js +++ b/packages/discord.js/src/index.js @@ -28,6 +28,7 @@ exports.Colors = require('./util/Colors'); exports.DataResolver = require('./util/DataResolver'); exports.Events = require('./util/Events'); exports.Formatters = require('./util/Formatters'); +exports.GuildMemberFlagsBitField = require('./util/GuildMemberFlagsBitField').GuildMemberFlagsBitField; exports.IntentsBitField = require('./util/IntentsBitField'); exports.LimitedCollection = require('./util/LimitedCollection'); exports.MessageFlagsBitField = require('./util/MessageFlagsBitField'); @@ -48,6 +49,7 @@ exports.version = require('../package.json').version; // Managers exports.ApplicationCommandManager = require('./managers/ApplicationCommandManager'); exports.ApplicationCommandPermissionsManager = require('./managers/ApplicationCommandPermissionsManager'); +exports.AutoModerationRuleManager = require('./managers/AutoModerationRuleManager'); exports.BaseGuildEmojiManager = require('./managers/BaseGuildEmojiManager'); exports.CachedManager = require('./managers/CachedManager'); exports.ChannelManager = require('./managers/ChannelManager'); @@ -87,7 +89,11 @@ exports.Activity = require('./structures/Presence').Activity; exports.AnonymousGuild = require('./structures/AnonymousGuild'); exports.Application = require('./structures/interfaces/Application'); exports.ApplicationCommand = require('./structures/ApplicationCommand'); +exports.ApplicationRoleConnectionMetadata = + require('./structures/ApplicationRoleConnectionMetadata').ApplicationRoleConnectionMetadata; exports.AutocompleteInteraction = require('./structures/AutocompleteInteraction'); +exports.AutoModerationActionExecution = require('./structures/AutoModerationActionExecution'); +exports.AutoModerationRule = require('./structures/AutoModerationRule'); exports.Base = require('./structures/Base'); exports.BaseGuild = require('./structures/BaseGuild'); exports.BaseGuildEmoji = require('./structures/BaseGuildEmoji'); @@ -198,10 +204,10 @@ exports.WidgetMember = require('./structures/WidgetMember'); exports.WelcomeChannel = require('./structures/WelcomeChannel'); exports.WelcomeScreen = require('./structures/WelcomeScreen'); -exports.WebSocket = require('./WebSocket'); - // External __exportStar(require('discord-api-types/v10'), exports); __exportStar(require('@discordjs/builders'), exports); +__exportStar(require('@discordjs/formatters'), exports); __exportStar(require('@discordjs/rest'), exports); __exportStar(require('@discordjs/util'), exports); +__exportStar(require('@discordjs/ws'), exports); diff --git a/packages/discord.js/src/managers/ApplicationCommandManager.js b/packages/discord.js/src/managers/ApplicationCommandManager.js index 2e9e2d8f69a7..417afc4d3381 100644 --- a/packages/discord.js/src/managers/ApplicationCommandManager.js +++ b/packages/discord.js/src/managers/ApplicationCommandManager.js @@ -1,8 +1,8 @@ 'use strict'; -const { isJSONEncodable } = require('@discordjs/builders'); const { Collection } = require('@discordjs/collection'); const { makeURLSearchParams } = require('@discordjs/rest'); +const { isJSONEncodable } = require('@discordjs/util'); const { Routes } = require('discord-api-types/v10'); const ApplicationCommandPermissionsManager = require('./ApplicationCommandPermissionsManager'); const CachedManager = require('./CachedManager'); @@ -66,12 +66,10 @@ class ApplicationCommandManager extends CachedManager { * @typedef {ApplicationCommand|Snowflake} ApplicationCommandResolvable */ - /* eslint-disable max-len */ /** * Data that resolves to the data of an ApplicationCommand - * @typedef {ApplicationCommandData|APIApplicationCommand|JSONEncodable} ApplicationCommandDataResolvable + * @typedef {ApplicationCommandData|APIApplicationCommand} ApplicationCommandDataResolvable */ - /* eslint-enable max-len */ /** * Options used to fetch data from Discord @@ -252,6 +250,7 @@ class ApplicationCommandManager extends CachedManager { name: command.name, name_localizations: command.nameLocalizations ?? command.name_localizations, description: command.description, + nsfw: command.nsfw, description_localizations: command.descriptionLocalizations ?? command.description_localizations, type: command.type, options: command.options?.map(o => ApplicationCommand.transformOption(o)), diff --git a/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js b/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js index d489e583c3cb..2f7279ae3cf4 100644 --- a/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js +++ b/packages/discord.js/src/managers/ApplicationCommandPermissionsManager.js @@ -112,14 +112,14 @@ class ApplicationCommandPermissionsManager extends BaseManager { * Options used to set permissions for one or more Application Commands in a guild * Omitting the `command` parameter edits the guild wide permissions * when the manager's `commandId` is `null` - * @typedef {BaseApplicationCommandPermissionsOptions} EditApplicationCommandPermissionsOptions + * @typedef {BaseApplicationCommandPermissionsOptions} ApplicationCommandPermissionsEditOptions * @property {ApplicationCommandPermissions[]} permissions The new permissions for the guild or overwrite * @property {string} token The bearer token to use that authorizes the permission edit */ /** * Sets the permissions for the guild or a command overwrite. - * @param {EditApplicationCommandPermissionsOptions} options Options used to set permissions + * @param {ApplicationCommandPermissionsEditOptions} options Options used to set permissions * @returns {Promise>} * @example * // Set a permission overwrite for a command @@ -179,7 +179,7 @@ class ApplicationCommandPermissionsManager extends BaseManager { /** * Add permissions to a command. - * @param {EditApplicationCommandPermissionsOptions} options Options used to add permissions + * @param {ApplicationCommandPermissionsEditOptions} options Options used to add permissions * @returns {Promise} * @example * // Add a rule to block a role from using a command diff --git a/packages/discord.js/src/managers/AutoModerationRuleManager.js b/packages/discord.js/src/managers/AutoModerationRuleManager.js new file mode 100644 index 000000000000..dd0ee4eea3ae --- /dev/null +++ b/packages/discord.js/src/managers/AutoModerationRuleManager.js @@ -0,0 +1,288 @@ +'use strict'; + +const { Collection } = require('@discordjs/collection'); +const { Routes } = require('discord-api-types/v10'); +const CachedManager = require('./CachedManager'); +const AutoModerationRule = require('../structures/AutoModerationRule'); + +/** + * Manages API methods for auto moderation rules and stores their cache. + * @extends {CachedManager} + */ +class AutoModerationRuleManager extends CachedManager { + constructor(guild, iterable) { + super(guild.client, AutoModerationRule, iterable); + + /** + * The guild this manager belongs to. + * @type {Guild} + */ + this.guild = guild; + } + + /** + * The cache of this manager + * @type {Collection} + * @name AutoModerationRuleManager#cache + */ + + /** + * Resolves an {@link AutoModerationRuleResolvable} to an {@link AutoModerationRule} object. + * @method resolve + * @memberof AutoModerationRuleManager + * @instance + * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve + * @returns {?AutoModerationRule} + */ + + /** + * Resolves an {@link AutoModerationRuleResolvable} to a {@link AutoModerationRule} id. + * @method resolveId + * @memberof AutoModerationRuleManager + * @instance + * @param {AutoModerationRuleResolvable} autoModerationRule The AutoModerationRule resolvable to resolve + * @returns {?Snowflake} + */ + + _add(data, cache) { + return super._add(data, cache, { extras: [this.guild] }); + } + + /** + * Options used to set the trigger metadata of an auto moderation rule. + * @typedef {Object} AutoModerationTriggerMetadataOptions + * @property {string[]} [keywordFilter] The substrings that will be searched for in the content + * @property {string[]} [regexPatterns] The regular expression patterns which will be matched against the content + * Only Rust-flavored regular expressions are supported. + * @property {AutoModerationRuleKeywordPresetType[]} [presets] + * The internally pre-defined wordsets which will be searched for in the content + * @property {string[]} [allowList] The substrings that will be exempt from triggering + * {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset} + * @property {?number} [mentionTotalLimit] The total number of role & user mentions allowed per message + * @property {boolean} [mentionRaidProtectionEnabled] Whether to automatically detect mention raids + */ + + /** + * Options used to set the actions of an auto moderation rule. + * @typedef {Object} AutoModerationActionOptions + * @property {AutoModerationActionType} type The type of this auto moderation rule action + * @property {AutoModerationActionMetadataOptions} [metadata] Additional metadata needed during execution + * This property is required if using a `type` of + * {@link AutoModerationActionType.SendAlertMessage} or {@link AutoModerationActionType.Timeout}. + */ + + /** + * Options used to set the metadata of an auto moderation rule action. + * @typedef {Object} AutoModerationActionMetadataOptions + * @property {GuildTextChannelResolvable|ThreadChannel} [channel] The channel to which content will be logged + * @property {number} [durationSeconds] The timeout duration in seconds + * @property {string} [customMessage] The custom message that is shown whenever a message is blocked + */ + + /** + * Options used to create an auto moderation rule. + * @typedef {Object} AutoModerationRuleCreateOptions + * @property {string} name The name of the auto moderation rule + * @property {AutoModerationRuleEventType} eventType The event type of the auto moderation rule + * @property {AutoModerationRuleTriggerType} triggerType The trigger type of the auto moderation rule + * @property {AutoModerationTriggerMetadataOptions} [triggerMetadata] The trigger metadata of the auto moderation rule + * This property is required if using a `triggerType` of + * {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, + * or {@link AutoModerationRuleTriggerType.MentionSpam}. + * @property {AutoModerationActionOptions[]} actions + * The actions that will execute when the auto moderation rule is triggered + * @property {boolean} [enabled] Whether the auto moderation rule should be enabled + * @property {Collection|RoleResolvable[]} [exemptRoles] + * The roles that should not be affected by the auto moderation rule + * @property {Collection|GuildChannelResolvable[]} [exemptChannels] + * The channels that should not be affected by the auto moderation rule + * @property {string} [reason] The reason for creating the auto moderation rule + */ + + /** + * Creates a new auto moderation rule. + * @param {AutoModerationRuleCreateOptions} options Options for creating the auto moderation rule + * @returns {Promise} + */ + async create({ + name, + eventType, + triggerType, + triggerMetadata, + actions, + enabled, + exemptRoles, + exemptChannels, + reason, + }) { + const data = await this.client.rest.post(Routes.guildAutoModerationRules(this.guild.id), { + body: { + name, + event_type: eventType, + trigger_type: triggerType, + trigger_metadata: triggerMetadata && { + keyword_filter: triggerMetadata.keywordFilter, + regex_patterns: triggerMetadata.regexPatterns, + presets: triggerMetadata.presets, + allow_list: triggerMetadata.allowList, + mention_total_limit: triggerMetadata.mentionTotalLimit, + mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled, + }, + actions: actions.map(action => ({ + type: action.type, + metadata: { + duration_seconds: action.metadata?.durationSeconds, + channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel), + custom_message: action.metadata?.customMessage, + }, + })), + enabled, + exempt_roles: exemptRoles?.map(exemptRole => this.guild.roles.resolveId(exemptRole)), + exempt_channels: exemptChannels?.map(exemptChannel => this.guild.channels.resolveId(exemptChannel)), + }, + reason, + }); + + return this._add(data); + } + + /** + * Options used to edit an auto moderation rule. + * @typedef {Object} AutoModerationRuleEditOptions + * @property {string} [name] The name of the auto moderation rule + * @property {AutoModerationRuleEventType} [eventType] The event type of the auto moderation rule + * @property {AutoModerationTriggerMetadataOptions} [triggerMetadata] The trigger metadata of the auto moderation rule + * @property {AutoModerationActionOptions[]} [actions] + * The actions that will execute when the auto moderation rule is triggered + * @property {boolean} [enabled] Whether the auto moderation rule should be enabled + * @property {Collection|RoleResolvable[]} [exemptRoles] + * The roles that should not be affected by the auto moderation rule + * @property {Collection|GuildChannelResolvable[]} [exemptChannels] + * The channels that should not be affected by the auto moderation rule + * @property {string} [reason] The reason for creating the auto moderation rule + */ + + /** + * Edits an auto moderation rule. + * @param {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to edit + * @param {AutoModerationRuleEditOptions} options Options for editing the auto moderation rule + * @returns {Promise} + */ + async edit( + autoModerationRule, + { name, eventType, triggerMetadata, actions, enabled, exemptRoles, exemptChannels, reason }, + ) { + const autoModerationRuleId = this.resolveId(autoModerationRule); + + const data = await this.client.rest.patch(Routes.guildAutoModerationRule(this.guild.id, autoModerationRuleId), { + body: { + name, + event_type: eventType, + trigger_metadata: triggerMetadata && { + keyword_filter: triggerMetadata.keywordFilter, + regex_patterns: triggerMetadata.regexPatterns, + presets: triggerMetadata.presets, + allow_list: triggerMetadata.allowList, + mention_total_limit: triggerMetadata.mentionTotalLimit, + mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled, + }, + actions: actions?.map(action => ({ + type: action.type, + metadata: { + duration_seconds: action.metadata?.durationSeconds, + channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel), + custom_message: action.metadata?.customMessage, + }, + })), + enabled, + exempt_roles: exemptRoles?.map(exemptRole => this.guild.roles.resolveId(exemptRole)), + exempt_channels: exemptChannels?.map(exemptChannel => this.guild.channels.resolveId(exemptChannel)), + }, + reason, + }); + + return this._add(data); + } + + /** + * Data that can be resolved to give an AutoModerationRule object. This can be: + * * An AutoModerationRule + * * A Snowflake + * @typedef {AutoModerationRule|Snowflake} AutoModerationRuleResolvable + */ + + /** + * Options used to fetch a single auto moderation rule from a guild. + * @typedef {BaseFetchOptions} FetchAutoModerationRuleOptions + * @property {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to fetch + */ + + /** + * Options used to fetch all auto moderation rules from a guild. + * @typedef {Object} FetchAutoModerationRulesOptions + * @property {boolean} [cache] Whether to cache the fetched auto moderation rules + */ + + /** + * Fetches auto moderation rules from Discord. + * @param {AutoModerationRuleResolvable|FetchAutoModerationRuleOptions|FetchAutoModerationRulesOptions} [options] + * Options for fetching auto moderation rule(s) + * @returns {Promise>} + * @example + * // Fetch all auto moderation rules from a guild without caching + * guild.autoModerationRules.fetch({ cache: false }) + * .then(console.log) + * .catch(console.error); + * @example + * // Fetch a single auto moderation rule + * guild.autoModerationRules.fetch('979083472868098119') + * .then(console.log) + * .catch(console.error); + * @example + * // Fetch a single auto moderation rule without checking cache and without caching + * guild.autoModerationRules.fetch({ autoModerationRule: '979083472868098119', cache: false, force: true }) + * .then(console.log) + * .catch(console.error) + */ + fetch(options) { + if (!options) return this._fetchMany(); + const { autoModerationRule, cache, force } = options; + const resolvedAutoModerationRule = this.resolveId(autoModerationRule ?? options); + if (resolvedAutoModerationRule) { + return this._fetchSingle({ autoModerationRule: resolvedAutoModerationRule, cache, force }); + } + return this._fetchMany(options); + } + + async _fetchSingle({ autoModerationRule, cache, force = false }) { + if (!force) { + const existing = this.cache.get(autoModerationRule); + if (existing) return existing; + } + + const data = await this.client.rest.get(Routes.guildAutoModerationRule(this.guild.id, autoModerationRule)); + return this._add(data, cache); + } + + async _fetchMany(options = {}) { + const data = await this.client.rest.get(Routes.guildAutoModerationRules(this.guild.id)); + + return data.reduce( + (col, autoModerationRule) => col.set(autoModerationRule.id, this._add(autoModerationRule, options.cache)), + new Collection(), + ); + } + + /** + * Deletes an auto moderation rule. + * @param {AutoModerationRuleResolvable} autoModerationRule The auto moderation rule to delete + * @param {string} [reason] The reason for deleting the auto moderation rule + * @returns {Promise} + */ + async delete(autoModerationRule, reason) { + const autoModerationRuleId = this.resolveId(autoModerationRule); + await this.client.rest.delete(Routes.guildAutoModerationRule(this.guild.id, autoModerationRuleId), { reason }); + } +} + +module.exports = AutoModerationRuleManager; diff --git a/packages/discord.js/src/managers/BaseGuildEmojiManager.js b/packages/discord.js/src/managers/BaseGuildEmojiManager.js index a9bbbff50ec7..89eee4c95a32 100644 --- a/packages/discord.js/src/managers/BaseGuildEmojiManager.js +++ b/packages/discord.js/src/managers/BaseGuildEmojiManager.js @@ -50,9 +50,9 @@ class BaseGuildEmojiManager extends CachedManager { /** * Data that can be resolved to give an emoji identifier. This can be: - * * The unicode representation of an emoji - * * The ``, `<:name:id>`, `a:name:id` or `name:id` emoji identifier string of an emoji * * An EmojiResolvable + * * The ``, `<:name:id>`, `a:name:id` or `name:id` emoji identifier string of an emoji + * * The Unicode representation of an emoji * @typedef {string|EmojiResolvable} EmojiIdentifierResolvable */ diff --git a/packages/discord.js/src/managers/CachedManager.js b/packages/discord.js/src/managers/CachedManager.js index 1058285d300e..e0ce0f8a52ca 100644 --- a/packages/discord.js/src/managers/CachedManager.js +++ b/packages/discord.js/src/managers/CachedManager.js @@ -11,6 +11,13 @@ class CachedManager extends DataManager { constructor(client, holds, iterable) { super(client, holds); + /** + * The private cache of items for this manager. + * @type {Collection} + * @private + * @readonly + * @name CachedManager#_cache + */ Object.defineProperty(this, '_cache', { value: this.client.options.makeCache(this.constructor, this.holds) }); if (iterable) { diff --git a/packages/discord.js/src/managers/CategoryChannelChildManager.js b/packages/discord.js/src/managers/CategoryChannelChildManager.js index 61155f269509..347526ab1766 100644 --- a/packages/discord.js/src/managers/CategoryChannelChildManager.js +++ b/packages/discord.js/src/managers/CategoryChannelChildManager.js @@ -56,6 +56,7 @@ class CategoryChannelChildManager extends DataManager { * @property {ThreadAutoArchiveDuration} [defaultAutoArchiveDuration] * The default auto archive duration for all new threads in this channel * @property {SortOrderType} [defaultSortOrder] The default sort order mode used to order posts (forum only). + * @property {ForumLayoutType} [defaultForumLayout] The default layout used to display posts (forum only). * @property {string} [reason] Reason for creating the new channel */ diff --git a/packages/discord.js/src/managers/ChannelManager.js b/packages/discord.js/src/managers/ChannelManager.js index 10eea17209d4..0126d914467d 100644 --- a/packages/discord.js/src/managers/ChannelManager.js +++ b/packages/discord.js/src/managers/ChannelManager.js @@ -36,10 +36,10 @@ class ChannelManager extends CachedManager { * @name ChannelManager#cache */ - _add(data, guild, { cache = true, allowUnknownGuild = false, fromInteraction = false } = {}) { + _add(data, guild, { cache = true, allowUnknownGuild = false } = {}) { const existing = this.cache.get(data.id); if (existing) { - if (cache) existing._patch(data, fromInteraction); + if (cache) existing._patch(data); guild?.channels?._add(existing); if (ThreadChannelTypes.includes(existing.type)) { existing.parent?.threads?._add(existing); @@ -47,7 +47,7 @@ class ChannelManager extends CachedManager { return existing; } - const channel = createChannel(this.client, data, guild, { allowUnknownGuild, fromInteraction }); + const channel = createChannel(this.client, data, guild, { allowUnknownGuild }); if (!channel) { this.client.emit(Events.Debug, `Failed to find guild, or unknown type for channel ${data.id} ${data.type}`); diff --git a/packages/discord.js/src/managers/GuildBanManager.js b/packages/discord.js/src/managers/GuildBanManager.js index 995780a6cdee..d3c8a0033a33 100644 --- a/packages/discord.js/src/managers/GuildBanManager.js +++ b/packages/discord.js/src/managers/GuildBanManager.js @@ -12,7 +12,7 @@ const { GuildMember } = require('../structures/GuildMember'); let deprecationEmittedForDeleteMessageDays = false; /** - * Manages API methods for GuildBans and stores their cache. + * Manages API methods for guild bans and stores their cache. * @extends {CachedManager} */ class GuildBanManager extends CachedManager { @@ -103,7 +103,7 @@ class GuildBanManager extends CachedManager { const resolvedUser = this.client.users.resolveId(user ?? options); if (resolvedUser) return this._fetchSingle({ user: resolvedUser, cache, force }); - if (!before && !after && !limit && typeof cache === 'undefined') { + if (!before && !after && !limit && cache === undefined) { return Promise.reject(new DiscordjsError(ErrorCodes.FetchBanResolveId)); } @@ -156,7 +156,7 @@ class GuildBanManager extends CachedManager { const id = this.client.users.resolveId(user); if (!id) throw new DiscordjsError(ErrorCodes.BanResolveId, true); - if (typeof options.deleteMessageDays !== 'undefined' && !deprecationEmittedForDeleteMessageDays) { + if (options.deleteMessageDays !== undefined && !deprecationEmittedForDeleteMessageDays) { process.emitWarning( // eslint-disable-next-line max-len 'The deleteMessageDays option for GuildBanManager#create() is deprecated. Use the deleteMessageSeconds option instead.', diff --git a/packages/discord.js/src/managers/GuildChannelManager.js b/packages/discord.js/src/managers/GuildChannelManager.js index 81974c01a201..7ca9287d8af8 100644 --- a/packages/discord.js/src/managers/GuildChannelManager.js +++ b/packages/discord.js/src/managers/GuildChannelManager.js @@ -161,6 +161,7 @@ class GuildChannelManager extends CachedManager { defaultReactionEmoji, defaultAutoArchiveDuration, defaultSortOrder, + defaultForumLayout, reason, }) { parent &&= this.client.channels.resolveId(parent); @@ -184,6 +185,7 @@ class GuildChannelManager extends CachedManager { default_reaction_emoji: defaultReactionEmoji && transformGuildDefaultReaction(defaultReactionEmoji), default_auto_archive_duration: defaultAutoArchiveDuration, default_sort_order: defaultSortOrder, + default_forum_layout: defaultForumLayout, }, reason, }); @@ -192,7 +194,7 @@ class GuildChannelManager extends CachedManager { /** * @typedef {ChannelWebhookCreateOptions} WebhookCreateOptions - * @property {TextChannel|NewsChannel|VoiceChannel|ForumChannel|Snowflake} channel + * @property {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|Snowflake} channel * The channel to create the webhook for */ @@ -252,13 +254,14 @@ class GuildChannelManager extends CachedManager { * @property {number} [defaultThreadRateLimitPerUser] The rate limit per user (slowmode) to set on forum posts * @property {ChannelFlagsResolvable} [flags] The flags to set on the channel * @property {?SortOrderType} [defaultSortOrder] The default sort order mode to set on the channel + * @property {ForumLayoutType} [defaultForumLayout] The default forum layout to set on the channel * @property {string} [reason] Reason for editing this channel */ /** * Edits the channel. * @param {GuildChannelResolvable} channel The channel to edit - * @param {GuildChannelEditOptions} data Options for editing the channel + * @param {GuildChannelEditOptions} options Options for editing the channel * @returns {Promise} * @example * // Edit a channel @@ -266,19 +269,19 @@ class GuildChannelManager extends CachedManager { * .then(console.log) * .catch(console.error); */ - async edit(channel, data) { + async edit(channel, options) { channel = this.resolve(channel); if (!channel) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable'); - const parent = data.parent && this.client.channels.resolveId(data.parent); + const parent = options.parent && this.client.channels.resolveId(options.parent); - if (typeof data.position !== 'undefined') { - await this.setPosition(channel, data.position, { position: data.position, reason: data.reason }); + if (options.position !== undefined) { + await this.setPosition(channel, options.position, { position: options.position, reason: options.reason }); } - let permission_overwrites = data.permissionOverwrites?.map(o => PermissionOverwrites.resolve(o, this.guild)); + let permission_overwrites = options.permissionOverwrites?.map(o => PermissionOverwrites.resolve(o, this.guild)); - if (data.lockPermissions) { + if (options.lockPermissions) { if (parent) { const newParent = this.guild.channels.resolve(parent); if (newParent?.type === ChannelType.GuildCategory) { @@ -295,26 +298,28 @@ class GuildChannelManager extends CachedManager { const newData = await this.client.rest.patch(Routes.channel(channel.id), { body: { - name: (data.name ?? channel.name).trim(), - type: data.type, - topic: data.topic, - nsfw: data.nsfw, - bitrate: data.bitrate ?? channel.bitrate, - user_limit: data.userLimit ?? channel.userLimit, - rtc_region: 'rtcRegion' in data ? data.rtcRegion : channel.rtcRegion, - video_quality_mode: data.videoQualityMode, + name: (options.name ?? channel.name).trim(), + type: options.type, + topic: options.topic, + nsfw: options.nsfw, + bitrate: options.bitrate ?? channel.bitrate, + user_limit: options.userLimit ?? channel.userLimit, + rtc_region: 'rtcRegion' in options ? options.rtcRegion : channel.rtcRegion, + video_quality_mode: options.videoQualityMode, parent_id: parent, - lock_permissions: data.lockPermissions, - rate_limit_per_user: data.rateLimitPerUser, - default_auto_archive_duration: data.defaultAutoArchiveDuration, + lock_permissions: options.lockPermissions, + rate_limit_per_user: options.rateLimitPerUser, + default_auto_archive_duration: options.defaultAutoArchiveDuration, permission_overwrites, - available_tags: data.availableTags?.map(availableTag => transformGuildForumTag(availableTag)), - default_reaction_emoji: data.defaultReactionEmoji && transformGuildDefaultReaction(data.defaultReactionEmoji), - default_thread_rate_limit_per_user: data.defaultThreadRateLimitPerUser, - flags: 'flags' in data ? ChannelFlagsBitField.resolve(data.flags) : undefined, - default_sort_order: data.defaultSortOrder, + available_tags: options.availableTags?.map(availableTag => transformGuildForumTag(availableTag)), + default_reaction_emoji: + options.defaultReactionEmoji && transformGuildDefaultReaction(options.defaultReactionEmoji), + default_thread_rate_limit_per_user: options.defaultThreadRateLimitPerUser, + flags: 'flags' in options ? ChannelFlagsBitField.resolve(options.flags) : undefined, + default_sort_order: options.defaultSortOrder, + default_forum_layout: options.defaultForumLayout, }, - reason: data.reason, + reason: options.reason, }); return this.client.actions.ChannelUpdate.handle(newData).updated; @@ -435,7 +440,7 @@ class GuildChannelManager extends CachedManager { id: this.client.channels.resolveId(r.channel), position: r.position, lock_permissions: r.lockPermissions, - parent_id: typeof r.parent !== 'undefined' ? this.resolveId(r.parent) : undefined, + parent_id: r.parent !== undefined ? this.resolveId(r.parent) : undefined, })); await this.client.rest.patch(Routes.guildChannels(this.guild.id), { body: channelPositions }); @@ -446,7 +451,14 @@ class GuildChannelManager extends CachedManager { } /** - * Obtains all active thread channels in the guild from Discord + * Data returned from fetching threads. + * @typedef {Object} FetchedThreads + * @property {Collection} threads The threads that were fetched + * @property {Collection} members The thread members in the received threads + */ + + /** + * Obtains all active thread channels in the guild. * @param {boolean} [cache=true] Whether to cache the fetched data * @returns {Promise} * @example @@ -456,8 +468,17 @@ class GuildChannelManager extends CachedManager { * .catch(console.error); */ async fetchActiveThreads(cache = true) { - const raw = await this.client.rest.get(Routes.guildActiveThreads(this.guild.id)); - return GuildTextThreadManager._mapThreads(raw, this.client, { guild: this.guild, cache }); + const data = await this.rawFetchGuildActiveThreads(); + return GuildTextThreadManager._mapThreads(data, this.client, { guild: this.guild, cache }); + } + + /** + * `GET /guilds/{guild.id}/threads/active` + * @private + * @returns {Promise} + */ + rawFetchGuildActiveThreads() { + return this.client.rest.get(Routes.guildActiveThreads(this.guild.id)); } /** diff --git a/packages/discord.js/src/managers/GuildEmojiManager.js b/packages/discord.js/src/managers/GuildEmojiManager.js index ee62b4d98c48..61f5050fac99 100644 --- a/packages/discord.js/src/managers/GuildEmojiManager.js +++ b/packages/discord.js/src/managers/GuildEmojiManager.js @@ -124,19 +124,19 @@ class GuildEmojiManager extends BaseGuildEmojiManager { /** * Edits an emoji. * @param {EmojiResolvable} emoji The Emoji resolvable to edit - * @param {GuildEmojiEditData} data The new data for the emoji + * @param {GuildEmojiEditOptions} options The options to provide * @returns {Promise} */ - async edit(emoji, data) { + async edit(emoji, options) { const id = this.resolveId(emoji); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'emoji', 'EmojiResolvable', true); - const roles = data.roles?.map(r => this.guild.roles.resolveId(r)); + const roles = options.roles?.map(r => this.guild.roles.resolveId(r)); const newData = await this.client.rest.patch(Routes.guildEmoji(this.guild.id, id), { body: { - name: data.name, + name: options.name, roles, }, - reason: data.reason, + reason: options.reason, }); const existing = this.cache.get(id); if (existing) { @@ -161,8 +161,8 @@ class GuildEmojiManager extends BaseGuildEmojiManager { const { me } = this.guild.members; if (!me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); - if (!me.permissions.has(PermissionFlagsBits.ManageEmojisAndStickers)) { - throw new DiscordjsError(ErrorCodes.MissingManageEmojisAndStickersPermission, this.guild); + if (!me.permissions.has(PermissionFlagsBits.ManageGuildExpressions)) { + throw new DiscordjsError(ErrorCodes.MissingManageGuildExpressionsPermission, this.guild); } const data = await this.client.rest.get(Routes.guildEmoji(this.guild.id, emoji.id)); diff --git a/packages/discord.js/src/managers/GuildForumThreadManager.js b/packages/discord.js/src/managers/GuildForumThreadManager.js index 3a0fe761670d..f830b98f1a7e 100644 --- a/packages/discord.js/src/managers/GuildForumThreadManager.js +++ b/packages/discord.js/src/managers/GuildForumThreadManager.js @@ -18,8 +18,9 @@ class GuildForumThreadManager extends ThreadManager { /** * @typedef {BaseMessageOptions} GuildForumThreadMessageCreateOptions - * @property {stickers} [stickers] The stickers to send with the message + * @property {StickerResolvable} [stickers] The stickers to send with the message * @property {BitFieldResolvable} [flags] The flags to send with the message + * Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set. */ /** diff --git a/packages/discord.js/src/managers/GuildInviteManager.js b/packages/discord.js/src/managers/GuildInviteManager.js index 992e7fb47eac..12a384aebd30 100644 --- a/packages/discord.js/src/managers/GuildInviteManager.js +++ b/packages/discord.js/src/managers/GuildInviteManager.js @@ -167,7 +167,7 @@ class GuildInviteManager extends CachedManager { /** * Create an invite to the guild from the provided channel. * @param {GuildInvitableChannelResolvable} channel The options for creating the invite from a channel. - * @param {CreateInviteOptions} [options={}] The options for creating the invite from a channel. + * @param {InviteCreateOptions} [options={}] The options for creating the invite from a channel. * @returns {Promise} * @example * // Create an invite to a selected channel diff --git a/packages/discord.js/src/managers/GuildManager.js b/packages/discord.js/src/managers/GuildManager.js index cf5137392e42..1d2d4ba96772 100644 --- a/packages/discord.js/src/managers/GuildManager.js +++ b/packages/discord.js/src/managers/GuildManager.js @@ -57,14 +57,14 @@ class GuildManager extends CachedManager { /** * Partial data for a Role. * @typedef {Object} PartialRoleData - * @property {Snowflake|number} [id] The role's id, used to set channel overrides, - * this is a placeholder and will be replaced by the API after consumption + * @property {Snowflake|number} [id] The role's id, used to set channel overrides. + * This is a placeholder and will be replaced by the API after consumption * @property {string} [name] The name of the role * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number - * @property {boolean} [hoist] Whether or not the role should be hoisted + * @property {boolean} [hoist] Whether the role should be hoisted * @property {number} [position] The position of the role * @property {PermissionResolvable} [permissions] The permissions of the role - * @property {boolean} [mentionable] Whether or not the role should be mentionable + * @property {boolean} [mentionable] Whether the role should be mentionable */ /** @@ -79,8 +79,8 @@ class GuildManager extends CachedManager { /** * Partial data for a Channel. * @typedef {Object} PartialChannelData - * @property {Snowflake|number} [id] The channel's id, used to set its parent, - * this is a placeholder and will be replaced by the API after consumption + * @property {Snowflake|number} [id] The channel's id, used to set its parent. + * This is a placeholder and will be replaced by the API after consumption * @property {Snowflake|number} [parentId] The parent id for this channel * @property {ChannelType.GuildText|ChannelType.GuildVoice|ChannelType.GuildCategory} [type] The type of the channel * @property {string} name The name of the channel @@ -141,18 +141,18 @@ class GuildManager extends CachedManager { * Options used to create a guild. * @typedef {Object} GuildCreateOptions * @property {string} name The name of the guild - * @property {Snowflake|number} [afkChannelId] The AFK channel's id - * @property {number} [afkTimeout] The AFK timeout in seconds - * @property {PartialChannelData[]} [channels=[]] The channels for this guild + * @property {?(BufferResolvable|Base64Resolvable)} [icon=null] The icon for the guild + * @property {GuildVerificationLevel} [verificationLevel] The verification level for the guild * @property {GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message notifications * for the guild * @property {GuildExplicitContentFilter} [explicitContentFilter] The explicit content filter level for the guild - * @property {?(BufferResolvable|Base64Resolvable)} [icon=null] The icon for the guild * @property {PartialRoleData[]} [roles=[]] The roles for this guild, + * @property {PartialChannelData[]} [channels=[]] The channels for this guild + * @property {Snowflake|number} [afkChannelId] The AFK channel's id + * @property {number} [afkTimeout] The AFK timeout in seconds * the first element of this array is used to change properties of the guild's everyone role. * @property {Snowflake|number} [systemChannelId] The system channel's id * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The flags of the system channel - * @property {GuildVerificationLevel} [verificationLevel] The verification level for the guild */ /* eslint-enable max-len */ @@ -164,81 +164,80 @@ class GuildManager extends CachedManager { */ async create({ name, - afkChannelId, - afkTimeout, - channels = [], + icon = null, + verificationLevel, defaultMessageNotifications, explicitContentFilter, - icon = null, roles = [], + channels = [], + afkChannelId, + afkTimeout, systemChannelId, systemChannelFlags, - verificationLevel, }) { - icon = await DataResolver.resolveImage(icon); - - for (const channel of channels) { - channel.parent_id = channel.parentId; - delete channel.parentId; - channel.user_limit = channel.userLimit; - delete channel.userLimit; - channel.rate_limit_per_user = channel.rateLimitPerUser; - delete channel.rateLimitPerUser; - channel.rtc_region = channel.rtcRegion; - delete channel.rtcRegion; - channel.video_quality_mode = channel.videoQualityMode; - delete channel.videoQualityMode; - - if (!channel.permissionOverwrites) continue; - for (const overwrite of channel.permissionOverwrites) { - overwrite.allow &&= PermissionsBitField.resolve(overwrite.allow).toString(); - overwrite.deny &&= PermissionsBitField.resolve(overwrite.deny).toString(); - } - channel.permission_overwrites = channel.permissionOverwrites; - delete channel.permissionOverwrites; - } - for (const role of roles) { - role.color &&= resolveColor(role.color); - role.permissions &&= PermissionsBitField.resolve(role.permissions).toString(); - } - systemChannelFlags &&= SystemChannelFlagsBitField.resolve(systemChannelFlags); - const data = await this.client.rest.post(Routes.guilds(), { body: { name, - icon, + icon: icon && (await DataResolver.resolveImage(icon)), verification_level: verificationLevel, default_message_notifications: defaultMessageNotifications, explicit_content_filter: explicitContentFilter, - roles, - channels, + roles: roles.map(({ color, permissions, ...options }) => ({ + ...options, + color: color && resolveColor(color), + permissions: permissions === undefined ? undefined : PermissionsBitField.resolve(permissions).toString(), + })), + channels: channels.map( + ({ + parentId, + userLimit, + rtcRegion, + videoQualityMode, + permissionOverwrites, + rateLimitPerUser, + ...options + }) => ({ + ...options, + parent_id: parentId, + user_limit: userLimit, + rtc_region: rtcRegion, + video_quality_mode: videoQualityMode, + permission_overwrites: permissionOverwrites?.map(({ allow, deny, ...permissionOverwriteOptions }) => ({ + ...permissionOverwriteOptions, + allow: allow === undefined ? undefined : PermissionsBitField.resolve(allow).toString(), + deny: deny === undefined ? undefined : PermissionsBitField.resolve(deny).toString(), + })), + rate_limit_per_user: rateLimitPerUser, + }), + ), afk_channel_id: afkChannelId, afk_timeout: afkTimeout, system_channel_id: systemChannelId, - system_channel_flags: systemChannelFlags, + system_channel_flags: + systemChannelFlags === undefined ? undefined : SystemChannelFlagsBitField.resolve(systemChannelFlags), }, }); - if (this.client.guilds.cache.has(data.id)) return this.client.guilds.cache.get(data.id); + return ( + this.client.guilds.cache.get(data.id) ?? + new Promise(resolve => { + const handleGuild = guild => { + if (guild.id === data.id) { + clearTimeout(timeout); + this.client.decrementMaxListeners(); + resolve(guild); + } + }; + this.client.incrementMaxListeners(); + this.client.once(Events.GuildCreate, handleGuild); - return new Promise(resolve => { - const handleGuild = guild => { - if (guild.id === data.id) { - clearTimeout(timeout); + const timeout = setTimeout(() => { this.client.removeListener(Events.GuildCreate, handleGuild); this.client.decrementMaxListeners(); - resolve(guild); - } - }; - this.client.incrementMaxListeners(); - this.client.on(Events.GuildCreate, handleGuild); - - const timeout = setTimeout(() => { - this.client.removeListener(Events.GuildCreate, handleGuild); - this.client.decrementMaxListeners(); - resolve(this.client.guilds._add(data)); - }, 10_000).unref(); - }); + resolve(this.client.guilds._add(data)); + }, 10_000).unref(); + }) + ); } /** diff --git a/packages/discord.js/src/managers/GuildMemberManager.js b/packages/discord.js/src/managers/GuildMemberManager.js index e85e296b14ec..a4cf09b5d07e 100644 --- a/packages/discord.js/src/managers/GuildMemberManager.js +++ b/packages/discord.js/src/managers/GuildMemberManager.js @@ -11,6 +11,7 @@ const BaseGuildVoiceChannel = require('../structures/BaseGuildVoiceChannel'); const { GuildMember } = require('../structures/GuildMember'); const { Role } = require('../structures/Role'); const Events = require('../util/Events'); +const { GuildMemberFlagsBitField } = require('../util/GuildMemberFlagsBitField'); const Partials = require('../util/Partials'); /** @@ -158,20 +159,18 @@ class GuildMemberManager extends CachedManager { /** * Options used to fetch multiple members from a guild. * @typedef {Object} FetchMembersOptions - * @property {UserResolvable|UserResolvable[]} user The user(s) to fetch - * @property {?string} query Limit fetch to members with similar usernames + * @property {UserResolvable|UserResolvable[]} [user] The user(s) to fetch + * @property {?string} [query] Limit fetch to members with similar usernames * @property {number} [limit=0] Maximum number of members to request - * @property {boolean} [withPresences=false] Whether or not to include the presences + * @property {boolean} [withPresences=false] Whether to include the presences * @property {number} [time=120e3] Timeout for receipt of members - * @property {?string} nonce Nonce for this request (32 characters max - default to base 16 now timestamp) - * @property {boolean} [force=false] Whether to skip the cache check and request the API + * @property {?string} [nonce] Nonce for this request (32 characters max - default to base 16 now timestamp) */ /** - * Fetches member(s) from Discord, even if they're offline. - * @param {UserResolvable|FetchMemberOptions|FetchMembersOptions} [options] If a UserResolvable, the user to fetch. - * If undefined, fetches all members. - * If a query, it limits the results to users with similar usernames. + * Fetches member(s) from a guild. + * @param {UserResolvable|FetchMemberOptions|FetchMembersOptions} [options] Options for fetching member(s). + * Omitting the parameter or providing `undefined` will fetch all members. * @returns {Promise>} * @example * // Fetch all members from a guild @@ -206,18 +205,70 @@ class GuildMemberManager extends CachedManager { */ fetch(options) { if (!options) return this._fetchMany(); - const user = this.client.users.resolveId(options); - if (user) return this._fetchSingle({ user, cache: true }); - if (options.user) { - if (Array.isArray(options.user)) { - options.user = options.user.map(u => this.client.users.resolveId(u)); - return this._fetchMany(options); - } else { - options.user = this.client.users.resolveId(options.user); - } - if (!options.limit && !options.withPresences) return this._fetchSingle(options); + const { user: users, limit, withPresences, cache, force } = options; + const resolvedUser = this.client.users.resolveId(users ?? options); + if (resolvedUser && !limit && !withPresences) return this._fetchSingle({ user: resolvedUser, cache, force }); + const resolvedUsers = users?.map?.(user => this.client.users.resolveId(user)) ?? resolvedUser ?? undefined; + return this._fetchMany({ ...options, users: resolvedUsers }); + } + + async _fetchSingle({ user, cache, force = false }) { + if (!force) { + const existing = this.cache.get(user); + if (existing && !existing.partial) return existing; } - return this._fetchMany(options); + + const data = await this.client.rest.get(Routes.guildMember(this.guild.id, user)); + return this._add(data, cache); + } + + _fetchMany({ + limit = 0, + withPresences: presences, + users, + query, + time = 120e3, + nonce = DiscordSnowflake.generate().toString(), + } = {}) { + if (nonce.length > 32) return Promise.reject(new DiscordjsRangeError(ErrorCodes.MemberFetchNonceLength)); + + return new Promise((resolve, reject) => { + if (!query && !users) query = ''; + this.guild.shard.send({ + op: GatewayOpcodes.RequestGuildMembers, + d: { + guild_id: this.guild.id, + presences, + user_ids: users, + query, + nonce, + limit, + }, + }); + const fetchedMembers = new Collection(); + let i = 0; + const handler = (members, _, chunk) => { + if (chunk.nonce !== nonce) return; + timeout.refresh(); + i++; + for (const member of members.values()) { + fetchedMembers.set(member.id, member); + } + if (members.size < 1_000 || (limit && fetchedMembers.size >= limit) || i === chunk.count) { + clearTimeout(timeout); + this.client.removeListener(Events.GuildMembersChunk, handler); + this.client.decrementMaxListeners(); + resolve(users && !Array.isArray(users) && fetchedMembers.size ? fetchedMembers.first() : fetchedMembers); + } + }; + const timeout = setTimeout(() => { + this.client.removeListener(Events.GuildMembersChunk, handler); + this.client.decrementMaxListeners(); + reject(new DiscordjsError(ErrorCodes.GuildMembersTimeout)); + }, time).unref(); + this.client.incrementMaxListeners(); + this.client.on(Events.GuildMembersChunk, handler); + }); } /** @@ -270,7 +321,7 @@ class GuildMemberManager extends CachedManager { /** * The data for editing a guild member. - * @typedef {Object} GuildMemberEditData + * @typedef {Object} GuildMemberEditOptions * @property {?string} [nick] The nickname to set for the member * @property {Collection|RoleResolvable[]} [roles] The roles or role ids to apply * @property {boolean} [mute] Whether or not the member should be muted @@ -279,6 +330,7 @@ class GuildMemberManager extends CachedManager { * (if they are connected to voice), or `null` if you want to disconnect them from voice * @property {DateResolvable|null} [communicationDisabledUntil] The date or timestamp * for the member's communication to be disabled until. Provide `null` to enable communication again. + * @property {GuildMemberFlagsResolvable} [flags] The flags to set for the member * @property {string} [reason] Reason for editing this user */ @@ -286,43 +338,47 @@ class GuildMemberManager extends CachedManager { * Edits a member of the guild. * The user must be a member of the guild * @param {UserResolvable} user The member to edit - * @param {GuildMemberEditData} data The data to edit the member with + * @param {GuildMemberEditOptions} options The options to provide * @returns {Promise} */ - async edit(user, { reason, ...data }) { + async edit(user, { reason, ...options }) { const id = this.client.users.resolveId(user); if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'); - if (data.channel) { - data.channel = this.guild.channels.resolve(data.channel); - if (!(data.channel instanceof BaseGuildVoiceChannel)) { + if (options.channel) { + options.channel = this.guild.channels.resolve(options.channel); + if (!(options.channel instanceof BaseGuildVoiceChannel)) { throw new DiscordjsError(ErrorCodes.GuildVoiceChannelResolve); } - data.channel_id = data.channel.id; - data.channel = undefined; - } else if (data.channel === null) { - data.channel_id = null; - data.channel = undefined; + options.channel_id = options.channel.id; + options.channel = undefined; + } else if (options.channel === null) { + options.channel_id = null; + options.channel = undefined; } - data.roles &&= data.roles.map(role => (role instanceof Role ? role.id : role)); + options.roles &&= options.roles.map(role => (role instanceof Role ? role.id : role)); - if (typeof data.communicationDisabledUntil !== 'undefined') { - data.communication_disabled_until = + if (options.communicationDisabledUntil !== undefined) { + options.communication_disabled_until = // eslint-disable-next-line eqeqeq - data.communicationDisabledUntil != null - ? new Date(data.communicationDisabledUntil).toISOString() - : data.communicationDisabledUntil; + options.communicationDisabledUntil != null + ? new Date(options.communicationDisabledUntil).toISOString() + : options.communicationDisabledUntil; + } + + if (options.flags !== undefined) { + options.flags = GuildMemberFlagsBitField.resolve(options.flags); } let endpoint; if (id === this.client.user.id) { - const keys = Object.keys(data); + const keys = Object.keys(options); if (keys.length === 1 && keys[0] === 'nick') endpoint = Routes.guildMember(this.guild.id); else endpoint = Routes.guildMember(this.guild.id, id); } else { endpoint = Routes.guildMember(this.guild.id, id); } - const d = await this.client.rest.patch(endpoint, { body: data, reason }); + const d = await this.client.rest.patch(endpoint, { body: options, reason }); const clone = this.cache.get(id)?._clone(); clone?._patch(d); @@ -479,66 +535,6 @@ class GuildMemberManager extends CachedManager { return this.resolve(user) ?? this.client.users.resolve(user) ?? userId; } - - async _fetchSingle({ user, cache, force = false }) { - if (!force) { - const existing = this.cache.get(user); - if (existing && !existing.partial) return existing; - } - - const data = await this.client.rest.get(Routes.guildMember(this.guild.id, user)); - return this._add(data, cache); - } - - _fetchMany({ - limit = 0, - withPresences: presences = false, - user: user_ids, - query, - time = 120e3, - nonce = DiscordSnowflake.generate().toString(), - } = {}) { - return new Promise((resolve, reject) => { - if (!query && !user_ids) query = ''; - if (nonce.length > 32) throw new DiscordjsRangeError(ErrorCodes.MemberFetchNonceLength); - this.guild.shard.send({ - op: GatewayOpcodes.RequestGuildMembers, - d: { - guild_id: this.guild.id, - presences, - user_ids, - query, - nonce, - limit, - }, - }); - const fetchedMembers = new Collection(); - let i = 0; - const handler = (members, _, chunk) => { - timeout.refresh(); - if (chunk.nonce !== nonce) return; - i++; - for (const member of members.values()) { - fetchedMembers.set(member.id, member); - } - if (members.size < 1_000 || (limit && fetchedMembers.size >= limit) || i === chunk.count) { - clearTimeout(timeout); - this.client.removeListener(Events.GuildMembersChunk, handler); - this.client.decrementMaxListeners(); - let fetched = fetchedMembers; - if (user_ids && !Array.isArray(user_ids) && fetched.size) fetched = fetched.first(); - resolve(fetched); - } - }; - const timeout = setTimeout(() => { - this.client.removeListener(Events.GuildMembersChunk, handler); - this.client.decrementMaxListeners(); - reject(new DiscordjsError(ErrorCodes.GuildMembersTimeout)); - }, time).unref(); - this.client.incrementMaxListeners(); - this.client.on(Events.GuildMembersChunk, handler); - }); - } } module.exports = GuildMemberManager; diff --git a/packages/discord.js/src/managers/GuildScheduledEventManager.js b/packages/discord.js/src/managers/GuildScheduledEventManager.js index 0867c151963c..9071b60a7df1 100644 --- a/packages/discord.js/src/managers/GuildScheduledEventManager.js +++ b/packages/discord.js/src/managers/GuildScheduledEventManager.js @@ -85,12 +85,12 @@ class GuildScheduledEventManager extends CachedManager { let entity_metadata, channel_id; if (entityType === GuildScheduledEventEntityType.External) { - channel_id = typeof channel === 'undefined' ? channel : null; + channel_id = channel === undefined ? channel : null; entity_metadata = { location: entityMetadata?.location }; } else { channel_id = this.guild.channels.resolveId(channel); if (!channel_id) throw new DiscordjsError(ErrorCodes.GuildVoiceChannelResolve); - entity_metadata = typeof entityMetadata === 'undefined' ? entityMetadata : null; + entity_metadata = entityMetadata === undefined ? entityMetadata : null; } const data = await this.client.rest.post(Routes.guildScheduledEvents(this.guild.id), { @@ -214,7 +214,7 @@ class GuildScheduledEventManager extends CachedManager { const data = await this.client.rest.patch(Routes.guildScheduledEvent(this.guild.id, guildScheduledEventId), { body: { - channel_id: typeof channel === 'undefined' ? channel : this.guild.channels.resolveId(channel), + channel_id: channel === undefined ? channel : this.guild.channels.resolveId(channel), name, privacy_level: privacyLevel, scheduled_start_time: scheduledStartTime ? new Date(scheduledStartTime).toISOString() : undefined, diff --git a/packages/discord.js/src/managers/GuildStickerManager.js b/packages/discord.js/src/managers/GuildStickerManager.js index 0341e7b9a9ea..a4974ecd7236 100644 --- a/packages/discord.js/src/managers/GuildStickerManager.js +++ b/packages/discord.js/src/managers/GuildStickerManager.js @@ -35,7 +35,7 @@ class GuildStickerManager extends CachedManager { /** * Options used to create a guild sticker. * @typedef {Object} GuildStickerCreateOptions - * @property {BufferResolvable|Stream|JSONEncodable} file The file for the sticker + * @property {AttachmentPayload|BufferResolvable|Stream} file The file for the sticker * @property {string} name The name for the sticker * @property {string} tags The Discord name of a unicode emoji representing the sticker's expression * @property {?string} [description] The description for the sticker @@ -101,16 +101,16 @@ class GuildStickerManager extends CachedManager { /** * Edits a sticker. * @param {StickerResolvable} sticker The sticker to edit - * @param {GuildStickerEditData} [data={}] The new data for the sticker + * @param {GuildStickerEditOptions} [options={}] The new data for the sticker * @returns {Promise} */ - async edit(sticker, data = {}) { + async edit(sticker, options = {}) { const stickerId = this.resolveId(sticker); if (!stickerId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'sticker', 'StickerResolvable'); const d = await this.client.rest.patch(Routes.guildSticker(this.guild.id, stickerId), { - body: data, - reason: data.reason, + body: options, + reason: options.reason, }); const existing = this.cache.get(stickerId); diff --git a/packages/discord.js/src/managers/MessageManager.js b/packages/discord.js/src/managers/MessageManager.js index 6b36320fd87d..28d622d2c79f 100644 --- a/packages/discord.js/src/managers/MessageManager.js +++ b/packages/discord.js/src/managers/MessageManager.js @@ -49,6 +49,7 @@ class MessageManager extends CachedManager { /** * Options used to fetch multiple messages. + * The `before`, `after`, and `around` parameters are mutually exclusive. * @typedef {Object} FetchMessagesOptions * @property {number} [limit] The maximum number of messages to return * @property {Snowflake} [before] Consider only messages before this id @@ -150,7 +151,7 @@ class MessageManager extends CachedManager { /** * Options that can be passed to edit a message. * @typedef {BaseMessageOptions} MessageEditOptions - * @property {Array>} [attachments] An array of attachments to keep, + * @property {AttachmentPayload[]} [attachments] An array of attachments to keep, * all attachments will be kept if omitted * @property {MessageFlags} [flags] Which flags to set for the message * Only the {@link MessageFlags.SuppressEmbeds} flag can be modified. diff --git a/packages/discord.js/src/managers/ReactionManager.js b/packages/discord.js/src/managers/ReactionManager.js index c92999c17710..55358829ba0d 100644 --- a/packages/discord.js/src/managers/ReactionManager.js +++ b/packages/discord.js/src/managers/ReactionManager.js @@ -33,6 +33,7 @@ class ReactionManager extends CachedManager { * Data that can be resolved to a MessageReaction object. This can be: * * A MessageReaction * * A Snowflake + * * The Unicode representation of an emoji * @typedef {MessageReaction|Snowflake} MessageReactionResolvable */ diff --git a/packages/discord.js/src/managers/RoleManager.js b/packages/discord.js/src/managers/RoleManager.js index 231b6162d780..e0c4ed7d97c7 100644 --- a/packages/discord.js/src/managers/RoleManager.js +++ b/packages/discord.js/src/managers/RoleManager.js @@ -100,7 +100,7 @@ class RoleManager extends CachedManager { /** * Options used to create a new role. - * @typedef {Object} CreateRoleOptions + * @typedef {Object} RoleCreateOptions * @property {string} [name] The name of the new role * @property {ColorResolvable} [color] The data to create the role with * @property {boolean} [hoist] Whether or not the new role should be hoisted @@ -117,7 +117,7 @@ class RoleManager extends CachedManager { /** * Creates a new role in the guild with given information. * The position will silently reset to 1 if an invalid one is provided, or none. - * @param {CreateRoleOptions} [options] Options for creating the new role + * @param {RoleCreateOptions} [options] Options for creating the new role * @returns {Promise} * @example * // Create a new role @@ -137,7 +137,7 @@ class RoleManager extends CachedManager { async create(options = {}) { let { name, color, hoist, permissions, position, mentionable, reason, icon, unicodeEmoji } = options; color &&= resolveColor(color); - if (typeof permissions !== 'undefined') permissions = new PermissionsBitField(permissions); + if (permissions !== undefined) permissions = new PermissionsBitField(permissions); if (icon) { const guildEmojiURL = this.guild.emojis.resolve(icon)?.url; icon = guildEmojiURL ? await DataResolver.resolveImage(guildEmojiURL) : await DataResolver.resolveImage(icon); @@ -166,14 +166,14 @@ class RoleManager extends CachedManager { /** * Options for editing a role - * @typedef {RoleData} EditRoleOptions + * @typedef {RoleData} RoleEditOptions * @property {string} [reason] The reason for editing this role */ /** * Edits a role of the guild. * @param {RoleResolvable} role The role to edit - * @param {EditRoleOptions} data The new data for the role + * @param {RoleEditOptions} options The options to provide * @returns {Promise} * @example * // Edit a role @@ -181,15 +181,15 @@ class RoleManager extends CachedManager { * .then(updated => console.log(`Edited role name to ${updated.name}`)) * .catch(console.error); */ - async edit(role, data) { + async edit(role, options) { role = this.resolve(role); if (!role) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'RoleResolvable'); - if (typeof data.position === 'number') { - await this.setPosition(role, data.position, { reason: data.reason }); + if (typeof options.position === 'number') { + await this.setPosition(role, options.position, { reason: options.reason }); } - let icon = data.icon; + let icon = options.icon; if (icon) { const guildEmojiURL = this.guild.emojis.resolve(icon)?.url; icon = guildEmojiURL ? await DataResolver.resolveImage(guildEmojiURL) : await DataResolver.resolveImage(icon); @@ -197,16 +197,16 @@ class RoleManager extends CachedManager { } const body = { - name: data.name, - color: typeof data.color === 'undefined' ? undefined : resolveColor(data.color), - hoist: data.hoist, - permissions: typeof data.permissions === 'undefined' ? undefined : new PermissionsBitField(data.permissions), - mentionable: data.mentionable, + name: options.name, + color: options.color === undefined ? undefined : resolveColor(options.color), + hoist: options.hoist, + permissions: options.permissions === undefined ? undefined : new PermissionsBitField(options.permissions), + mentionable: options.mentionable, icon, - unicode_emoji: data.unicodeEmoji, + unicode_emoji: options.unicodeEmoji, }; - const d = await this.client.rest.patch(Routes.guildRole(this.guild.id, role.id), { body, reason: data.reason }); + const d = await this.client.rest.patch(Routes.guildRole(this.guild.id, role.id), { body, reason: options.reason }); const clone = role._clone(); clone._patch(d); @@ -307,11 +307,14 @@ class RoleManager extends CachedManager { throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'role', 'Role nor a Snowflake'); } - if (resolvedRole1.position === resolvedRole2.position) { + const role1Position = resolvedRole1.position; + const role2Position = resolvedRole2.position; + + if (role1Position === role2Position) { return Number(BigInt(resolvedRole2.id) - BigInt(resolvedRole1.id)); } - return resolvedRole1.position - resolvedRole2.position; + return role1Position - role2Position; } /** diff --git a/packages/discord.js/src/managers/ThreadManager.js b/packages/discord.js/src/managers/ThreadManager.js index 530de214ebd4..005e02c45392 100644 --- a/packages/discord.js/src/managers/ThreadManager.js +++ b/packages/discord.js/src/managers/ThreadManager.js @@ -75,10 +75,9 @@ class ThreadManager extends CachedManager { */ /** - * The options for fetching multiple threads, the properties are mutually exclusive + * Options for fetching multiple threads. * @typedef {Object} FetchThreadsOptions - * @property {FetchArchivedThreadOptions} [archived] The options used to fetch archived threads - * @property {boolean} [active] When true, fetches active threads. If `archived` is set, this is ignored! + * @property {FetchArchivedThreadOptions} [archived] Options used to fetch archived threads */ /** @@ -87,17 +86,18 @@ class ThreadManager extends CachedManager { * ThreadChannelResolvable then the specified thread will be fetched. Fetches all active threads if `undefined` * @param {BaseFetchOptions} [cacheOptions] Additional options for this fetch. The `force` field gets ignored * if `options` is not a {@link ThreadChannelResolvable} - * @returns {Promise} + * @returns {Promise} + * {@link FetchedThreads} if active & {@link FetchedThreadsMore} if archived. * @example * // Fetch a thread by its id * channel.threads.fetch('831955138126104859') * .then(channel => console.log(channel.name)) * .catch(console.error); */ - fetch(options, { cache = true, force = false } = {}) { + fetch(options, { cache, force } = {}) { if (!options) return this.fetchActive(cache); const channel = this.client.channels.resolveId(options); - if (channel) return this.client.channels.fetch(channel, cache, force); + if (channel) return this.client.channels.fetch(channel, { cache, force }); if (options.archived) { return this.fetchArchived(options.archived, cache); } @@ -118,16 +118,15 @@ class ThreadManager extends CachedManager { * @property {string} [type='public'] The type of threads to fetch (`public` or `private`) * @property {boolean} [fetchAll=false] Whether to fetch **all** archived threads when `type` is `private` * This property requires the {@link PermissionFlagsBits.ManageThreads} permission if `true`. - * @property {DateResolvable|ThreadChannelResolvable} [before] Only return threads that were created before this Date + * @property {DateResolvable|ThreadChannelResolvable} [before] Only return threads that were archived before this Date * or Snowflake * Must be a {@link ThreadChannelResolvable} when `type` is `private` and `fetchAll` is `false`. * @property {number} [limit] Maximum number of threads to return */ /** - * The data returned from a thread fetch that returns multiple threads. - * @typedef {Object} FetchedThreads - * @property {Collection} threads The threads that were fetched, with any members returned + * Data returned from fetching multiple threads. + * @typedef {FetchedThreads} FetchedThreadsMore * @property {?boolean} hasMore Whether there are potentially additional threads that require a subsequent call */ @@ -137,7 +136,7 @@ class ThreadManager extends CachedManager { * in the parent channel. * @param {FetchArchivedThreadOptions} [options] The options to fetch archived threads * @param {boolean} [cache=true] Whether to cache the new thread objects if they aren't already - * @returns {Promise} + * @returns {Promise} */ async fetchArchived({ type = 'public', fetchAll = false, before, limit } = {}, cache = true) { let path = Routes.channelThreads(this.channel.id, type); @@ -147,8 +146,8 @@ class ThreadManager extends CachedManager { let timestamp; let id; const query = makeURLSearchParams({ limit }); - if (typeof before !== 'undefined') { - if (before instanceof ThreadChannel || /^\d{16,19}$/.test(String(before))) { + if (before !== undefined) { + if (before instanceof ThreadChannel || /^\d{17,19}$/.test(String(before))) { id = this.resolveId(before); timestamp = this.resolve(before)?.archivedAt?.toISOString(); const toUse = type === 'private' && !fetchAll ? id : timestamp; @@ -172,15 +171,13 @@ class ThreadManager extends CachedManager { } /** - * Obtains the accessible active threads from Discord. - * This method requires the {@link PermissionFlagsBits.ReadMessageHistory} permission - * in the parent channel. - * @param {boolean} [cache=true] Whether to cache the new thread objects if they aren't already + * Obtains all active threads in the channel. + * @param {boolean} [cache=true] Whether to cache the fetched data * @returns {Promise} */ async fetchActive(cache = true) { - const raw = await this.client.rest.get(Routes.guildActiveThreads(this.channel.guild.id)); - return this.constructor._mapThreads(raw, this.client, { parent: this.channel, cache }); + const data = await this.channel.guild.channels.rawFetchGuildActiveThreads(); + return this.constructor._mapThreads(data, this.client, { parent: this.channel, cache }); } static _mapThreads(rawThreads, client, { parent, guild, cache }) { @@ -189,12 +186,18 @@ class ThreadManager extends CachedManager { if (parent && thread.parentId !== parent.id) return coll; return coll.set(thread.id, thread); }, new Collection()); + // Discord sends the thread id as id in this object - for (const rawMember of rawThreads.members) client.channels.cache.get(rawMember.id)?.members._add(rawMember); - return { - threads, - hasMore: rawThreads.has_more ?? false, - }; + const threadMembers = rawThreads.members.reduce((coll, raw) => { + const thread = threads.get(raw.id); + return thread ? coll.set(raw.user_id, thread.members._add(raw)) : coll; + }, new Collection()); + + const response = { threads, members: threadMembers }; + + // The GET `/guilds/{guild.id}/threads/active` route does not return `has_more`. + if ('has_more' in rawThreads) response.hasMore = rawThreads.has_more; + return response; } } diff --git a/packages/discord.js/src/managers/ThreadMemberManager.js b/packages/discord.js/src/managers/ThreadMemberManager.js index a756bdd1ac47..c138aa32854b 100644 --- a/packages/discord.js/src/managers/ThreadMemberManager.js +++ b/packages/discord.js/src/managers/ThreadMemberManager.js @@ -1,6 +1,7 @@ 'use strict'; const { Collection } = require('@discordjs/collection'); +const { makeURLSearchParams } = require('@discordjs/rest'); const { Routes } = require('discord-api-types/v10'); const CachedManager = require('./CachedManager'); const { DiscordjsTypeError, ErrorCodes } = require('../errors'); @@ -29,10 +30,10 @@ class ThreadMemberManager extends CachedManager { _add(data, cache = true) { const existing = this.cache.get(data.user_id); - if (cache) existing?._patch(data); + if (cache) existing?._patch(data, { cache }); if (existing) return existing; - const member = new ThreadMember(this.thread, data); + const member = new ThreadMember(this.thread, data, { cache }); if (cache) this.cache.set(data.user_id, member); return member; } @@ -112,15 +113,35 @@ class ThreadMemberManager extends CachedManager { } /** + * Options used to fetch a thread member. * @typedef {BaseFetchOptions} FetchThreadMemberOptions * @property {ThreadMemberResolvable} member The thread member to fetch + * @property {boolean} [withMember] Whether to also return the guild member associated with this thread member */ /** - * @typedef {Object} FetchThreadMembersOptions + * Options used to fetch multiple thread members with guild member data. + * With `withMember` set to `true`, pagination is enabled. + * @typedef {Object} FetchThreadMembersWithGuildMemberDataOptions + * @property {true} withMember Whether to also return the guild member data + * @property {Snowflake} [after] Consider only thread members after this id + * @property {number} [limit] The maximum number of thread members to return + * @property {boolean} [cache] Whether to cache the fetched thread members and guild members + */ + + /** + * Options used to fetch multiple thread members without guild member data. + * @typedef {Object} FetchThreadMembersWithoutGuildMemberDataOptions + * @property {false} [withMember] Whether to also return the guild member data * @property {boolean} [cache] Whether to cache the fetched thread members */ + /** + * Options used to fetch multiple thread members. + * @typedef {FetchThreadMembersWithGuildMemberDataOptions| + * FetchThreadMembersWithoutGuildMemberDataOptions} FetchThreadMembersOptions + */ + /** * Fetches thread member(s) from Discord. * This method requires the {@link GatewayIntentBits.GuildMembers} privileged gateway intent. @@ -130,25 +151,31 @@ class ThreadMemberManager extends CachedManager { */ fetch(options) { if (!options) return this._fetchMany(); - const { member, cache, force } = options; + const { member, withMember, cache, force } = options; const resolvedMember = this.resolveId(member ?? options); - if (resolvedMember) return this._fetchSingle({ member: resolvedMember, cache, force }); + if (resolvedMember) return this._fetchSingle({ member: resolvedMember, withMember, cache, force }); return this._fetchMany(options); } - async _fetchSingle({ member, cache, force = false }) { + async _fetchSingle({ member, withMember, cache, force = false }) { if (!force) { const existing = this.cache.get(member); if (existing) return existing; } - const data = await this.client.rest.get(Routes.threadMembers(this.thread.id, member)); + const data = await this.client.rest.get(Routes.threadMembers(this.thread.id, member), { + query: makeURLSearchParams({ with_member: withMember }), + }); + return this._add(data, cache); } - async _fetchMany(options = {}) { - const data = await this.client.rest.get(Routes.threadMembers(this.thread.id)); - return data.reduce((col, member) => col.set(member.user_id, this._add(member, options.cache)), new Collection()); + async _fetchMany({ withMember, after, limit, cache } = {}) { + const data = await this.client.rest.get(Routes.threadMembers(this.thread.id), { + query: makeURLSearchParams({ with_member: withMember, after, limit }), + }); + + return data.reduce((col, member) => col.set(member.user_id, this._add(member, cache)), new Collection()); } } diff --git a/packages/discord.js/src/sharding/Shard.js b/packages/discord.js/src/sharding/Shard.js index 322fd40bfabb..d0bccf09d6c4 100644 --- a/packages/discord.js/src/sharding/Shard.js +++ b/packages/discord.js/src/sharding/Shard.js @@ -21,8 +21,14 @@ class Shard extends EventEmitter { constructor(manager, id) { super(); - if (manager.mode === 'process') childProcess = require('node:child_process'); - else if (manager.mode === 'worker') Worker = require('node:worker_threads').Worker; + switch (manager.mode) { + case 'process': + childProcess = require('node:child_process'); + break; + case 'worker': + Worker = require('node:worker_threads').Worker; + break; + } /** * Manager that created the shard @@ -112,18 +118,21 @@ class Shard extends EventEmitter { this._exitListener = this._handleExit.bind(this, undefined, timeout); - if (this.manager.mode === 'process') { - this.process = childProcess - .fork(path.resolve(this.manager.file), this.args, { - env: this.env, - execArgv: this.execArgv, - }) - .on('message', this._handleMessage.bind(this)) - .on('exit', this._exitListener); - } else if (this.manager.mode === 'worker') { - this.worker = new Worker(path.resolve(this.manager.file), { workerData: this.env }) - .on('message', this._handleMessage.bind(this)) - .on('exit', this._exitListener); + switch (this.manager.mode) { + case 'process': + this.process = childProcess + .fork(path.resolve(this.manager.file), this.args, { + env: this.env, + execArgv: this.execArgv, + }) + .on('message', this._handleMessage.bind(this)) + .on('exit', this._exitListener); + break; + case 'worker': + this.worker = new Worker(path.resolve(this.manager.file), { workerData: this.env }) + .on('message', this._handleMessage.bind(this)) + .on('exit', this._exitListener); + break; } this._evals.clear(); @@ -358,6 +367,12 @@ class Shard extends EventEmitter { return; } + // Shard has resumed + if (message._resume) { + this.ready = true; + return; + } + // Shard is requesting a property fetch if (message._sFetchProp) { const resp = { _sFetchProp: message._sFetchProp, _sFetchPropShard: message._sFetchPropShard }; diff --git a/packages/discord.js/src/sharding/ShardClientUtil.js b/packages/discord.js/src/sharding/ShardClientUtil.js index 64bc5a540c65..c1bd4a800571 100644 --- a/packages/discord.js/src/sharding/ShardClientUtil.js +++ b/packages/discord.js/src/sharding/ShardClientUtil.js @@ -1,6 +1,7 @@ 'use strict'; const process = require('node:process'); +const { calculateShardId } = require('@discordjs/util'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); const Events = require('../util/Events'); const { makeError, makePlainError } = require('../util/Util'); @@ -29,29 +30,38 @@ class ShardClientUtil { */ this.parentPort = null; - if (mode === 'process') { - process.on('message', this._handleMessage.bind(this)); - client.on('ready', () => { - process.send({ _ready: true }); - }); - client.on('disconnect', () => { - process.send({ _disconnect: true }); - }); - client.on('reconnecting', () => { - process.send({ _reconnecting: true }); - }); - } else if (mode === 'worker') { - this.parentPort = require('node:worker_threads').parentPort; - this.parentPort.on('message', this._handleMessage.bind(this)); - client.on('ready', () => { - this.parentPort.postMessage({ _ready: true }); - }); - client.on('disconnect', () => { - this.parentPort.postMessage({ _disconnect: true }); - }); - client.on('reconnecting', () => { - this.parentPort.postMessage({ _reconnecting: true }); - }); + switch (mode) { + case 'process': + process.on('message', this._handleMessage.bind(this)); + client.on(Events.ShardReady, () => { + process.send({ _ready: true }); + }); + client.on(Events.ShardDisconnect, () => { + process.send({ _disconnect: true }); + }); + client.on(Events.ShardReconnecting, () => { + process.send({ _reconnecting: true }); + }); + client.on(Events.ShardResume, () => { + process.send({ _resume: true }); + }); + break; + case 'worker': + this.parentPort = require('node:worker_threads').parentPort; + this.parentPort.on('message', this._handleMessage.bind(this)); + client.on(Events.ShardReady, () => { + this.parentPort.postMessage({ _ready: true }); + }); + client.on(Events.ShardDisconnect, () => { + this.parentPort.postMessage({ _disconnect: true }); + }); + client.on(Events.ShardReconnecting, () => { + this.parentPort.postMessage({ _reconnecting: true }); + }); + client.on(Events.ShardResume, () => { + this.parentPort.postMessage({ _resume: true }); + }); + break; } } @@ -81,14 +91,17 @@ class ShardClientUtil { */ send(message) { return new Promise((resolve, reject) => { - if (this.mode === 'process') { - process.send(message, err => { - if (err) reject(err); - else resolve(); - }); - } else if (this.mode === 'worker') { - this.parentPort.postMessage(message); - resolve(); + switch (this.mode) { + case 'process': + process.send(message, err => { + if (err) reject(err); + else resolve(); + }); + break; + case 'worker': + this.parentPort.postMessage(message); + resolve(); + break; } }); } @@ -245,7 +258,7 @@ class ShardClientUtil { * @returns {number} */ static shardIdForGuildId(guildId, shardCount) { - const shard = Number(BigInt(guildId) >> 22n) % shardCount; + const shard = calculateShardId(guildId, shardCount); if (shard < 0) throw new DiscordjsError(ErrorCodes.ShardingShardMiscalculation, shard, guildId, shardCount); return shard; } diff --git a/packages/discord.js/src/structures/ActionRow.js b/packages/discord.js/src/structures/ActionRow.js index 67aeebbaa7cb..3f39691b1101 100644 --- a/packages/discord.js/src/structures/ActionRow.js +++ b/packages/discord.js/src/structures/ActionRow.js @@ -1,7 +1,7 @@ 'use strict'; const { deprecate } = require('node:util'); -const { isJSONEncodable } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const Component = require('./Component'); const { createComponent } = require('../util/Components'); @@ -23,16 +23,16 @@ class ActionRow extends Component { /** * Creates a new action row builder from JSON data - * @param {JSONEncodable|APIActionRowComponent} other The other data + * @method from + * @memberof ActionRow + * @param {ActionRowBuilder|ActionRow|APIActionRowComponent} other The other data * @returns {ActionRowBuilder} - * @deprecated Use {@link ActionRowBuilder.from()} instead. + * @deprecated Use {@link ActionRowBuilder.from} instead. */ - static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); - } + static from = deprecate( + other => new this(isJSONEncodable(other) ? other.toJSON() : other), + 'ActionRow.from() is deprecated. Use ActionRowBuilder.from() instead.', + ); /** * Returns the API-compatible JSON for this component @@ -43,6 +43,4 @@ class ActionRow extends Component { } } -ActionRow.from = deprecate(ActionRow.from, 'ActionRow.from() is deprecated. Use ActionRowBuilder.from() instead.'); - module.exports = ActionRow; diff --git a/packages/discord.js/src/structures/ActionRowBuilder.js b/packages/discord.js/src/structures/ActionRowBuilder.js index eb5f27630a61..962a378c2a41 100644 --- a/packages/discord.js/src/structures/ActionRowBuilder.js +++ b/packages/discord.js/src/structures/ActionRowBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { ActionRowBuilder: BuildersActionRow, isJSONEncodable } = require('@discordjs/builders'); +const { ActionRowBuilder: BuildersActionRow } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { createComponentBuilder } = require('../util/Components'); const { toSnakeCase } = require('../util/Transformers'); @@ -18,15 +19,11 @@ class ActionRowBuilder extends BuildersActionRow { /** * Creates a new action row builder from JSON data - * @param {JSONEncodable> - * |APIActionRowComponent} other The other data + * @param {ActionRow|ActionRowBuilder|APIActionRowComponent} other The other data * @returns {ActionRowBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -34,5 +31,5 @@ module.exports = ActionRowBuilder; /** * @external BuildersActionRow - * @see {@link https://discord.js.org/#/docs/builders/main/class/ActionRowBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/ActionRowBuilder:Class} */ diff --git a/packages/discord.js/src/structures/ApplicationCommand.js b/packages/discord.js/src/structures/ApplicationCommand.js index afdddaca9586..bd87281c11f5 100644 --- a/packages/discord.js/src/structures/ApplicationCommand.js +++ b/packages/discord.js/src/structures/ApplicationCommand.js @@ -52,6 +52,12 @@ class ApplicationCommand extends Base { */ this.type = data.type; + /** + * Whether this command is age-restricted (18+) + * @type {boolean} + */ + this.nsfw = data.nsfw ?? false; + this._patch(data); } @@ -188,6 +194,7 @@ class ApplicationCommand extends Base { * {@link ApplicationCommandType.ChatInput} * @property {Object} [nameLocalizations] The localizations for the command name * @property {string} description The description of the command, if type is {@link ApplicationCommandType.ChatInput} + * @property {boolean} [nsfw] Whether the command is age-restricted * @property {Object} [descriptionLocalizations] The localizations for the command description, * if type is {@link ApplicationCommandType.ChatInput} * @property {ApplicationCommandType} [type=ApplicationCommandType.ChatInput] The type of the command @@ -377,11 +384,12 @@ class ApplicationCommand extends Base { ('description' in command && command.description !== this.description) || ('version' in command && command.version !== this.version) || (command.type && command.type !== this.type) || + ('nsfw' in command && command.nsfw !== this.nsfw) || // Future proof for options being nullable // TODO: remove ?? 0 on each when nullable (command.options?.length ?? 0) !== (this.options?.length ?? 0) || defaultMemberPermissions !== (this.defaultMemberPermissions?.bitfield ?? null) || - (typeof dmPermission !== 'undefined' && dmPermission !== this.dmPermission) || + (dmPermission !== undefined && dmPermission !== this.dmPermission) || !isEqual(command.nameLocalizations ?? command.name_localizations ?? {}, this.nameLocalizations ?? {}) || !isEqual( command.descriptionLocalizations ?? command.description_localizations ?? {}, @@ -510,7 +518,7 @@ class ApplicationCommand extends Base { * {@link ApplicationCommandOptionType.Number} option * @property {ApplicationCommandOptionChoice[]} [choices] The choices of the option for the user to pick from * @property {ApplicationCommandOption[]} [options] Additional options if this option is a subcommand (group) - * @property {ChannelType[]} [channelTypes] When the option type is channel, + * @property {ApplicationCommandOptionAllowedChannelTypes[]} [channelTypes] When the option type is channel, * the allowed types of channels that can be selected * @property {number} [minValue] The minimum value for an {@link ApplicationCommandOptionType.Integer} or * {@link ApplicationCommandOptionType.Number} option @@ -591,3 +599,8 @@ module.exports = ApplicationCommand; * @external APIApplicationCommandOption * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure} */ + +/** + * @external ApplicationCommandOptionAllowedChannelTypes + * @see {@link https://discord.js.org/docs/packages/builders/stable/ApplicationCommandOptionAllowedChannelTypes:TypeAlias} + */ diff --git a/packages/discord.js/src/structures/ApplicationRoleConnectionMetadata.js b/packages/discord.js/src/structures/ApplicationRoleConnectionMetadata.js new file mode 100644 index 000000000000..7ed9b33f318f --- /dev/null +++ b/packages/discord.js/src/structures/ApplicationRoleConnectionMetadata.js @@ -0,0 +1,46 @@ +'use strict'; + +/** + * Role connection metadata object for an application. + */ +class ApplicationRoleConnectionMetadata { + constructor(data) { + /** + * The name of this metadata field + * @type {string} + */ + this.name = data.name; + + /** + * The name localizations for this metadata field + * @type {?Object} + */ + this.nameLocalizations = data.name_localizations ?? null; + + /** + * The description of this metadata field + * @type {string} + */ + this.description = data.description; + + /** + * The description localizations for this metadata field + * @type {?Object} + */ + this.descriptionLocalizations = data.description_localizations ?? null; + + /** + * The dictionary key for this metadata field + * @type {string} + */ + this.key = data.key; + + /** + * The type of this metadata field + * @type {ApplicationRoleConnectionMetadataType} + */ + this.type = data.type; + } +} + +exports.ApplicationRoleConnectionMetadata = ApplicationRoleConnectionMetadata; diff --git a/packages/discord.js/src/structures/Attachment.js b/packages/discord.js/src/structures/Attachment.js index 11a45643194e..086d7a870731 100644 --- a/packages/discord.js/src/structures/Attachment.js +++ b/packages/discord.js/src/structures/Attachment.js @@ -99,6 +99,28 @@ class Attachment { * @type {boolean} */ this.ephemeral = data.ephemeral ?? false; + + if ('duration_secs' in data) { + /** + * The duration of this attachment in seconds + * This will only be available if the attachment is an audio file. + * @type {?number} + */ + this.duration = data.duration_secs; + } else { + this.duration ??= null; + } + + if ('waveform' in data) { + /** + * The base64 encoded byte array representing a sampled waveform + * This will only be available if the attachment is an audio file. + * @type {?string} + */ + this.waveform = data.waveform; + } else { + this.waveform ??= null; + } } /** diff --git a/packages/discord.js/src/structures/AttachmentBuilder.js b/packages/discord.js/src/structures/AttachmentBuilder.js index e2e7cf5179cd..6c638108d843 100644 --- a/packages/discord.js/src/structures/AttachmentBuilder.js +++ b/packages/discord.js/src/structures/AttachmentBuilder.js @@ -91,7 +91,7 @@ class AttachmentBuilder { /** * Makes a new builder instance from a preexisting attachment structure. - * @param {JSONEncodable} other The builder to construct a new instance from + * @param {AttachmentBuilder|Attachment|AttachmentPayload} other The builder to construct a new instance from * @returns {AttachmentBuilder} */ static from(other) { diff --git a/packages/discord.js/src/structures/AutoModerationActionExecution.js b/packages/discord.js/src/structures/AutoModerationActionExecution.js new file mode 100644 index 000000000000..fcbc6170bdd0 --- /dev/null +++ b/packages/discord.js/src/structures/AutoModerationActionExecution.js @@ -0,0 +1,116 @@ +'use strict'; + +const { _transformAPIAutoModerationAction } = require('../util/Transformers'); + +/** + * Represents the structure of an executed action when an {@link AutoModerationRule} is triggered. + */ +class AutoModerationActionExecution { + constructor(data, guild) { + /** + * The guild where this action was executed from. + * @type {Guild} + */ + this.guild = guild; + + /** + * The action that was executed. + * @type {AutoModerationAction} + */ + this.action = _transformAPIAutoModerationAction(data.action); + + /** + * The id of the auto moderation rule this action belongs to. + * @type {Snowflake} + */ + this.ruleId = data.rule_id; + + /** + * The trigger type of the auto moderation rule which was triggered. + * @type {AutoModerationRuleTriggerType} + */ + this.ruleTriggerType = data.rule_trigger_type; + + /** + * The id of the user that triggered this action. + * @type {Snowflake} + */ + this.userId = data.user_id; + + /** + * The id of the channel where this action was triggered from. + * @type {?Snowflake} + */ + this.channelId = data.channel_id ?? null; + + /** + * The id of the message that triggered this action. + * This will not be present if the message was blocked or the content was not part of any message. + * @type {?Snowflake} + */ + this.messageId = data.message_id ?? null; + + /** + * The id of any system auto moderation messages posted as a result of this action. + * @type {?Snowflake} + */ + this.alertSystemMessageId = data.alert_system_message_id ?? null; + + /** + * The content that triggered this action. + * This property requires the {@link GatewayIntentBits.MessageContent} privileged gateway intent. + * @type {string} + */ + this.content = data.content; + + /** + * The word or phrase configured in the rule that triggered this action. + * @type {?string} + */ + this.matchedKeyword = data.matched_keyword ?? null; + + /** + * The substring in content that triggered this action. + * @type {?string} + */ + this.matchedContent = data.matched_content ?? null; + } + + /** + * The auto moderation rule this action belongs to. + * @type {?AutoModerationRule} + * @readonly + */ + get autoModerationRule() { + return this.guild.autoModerationRules.cache.get(this.ruleId) ?? null; + } + + /** + * The channel where this action was triggered from. + * @type {?(GuildTextBasedChannel|ForumChannel)} + * @readonly + */ + get channel() { + return this.guild.channels.cache.get(this.channelId) ?? null; + } + + /** + * The user that triggered this action. + * @type {?User} + * @readonly + */ + get user() { + return this.guild.client.users.cache.get(this.userId) ?? null; + } + + /** + * The guild member that triggered this action. + * @type {?GuildMember} + * @readonly + */ + get member() { + return this.guild.members.cache.get(this.userId) ?? null; + } +} + +module.exports = AutoModerationActionExecution; diff --git a/packages/discord.js/src/structures/AutoModerationRule.js b/packages/discord.js/src/structures/AutoModerationRule.js new file mode 100644 index 000000000000..e87f547eb37c --- /dev/null +++ b/packages/discord.js/src/structures/AutoModerationRule.js @@ -0,0 +1,284 @@ +'use strict'; + +const { Collection } = require('@discordjs/collection'); +const Base = require('./Base'); +const { _transformAPIAutoModerationAction } = require('../util/Transformers'); + +/** + * Represents an auto moderation rule. + * @extends {Base} + */ +class AutoModerationRule extends Base { + constructor(client, data, guild) { + super(client); + + /** + * The id of this auto moderation rule. + * @type {Snowflake} + */ + this.id = data.id; + + /** + * The guild this auto moderation rule is for. + * @type {Guild} + */ + this.guild = guild; + + /** + * The user that created this auto moderation rule. + * @type {Snowflake} + */ + this.creatorId = data.creator_id; + + /** + * The trigger type of this auto moderation rule. + * @type {AutoModerationRuleTriggerType} + */ + this.triggerType = data.trigger_type; + + this._patch(data); + } + + _patch(data) { + if ('name' in data) { + /** + * The name of this auto moderation rule. + * @type {string} + */ + this.name = data.name; + } + + if ('event_type' in data) { + /** + * The event type of this auto moderation rule. + * @type {AutoModerationRuleEventType} + */ + this.eventType = data.event_type; + } + + if ('trigger_metadata' in data) { + /** + * Additional data used to determine whether an auto moderation rule should be triggered. + * @typedef {Object} AutoModerationTriggerMetadata + * @property {string[]} keywordFilter The substrings that will be searched for in the content + * @property {string[]} regexPatterns The regular expression patterns which will be matched against the content + * Only Rust-flavored regular expressions are supported. + * @property {AutoModerationRuleKeywordPresetType[]} presets + * The internally pre-defined wordsets which will be searched for in the content + * @property {string[]} allowList The substrings that will be exempt from triggering + * {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset} + * @property {?number} mentionTotalLimit The total number of role & user mentions allowed per message + * @property {boolean} mentionRaidProtectionEnabled Whether mention raid protection is enabled + */ + + /** + * The trigger metadata of the rule. + * @type {AutoModerationTriggerMetadata} + */ + this.triggerMetadata = { + keywordFilter: data.trigger_metadata.keyword_filter ?? [], + regexPatterns: data.trigger_metadata.regex_patterns ?? [], + presets: data.trigger_metadata.presets ?? [], + allowList: data.trigger_metadata.allow_list ?? [], + mentionTotalLimit: data.trigger_metadata.mention_total_limit ?? null, + mentionRaidProtectionEnabled: data.trigger_metadata.mention_raid_protection_enabled ?? false, + }; + } + + if ('actions' in data) { + /** + * An object containing information about an auto moderation rule action. + * @typedef {Object} AutoModerationAction + * @property {AutoModerationActionType} type The type of this auto moderation rule action + * @property {AutoModerationActionMetadata} metadata Additional metadata needed during execution + */ + + /** + * Additional data used when an auto moderation rule is executed. + * @typedef {Object} AutoModerationActionMetadata + * @property {?Snowflake} channelId The id of the channel to which content will be logged + * @property {?number} durationSeconds The timeout duration in seconds + * @property {?string} customMessage The custom message that is shown whenever a message is blocked + */ + + /** + * The actions of this auto moderation rule. + * @type {AutoModerationAction[]} + */ + this.actions = data.actions.map(action => _transformAPIAutoModerationAction(action)); + } + + if ('enabled' in data) { + /** + * Whether this auto moderation rule is enabled. + * @type {boolean} + */ + this.enabled = data.enabled; + } + + if ('exempt_roles' in data) { + /** + * The roles exempt by this auto moderation rule. + * @type {Collection} + */ + this.exemptRoles = new Collection( + data.exempt_roles.map(exemptRole => [exemptRole, this.guild.roles.cache.get(exemptRole)]), + ); + } + + if ('exempt_channels' in data) { + /** + * The channels exempt by this auto moderation rule. + * @type {Collection} + */ + this.exemptChannels = new Collection( + data.exempt_channels.map(exemptChannel => [exemptChannel, this.guild.channels.cache.get(exemptChannel)]), + ); + } + } + + /** + * Edits this auto moderation rule. + * @param {AutoModerationRuleEditOptions} options Options for editing this auto moderation rule + * @returns {Promise} + */ + edit(options) { + return this.guild.autoModerationRules.edit(this.id, options); + } + + /** + * Deletes this auto moderation rule. + * @param {string} [reason] The reason for deleting this auto moderation rule + * @returns {Promise} + */ + delete(reason) { + return this.guild.autoModerationRules.delete(this.id, reason); + } + + /** + * Sets the name for this auto moderation rule. + * @param {string} name The name of this auto moderation rule + * @param {string} [reason] The reason for changing the name of this auto moderation rule + * @returns {Promise} + */ + setName(name, reason) { + return this.edit({ name, reason }); + } + + /** + * Sets the event type for this auto moderation rule. + * @param {AutoModerationRuleEventType} eventType The event type of this auto moderation rule + * @param {string} [reason] The reason for changing the event type of this auto moderation rule + * @returns {Promise} + */ + setEventType(eventType, reason) { + return this.edit({ eventType, reason }); + } + + /** + * Sets the keyword filter for this auto moderation rule. + * @param {string[]} keywordFilter The keyword filter of this auto moderation rule + * @param {string} [reason] The reason for changing the keyword filter of this auto moderation rule + * @returns {Promise} + */ + setKeywordFilter(keywordFilter, reason) { + return this.edit({ triggerMetadata: { ...this.triggerMetadata, keywordFilter }, reason }); + } + + /** + * Sets the regular expression patterns for this auto moderation rule. + * @param {string[]} regexPatterns The regular expression patterns of this auto moderation rule + * Only Rust-flavored regular expressions are supported. + * @param {string} [reason] The reason for changing the regular expression patterns of this auto moderation rule + * @returns {Promise} + */ + setRegexPatterns(regexPatterns, reason) { + return this.edit({ triggerMetadata: { ...this.triggerMetadata, regexPatterns }, reason }); + } + + /** + * Sets the presets for this auto moderation rule. + * @param {AutoModerationRuleKeywordPresetType[]} presets The presets of this auto moderation rule + * @param {string} [reason] The reason for changing the presets of this auto moderation rule + * @returns {Promise} + */ + setPresets(presets, reason) { + return this.edit({ triggerMetadata: { ...this.triggerMetadata, presets }, reason }); + } + + /** + * Sets the allow list for this auto moderation rule. + * @param {string[]} allowList The substrings that will be exempt from triggering + * {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset} + * @param {string} [reason] The reason for changing the allow list of this auto moderation rule + * @returns {Promise} + */ + setAllowList(allowList, reason) { + return this.edit({ triggerMetadata: { ...this.triggerMetadata, allowList }, reason }); + } + + /** + * Sets the mention total limit for this auto moderation rule. + * @param {number} mentionTotalLimit The total number of unique role and user mentions allowed per message + * @param {string} [reason] The reason for changing the mention total limit of this auto moderation rule + * @returns {Promise} + */ + setMentionTotalLimit(mentionTotalLimit, reason) { + return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionTotalLimit }, reason }); + } + + /** + * Sets whether to enable mention raid protection for this auto moderation rule. + * @param {boolean} mentionRaidProtectionEnabled + * Whether to enable mention raid protection for this auto moderation rule + * @param {string} [reason] The reason for changing the mention raid protection of this auto moderation rule + * @returns {Promise} + */ + setMentionRaidProtectionEnabled(mentionRaidProtectionEnabled, reason) { + return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionRaidProtectionEnabled }, reason }); + } + + /** + * Sets the actions for this auto moderation rule. + * @param {AutoModerationActionOptions[]} actions The actions of this auto moderation rule + * @param {string} [reason] The reason for changing the actions of this auto moderation rule + * @returns {Promise} + */ + setActions(actions, reason) { + return this.edit({ actions, reason }); + } + + /** + * Sets whether this auto moderation rule should be enabled. + * @param {boolean} [enabled=true] Whether to enable this auto moderation rule + * @param {string} [reason] The reason for enabling or disabling this auto moderation rule + * @returns {Promise} + */ + setEnabled(enabled = true, reason) { + return this.edit({ enabled, reason }); + } + + /** + * Sets the exempt roles for this auto moderation rule. + * @param {Collection|RoleResolvable[]} [exemptRoles] + * The roles that should not be affected by the auto moderation rule + * @param {string} [reason] The reason for changing the exempt roles of this auto moderation rule + * @returns {Promise} + */ + setExemptRoles(exemptRoles, reason) { + return this.edit({ exemptRoles, reason }); + } + + /** + * Sets the exempt channels for this auto moderation rule. + * @param {Collection|GuildChannelResolvable[]} [exemptChannels] + * The channels that should not be affected by the auto moderation rule + * @param {string} [reason] The reason for changing the exempt channels of this auto moderation rule + * @returns {Promise} + */ + setExemptChannels(exemptChannels, reason) { + return this.edit({ exemptChannels, reason }); + } +} + +module.exports = AutoModerationRule; diff --git a/packages/discord.js/src/structures/AutocompleteInteraction.js b/packages/discord.js/src/structures/AutocompleteInteraction.js index c44188af4ca7..4b7e39eee69e 100644 --- a/packages/discord.js/src/structures/AutocompleteInteraction.js +++ b/packages/discord.js/src/structures/AutocompleteInteraction.js @@ -87,7 +87,10 @@ class AutocompleteInteraction extends BaseInteraction { body: { type: InteractionResponseType.ApplicationCommandAutocompleteResult, data: { - choices: options, + choices: options.map(({ nameLocalizations, ...option }) => ({ + ...this.client.options.jsonTransformer(option), + name_localizations: nameLocalizations, + })), }, }, auth: false, diff --git a/packages/discord.js/src/structures/BaseGuildTextChannel.js b/packages/discord.js/src/structures/BaseGuildTextChannel.js index 71cb3c797aac..a8a608b3bdd0 100644 --- a/packages/discord.js/src/structures/BaseGuildTextChannel.js +++ b/packages/discord.js/src/structures/BaseGuildTextChannel.js @@ -125,7 +125,7 @@ class BaseGuildTextChannel extends GuildChannel { /** * Options used to create an invite to a guild channel. - * @typedef {Object} CreateInviteOptions + * @typedef {Object} InviteCreateOptions * @property {boolean} [temporary] Whether members that joined via the invite should be automatically * kicked after 24 hours if they have not yet received a role * @property {number} [maxAge] How long the invite should last (in seconds, 0 for forever) @@ -142,7 +142,7 @@ class BaseGuildTextChannel extends GuildChannel { /** * Creates an invite to this guild channel. - * @param {CreateInviteOptions} [options={}] The options for creating the invite + * @param {InviteCreateOptions} [options={}] The options for creating the invite * @returns {Promise} * @example * // Create an invite to a channel diff --git a/packages/discord.js/src/structures/BaseGuildVoiceChannel.js b/packages/discord.js/src/structures/BaseGuildVoiceChannel.js index 57d6bf26faad..de80dfeaaed6 100644 --- a/packages/discord.js/src/structures/BaseGuildVoiceChannel.js +++ b/packages/discord.js/src/structures/BaseGuildVoiceChannel.js @@ -3,12 +3,32 @@ const { Collection } = require('@discordjs/collection'); const { PermissionFlagsBits } = require('discord-api-types/v10'); const GuildChannel = require('./GuildChannel'); +const TextBasedChannel = require('./interfaces/TextBasedChannel'); +const MessageManager = require('../managers/MessageManager'); /** * Represents a voice-based guild channel on Discord. * @extends {GuildChannel} + * @implements {TextBasedChannel} */ class BaseGuildVoiceChannel extends GuildChannel { + constructor(guild, data, client) { + super(guild, data, client, false); + /** + * A manager of the messages sent to this channel + * @type {MessageManager} + */ + this.messages = new MessageManager(this); + + /** + * If the guild considers this channel NSFW + * @type {boolean} + */ + this.nsfw = Boolean(data.nsfw); + + this._patch(data); + } + _patch(data) { super._patch(data); @@ -35,6 +55,40 @@ class BaseGuildVoiceChannel extends GuildChannel { */ this.userLimit = data.user_limit; } + + if ('video_quality_mode' in data) { + /** + * The camera video quality mode of the channel. + * @type {?VideoQualityMode} + */ + this.videoQualityMode = data.video_quality_mode; + } else { + this.videoQualityMode ??= null; + } + + if ('last_message_id' in data) { + /** + * The last message id sent in the channel, if one was sent + * @type {?Snowflake} + */ + this.lastMessageId = data.last_message_id; + } + + if ('messages' in data) { + for (const message of data.messages) this.messages._add(message); + } + + if ('rate_limit_per_user' in data) { + /** + * The rate limit per user (slowmode) for this channel in seconds + * @type {number} + */ + this.rateLimitPerUser = data.rate_limit_per_user; + } + + if ('nsfw' in data) { + this.nsfw = data.nsfw; + } } /** @@ -80,6 +134,44 @@ class BaseGuildVoiceChannel extends GuildChannel { ); } + /** + * Creates an invite to this guild channel. + * @param {InviteCreateOptions} [options={}] The options for creating the invite + * @returns {Promise} + * @example + * // Create an invite to a channel + * channel.createInvite() + * .then(invite => console.log(`Created an invite with a code of ${invite.code}`)) + * .catch(console.error); + */ + createInvite(options) { + return this.guild.invites.create(this.id, options); + } + + /** + * Fetches a collection of invites to this guild channel. + * @param {boolean} [cache=true] Whether to cache the fetched invites + * @returns {Promise>} + */ + fetchInvites(cache = true) { + return this.guild.invites.fetch({ channelId: this.id, cache }); + } + + /** + * Sets the bitrate of the channel. + * @param {number} bitrate The new bitrate + * @param {string} [reason] Reason for changing the channel's bitrate + * @returns {Promise} + * @example + * // Set the bitrate of a voice channel + * channel.setBitrate(48_000) + * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`)) + * .catch(console.error); + */ + setBitrate(bitrate, reason) { + return this.edit({ bitrate, reason }); + } + /** * Sets the RTC region of the channel. * @param {?string} rtcRegion The new region of the channel. Set to `null` to remove a specific region for the channel @@ -97,28 +189,46 @@ class BaseGuildVoiceChannel extends GuildChannel { } /** - * Creates an invite to this guild channel. - * @param {CreateInviteOptions} [options={}] The options for creating the invite - * @returns {Promise} + * Sets the user limit of the channel. + * @param {number} userLimit The new user limit + * @param {string} [reason] Reason for changing the user limit + * @returns {Promise} * @example - * // Create an invite to a channel - * channel.createInvite() - * .then(invite => console.log(`Created an invite with a code of ${invite.code}`)) + * // Set the user limit of a voice channel + * channel.setUserLimit(42) + * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`)) * .catch(console.error); */ - createInvite(options) { - return this.guild.invites.create(this.id, options); + setUserLimit(userLimit, reason) { + return this.edit({ userLimit, reason }); } /** - * Fetches a collection of invites to this guild channel. - * Resolves with a collection mapping invites by their codes. - * @param {boolean} [cache=true] Whether or not to cache the fetched invites - * @returns {Promise>} + * Sets the camera video quality mode of the channel. + * @param {VideoQualityMode} videoQualityMode The new camera video quality mode. + * @param {string} [reason] Reason for changing the camera video quality mode. + * @returns {Promise} */ - fetchInvites(cache = true) { - return this.guild.invites.fetch({ channelId: this.id, cache }); + setVideoQualityMode(videoQualityMode, reason) { + return this.edit({ videoQualityMode, reason }); } + + // These are here only for documentation purposes - they are implemented by TextBasedChannel + /* eslint-disable no-empty-function */ + get lastMessage() {} + send() {} + sendTyping() {} + createMessageCollector() {} + awaitMessages() {} + createMessageComponentCollector() {} + awaitMessageComponent() {} + bulkDelete() {} + fetchWebhooks() {} + createWebhook() {} + setRateLimitPerUser() {} + setNSFW() {} } +TextBasedChannel.applyToClass(BaseGuildVoiceChannel, true, ['lastPinAt']); + module.exports = BaseGuildVoiceChannel; diff --git a/packages/discord.js/src/structures/BaseInteraction.js b/packages/discord.js/src/structures/BaseInteraction.js index df98cf2e1c85..967350fd0449 100644 --- a/packages/discord.js/src/structures/BaseInteraction.js +++ b/packages/discord.js/src/structures/BaseInteraction.js @@ -46,7 +46,7 @@ class BaseInteraction extends Base { * The id of the channel this interaction was sent in * @type {?Snowflake} */ - this.channelId = data.channel_id ?? null; + this.channelId = data.channel?.id ?? null; /** * The id of the guild this interaction was sent in @@ -270,12 +270,10 @@ class BaseInteraction extends Base { return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.Button; } - // TODO: Get rid of this in the next major /** * Indicates whether this interaction is a {@link StringSelectMenuInteraction}. * @returns {boolean} - * - * @deprecated Use {@link Interaction#isStringSelectMenu} instead + * @deprecated Use {@link BaseInteraction#isStringSelectMenu} instead. */ isSelectMenu() { return this.isStringSelectMenu(); @@ -322,7 +320,7 @@ class BaseInteraction extends Base { } /** - * Indicates whether this interaction is a {@link MenionableSelectMenuInteraction} + * Indicates whether this interaction is a {@link MentionableSelectMenuInteraction} * @returns {boolean} */ isMentionableSelectMenu() { diff --git a/packages/discord.js/src/structures/BaseSelectMenuComponent.js b/packages/discord.js/src/structures/BaseSelectMenuComponent.js index bb08087630a6..7177f4329bbf 100644 --- a/packages/discord.js/src/structures/BaseSelectMenuComponent.js +++ b/packages/discord.js/src/structures/BaseSelectMenuComponent.js @@ -45,11 +45,11 @@ class BaseSelectMenuComponent extends Component { /** * Whether this select menu is disabled - * @type {?boolean} + * @type {boolean} * @readonly */ get disabled() { - return this.data.disabled ?? null; + return this.data.disabled ?? false; } } diff --git a/packages/discord.js/src/structures/ButtonBuilder.js b/packages/discord.js/src/structures/ButtonBuilder.js index a32bf0015347..ada4188a8e5c 100644 --- a/packages/discord.js/src/structures/ButtonBuilder.js +++ b/packages/discord.js/src/structures/ButtonBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { ButtonBuilder: BuildersButton, isJSONEncodable } = require('@discordjs/builders'); +const { ButtonBuilder: BuildersButton } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolvePartialEmoji } = require('../util/Util'); @@ -27,14 +28,11 @@ class ButtonBuilder extends BuildersButton { /** * Creates a new button builder from JSON data - * @param {JSONEncodable|APIButtonComponent} other The other data + * @param {ButtonBuilder|ButtonComponent|APIButtonComponent} other The other data * @returns {ButtonBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -42,5 +40,5 @@ module.exports = ButtonBuilder; /** * @external BuildersButton - * @see {@link https://discord.js.org/#/docs/builders/main/class/ButtonBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/ButtonBuilder:Class} */ diff --git a/packages/discord.js/src/structures/ButtonComponent.js b/packages/discord.js/src/structures/ButtonComponent.js index b6dd52a4d35b..7319c3a5f19f 100644 --- a/packages/discord.js/src/structures/ButtonComponent.js +++ b/packages/discord.js/src/structures/ButtonComponent.js @@ -36,11 +36,11 @@ class ButtonComponent extends Component { /** * Whether this button is disabled - * @type {?boolean} + * @type {boolean} * @readonly */ get disabled() { - return this.data.disabled ?? null; + return this.data.disabled ?? false; } /** diff --git a/packages/discord.js/src/structures/CategoryChannel.js b/packages/discord.js/src/structures/CategoryChannel.js index 6f53858cea95..d03804466b2b 100644 --- a/packages/discord.js/src/structures/CategoryChannel.js +++ b/packages/discord.js/src/structures/CategoryChannel.js @@ -9,17 +9,21 @@ const CategoryChannelChildManager = require('../managers/CategoryChannelChildMan */ class CategoryChannel extends GuildChannel { /** - * A manager of the channels belonging to this category - * @type {CategoryChannelChildManager} + * The id of the parent of this channel. + * @name CategoryChannel#parentId + * @type {null} + */ + + /** + * The parent of this channel. + * @name CategoryChannel#parent + * @type {null} * @readonly */ - get children() { - return new CategoryChannelChildManager(this); - } /** * Sets the category parent of this channel. - * It is not currently possible to set the parent of a CategoryChannel. + * It is not possible to set the parent of a CategoryChannel. * @method setParent * @memberof CategoryChannel * @instance @@ -27,6 +31,15 @@ class CategoryChannel extends GuildChannel { * @param {SetParentOptions} [options={}] The options for setting the parent * @returns {Promise} */ + + /** + * A manager of the channels belonging to this category + * @type {CategoryChannelChildManager} + * @readonly + */ + get children() { + return new CategoryChannelChildManager(this); + } } module.exports = CategoryChannel; diff --git a/packages/discord.js/src/structures/ChannelSelectMenuBuilder.js b/packages/discord.js/src/structures/ChannelSelectMenuBuilder.js index 324f70b3e27f..6d994740587b 100644 --- a/packages/discord.js/src/structures/ChannelSelectMenuBuilder.js +++ b/packages/discord.js/src/structures/ChannelSelectMenuBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { ChannelSelectMenuBuilder: BuildersChannelSelectMenu, isJSONEncodable } = require('@discordjs/builders'); +const { ChannelSelectMenuBuilder: BuildersChannelSelectMenu } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** @@ -13,15 +14,12 @@ class ChannelSelectMenuBuilder extends BuildersChannelSelectMenu { } /** - * Creates a new select menu builder from json data - * @param {JSONEncodable | APISelectMenuComponent} other The other data + * Creates a new select menu builder from JSON data + * @param {ChannelSelectMenuBuilder|ChannelSelectMenuComponent|APIChannelSelectComponent} other The other data * @returns {ChannelSelectMenuBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -29,5 +27,5 @@ module.exports = ChannelSelectMenuBuilder; /** * @external BuildersChannelSelectMenu - * @see {@link https://discord.js.org/#/docs/builders/main/class/ChannelSelectMenuBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/ChannelSelectMenuBuilder:Class} */ diff --git a/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js b/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js index 04d076e599f0..d36bac8d5e84 100644 --- a/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/ChannelSelectMenuInteraction.js @@ -10,13 +10,21 @@ const MessageComponentInteraction = require('./MessageComponentInteraction'); class ChannelSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + const { resolved, values } = data.data; + + /** + * An array of the selected channel ids + * @type {Snowflake[]} + */ + this.values = values ?? []; /** * Collection of the selected channels * @type {Collection} */ this.channels = new Collection(); - for (const channel of Object.values(data.data.resolved.channels)) { + + for (const channel of Object.values(resolved?.channels ?? {})) { this.channels.set(channel.id, this.client.channels._add(channel, this.guild) ?? channel); } } diff --git a/packages/discord.js/src/structures/ClientApplication.js b/packages/discord.js/src/structures/ClientApplication.js index 811147cd4552..afee47d3c353 100644 --- a/packages/discord.js/src/structures/ClientApplication.js +++ b/packages/discord.js/src/structures/ClientApplication.js @@ -1,6 +1,7 @@ 'use strict'; const { Routes } = require('discord-api-types/v10'); +const { ApplicationRoleConnectionMetadata } = require('./ApplicationRoleConnectionMetadata'); const Team = require('./Team'); const Application = require('./interfaces/Application'); const ApplicationCommandManager = require('../managers/ApplicationCommandManager'); @@ -108,6 +109,16 @@ class ClientApplication extends Application { this.botPublic ??= null; } + if ('role_connections_verification_url' in data) { + /** + * This application's role connection verification entry point URL + * @type {?string} + */ + this.roleConnectionsVerificationURL = data.role_connections_verification_url; + } else { + this.roleConnectionsVerificationURL ??= null; + } + /** * The owner of this OAuth application * @type {?(User|Team)} @@ -137,6 +148,46 @@ class ClientApplication extends Application { this._patch(app); return this; } + + /** + * Gets this application's role connection metadata records + * @returns {Promise} + */ + async fetchRoleConnectionMetadataRecords() { + const metadata = await this.client.rest.get(Routes.applicationRoleConnectionMetadata(this.client.user.id)); + return metadata.map(data => new ApplicationRoleConnectionMetadata(data)); + } + + /** + * Data for creating or editing an application role connection metadata. + * @typedef {Object} ApplicationRoleConnectionMetadataEditOptions + * @property {string} name The name of the metadata field + * @property {?Object} [nameLocalizations] The name localizations for the metadata field + * @property {string} description The description of the metadata field + * @property {?Object} [descriptionLocalizations] The description localizations for the metadata field + * @property {string} key The dictionary key of the metadata field + * @property {ApplicationRoleConnectionMetadataType} type The type of the metadata field + */ + + /** + * Updates this application's role connection metadata records + * @param {ApplicationRoleConnectionMetadataEditOptions[]} records The new role connection metadata records + * @returns {Promise} + */ + async editRoleConnectionMetadataRecords(records) { + const newRecords = await this.client.rest.put(Routes.applicationRoleConnectionMetadata(this.client.user.id), { + body: records.map(record => ({ + type: record.type, + key: record.key, + name: record.name, + name_localizations: record.nameLocalizations, + description: record.description, + description_localizations: record.descriptionLocalizations, + })), + }); + + return newRecords.map(data => new ApplicationRoleConnectionMetadata(data)); + } } module.exports = ClientApplication; diff --git a/packages/discord.js/src/structures/ClientPresence.js b/packages/discord.js/src/structures/ClientPresence.js index e94238f97674..5b448d78643b 100644 --- a/packages/discord.js/src/structures/ClientPresence.js +++ b/packages/discord.js/src/structures/ClientPresence.js @@ -21,7 +21,7 @@ class ClientPresence extends Presence { set(presence) { const packet = this._parse(presence); this._patch(packet); - if (typeof presence.shardId === 'undefined') { + if (presence.shardId === undefined) { this.client.ws.broadcast({ op: GatewayOpcodes.PresenceUpdate, d: packet }); } else if (Array.isArray(presence.shardId)) { for (const shardId of presence.shardId) { diff --git a/packages/discord.js/src/structures/ClientUser.js b/packages/discord.js/src/structures/ClientUser.js index e8041d4b4011..040e732910c2 100644 --- a/packages/discord.js/src/structures/ClientUser.js +++ b/packages/discord.js/src/structures/ClientUser.js @@ -44,22 +44,24 @@ class ClientUser extends User { /** * Data used to edit the logged in client - * @typedef {Object} ClientUserEditData + * @typedef {Object} ClientUserEditOptions * @property {string} [username] The new username * @property {?(BufferResolvable|Base64Resolvable)} [avatar] The new avatar */ /** * Edits the logged in client. - * @param {ClientUserEditData} data The new data + * @param {ClientUserEditOptions} options The options to provide * @returns {Promise} */ - async edit(data) { - if (typeof data.avatar !== 'undefined') data.avatar = await DataResolver.resolveImage(data.avatar); - const newData = await this.client.rest.patch(Routes.user(), { body: data }); - this.client.token = newData.token; - this.client.rest.setToken(newData.token); - const { updated } = this.client.actions.UserUpdate.handle(newData); + async edit({ username, avatar }) { + const data = await this.client.rest.patch(Routes.user(), { + body: { username, avatar: avatar && (await DataResolver.resolveImage(avatar)) }, + }); + + this.client.token = data.token; + this.client.rest.setToken(data.token); + const { updated } = this.client.actions.UserUpdate.handle(data); return updated ?? this; } diff --git a/packages/discord.js/src/structures/CommandInteractionOptionResolver.js b/packages/discord.js/src/structures/CommandInteractionOptionResolver.js index 530a8666a787..621dbf44e1f2 100644 --- a/packages/discord.js/src/structures/CommandInteractionOptionResolver.js +++ b/packages/discord.js/src/structures/CommandInteractionOptionResolver.js @@ -85,19 +85,19 @@ class CommandInteractionOptionResolver { /** * Gets an option by name and property and checks its type. * @param {string} name The name of the option. - * @param {ApplicationCommandOptionType} type The type of the option. + * @param {ApplicationCommandOptionType[]} allowedTypes The allowed types of the option. * @param {string[]} properties The properties to check for for `required`. * @param {boolean} required Whether to throw an error if the option is not found. * @returns {?CommandInteractionOption} The option, if found. * @private */ - _getTypedOption(name, type, properties, required) { + _getTypedOption(name, allowedTypes, properties, required) { const option = this.get(name, required); if (!option) { return null; - } else if (option.type !== type) { - throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionType, name, option.type, type); - } else if (required && properties.every(prop => option[prop] === null || typeof option[prop] === 'undefined')) { + } else if (!allowedTypes.includes(option.type)) { + throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionType, name, option.type, allowedTypes.join(', ')); + } else if (required && properties.every(prop => option[prop] === null || option[prop] === undefined)) { throw new DiscordjsTypeError(ErrorCodes.CommandInteractionOptionEmpty, name, option.type); } return option; @@ -134,7 +134,7 @@ class CommandInteractionOptionResolver { * @returns {?boolean} The value of the option, or null if not set and not required. */ getBoolean(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.Boolean, ['value'], required); + const option = this._getTypedOption(name, [ApplicationCommandOptionType.Boolean], ['value'], required); return option?.value ?? null; } @@ -142,12 +142,24 @@ class CommandInteractionOptionResolver { * Gets a channel option. * @param {string} name The name of the option. * @param {boolean} [required=false] Whether to throw an error if the option is not found. + * @param {ChannelType[]} [channelTypes=[]] The allowed types of channels. If empty, all channel types are allowed. * @returns {?(GuildChannel|ThreadChannel|APIChannel)} * The value of the option, or null if not set and not required. */ - getChannel(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.Channel, ['channel'], required); - return option?.channel ?? null; + getChannel(name, required = false, channelTypes = []) { + const option = this._getTypedOption(name, [ApplicationCommandOptionType.Channel], ['channel'], required); + const channel = option?.channel ?? null; + + if (channel && channelTypes.length > 0 && !channelTypes.includes(channel.type)) { + throw new DiscordjsTypeError( + ErrorCodes.CommandInteractionOptionInvalidChannelType, + name, + channel.type, + channelTypes.join(', '), + ); + } + + return channel; } /** @@ -157,7 +169,7 @@ class CommandInteractionOptionResolver { * @returns {?string} The value of the option, or null if not set and not required. */ getString(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.String, ['value'], required); + const option = this._getTypedOption(name, [ApplicationCommandOptionType.String], ['value'], required); return option?.value ?? null; } @@ -168,7 +180,7 @@ class CommandInteractionOptionResolver { * @returns {?number} The value of the option, or null if not set and not required. */ getInteger(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.Integer, ['value'], required); + const option = this._getTypedOption(name, [ApplicationCommandOptionType.Integer], ['value'], required); return option?.value ?? null; } @@ -179,7 +191,7 @@ class CommandInteractionOptionResolver { * @returns {?number} The value of the option, or null if not set and not required. */ getNumber(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.Number, ['value'], required); + const option = this._getTypedOption(name, [ApplicationCommandOptionType.Number], ['value'], required); return option?.value ?? null; } @@ -190,7 +202,12 @@ class CommandInteractionOptionResolver { * @returns {?User} The value of the option, or null if not set and not required. */ getUser(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.User, ['user'], required); + const option = this._getTypedOption( + name, + [ApplicationCommandOptionType.User, ApplicationCommandOptionType.Mentionable], + ['user'], + required, + ); return option?.user ?? null; } @@ -201,7 +218,12 @@ class CommandInteractionOptionResolver { * The value of the option, or null if the user is not present in the guild or the option is not set. */ getMember(name) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.User, ['member'], false); + const option = this._getTypedOption( + name, + [ApplicationCommandOptionType.User, ApplicationCommandOptionType.Mentionable], + ['member'], + false, + ); return option?.member ?? null; } @@ -212,7 +234,12 @@ class CommandInteractionOptionResolver { * @returns {?(Role|APIRole)} The value of the option, or null if not set and not required. */ getRole(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.Role, ['role'], required); + const option = this._getTypedOption( + name, + [ApplicationCommandOptionType.Role, ApplicationCommandOptionType.Mentionable], + ['role'], + required, + ); return option?.role ?? null; } @@ -223,7 +250,7 @@ class CommandInteractionOptionResolver { * @returns {?Attachment} The value of the option, or null if not set and not required. */ getAttachment(name, required = false) { - const option = this._getTypedOption(name, ApplicationCommandOptionType.Attachment, ['attachment'], required); + const option = this._getTypedOption(name, [ApplicationCommandOptionType.Attachment], ['attachment'], required); return option?.attachment ?? null; } @@ -237,7 +264,7 @@ class CommandInteractionOptionResolver { getMentionable(name, required = false) { const option = this._getTypedOption( name, - ApplicationCommandOptionType.Mentionable, + [ApplicationCommandOptionType.Mentionable], ['user', 'member', 'role'], required, ); @@ -252,7 +279,7 @@ class CommandInteractionOptionResolver { * The value of the option, or null if not set and not required. */ getMessage(name, required = false) { - const option = this._getTypedOption(name, '_MESSAGE', ['message'], required); + const option = this._getTypedOption(name, ['_MESSAGE'], ['message'], required); return option?.message ?? null; } diff --git a/packages/discord.js/src/structures/DMChannel.js b/packages/discord.js/src/structures/DMChannel.js index b5452ca09db1..8c13f7550058 100644 --- a/packages/discord.js/src/structures/DMChannel.js +++ b/packages/discord.js/src/structures/DMChannel.js @@ -68,7 +68,7 @@ class DMChannel extends BaseChannel { * @readonly */ get partial() { - return typeof this.lastMessageId === 'undefined'; + return this.lastMessageId === undefined; } /** diff --git a/packages/discord.js/src/structures/EmbedBuilder.js b/packages/discord.js/src/structures/EmbedBuilder.js index 58d5c210436c..09fe5725a2b9 100644 --- a/packages/discord.js/src/structures/EmbedBuilder.js +++ b/packages/discord.js/src/structures/EmbedBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { EmbedBuilder: BuildersEmbed, isJSONEncodable } = require('@discordjs/builders'); +const { EmbedBuilder: BuildersEmbed } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolveColor } = require('../util/Util'); @@ -24,14 +25,11 @@ class EmbedBuilder extends BuildersEmbed { /** * Creates a new embed builder from JSON data - * @param {JSONEncodable|APIEmbed} other The other data + * @param {EmbedBuilder|Embed|APIEmbed} other The other data * @returns {EmbedBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -39,5 +37,5 @@ module.exports = EmbedBuilder; /** * @external BuildersEmbed - * @see {@link https://discord.js.org/#/docs/builders/main/class/EmbedBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/EmbedBuilder:Class} */ diff --git a/packages/discord.js/src/structures/ForumChannel.js b/packages/discord.js/src/structures/ForumChannel.js index 617f8ea6f3c5..87e647820424 100644 --- a/packages/discord.js/src/structures/ForumChannel.js +++ b/packages/discord.js/src/structures/ForumChannel.js @@ -134,6 +134,12 @@ class ForumChannel extends GuildChannel { } else { this.defaultSortOrder ??= null; } + + /** + * The default layout type used to display posts + * @type {ForumLayoutType} + */ + this.defaultForumLayout = data.default_forum_layout; } /** @@ -168,7 +174,7 @@ class ForumChannel extends GuildChannel { /** * Creates an invite to this guild channel. - * @param {CreateInviteOptions} [options={}] The options for creating the invite + * @param {InviteCreateOptions} [options={}] The options for creating the invite * @returns {Promise} * @example * // Create an invite to a channel @@ -225,6 +231,16 @@ class ForumChannel extends GuildChannel { return this.edit({ defaultSortOrder, reason }); } + /** + * Sets the default forum layout type used to display posts + * @param {ForumLayoutType} defaultForumLayout The default forum layout type to set on this channel + * @param {string} [reason] Reason for changing the default forum layout + * @returns {Promise} + */ + setDefaultForumLayout(defaultForumLayout, reason) { + return this.edit({ defaultForumLayout, reason }); + } + // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ createWebhook() {} diff --git a/packages/discord.js/src/structures/Guild.js b/packages/discord.js/src/structures/Guild.js index ba1d2b3b42ae..ce3405813f56 100644 --- a/packages/discord.js/src/structures/Guild.js +++ b/packages/discord.js/src/structures/Guild.js @@ -5,13 +5,13 @@ const { makeURLSearchParams } = require('@discordjs/rest'); const { ChannelType, GuildPremiumTier, Routes, GuildFeature } = require('discord-api-types/v10'); const AnonymousGuild = require('./AnonymousGuild'); const GuildAuditLogs = require('./GuildAuditLogs'); -const GuildAuditLogsEntry = require('./GuildAuditLogsEntry'); const GuildPreview = require('./GuildPreview'); const GuildTemplate = require('./GuildTemplate'); const Integration = require('./Integration'); const Webhook = require('./Webhook'); const WelcomeScreen = require('./WelcomeScreen'); const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors'); +const AutoModerationRuleManager = require('../managers/AutoModerationRuleManager'); const GuildApplicationCommandManager = require('../managers/GuildApplicationCommandManager'); const GuildBanManager = require('../managers/GuildBanManager'); const GuildChannelManager = require('../managers/GuildChannelManager'); @@ -99,6 +99,12 @@ class Guild extends AnonymousGuild { */ this.scheduledEvents = new GuildScheduledEventManager(this); + /** + * A manager of the auto moderation rules of this guild. + * @type {AutoModerationRuleManager} + */ + this.autoModerationRules = new AutoModerationRuleManager(this); + if (!data) return; if (data.unavailable) { /** @@ -301,6 +307,16 @@ class Guild extends AnonymousGuild { this.maxVideoChannelUsers ??= null; } + if ('max_stage_video_channel_users' in data) { + /** + * The maximum amount of users allowed in a stage video channel. + * @type {?number} + */ + this.maxStageVideoChannelUsers = data.max_stage_video_channel_users; + } else { + this.maxStageVideoChannelUsers ??= null; + } + if ('approximate_member_count' in data) { /** * The approximate amount of members the guild has @@ -354,6 +370,16 @@ class Guild extends AnonymousGuild { this.preferredLocale = data.preferred_locale; } + if ('safety_alerts_channel_id' in data) { + /** + * The safety alerts channel's id for the guild + * @type {?Snowflake} + */ + this.safetyAlertsChannelId = data.safety_alerts_channel_id; + } else { + this.safetyAlertsChannelId ??= null; + } + if (data.channels) { this.channels.cache.clear(); for (const rawChannel of data.channels) { @@ -518,6 +544,15 @@ class Guild extends AnonymousGuild { return this.client.channels.resolve(this.publicUpdatesChannelId); } + /** + * Safety alerts channel for this guild + * @type {?TextChannel} + * @readonly + */ + get safetyAlertsChannel() { + return this.client.channels.resolve(this.safetyAlertsChannelId); + } + /** * The maximum bitrate available for this guild * @type {number} @@ -617,9 +652,6 @@ class Guild extends AnonymousGuild { * .catch(console.error); */ async fetchVanityData() { - if (!this.features.includes(GuildFeature.VanityURL)) { - throw new DiscordjsError(ErrorCodes.VanityURL); - } const data = await this.client.rest.get(Routes.guildVanityUrl(this.id)); this.vanityURLCode = data.code; this.vanityURLUses = data.uses; @@ -693,7 +725,8 @@ class Guild extends AnonymousGuild { /** * Options used to fetch audit logs. * @typedef {Object} GuildAuditLogsFetchOptions - * @property {Snowflake|GuildAuditLogsEntry} [before] Only return entries before this entry + * @property {Snowflake|GuildAuditLogsEntry} [before] Consider only entries before this entry + * @property {Snowflake|GuildAuditLogsEntry} [after] Consider only entries after this entry * @property {number} [limit] The number of entries to return * @property {UserResolvable} [user] Only return entries for actions made by this user * @property {?AuditLogEvent} [type] Only return entries for this action type @@ -709,19 +742,18 @@ class Guild extends AnonymousGuild { * .then(audit => console.log(audit.entries.first())) * .catch(console.error); */ - async fetchAuditLogs(options = {}) { - if (options.before && options.before instanceof GuildAuditLogsEntry) options.before = options.before.id; - + async fetchAuditLogs({ before, after, limit, user, type } = {}) { const query = makeURLSearchParams({ - before: options.before, - limit: options.limit, - action_type: options.type, + before: before?.id ?? before, + after: after?.id ?? after, + limit, + action_type: type, }); - if (options.user) { - const id = this.client.users.resolveId(options.user); - if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'); - query.set('user_id', id); + if (user) { + const userId = this.client.users.resolveId(user); + if (!userId) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'user', 'UserResolvable'); + query.set('user_id', userId); } const data = await this.client.rest.get(Routes.guildAuditLog(this.id), { query }); @@ -730,30 +762,30 @@ class Guild extends AnonymousGuild { /** * The data for editing a guild. - * @typedef {Object} GuildEditData + * @typedef {Object} GuildEditOptions * @property {string} [name] The name of the guild * @property {?GuildVerificationLevel} [verificationLevel] The verification level of the guild + * @property {?GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message + * notification level of the guild * @property {?GuildExplicitContentFilter} [explicitContentFilter] The level of the explicit content filter * @property {?VoiceChannelResolvable} [afkChannel] The AFK channel of the guild - * @property {?TextChannelResolvable} [systemChannel] The system channel of the guild * @property {number} [afkTimeout] The AFK timeout of the guild * @property {?(BufferResolvable|Base64Resolvable)} [icon] The icon of the guild * @property {GuildMemberResolvable} [owner] The owner of the guild * @property {?(BufferResolvable|Base64Resolvable)} [splash] The invite splash image of the guild * @property {?(BufferResolvable|Base64Resolvable)} [discoverySplash] The discovery splash image of the guild * @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner of the guild - * @property {?GuildDefaultMessageNotifications} [defaultMessageNotifications] The default message - * notification level of the guild + * @property {?TextChannelResolvable} [systemChannel] The system channel of the guild * @property {SystemChannelFlagsResolvable} [systemChannelFlags] The system channel flags of the guild * @property {?TextChannelResolvable} [rulesChannel] The rules channel of the guild * @property {?TextChannelResolvable} [publicUpdatesChannel] The community updates channel of the guild + * @property {?TextChannelResolvable} [safetyAlertsChannel] The safety alerts channel of the guild * @property {?string} [preferredLocale] The preferred locale of the guild - * @property {boolean} [premiumProgressBarEnabled] Whether the guild's premium progress bar is enabled - * @property {?string} [description] The discovery description of the guild * @property {GuildFeature[]} [features] The features of the guild + * @property {?string} [description] The discovery description of the guild + * @property {boolean} [premiumProgressBarEnabled] Whether the guild's premium progress bar is enabled * @property {string} [reason] Reason for editing this guild */ - /* eslint-enable max-len */ /** * Data that can be resolved to a Text Channel object. This can be: @@ -771,7 +803,7 @@ class Guild extends AnonymousGuild { /** * Updates the guild with new information - e.g. a new name. - * @param {GuildEditData} data The data to update the guild with + * @param {GuildEditOptions} options The options to provide * @returns {Promise} * @example * // Set the guild name @@ -781,51 +813,52 @@ class Guild extends AnonymousGuild { * .then(updated => console.log(`New guild name ${updated}`)) * .catch(console.error); */ - async edit(data) { - const _data = {}; - if (data.name) _data.name = data.name; - if (typeof data.verificationLevel !== 'undefined') { - _data.verification_level = data.verificationLevel; - } - if (typeof data.afkChannel !== 'undefined') { - _data.afk_channel_id = this.client.channels.resolveId(data.afkChannel); - } - if (typeof data.systemChannel !== 'undefined') { - _data.system_channel_id = this.client.channels.resolveId(data.systemChannel); - } - if (data.afkTimeout) _data.afk_timeout = Number(data.afkTimeout); - if (typeof data.icon !== 'undefined') _data.icon = await DataResolver.resolveImage(data.icon); - if (data.owner) _data.owner_id = this.client.users.resolveId(data.owner); - if (typeof data.splash !== 'undefined') _data.splash = await DataResolver.resolveImage(data.splash); - if (typeof data.discoverySplash !== 'undefined') { - _data.discovery_splash = await DataResolver.resolveImage(data.discoverySplash); - } - if (typeof data.banner !== 'undefined') _data.banner = await DataResolver.resolveImage(data.banner); - if (typeof data.explicitContentFilter !== 'undefined') { - _data.explicit_content_filter = data.explicitContentFilter; - } - if (typeof data.defaultMessageNotifications !== 'undefined') { - _data.default_message_notifications = data.defaultMessageNotifications; - } - if (typeof data.systemChannelFlags !== 'undefined') { - _data.system_channel_flags = SystemChannelFlagsBitField.resolve(data.systemChannelFlags); - } - if (typeof data.rulesChannel !== 'undefined') { - _data.rules_channel_id = this.client.channels.resolveId(data.rulesChannel); - } - if (typeof data.publicUpdatesChannel !== 'undefined') { - _data.public_updates_channel_id = this.client.channels.resolveId(data.publicUpdatesChannel); - } - if (typeof data.features !== 'undefined') { - _data.features = data.features; - } - if (typeof data.description !== 'undefined') { - _data.description = data.description; - } - if (typeof data.preferredLocale !== 'undefined') _data.preferred_locale = data.preferredLocale; - if ('premiumProgressBarEnabled' in data) _data.premium_progress_bar_enabled = data.premiumProgressBarEnabled; - const newData = await this.client.rest.patch(Routes.guild(this.id), { body: _data, reason: data.reason }); - return this.client.actions.GuildUpdate.handle(newData).updated; + async edit({ + verificationLevel, + defaultMessageNotifications, + explicitContentFilter, + afkChannel, + afkTimeout, + icon, + owner, + splash, + discoverySplash, + banner, + systemChannel, + systemChannelFlags, + rulesChannel, + publicUpdatesChannel, + preferredLocale, + premiumProgressBarEnabled, + safetyAlertsChannel, + ...options + }) { + const data = await this.client.rest.patch(Routes.guild(this.id), { + body: { + ...options, + verification_level: verificationLevel, + default_message_notifications: defaultMessageNotifications, + explicit_content_filter: explicitContentFilter, + afk_channel_id: afkChannel && this.client.channels.resolveId(afkChannel), + afk_timeout: afkTimeout, + icon: icon && (await DataResolver.resolveImage(icon)), + owner_id: owner && this.client.users.resolveId(owner), + splash: splash && (await DataResolver.resolveImage(splash)), + discovery_splash: discoverySplash && (await DataResolver.resolveImage(discoverySplash)), + banner: banner && (await DataResolver.resolveImage(banner)), + system_channel_id: systemChannel && this.client.channels.resolveId(systemChannel), + system_channel_flags: + systemChannelFlags === undefined ? undefined : SystemChannelFlagsBitField.resolve(systemChannelFlags), + rules_channel_id: rulesChannel && this.client.channels.resolveId(rulesChannel), + public_updates_channel_id: publicUpdatesChannel && this.client.channels.resolveId(publicUpdatesChannel), + preferred_locale: preferredLocale, + premium_progress_bar_enabled: premiumProgressBarEnabled, + safety_alerts_channel_id: safetyAlertsChannel && this.client.channels.resolveId(safetyAlertsChannel), + }, + reason: options.reason, + }); + + return this.client.actions.GuildUpdate.handle(data).updated; } /** @@ -838,7 +871,7 @@ class Guild extends AnonymousGuild { /** * Welcome screen edit data - * @typedef {Object} WelcomeScreenEditData + * @typedef {Object} WelcomeScreenEditOptions * @property {boolean} [enabled] Whether the welcome screen is enabled * @property {string} [description] The description for the welcome screen * @property {WelcomeChannelData[]} [welcomeChannels] The welcome channel data for the welcome screen @@ -862,7 +895,7 @@ class Guild extends AnonymousGuild { /** * Updates the guild's welcome screen - * @param {WelcomeScreenEditData} data Data to edit the welcome screen with + * @param {WelcomeScreenEditOptions} options The options to provide * @returns {Promise} * @example * guild.editWelcomeScreen({ @@ -876,8 +909,8 @@ class Guild extends AnonymousGuild { * ], * }) */ - async editWelcomeScreen(data) { - const { enabled, description, welcomeChannels } = data; + async editWelcomeScreen(options) { + const { enabled, description, welcomeChannels } = options; const welcome_channels = welcomeChannels?.map(welcomeChannelData => { const emoji = this.emojis.resolve(welcomeChannelData.emoji); return { @@ -898,7 +931,6 @@ class Guild extends AnonymousGuild { return new WelcomeScreen(this, patchData); } - /* eslint-disable max-len */ /** * Edits the level of the explicit content filter. * @param {?GuildExplicitContentFilter} explicitContentFilter The new level of the explicit content filter @@ -911,14 +943,14 @@ class Guild extends AnonymousGuild { /** * Edits the setting of the default message notifications of the guild. - * @param {?GuildDefaultMessageNotifications} defaultMessageNotifications The new default message notification level of the guild + * @param {?GuildDefaultMessageNotifications} defaultMessageNotifications + * The new default message notification level of the guild * @param {string} [reason] Reason for changing the setting of the default message notifications * @returns {Promise} */ setDefaultMessageNotifications(defaultMessageNotifications, reason) { return this.edit({ defaultMessageNotifications, reason }); } - /* eslint-enable max-len */ /** * Edits the flags of the default message notifications of the guild. @@ -1135,6 +1167,21 @@ class Guild extends AnonymousGuild { return this.edit({ premiumProgressBarEnabled: enabled, reason }); } + /** + * Edits the safety alerts channel of the guild. + * @param {?TextChannelResolvable} safetyAlertsChannel The new safety alerts channel + * @param {string} [reason] Reason for changing the guild's safety alerts channel + * @returns {Promise} + * @example + * // Edit the guild safety alerts channel + * guild.setSafetyAlertsChannel(channel) + * .then(updated => console.log(`Updated guild safety alerts channel to ${updated.safetyAlertsChannel.name}`)) + * .catch(console.error); + */ + setSafetyAlertsChannel(safetyAlertsChannel, reason) { + return this.edit({ safetyAlertsChannel, reason }); + } + /** * Edits the guild's widget settings. * @param {GuildWidgetSettingsData} settings The widget settings for the guild @@ -1154,9 +1201,15 @@ class Guild extends AnonymousGuild { /** * Sets the guild's MFA level + * An elevated MFA level requires guild moderators to have 2FA enabled. * @param {GuildMFALevel} level The MFA level * @param {string} [reason] Reason for changing the guild's MFA level * @returns {Promise} + * @example + * // Set the MFA level of the guild to Elevated + * guild.setMFALevel(GuildMFALevel.Elevated) + * .then(guild => console.log("Set guild's MFA level to Elevated")) + * .catch(console.error); */ async setMFALevel(level, reason) { await this.client.rest.post(Routes.guildMFA(this.id), { @@ -1174,7 +1227,7 @@ class Guild extends AnonymousGuild { * @example * // Leave a guild * guild.leave() - * .then(g => console.log(`Left the guild ${g}`)) + * .then(guild => console.log(`Left the guild: ${guild.name}`)) * .catch(console.error); */ async leave() { @@ -1197,6 +1250,17 @@ class Guild extends AnonymousGuild { return this; } + /** + * Sets whether this guild's invites are disabled. + * @param {boolean} [disabled=true] Whether the invites are disabled + * @returns {Promise} + */ + async disableInvites(disabled = true) { + const features = this.features.filter(feature => feature !== GuildFeature.InvitesDisabled); + if (disabled) features.push(GuildFeature.InvitesDisabled); + return this.edit({ features }); + } + /** * Whether this guild equals another guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often diff --git a/packages/discord.js/src/structures/GuildAuditLogs.js b/packages/discord.js/src/structures/GuildAuditLogs.js index b5635a37807d..2ce13a8da312 100644 --- a/packages/discord.js/src/structures/GuildAuditLogs.js +++ b/packages/discord.js/src/structures/GuildAuditLogs.js @@ -61,13 +61,24 @@ class GuildAuditLogs { } } + /** + * Cached auto moderation rules. + * @type {Collection} + * @private + */ + this.autoModerationRules = data.auto_moderation_rules.reduce( + (autoModerationRules, autoModerationRule) => + autoModerationRules.set(autoModerationRule.id, guild.autoModerationRules._add(autoModerationRule)), + new Collection(), + ); + /** * The entries for this guild's audit logs * @type {Collection} */ this.entries = new Collection(); for (const item of data.audit_log_entries) { - const entry = new GuildAuditLogsEntry(this, guild, item); + const entry = new GuildAuditLogsEntry(guild, item, this); this.entries.set(entry.id, entry); } } diff --git a/packages/discord.js/src/structures/GuildAuditLogsEntry.js b/packages/discord.js/src/structures/GuildAuditLogsEntry.js index dde8b6e136a0..febbd12929b8 100644 --- a/packages/discord.js/src/structures/GuildAuditLogsEntry.js +++ b/packages/discord.js/src/structures/GuildAuditLogsEntry.js @@ -2,6 +2,7 @@ const { DiscordSnowflake } = require('@sapphire/snowflake'); const { AuditLogOptionsType, AuditLogEvent } = require('discord-api-types/v10'); +const AutoModerationRule = require('./AutoModerationRule'); const { GuildScheduledEvent } = require('./GuildScheduledEvent'); const Integration = require('./Integration'); const Invite = require('./Invite'); @@ -27,6 +28,7 @@ const Targets = { Sticker: 'Sticker', Thread: 'Thread', ApplicationCommand: 'ApplicationCommand', + AutoModeration: 'AutoModeration', Unknown: 'Unknown', }; @@ -46,10 +48,11 @@ const Targets = { * * A guild scheduled event * * A thread * * An application command + * * An auto moderation rule * * An object with an id key if target was deleted or fake entity * * An object where the keys represent either the new value or the old value * @typedef {?(Object|Guild|BaseChannel|User|Role|Invite|Webhook|GuildEmoji|Message|Integration|StageInstance|Sticker| - * GuildScheduledEvent|ApplicationCommand)} AuditLogEntryTarget + * GuildScheduledEvent|ApplicationCommand|AutoModerationRule)} AuditLogEntryTarget */ /** @@ -91,7 +94,7 @@ class GuildAuditLogsEntry { */ static Targets = Targets; - constructor(logs, guild, data) { + constructor(guild, data, logs) { /** * The target type of this entry * @type {AuditLogTargetType} @@ -106,7 +109,7 @@ class GuildAuditLogsEntry { this.actionType = GuildAuditLogsEntry.actionType(data.action_type); /** - * The type of action that occured. + * The type of action that occurred. * @type {AuditLogEvent} */ this.action = data.action_type; @@ -117,6 +120,12 @@ class GuildAuditLogsEntry { */ this.reason = data.reason ?? null; + /** + * The id of the user that executed this entry + * @type {?Snowflake} + */ + this.executorId = data.user_id; + /** * The user that executed this entry * @type {?User} @@ -124,7 +133,7 @@ class GuildAuditLogsEntry { this.executor = data.user_id ? guild.client.options.partials.includes(Partials.User) ? guild.client.users._add({ id: data.user_id }) - : guild.client.users.cache.get(data.user_id) + : guild.client.users.cache.get(data.user_id) ?? null : null; /** @@ -223,10 +232,26 @@ class GuildAuditLogsEntry { }; break; + case AuditLogEvent.AutoModerationBlockMessage: + case AuditLogEvent.AutoModerationFlagToChannel: + case AuditLogEvent.AutoModerationUserCommunicationDisabled: + this.extra = { + autoModerationRuleName: data.options.auto_moderation_rule_name, + autoModerationRuleTriggerType: data.options.auto_moderation_rule_trigger_type, + channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id }, + }; + break; + default: break; } + /** + * The id of the target of this entry + * @type {?Snowflake} + */ + this.targetId = data.target_id; + /** * The target of this entry * @type {?AuditLogEntryTarget} @@ -242,12 +267,12 @@ class GuildAuditLogsEntry { } else if (targetType === Targets.User && data.target_id) { this.target = guild.client.options.partials.includes(Partials.User) ? guild.client.users._add({ id: data.target_id }) - : guild.client.users.cache.get(data.target_id); + : guild.client.users.cache.get(data.target_id) ?? null; } else if (targetType === Targets.Guild) { this.target = guild.client.guilds.cache.get(data.target_id); } else if (targetType === Targets.Webhook) { this.target = - logs.webhooks.get(data.target_id) ?? + logs?.webhooks.get(data.target_id) ?? new Webhook( guild.client, this.changes.reduce( @@ -282,10 +307,10 @@ class GuildAuditLogsEntry { this.target = data.action_type === AuditLogEvent.MessageBulkDelete ? guild.channels.cache.get(data.target_id) ?? { id: data.target_id } - : guild.client.users.cache.get(data.target_id); + : guild.client.users.cache.get(data.target_id) ?? null; } else if (targetType === Targets.Integration) { this.target = - logs.integrations.get(data.target_id) ?? + logs?.integrations.get(data.target_id) ?? new Integration( guild.client, this.changes.reduce( @@ -351,7 +376,21 @@ class GuildAuditLogsEntry { ), ); } else if (targetType === Targets.ApplicationCommand) { - this.target = logs.applicationCommands.get(data.target_id) ?? { id: data.target_id }; + this.target = logs?.applicationCommands.get(data.target_id) ?? { id: data.target_id }; + } else if (targetType === Targets.AutoModeration) { + this.target = + guild.autoModerationRules.cache.get(data.target_id) ?? + new AutoModerationRule( + guild.client, + this.changes.reduce( + (o, c) => { + o[c.key] = c.new ?? c.old; + return o; + }, + { id: data.target_id, guild_id: guild.id }, + ), + guild, + ); } else if (data.target_id) { this.target = guild[`${targetType.toLowerCase()}s`]?.cache.get(data.target_id) ?? { id: data.target_id }; } @@ -377,6 +416,7 @@ class GuildAuditLogsEntry { if (target < 110) return Targets.GuildScheduledEvent; if (target < 120) return Targets.Thread; if (target < 130) return Targets.ApplicationCommand; + if (target >= 140 && target < 150) return Targets.AutoModeration; return Targets.Unknown; } @@ -402,6 +442,8 @@ class GuildAuditLogsEntry { AuditLogEvent.StickerCreate, AuditLogEvent.GuildScheduledEventCreate, AuditLogEvent.ThreadCreate, + AuditLogEvent.AutoModerationRuleCreate, + AuditLogEvent.AutoModerationBlockMessage, ].includes(action) ) { return 'Create'; @@ -427,6 +469,7 @@ class GuildAuditLogsEntry { AuditLogEvent.StickerDelete, AuditLogEvent.GuildScheduledEventDelete, AuditLogEvent.ThreadDelete, + AuditLogEvent.AutoModerationRuleDelete, ].includes(action) ) { return 'Delete'; @@ -450,6 +493,7 @@ class GuildAuditLogsEntry { AuditLogEvent.GuildScheduledEventUpdate, AuditLogEvent.ThreadUpdate, AuditLogEvent.ApplicationCommandPermissionUpdate, + AuditLogEvent.AutoModerationRuleUpdate, ].includes(action) ) { return 'Update'; diff --git a/packages/discord.js/src/structures/GuildChannel.js b/packages/discord.js/src/structures/GuildChannel.js index 263f3b3aab2d..6de224a3f0f2 100644 --- a/packages/discord.js/src/structures/GuildChannel.js +++ b/packages/discord.js/src/structures/GuildChannel.js @@ -20,7 +20,7 @@ const PermissionsBitField = require('../util/PermissionsBitField'); */ class GuildChannel extends BaseChannel { constructor(guild, data, client, immediatePatch = true) { - super(guild?.client ?? client, data, false); + super(client, data, false); /** * The guild the channel is in @@ -33,8 +33,6 @@ class GuildChannel extends BaseChannel { * @type {Snowflake} */ this.guildId = guild?.id ?? data.guild_id; - - this.parentId = this.parentId ?? null; /** * A manager of permission overwrites that belong to this channel * @type {PermissionOverwriteManager} @@ -73,6 +71,8 @@ class GuildChannel extends BaseChannel { * @type {?Snowflake} */ this.parentId = data.parent_id; + } else { + this.parentId ??= null; } if ('permission_overwrites' in data) { @@ -131,8 +131,8 @@ class GuildChannel extends BaseChannel { // Compare overwrites return ( - typeof channelVal !== 'undefined' && - typeof parentVal !== 'undefined' && + channelVal !== undefined && + parentVal !== undefined && channelVal.deny.bitfield === parentVal.deny.bitfield && channelVal.allow.bitfield === parentVal.allow.bitfield ); @@ -268,7 +268,7 @@ class GuildChannel extends BaseChannel { /** * Edits the channel. - * @param {GuildChannelEditOptions} data The new data for the channel + * @param {GuildChannelEditOptions} options The options to provide * @returns {Promise} * @example * // Edit a channel @@ -276,8 +276,8 @@ class GuildChannel extends BaseChannel { * .then(console.log) * .catch(console.error); */ - edit(data) { - return this.guild.channels.edit(this, data); + edit(options) { + return this.guild.channels.edit(this, options); } /** diff --git a/packages/discord.js/src/structures/GuildEmoji.js b/packages/discord.js/src/structures/GuildEmoji.js index d2854a794994..0035a36e0197 100644 --- a/packages/discord.js/src/structures/GuildEmoji.js +++ b/packages/discord.js/src/structures/GuildEmoji.js @@ -56,7 +56,7 @@ class GuildEmoji extends BaseGuildEmoji { */ get deletable() { if (!this.guild.members.me) throw new DiscordjsError(ErrorCodes.GuildUncachedMe); - return !this.managed && this.guild.members.me.permissions.has(PermissionFlagsBits.ManageEmojisAndStickers); + return !this.managed && this.guild.members.me.permissions.has(PermissionFlagsBits.ManageGuildExpressions); } /** @@ -78,7 +78,7 @@ class GuildEmoji extends BaseGuildEmoji { /** * Data for editing an emoji. - * @typedef {Object} GuildEmojiEditData + * @typedef {Object} GuildEmojiEditOptions * @property {string} [name] The name of the emoji * @property {Collection|RoleResolvable[]} [roles] Roles to restrict emoji to * @property {string} [reason] Reason for editing this emoji @@ -86,7 +86,7 @@ class GuildEmoji extends BaseGuildEmoji { /** * Edits the emoji. - * @param {GuildEmojiEditData} data The new data for the emoji + * @param {GuildEmojiEditOptions} options The options to provide * @returns {Promise} * @example * // Edit an emoji @@ -94,8 +94,8 @@ class GuildEmoji extends BaseGuildEmoji { * .then(e => console.log(`Edited emoji ${e}`)) * .catch(console.error); */ - edit(data) { - return this.guild.emojis.edit(this.id, data); + edit(options) { + return this.guild.emojis.edit(this.id, options); } /** diff --git a/packages/discord.js/src/structures/GuildMember.js b/packages/discord.js/src/structures/GuildMember.js index 8553889f33bb..8806b508b555 100644 --- a/packages/discord.js/src/structures/GuildMember.js +++ b/packages/discord.js/src/structures/GuildMember.js @@ -6,6 +6,7 @@ const VoiceState = require('./VoiceState'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const { DiscordjsError, ErrorCodes } = require('../errors'); const GuildMemberRoleManager = require('../managers/GuildMemberRoleManager'); +const { GuildMemberFlagsBitField } = require('../util/GuildMemberFlagsBitField'); const PermissionsBitField = require('../util/PermissionsBitField'); /** @@ -53,7 +54,14 @@ class GuildMember extends Base { */ this.communicationDisabledUntilTimestamp = null; - this._roles = []; + /** + * The role ids of the member + * @name GuildMember#_roles + * @type {Snowflake[]} + * @private + */ + Object.defineProperty(this, '_roles', { value: [], writable: true }); + if (data) this._patch(data); } @@ -93,6 +101,16 @@ class GuildMember extends Base { this.communicationDisabledUntilTimestamp = data.communication_disabled_until && Date.parse(data.communication_disabled_until); } + + if ('flags' in data) { + /** + * The flags of this member + * @type {Readonly} + */ + this.flags = new GuildMemberFlagsBitField(data.flags).freeze(); + } else { + this.flags ??= new GuildMemberFlagsBitField().freeze(); + } } _clone() { @@ -220,12 +238,12 @@ class GuildMember extends Base { } /** - * The nickname of this member, or their username if they don't have one + * The nickname of this member, or their user display name if they don't have one * @type {?string} * @readonly */ get displayName() { - return this.nickname ?? this.user.username; + return this.nickname ?? this.user.displayName; } /** @@ -307,11 +325,21 @@ class GuildMember extends Base { /** * Edits this member. - * @param {GuildMemberEditData} data The data to edit the member with + * @param {GuildMemberEditOptions} options The options to provide + * @returns {Promise} + */ + edit(options) { + return this.guild.members.edit(this, options); + } + + /** + * Sets the flags for this member. + * @param {GuildMemberFlagsResolvable} flags The flags to set + * @param {string} [reason] Reason for setting the flags * @returns {Promise} */ - edit(data) { - return this.guild.members.edit(this, data); + setFlags(flags, reason) { + return this.edit({ flags, reason }); } /** @@ -319,6 +347,16 @@ class GuildMember extends Base { * @param {?string} nick The nickname for the guild member, or `null` if you want to reset their nickname * @param {string} [reason] Reason for setting the nickname * @returns {Promise} + * @example + * // Set a nickname for a guild member + * guildMember.setNickname('cool nickname', 'Needed a new nickname') + * .then(member => console.log(`Set nickname of ${member.user.username}`)) + * .catch(console.error); + * @example + * // Remove a nickname for a guild member + * guildMember.setNickname(null, 'No nicknames allowed!') + * .then(member => console.log(`Removed nickname for ${member.user.username}`)) + * .catch(console.error); */ setNickname(nick, reason) { return this.edit({ nick, reason }); @@ -361,7 +399,7 @@ class GuildMember extends Base { * .catch(console.error); */ ban(options) { - return this.guild.members.ban(this, options); + return this.guild.bans.create(this, options); } /** @@ -375,6 +413,11 @@ class GuildMember extends Base { * guildMember.disableCommunicationUntil(Date.now() + (5 * 60 * 1000), 'They deserved it') * .then(console.log) * .catch(console.error); + * @example + * // Remove the timeout of a guild member + * guildMember.disableCommunicationUntil(null) + * .then(member => console.log(`Removed timeout for ${member.displayName}`)) + * .catch(console.error); */ disableCommunicationUntil(communicationDisabledUntil, reason) { return this.edit({ communicationDisabledUntil, reason }); @@ -423,6 +466,7 @@ class GuildMember extends Base { this.avatar === member.avatar && this.pending === member.pending && this.communicationDisabledUntilTimestamp === member.communicationDisabledUntilTimestamp && + this.flags.bitfield === member.flags.bitfield && (this._roles === member._roles || (this._roles.length === member._roles.length && this._roles.every((role, i) => role === member._roles[i]))) ); @@ -450,12 +494,22 @@ class GuildMember extends Base { json.displayAvatarURL = this.displayAvatarURL(); return json; } - - // These are here only for documentation purposes - they are implemented by TextBasedChannel - /* eslint-disable no-empty-function */ - send() {} } +/** + * Sends a message to this user. + * @method send + * @memberof GuildMember + * @instance + * @param {string|MessagePayload|MessageCreateOptions} options The options to provide + * @returns {Promise} + * @example + * // Send a direct message + * guildMember.send('Hello!') + * .then(message => console.log(`Sent message: ${message.content} to ${guildMember.displayName}`)) + * .catch(console.error); + */ + TextBasedChannel.applyToClass(GuildMember); exports.GuildMember = GuildMember; diff --git a/packages/discord.js/src/structures/GuildScheduledEvent.js b/packages/discord.js/src/structures/GuildScheduledEvent.js index 8e11175d29b5..e9a37b2b0b86 100644 --- a/packages/discord.js/src/structures/GuildScheduledEvent.js +++ b/packages/discord.js/src/structures/GuildScheduledEvent.js @@ -240,7 +240,7 @@ class GuildScheduledEvent extends Base { /** * Options used to create an invite URL to a {@link GuildScheduledEvent} - * @typedef {CreateInviteOptions} CreateGuildScheduledEventInviteURLOptions + * @typedef {InviteCreateOptions} GuildScheduledEventInviteURLCreateOptions * @property {GuildInvitableChannelResolvable} [channel] The channel to create the invite in. * This is required when the `entityType` of `GuildScheduledEvent` is * {@link GuildScheduledEventEntityType.External}, gets ignored otherwise @@ -248,7 +248,7 @@ class GuildScheduledEvent extends Base { /** * Creates an invite URL to this guild scheduled event. - * @param {CreateGuildScheduledEventInviteURLOptions} [options] The options to create the invite + * @param {GuildScheduledEventInviteURLCreateOptions} [options] The options to create the invite * @returns {Promise} */ async createInviteURL(options) { diff --git a/packages/discord.js/src/structures/GuildTemplate.js b/packages/discord.js/src/structures/GuildTemplate.js index 7f4cad43da58..c1e219b5e2a0 100644 --- a/packages/discord.js/src/structures/GuildTemplate.js +++ b/packages/discord.js/src/structures/GuildTemplate.js @@ -155,14 +155,14 @@ class GuildTemplate extends Base { /** * Options used to edit a guild template. - * @typedef {Object} EditGuildTemplateOptions + * @typedef {Object} GuildTemplateEditOptions * @property {string} [name] The name of this template * @property {string} [description] The description of this template */ /** * Updates the metadata of this template. - * @param {EditGuildTemplateOptions} [options] Options for editing the template + * @param {GuildTemplateEditOptions} [options] Options for editing the template * @returns {Promise} */ async edit({ name, description } = {}) { diff --git a/packages/discord.js/src/structures/Integration.js b/packages/discord.js/src/structures/Integration.js index d51dfbda8b73..fa9777b38c8c 100644 --- a/packages/discord.js/src/structures/Integration.js +++ b/packages/discord.js/src/structures/Integration.js @@ -16,6 +16,7 @@ const IntegrationApplication = require('./IntegrationApplication'); * * `twitch` * * `youtube` * * `discord` + * * `guild_subscription` * @typedef {string} IntegrationType */ diff --git a/packages/discord.js/src/structures/InteractionCollector.js b/packages/discord.js/src/structures/InteractionCollector.js index 7134406f2392..bb8e6c7676fc 100644 --- a/packages/discord.js/src/structures/InteractionCollector.js +++ b/packages/discord.js/src/structures/InteractionCollector.js @@ -14,7 +14,7 @@ const Events = require('../util/Events'); * @property {number} [maxComponents] The maximum number of components to collect * @property {number} [maxUsers] The maximum number of users to interact * @property {Message|APIMessage} [message] The message to listen to interactions from - * @property {InteractionResponse} interactionResponse The interaction response to listen + * @property {InteractionResponse} [interactionResponse] The interaction response to listen * to message component interactions from */ diff --git a/packages/discord.js/src/structures/InteractionResponse.js b/packages/discord.js/src/structures/InteractionResponse.js index b99f80f696c6..9b372e3932d6 100644 --- a/packages/discord.js/src/structures/InteractionResponse.js +++ b/packages/discord.js/src/structures/InteractionResponse.js @@ -1,5 +1,6 @@ 'use strict'; +const { DiscordSnowflake } = require('@sapphire/snowflake'); const { InteractionType } = require('discord-api-types/v10'); const { DiscordjsError, ErrorCodes } = require('../errors'); @@ -21,6 +22,24 @@ class InteractionResponse { this.client = interaction.client; } + /** + * The timestamp the interaction response was created at + * @type {number} + * @readonly + */ + get createdTimestamp() { + return DiscordSnowflake.timestampFrom(this.id); + } + + /** + * The time the interaction response was created at + * @type {Date} + * @readonly + */ + get createdAt() { + return new Date(this.createdTimestamp); + } + /** * Collects a single component interaction that passes the filter. * The Promise will reject if the time expires. @@ -51,6 +70,31 @@ class InteractionResponse { interactionType: InteractionType.MessageComponent, }); } + + /** + * Fetches the response as a {@link Message} object. + * @returns {Promise} + */ + fetch() { + return this.interaction.fetchReply(); + } + + /** + * Deletes the response. + * @returns {Promise} + */ + delete() { + return this.interaction.deleteReply(); + } + + /** + * Edits the response. + * @param {string|MessagePayload|WebhookMessageEditOptions} options The new options for the response. + * @returns {Promise} + */ + edit(options) { + return this.interaction.editReply(options); + } } // eslint-disable-next-line import/order diff --git a/packages/discord.js/src/structures/InteractionWebhook.js b/packages/discord.js/src/structures/InteractionWebhook.js index b54ca0c12c9d..58eb531435e7 100644 --- a/packages/discord.js/src/structures/InteractionWebhook.js +++ b/packages/discord.js/src/structures/InteractionWebhook.js @@ -45,7 +45,7 @@ class InteractionWebhook { /** * Edits a message that was sent by this webhook. * @param {MessageResolvable|'@original'} message The message to edit - * @param {string|MessagePayload|WebhookEditMessageOptions} options The options to provide + * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide * @returns {Promise} Returns the message edited by this webhook */ diff --git a/packages/discord.js/src/structures/InviteGuild.js b/packages/discord.js/src/structures/InviteGuild.js index ab1aed492144..8efd9805ec19 100644 --- a/packages/discord.js/src/structures/InviteGuild.js +++ b/packages/discord.js/src/structures/InviteGuild.js @@ -15,8 +15,7 @@ class InviteGuild extends AnonymousGuild { * The welcome screen for this invite guild * @type {?WelcomeScreen} */ - this.welcomeScreen = - typeof data.welcome_screen !== 'undefined' ? new WelcomeScreen(this, data.welcome_screen) : null; + this.welcomeScreen = data.welcome_screen !== undefined ? new WelcomeScreen(this, data.welcome_screen) : null; } } diff --git a/packages/discord.js/src/structures/MentionableSelectMenuBuilder.js b/packages/discord.js/src/structures/MentionableSelectMenuBuilder.js index d5673db6865e..b22f600b90e3 100644 --- a/packages/discord.js/src/structures/MentionableSelectMenuBuilder.js +++ b/packages/discord.js/src/structures/MentionableSelectMenuBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { MentionableSelectMenuBuilder: BuildersMentionableSelectMenu, isJSONEncodable } = require('@discordjs/builders'); +const { MentionableSelectMenuBuilder: BuildersMentionableSelectMenu } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** @@ -13,15 +14,13 @@ class MentionableSelectMenuBuilder extends BuildersMentionableSelectMenu { } /** - * Creates a new select menu builder from json data - * @param {JSONEncodable | APISelectMenuComponent} other The other data + * Creates a new select menu builder from JSON data + * @param {MentionableSelectMenuBuilder|MentionableSelectMenuComponent|APIMentionableSelectComponent} other + * The other data * @returns {MentionableSelectMenuBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -29,5 +28,5 @@ module.exports = MentionableSelectMenuBuilder; /** * @external BuildersMentionableSelectMenu - * @see {@link https://discord.js.org/#/docs/builders/main/class/MentionableSelectMenuBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/MentionableSelectMenuBuilder:Class} */ diff --git a/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js b/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js index bd294a04a74a..416d5ceb5429 100644 --- a/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/MentionableSelectMenuInteraction.js @@ -11,8 +11,14 @@ const Events = require('../util/Events'); class MentionableSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + const { resolved, values } = data.data; + const { members, users, roles } = resolved ?? {}; - const { members, users, roles } = data.data.resolved ?? {}; + /** + * An array of the selected user and role ids + * @type {Snowflake[]} + */ + this.values = values ?? []; /** * Collection of the selected users diff --git a/packages/discord.js/src/structures/Message.js b/packages/discord.js/src/structures/Message.js index dd5a4b6ff12e..c82c177ab146 100644 --- a/packages/discord.js/src/structures/Message.js +++ b/packages/discord.js/src/structures/Message.js @@ -22,7 +22,7 @@ const { Sticker } = require('./Sticker'); const { DiscordjsError, ErrorCodes } = require('../errors'); const ReactionManager = require('../managers/ReactionManager'); const { createComponent } = require('../util/Components'); -const { NonSystemMessageTypes, MaxBulkDeletableMessageAge } = require('../util/Constants'); +const { NonSystemMessageTypes, MaxBulkDeletableMessageAge, DeletableMessageTypes } = require('../util/Constants'); const MessageFlagsBitField = require('../util/MessageFlagsBitField'); const PermissionsBitField = require('../util/PermissionsBitField'); const { cleanContent, resolvePartialEmoji } = require('../util/Util'); @@ -198,6 +198,31 @@ class Message extends Base { this.position ??= null; } + if ('role_subscription_data' in data) { + /** + * Role subscription data found on {@link MessageType.RoleSubscriptionPurchase} messages. + * @typedef {Object} RoleSubscriptionData + * @property {Snowflake} roleSubscriptionListingId The id of the SKU and listing the user is subscribed to + * @property {string} tierName The name of the tier the user is subscribed to + * @property {number} totalMonthsSubscribed The total number of months the user has been subscribed for + * @property {boolean} isRenewal Whether this notification is a renewal + */ + + /** + * The data of the role subscription purchase or renewal. + * This is present on {@link MessageType.RoleSubscriptionPurchase} messages. + * @type {?RoleSubscriptionData} + */ + this.roleSubscriptionData = { + roleSubscriptionListingId: data.role_subscription_data.role_subscription_listing_id, + tierName: data.role_subscription_data.tier_name, + totalMonthsSubscribed: data.role_subscription_data.total_months_subscribed, + isRenewal: data.role_subscription_data.is_renewal, + }; + } else { + this.roleSubscriptionData ??= null; + } + // Discord sends null if the message has not been edited if (data.edited_timestamp) { /** @@ -543,7 +568,7 @@ class Message extends Base { * @property {ComponentType} [componentType] The type of component interaction to collect * @property {number} [idle] Time to wait without another message component interaction before ending the collector * @property {boolean} [dispose] Whether to remove the message component interaction after collecting - * @property {InteractionResponse} [InteractionResponse] The interaction response to collect interactions from + * @property {InteractionResponse} [interactionResponse] The interaction response to collect interactions from */ /** @@ -577,11 +602,17 @@ class Message extends Base { */ get editable() { const precheck = Boolean(this.author.id === this.client.user.id && (!this.guild || this.channel?.viewable)); + // Regardless of permissions thread messages cannot be edited if - // the thread is locked. + // the thread is archived or the thread is locked and the bot does not have permission to manage threads. if (this.channel?.isThread()) { - return precheck && !this.channel.locked; + if (this.channel.archived) return false; + if (this.channel.locked) { + const permissions = this.channel.permissionsFor(this.client.user); + if (!permissions?.has(PermissionFlagsBits.ManageThreads, true)) return false; + } } + return precheck; } @@ -591,6 +622,8 @@ class Message extends Base { * @readonly */ get deletable() { + if (!DeletableMessageTypes.includes(this.type)) return false; + if (!this.guild) { return this.author.id === this.client.user.id; } @@ -604,10 +637,10 @@ class Message extends Base { // This flag allows deleting even if timed out if (permissions.has(PermissionFlagsBits.Administrator, false)) return true; - return Boolean( - this.author.id === this.client.user.id || - (permissions.has(PermissionFlagsBits.ManageMessages, false) && - this.guild.members.me.communicationDisabledUntilTimestamp < Date.now()), + // The auto moderation action message author is the reference message author + return ( + (this.type !== MessageType.AutoModerationAction && this.author.id === this.client.user.id) || + (permissions.has(PermissionFlagsBits.ManageMessages, false) && !this.guild.members.me.isCommunicationDisabled()) ); } @@ -620,12 +653,11 @@ class Message extends Base { * channel.bulkDelete(messages.filter(message => message.bulkDeletable)); */ get bulkDeletable() { - const permissions = this.channel?.permissionsFor(this.client.user); return ( (this.inGuild() && Date.now() - this.createdTimestamp < MaxBulkDeletableMessageAge && this.deletable && - permissions?.has(PermissionFlagsBits.ManageMessages, false)) ?? + this.channel?.permissionsFor(this.client.user).has(PermissionFlagsBits.ManageMessages, false)) ?? false ); } @@ -761,9 +793,9 @@ class Message extends Base { return this.client.actions.MessageReactionAdd.handle( { - user: this.client.user, - channel: this.channel, - message: this, + [this.client.actions.injectedUser]: this.client.user, + [this.client.actions.injectedChannel]: this.channel, + [this.client.actions.injectedMessage]: this, emoji: resolvePartialEmoji(emoji), }, true, @@ -790,7 +822,6 @@ class Message extends Base { * @typedef {BaseMessageCreateOptions} MessageReplyOptions * @property {boolean} [failIfNotExists=this.client.options.failIfNotExists] Whether to error if the referenced * message does not exist (creates a standard message in this case when false) - * @property {StickerResolvable[]} [stickers=[]] Stickers to send in the message */ /** diff --git a/packages/discord.js/src/structures/MessageComponentInteraction.js b/packages/discord.js/src/structures/MessageComponentInteraction.js index 9ffa99354481..47b31e04c12c 100644 --- a/packages/discord.js/src/structures/MessageComponentInteraction.js +++ b/packages/discord.js/src/structures/MessageComponentInteraction.js @@ -66,10 +66,15 @@ class MessageComponentInteraction extends BaseInteraction { } /** - * Raw message components from the API - * * APIMessageButton - * * APIMessageSelectMenu - * @typedef {APIMessageButton|APIMessageSelectMenu} APIMessageActionRowComponent + * Components that can be placed in an action row for messages. + * * ButtonComponent + * * StringSelectMenuComponent + * * UserSelectMenuComponent + * * RoleSelectMenuComponent + * * MentionableSelectMenuComponent + * * ChannelSelectMenuComponent + * @typedef {ButtonComponent|StringSelectMenuComponent|UserSelectMenuComponent| + * RoleSelectMenuComponent|MentionableSelectMenuComponent|ChannelSelectMenuComponent} MessageActionRowComponent */ /** @@ -100,13 +105,3 @@ class MessageComponentInteraction extends BaseInteraction { InteractionResponses.applyToClass(MessageComponentInteraction); module.exports = MessageComponentInteraction; - -/** - * @external APIMessageSelectMenu - * @see {@link https://discord.com/developers/docs/interactions/message-components#select-menu-object} - */ - -/** - * @external APIMessageButton - * @see {@link https://discord.com/developers/docs/interactions/message-components#button-object} - */ diff --git a/packages/discord.js/src/structures/MessagePayload.js b/packages/discord.js/src/structures/MessagePayload.js index dacbc2222292..e23730906c8e 100644 --- a/packages/discord.js/src/structures/MessagePayload.js +++ b/packages/discord.js/src/structures/MessagePayload.js @@ -1,8 +1,7 @@ 'use strict'; const { Buffer } = require('node:buffer'); -const { isJSONEncodable } = require('@discordjs/builders'); -const { lazy } = require('@discordjs/util'); +const { lazy, isJSONEncodable } = require('@discordjs/util'); const { MessageFlags } = require('discord-api-types/v10'); const ActionRowBuilder = require('./ActionRowBuilder'); const { DiscordjsRangeError, ErrorCodes } = require('../errors'); @@ -107,7 +106,7 @@ class MessagePayload { let content; if (this.options.content === null) { content = ''; - } else if (typeof this.options.content !== 'undefined') { + } else if (this.options.content !== undefined) { content = verifyString(this.options.content, DiscordjsRangeError, ErrorCodes.MessageContentType, true); } @@ -127,7 +126,7 @@ class MessagePayload { const tts = Boolean(this.options.tts); let nonce; - if (typeof this.options.nonce !== 'undefined') { + if (this.options.nonce !== undefined) { nonce = this.options.nonce; if (typeof nonce === 'number' ? !Number.isInteger(nonce) : typeof nonce !== 'string') { throw new DiscordjsRangeError(ErrorCodes.MessageNonceType); @@ -147,8 +146,8 @@ class MessagePayload { let flags; if ( - typeof this.options.flags !== 'undefined' || - (this.isMessage && typeof this.options.reply === 'undefined') || + this.options.flags !== undefined || + (this.isMessage && this.options.reply === undefined) || this.isMessageManager ) { flags = @@ -163,11 +162,11 @@ class MessagePayload { } let allowedMentions = - typeof this.options.allowedMentions === 'undefined' + this.options.allowedMentions === undefined ? this.target.client.options.allowedMentions : this.options.allowedMentions; - if (typeof allowedMentions?.repliedUser !== 'undefined') { + if (allowedMentions?.repliedUser !== undefined) { allowedMentions = { ...allowedMentions, replied_user: allowedMentions.repliedUser }; delete allowedMentions.repliedUser; } @@ -204,8 +203,7 @@ class MessagePayload { components, username, avatar_url: avatarURL, - allowed_mentions: - typeof content === 'undefined' && typeof message_reference === 'undefined' ? undefined : allowedMentions, + allowed_mentions: content === undefined && message_reference === undefined ? undefined : allowedMentions, flags, message_reference, attachments: this.options.attachments, @@ -228,8 +226,7 @@ class MessagePayload { /** * Resolves a single file into an object sendable to the API. - * @param {BufferResolvable|Stream|JSONEncodable} fileLike Something that could - * be resolved to a file + * @param {AttachmentPayload|BufferResolvable|Stream} fileLike Something that could be resolved to a file * @returns {Promise} */ static async resolveFile(fileLike) { @@ -287,7 +284,7 @@ module.exports = MessagePayload; /** * A possible payload option. - * @typedef {MessageCreateOptions|MessageEditOptions|WebhookCreateMessageOptions|WebhookEditMessageOptions| + * @typedef {MessageCreateOptions|MessageEditOptions|WebhookMessageCreateOptions|WebhookMessageEditOptions| * InteractionReplyOptions|InteractionUpdateOptions} MessagePayloadOption */ @@ -298,5 +295,5 @@ module.exports = MessagePayload; /** * @external RawFile - * @see {@link https://discord.js.org/#/docs/rest/main/typedef/RawFile} + * @see {@link https://discord.js.org/docs/packages/rest/stable/RawFile:Interface} */ diff --git a/packages/discord.js/src/structures/MessageReaction.js b/packages/discord.js/src/structures/MessageReaction.js index d44eb462a12f..43f05e32b417 100644 --- a/packages/discord.js/src/structures/MessageReaction.js +++ b/packages/discord.js/src/structures/MessageReaction.js @@ -117,6 +117,10 @@ class MessageReaction { return flatten(this, { emoji: 'emojiId', message: 'messageId' }); } + valueOf() { + return this._emoji.id ?? this._emoji.name; + } + _add(user) { if (this.partial) return; this.users.cache.set(user.id, user); diff --git a/packages/discord.js/src/structures/ModalBuilder.js b/packages/discord.js/src/structures/ModalBuilder.js index 84ddfbea29c4..535b4a52a51b 100644 --- a/packages/discord.js/src/structures/ModalBuilder.js +++ b/packages/discord.js/src/structures/ModalBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { ModalBuilder: BuildersModal, ComponentBuilder, isJSONEncodable } = require('@discordjs/builders'); +const { ModalBuilder: BuildersModal, ComponentBuilder } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** @@ -17,14 +18,11 @@ class ModalBuilder extends BuildersModal { /** * Creates a new modal builder from JSON data - * @param {JSONEncodable|APIModalComponent} other The other data + * @param {ModalBuilder|APIModalComponent} other The other data * @returns {ModalBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -32,5 +30,5 @@ module.exports = ModalBuilder; /** * @external BuildersModal - * @see {@link https://discord.js.org/#/docs/builders/main/class/ModalBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/ModalBuilder:Class} */ diff --git a/packages/discord.js/src/structures/ModalSubmitFields.js b/packages/discord.js/src/structures/ModalSubmitFields.js index ac2a72fbcaef..8e67b21d2e6f 100644 --- a/packages/discord.js/src/structures/ModalSubmitFields.js +++ b/packages/discord.js/src/structures/ModalSubmitFields.js @@ -11,13 +11,13 @@ class ModalSubmitFields { constructor(components) { /** * The components within the modal - * @type {ActionRowModalData[]} The components in the modal + * @type {ActionRowModalData[]} */ this.components = components; /** * The extracted fields from the modal - * @type {Collection} The fields in the modal + * @type {Collection} */ this.fields = components.reduce((accumulator, next) => { next.components.forEach(c => accumulator.set(c.customId, c)); diff --git a/packages/discord.js/src/structures/ModalSubmitInteraction.js b/packages/discord.js/src/structures/ModalSubmitInteraction.js index f10eb476d640..8f0ccf16c127 100644 --- a/packages/discord.js/src/structures/ModalSubmitInteraction.js +++ b/packages/discord.js/src/structures/ModalSubmitInteraction.js @@ -88,12 +88,13 @@ class ModalSubmitInteraction extends BaseInteraction { * @returns {ModalData[]} */ static transformComponent(rawComponent) { - return { - value: rawComponent.value, - type: rawComponent.type, - customId: rawComponent.custom_id, - components: rawComponent.components?.map(c => this.transformComponent(c)), - }; + return rawComponent.components + ? { type: rawComponent.type, components: rawComponent.components.map(c => this.transformComponent(c)) } + : { + value: rawComponent.value, + type: rawComponent.type, + customId: rawComponent.custom_id, + }; } /** diff --git a/packages/discord.js/src/structures/Presence.js b/packages/discord.js/src/structures/Presence.js index 825bc01029de..79ecb2918b3b 100644 --- a/packages/discord.js/src/structures/Presence.js +++ b/packages/discord.js/src/structures/Presence.js @@ -141,6 +141,12 @@ class Presence extends Base { */ class Activity { constructor(presence, data) { + /** + * The presence of the Activity + * @type {Presence} + * @readonly + * @name Activity#presence + */ Object.defineProperty(this, 'presence', { value: presence }); /** @@ -254,7 +260,9 @@ class Activity { this.type === activity.type && this.url === activity.url && this.state === activity.state && - this.details === activity.details) + this.details === activity.details && + this.emoji?.id === activity.emoji?.id && + this.emoji?.name === activity.emoji?.name) ); } @@ -285,6 +293,12 @@ class Activity { */ class RichPresenceAssets { constructor(activity, assets) { + /** + * The activity of the RichPresenceAssets + * @type {Activity} + * @readonly + * @name RichPresenceAssets#activity + */ Object.defineProperty(this, 'activity', { value: activity }); /** @@ -344,6 +358,12 @@ class RichPresenceAssets { switch (platform) { case 'mp': return `https://media.discordapp.net/${id}`; + case 'spotify': + return `https://i.scdn.co/image/${id}`; + case 'youtube': + return `https://i.ytimg.com/vi/${id}/hqdefault_live.jpg`; + case 'twitch': + return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${id}.png`; default: return null; } diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index e1444096ade5..99acd9a7e43a 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -107,6 +107,9 @@ class Role extends Base { * @property {Snowflake} [botId] The id of the bot this role belongs to * @property {Snowflake|string} [integrationId] The id of the integration this role belongs to * @property {true} [premiumSubscriberRole] Whether this is the guild's premium subscription role + * @property {Snowflake} [subscriptionListingId] The id of this role's subscription SKU and listing + * @property {true} [availableForPurchase] Whether this role is available for purchase + * @property {true} [guildConnections] Whether this role is a guild's linked role */ this.tags = data.tags ? {} : null; if (data.tags) { @@ -119,6 +122,15 @@ class Role extends Base { if ('premium_subscriber' in data.tags) { this.tags.premiumSubscriberRole = true; } + if ('subscription_listing_id' in data.tags) { + this.tags.subscriptionListingId = data.tags.subscription_listing_id; + } + if ('available_for_purchase' in data.tags) { + this.tags.availableForPurchase = true; + } + if ('guild_connections' in data.tags) { + this.tags.guildConnections = true; + } } } @@ -155,7 +167,7 @@ class Role extends Base { * @readonly */ get members() { - return this.guild.members.cache.filter(m => m.roles.cache.has(this.id)); + return this.guild.members.cache.filter(m => m._roles.includes(this.id)); } /** @@ -176,8 +188,14 @@ class Role extends Base { * @readonly */ get position() { - const sorted = this.guild._sortedRoles(); - return [...sorted.values()].indexOf(sorted.get(this.id)); + return this.guild.roles.cache.reduce( + (acc, role) => + acc + + (this.rawPosition === role.rawPosition + ? BigInt(this.id) > BigInt(role.id) + : this.rawPosition > role.rawPosition), + 0, + ); } /** @@ -185,6 +203,10 @@ class Role extends Base { * @param {RoleResolvable} role Role to compare to this one * @returns {number} Negative number if this role's position is lower (other role's is higher), * positive number if this one is higher (other's is lower), 0 if equal + * @example + * // Compare the position of a role to another + * const roleCompare = role.comparePositionTo(otherRole); + * if (roleCompare >= 1) console.log(`${role.name} is higher than ${otherRole.name}`); */ comparePositionTo(role) { return this.guild.roles.comparePositions(this, role); @@ -207,7 +229,7 @@ class Role extends Base { /** * Edits the role. - * @param {EditRoleOptions} data The new data for the role + * @param {RoleEditOptions} options The options to provide * @returns {Promise} * @example * // Edit a role @@ -215,8 +237,8 @@ class Role extends Base { * .then(updated => console.log(`Edited role name to ${updated.name}`)) * .catch(console.error); */ - edit(data) { - return this.guild.roles.edit(this, data); + edit(options) { + return this.guild.roles.edit(this, options); } /** diff --git a/packages/discord.js/src/structures/RoleSelectMenuBuilder.js b/packages/discord.js/src/structures/RoleSelectMenuBuilder.js index a42b436fa2c8..0d80de5ba9b0 100644 --- a/packages/discord.js/src/structures/RoleSelectMenuBuilder.js +++ b/packages/discord.js/src/structures/RoleSelectMenuBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { RoleSelectMenuBuilder: BuildersRoleSelectMenu, isJSONEncodable } = require('@discordjs/builders'); +const { RoleSelectMenuBuilder: BuildersRoleSelectMenu } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** @@ -13,15 +14,12 @@ class RoleSelectMenuBuilder extends BuildersRoleSelectMenu { } /** - * Creates a new select menu builder from json data - * @param {JSONEncodable | APISelectMenuComponent} other The other data + * Creates a new select menu builder from JSON data + * @param {RoleSelectMenuBuilder|RoleSelectMenuComponent|APIRoleSelectComponent} other The other data * @returns {RoleSelectMenuBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -29,5 +27,5 @@ module.exports = RoleSelectMenuBuilder; /** * @external BuildersRoleSelectMenu - * @see {@link https://discord.js.org/#/docs/builders/main/class/RoleSelectMenuBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/RoleSelectMenuBuilder:Class} */ diff --git a/packages/discord.js/src/structures/RoleSelectMenuInteraction.js b/packages/discord.js/src/structures/RoleSelectMenuInteraction.js index b45d356a2828..eb42eff2351e 100644 --- a/packages/discord.js/src/structures/RoleSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/RoleSelectMenuInteraction.js @@ -10,13 +10,21 @@ const MessageComponentInteraction = require('./MessageComponentInteraction'); class RoleSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + const { resolved, values } = data.data; + + /** + * An array of the selected role ids + * @type {Snowflake[]} + */ + this.values = values ?? []; /** * Collection of the selected roles * @type {Collection} */ this.roles = new Collection(); - for (const role of Object.values(data.data.resolved.roles)) { + + for (const role of Object.values(resolved?.roles ?? {})) { this.roles.set(role.id, this.guild?.roles._add(role) ?? role); } } diff --git a/packages/discord.js/src/structures/SelectMenuBuilder.js b/packages/discord.js/src/structures/SelectMenuBuilder.js index caa971b468e9..a77937054777 100644 --- a/packages/discord.js/src/structures/SelectMenuBuilder.js +++ b/packages/discord.js/src/structures/SelectMenuBuilder.js @@ -7,6 +7,7 @@ let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuBuilder} instead. + * @extends {StringSelectMenuBuilder} */ class SelectMenuBuilder extends StringSelectMenuBuilder { constructor(...params) { @@ -14,7 +15,7 @@ class SelectMenuBuilder extends StringSelectMenuBuilder { if (!deprecationEmitted) { process.emitWarning( - 'The SelectMenuBuilder class is deprecated, use StringSelectMenuBuilder instead.', + 'The SelectMenuBuilder class is deprecated. Use StringSelectMenuBuilder instead.', 'DeprecationWarning', ); deprecationEmitted = true; diff --git a/packages/discord.js/src/structures/SelectMenuComponent.js b/packages/discord.js/src/structures/SelectMenuComponent.js index 850c985275c2..2cd8097c95f3 100644 --- a/packages/discord.js/src/structures/SelectMenuComponent.js +++ b/packages/discord.js/src/structures/SelectMenuComponent.js @@ -7,6 +7,7 @@ let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuComponent} instead. + * @extends {StringSelectMenuComponent} */ class SelectMenuComponent extends StringSelectMenuComponent { constructor(...params) { @@ -14,7 +15,7 @@ class SelectMenuComponent extends StringSelectMenuComponent { if (!deprecationEmitted) { process.emitWarning( - 'The SelectMenuComponent class is deprecated, use StringSelectMenuComponent instead.', + 'The SelectMenuComponent class is deprecated. Use StringSelectMenuComponent instead.', 'DeprecationWarning', ); deprecationEmitted = true; diff --git a/packages/discord.js/src/structures/SelectMenuInteraction.js b/packages/discord.js/src/structures/SelectMenuInteraction.js index 9ee092d008b1..a09655958846 100644 --- a/packages/discord.js/src/structures/SelectMenuInteraction.js +++ b/packages/discord.js/src/structures/SelectMenuInteraction.js @@ -7,6 +7,7 @@ let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuInteraction} instead. + * @extends {StringSelectMenuInteraction} */ class SelectMenuInteraction extends StringSelectMenuInteraction { constructor(...params) { @@ -14,7 +15,7 @@ class SelectMenuInteraction extends StringSelectMenuInteraction { if (!deprecationEmitted) { process.emitWarning( - 'The SelectMenuInteraction class is deprecated, use StringSelectMenuInteraction instead.', + 'The SelectMenuInteraction class is deprecated. Use StringSelectMenuInteraction instead.', 'DeprecationWarning', ); deprecationEmitted = true; diff --git a/packages/discord.js/src/structures/SelectMenuOptionBuilder.js b/packages/discord.js/src/structures/SelectMenuOptionBuilder.js index ac4d265379d7..85309d1542bb 100644 --- a/packages/discord.js/src/structures/SelectMenuOptionBuilder.js +++ b/packages/discord.js/src/structures/SelectMenuOptionBuilder.js @@ -7,6 +7,7 @@ let deprecationEmitted = false; /** * @deprecated Use {@link StringSelectMenuOptionBuilder} instead. + * @extends {StringSelectMenuOptionBuilder} */ class SelectMenuOptionBuilder extends StringSelectMenuOptionBuilder { constructor(...params) { @@ -14,7 +15,7 @@ class SelectMenuOptionBuilder extends StringSelectMenuOptionBuilder { if (!deprecationEmitted) { process.emitWarning( - 'The SelectMenuOptionBuilder class is deprecated, use StringSelectMenuOptionBuilder instead.', + 'The SelectMenuOptionBuilder class is deprecated. Use StringSelectMenuOptionBuilder instead.', 'DeprecationWarning', ); deprecationEmitted = true; diff --git a/packages/discord.js/src/structures/StageChannel.js b/packages/discord.js/src/structures/StageChannel.js index 0f399c3b1659..26614895e254 100644 --- a/packages/discord.js/src/structures/StageChannel.js +++ b/packages/discord.js/src/structures/StageChannel.js @@ -41,11 +41,11 @@ class StageChannel extends BaseGuildVoiceChannel { * Sets a new topic for the guild channel. * @param {?string} topic The new topic for the guild channel * @param {string} [reason] Reason for changing the guild channel's topic - * @returns {Promise} + * @returns {Promise} * @example * // Set a new channel topic - * channel.setTopic('needs more rate limiting') - * .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`)) + * stageChannel.setTopic('needs more rate limiting') + * .then(channel => console.log(`Channel's new topic is ${channel.topic}`)) * .catch(console.error); */ setTopic(topic, reason) { @@ -53,6 +53,21 @@ class StageChannel extends BaseGuildVoiceChannel { } } +/** + * Sets the bitrate of the channel. + * @method setBitrate + * @memberof StageChannel + * @instance + * @param {number} bitrate The new bitrate + * @param {string} [reason] Reason for changing the channel's bitrate + * @returns {Promise} + * @example + * // Set the bitrate of a voice channel + * stageChannel.setBitrate(48_000) + * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`)) + * .catch(console.error); + */ + /** * Sets the RTC region of the channel. * @method setRTCRegion @@ -69,4 +84,29 @@ class StageChannel extends BaseGuildVoiceChannel { * stageChannel.setRTCRegion(null, 'We want to let Discord decide.'); */ +/** + * Sets the user limit of the channel. + * @method setUserLimit + * @memberof StageChannel + * @instance + * @param {number} userLimit The new user limit + * @param {string} [reason] Reason for changing the user limit + * @returns {Promise} + * @example + * // Set the user limit of a voice channel + * stageChannel.setUserLimit(42) + * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`)) + * .catch(console.error); + */ + +/** + * Sets the camera video quality mode of the channel. + * @method setVideoQualityMode + * @memberof StageChannel + * @instance + * @param {VideoQualityMode} videoQualityMode The new camera video quality mode. + * @param {string} [reason] Reason for changing the camera video quality mode. + * @returns {Promise} + */ + module.exports = StageChannel; diff --git a/packages/discord.js/src/structures/Sticker.js b/packages/discord.js/src/structures/Sticker.js index e845fd57e686..b0f2ef6cb749 100644 --- a/packages/discord.js/src/structures/Sticker.js +++ b/packages/discord.js/src/structures/Sticker.js @@ -1,9 +1,10 @@ 'use strict'; const { DiscordSnowflake } = require('@sapphire/snowflake'); -const { Routes, StickerFormatType } = require('discord-api-types/v10'); +const { Routes } = require('discord-api-types/v10'); const Base = require('./Base'); const { DiscordjsError, ErrorCodes } = require('../errors'); +const { StickerFormatExtensionMap } = require('../util/Constants'); /** * Represents a Sticker. @@ -164,7 +165,7 @@ class Sticker extends Base { * @readonly */ get url() { - return this.client.rest.cdn.sticker(this.id, this.format === StickerFormatType.Lottie ? 'json' : 'png'); + return this.client.rest.cdn.sticker(this.id, StickerFormatExtensionMap[this.format]); } /** @@ -197,7 +198,7 @@ class Sticker extends Base { /** * Data for editing a sticker. - * @typedef {Object} GuildStickerEditData + * @typedef {Object} GuildStickerEditOptions * @property {string} [name] The name of the sticker * @property {?string} [description] The description of the sticker * @property {string} [tags] The Discord name of a unicode emoji representing the sticker's expression @@ -206,7 +207,7 @@ class Sticker extends Base { /** * Edits the sticker. - * @param {GuildStickerEditData} data The new data for the sticker + * @param {GuildStickerEditOptions} options The options to provide * @returns {Promise} * @example * // Update the name of a sticker @@ -214,8 +215,8 @@ class Sticker extends Base { * .then(s => console.log(`Updated the name of the sticker to ${s.name}`)) * .catch(console.error); */ - edit(data) { - return this.guild.stickers.edit(this, data); + edit(options) { + return this.guild.stickers.edit(this, options); } /** diff --git a/packages/discord.js/src/structures/StringSelectMenuBuilder.js b/packages/discord.js/src/structures/StringSelectMenuBuilder.js index 3dd645e3cb53..ac555e745401 100644 --- a/packages/discord.js/src/structures/StringSelectMenuBuilder.js +++ b/packages/discord.js/src/structures/StringSelectMenuBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { SelectMenuBuilder: BuildersSelectMenu, isJSONEncodable, normalizeArray } = require('@discordjs/builders'); +const { SelectMenuBuilder: BuildersSelectMenu, normalizeArray } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolvePartialEmoji } = require('../util/Util'); @@ -23,7 +24,7 @@ class StringSelectMenuBuilder extends BuildersSelectMenu { /** * Normalizes a select menu option emoji - * @param {SelectMenuOptionData|JSONEncodable} selectMenuOption The option to normalize + * @param {SelectMenuOptionData|APISelectMenuOption} selectMenuOption The option to normalize * @returns {SelectMenuOptionBuilder|APISelectMenuOption} * @private */ @@ -59,7 +60,7 @@ class StringSelectMenuBuilder extends BuildersSelectMenu { /** * Creates a new select menu builder from json data - * @param {JSONEncodable | APISelectMenuComponent} other The other data + * @param {StringSelectMenuBuilder|StringSelectMenuComponent|APIStringSelectComponent} other The other data * @returns {StringSelectMenuBuilder} */ static from(other) { @@ -74,5 +75,5 @@ module.exports = StringSelectMenuBuilder; /** * @external BuildersSelectMenu - * @see {@link https://discord.js.org/#/docs/builders/main/class/SelectMenuBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/StringSelectMenuBuilder:Class} */ diff --git a/packages/discord.js/src/structures/StringSelectMenuOptionBuilder.js b/packages/discord.js/src/structures/StringSelectMenuOptionBuilder.js index f5fa6d9e6884..d7056a586a83 100644 --- a/packages/discord.js/src/structures/StringSelectMenuOptionBuilder.js +++ b/packages/discord.js/src/structures/StringSelectMenuOptionBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { SelectMenuOptionBuilder: BuildersSelectMenuOption, isJSONEncodable } = require('@discordjs/builders'); +const { SelectMenuOptionBuilder: BuildersSelectMenuOption } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); const { resolvePartialEmoji } = require('../util/Util'); @@ -32,14 +33,11 @@ class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption { /** * Creates a new select menu option builder from JSON data - * @param {JSONEncodable|APISelectMenuOption} other The other data + * @param {StringSelectMenuOptionBuilder|APISelectMenuOption} other The other data * @returns {StringSelectMenuOptionBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -47,5 +45,5 @@ module.exports = StringSelectMenuOptionBuilder; /** * @external BuildersSelectMenuOption - * @see {@link https://discord.js.org/#/docs/builders/main/class/SelectMenuOptionBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/SelectMenuOptionBuilder:Class} */ diff --git a/packages/discord.js/src/structures/TextInputBuilder.js b/packages/discord.js/src/structures/TextInputBuilder.js index a30b3689b701..938215495b63 100644 --- a/packages/discord.js/src/structures/TextInputBuilder.js +++ b/packages/discord.js/src/structures/TextInputBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { TextInputBuilder: BuildersTextInput, isJSONEncodable } = require('@discordjs/builders'); +const { TextInputBuilder: BuildersTextInput } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** @@ -14,14 +15,11 @@ class TextInputBuilder extends BuildersTextInput { /** * Creates a new text input builder from JSON data - * @param {JSONEncodable|APITextInputComponent} other The other data + * @param {TextInputBuilder|TextInputComponent|APITextInputComponent} other The other data * @returns {TextInputBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -29,5 +27,5 @@ module.exports = TextInputBuilder; /** * @external BuildersTextInput - * @see {@link https://discord.js.org/#/docs/builders/main/class/TextInputBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/TextInputBuilder:Class} */ diff --git a/packages/discord.js/src/structures/ThreadChannel.js b/packages/discord.js/src/structures/ThreadChannel.js index ea10d1f8781c..d57fd9dd23f0 100644 --- a/packages/discord.js/src/structures/ThreadChannel.js +++ b/packages/discord.js/src/structures/ThreadChannel.js @@ -1,6 +1,6 @@ 'use strict'; -const { ChannelType, PermissionFlagsBits, Routes } = require('discord-api-types/v10'); +const { ChannelType, PermissionFlagsBits, Routes, ChannelFlags } = require('discord-api-types/v10'); const { BaseChannel } = require('./BaseChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const { DiscordjsRangeError, ErrorCodes } = require('../errors'); @@ -14,7 +14,7 @@ const ChannelFlagsBitField = require('../util/ChannelFlagsBitField'); * @implements {TextBasedChannel} */ class ThreadChannel extends BaseChannel { - constructor(guild, data, client, fromInteraction = false) { + constructor(guild, data, client) { super(guild?.client ?? client, data, false); /** @@ -40,12 +40,14 @@ class ThreadChannel extends BaseChannel { * @type {ThreadMemberManager} */ this.members = new ThreadMemberManager(this); - if (data) this._patch(data, fromInteraction); + if (data) this._patch(data); } - _patch(data, partial = false) { + _patch(data) { super._patch(data); + if ('message' in data) this.messages._add(data.message); + if ('name' in data) { /** * The name of the thread @@ -147,7 +149,7 @@ class ThreadChannel extends BaseChannel { this.lastPinTimestamp ??= null; } - if ('rate_limit_per_user' in data || !partial) { + if ('rate_limit_per_user' in data) { /** * The rate limit per user (slowmode) for this thread in seconds * @type {?number} @@ -316,7 +318,7 @@ class ThreadChannel extends BaseChannel { /** * The options used to edit a thread channel - * @typedef {Object} ThreadEditData + * @typedef {Object} ThreadEditOptions * @property {string} [name] The new name for the thread * @property {boolean} [archived] Whether the thread is archived * @property {ThreadAutoArchiveDuration} [autoArchiveDuration] The amount of time after which the thread @@ -324,15 +326,15 @@ class ThreadChannel extends BaseChannel { * @property {number} [rateLimitPerUser] The rate limit per user (slowmode) for the thread in seconds * @property {boolean} [locked] Whether the thread is locked * @property {boolean} [invitable] Whether non-moderators can add other non-moderators to a thread + * Can only be edited on {@link ChannelType.PrivateThread} * @property {Snowflake[]} [appliedTags] The tags to apply to the thread * @property {ChannelFlagsResolvable} [flags] The flags to set on the channel * @property {string} [reason] Reason for editing the thread - * Can only be edited on {@link ChannelType.PrivateThread} */ /** * Edits this thread. - * @param {ThreadEditData} data The new data for this thread + * @param {ThreadEditOptions} options The options to provide * @returns {Promise} * @example * // Edit a thread @@ -340,19 +342,19 @@ class ThreadChannel extends BaseChannel { * .then(editedThread => console.log(editedThread)) * .catch(console.error); */ - async edit(data) { + async edit(options) { const newData = await this.client.rest.patch(Routes.channel(this.id), { body: { - name: (data.name ?? this.name).trim(), - archived: data.archived, - auto_archive_duration: data.autoArchiveDuration, - rate_limit_per_user: data.rateLimitPerUser, - locked: data.locked, - invitable: this.type === ChannelType.PrivateThread ? data.invitable : undefined, - applied_tags: data.appliedTags, - flags: 'flags' in data ? ChannelFlagsBitField.resolve(data.flags) : undefined, + name: (options.name ?? this.name).trim(), + archived: options.archived, + auto_archive_duration: options.autoArchiveDuration, + rate_limit_per_user: options.rateLimitPerUser, + locked: options.locked, + invitable: this.type === ChannelType.PrivateThread ? options.invitable : undefined, + applied_tags: options.appliedTags, + flags: 'flags' in options ? ChannelFlagsBitField.resolve(options.flags) : undefined, }, - reason: data.reason, + reason: options.reason, }); return this.client.actions.ChannelUpdate.handle(newData).updated; @@ -457,6 +459,24 @@ class ThreadChannel extends BaseChannel { return this.edit({ appliedTags, reason }); } + /** + * Pins this thread from the forum channel (only applicable to forum threads). + * @param {string} [reason] Reason for pinning + * @returns {Promise} + */ + pin(reason) { + return this.edit({ flags: this.flags.add(ChannelFlags.Pinned), reason }); + } + + /** + * Unpins this thread from the forum channel (only applicable to forum threads). + * @param {string} [reason] Reason for unpinning + * @returns {Promise} + */ + unpin(reason) { + return this.edit({ flags: this.flags.remove(ChannelFlags.Pinned), reason }); + } + /** * Whether the client user is a member of the thread. * @type {boolean} diff --git a/packages/discord.js/src/structures/ThreadMember.js b/packages/discord.js/src/structures/ThreadMember.js index 2b6743a93554..fc79dd0916f7 100644 --- a/packages/discord.js/src/structures/ThreadMember.js +++ b/packages/discord.js/src/structures/ThreadMember.js @@ -8,7 +8,7 @@ const ThreadMemberFlagsBitField = require('../util/ThreadMemberFlagsBitField'); * @extends {Base} */ class ThreadMember extends Base { - constructor(thread, data) { + constructor(thread, data, extra = {}) { super(thread.client); /** @@ -35,12 +35,23 @@ class ThreadMember extends Base { */ this.id = data.user_id; - this._patch(data); + this._patch(data, extra); } - _patch(data) { + _patch(data, extra = {}) { if ('join_timestamp' in data) this.joinedTimestamp = Date.parse(data.join_timestamp); if ('flags' in data) this.flags = new ThreadMemberFlagsBitField(data.flags).freeze(); + + if ('member' in data) { + /** + * The guild member associated with this thread member. + * @type {?GuildMember} + * @private + */ + this.member = this.thread.guild.members._add(data.member, extra.cache); + } else { + this.member ??= null; + } } /** @@ -58,7 +69,7 @@ class ThreadMember extends Base { * @readonly */ get guildMember() { - return this.thread.guild.members.resolve(this.id); + return this.member ?? this.thread.guild.members.resolve(this.id); } /** diff --git a/packages/discord.js/src/structures/User.js b/packages/discord.js/src/structures/User.js index 75189c8c6dcb..e48fd0293ab3 100644 --- a/packages/discord.js/src/structures/User.js +++ b/packages/discord.js/src/structures/User.js @@ -1,11 +1,15 @@ 'use strict'; +const process = require('node:process'); const { userMention } = require('@discordjs/builders'); +const { calculateUserDefaultAvatarIndex } = require('@discordjs/rest'); const { DiscordSnowflake } = require('@sapphire/snowflake'); const Base = require('./Base'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); const UserFlagsBitField = require('../util/UserFlagsBitField'); +let tagDeprecationEmitted = false; + /** * Represents a user on Discord. * @implements {TextBasedChannel} @@ -41,6 +45,16 @@ class User extends Base { this.username ??= null; } + if ('global_name' in data) { + /** + * The global name of this user + * @type {?string} + */ + this.globalName = data.global_name; + } else { + this.globalName ??= null; + } + if ('bot' in data) { /** * Whether or not the user is a bot @@ -53,7 +67,8 @@ class User extends Base { if ('discriminator' in data) { /** - * A discriminator based on username for the user + * The discriminator of this user + * `'0'`, or a 4-digit stringified number if they're using the legacy username system * @type {?string} */ this.discriminator = data.discriminator; @@ -154,7 +169,8 @@ class User extends Base { * @readonly */ get defaultAvatarURL() { - return this.client.rest.cdn.defaultAvatar(this.discriminator % 5); + const index = this.discriminator === '0' ? calculateUserDefaultAvatarIndex(this.id) : this.discriminator % 5; + return this.client.rest.cdn.defaultAvatar(index); } /** @@ -188,12 +204,33 @@ class User extends Base { } /** - * The Discord "tag" (e.g. `hydrabolt#0001`) for this user + * The tag of this user + * This user's username, or their legacy tag (e.g. `hydrabolt#0001`) + * if they're using the legacy username system * @type {?string} * @readonly + * @deprecated Use {@link User#username} instead. */ get tag() { - return typeof this.username === 'string' ? `${this.username}#${this.discriminator}` : null; + if (!tagDeprecationEmitted) { + process.emitWarning('User#tag is deprecated. Use User#username instead.', 'DeprecationWarning'); + tagDeprecationEmitted = true; + } + + return typeof this.username === 'string' + ? this.discriminator === '0' + ? this.username + : `${this.username}#${this.discriminator}` + : null; + } + + /** + * The global name of this user, or their username if they don't have one + * @type {?string} + * @readonly + */ + get displayName() { + return this.globalName ?? this.username; } /** @@ -235,6 +272,7 @@ class User extends Base { this.id === user.id && this.username === user.username && this.discriminator === user.discriminator && + this.globalName === user.globalName && this.avatar === user.avatar && this.flags?.bitfield === user.flags?.bitfield && this.banner === user.banner && @@ -254,6 +292,7 @@ class User extends Base { this.id === user.id && this.username === user.username && this.discriminator === user.discriminator && + this.globalName === user.global_name && this.avatar === user.avatar && this.flags?.bitfield === user.public_flags && ('banner' in user ? this.banner === user.banner : true) && @@ -305,12 +344,22 @@ class User extends Base { json.bannerURL = this.banner ? this.bannerURL() : this.banner; return json; } - - // These are here only for documentation purposes - they are implemented by TextBasedChannel - /* eslint-disable no-empty-function */ - send() {} } +/** + * Sends a message to this user. + * @method send + * @memberof User + * @instance + * @param {string|MessagePayload|MessageCreateOptions} options The options to provide + * @returns {Promise} + * @example + * // Send a direct message + * user.send('Hello!') + * .then(message => console.log(`Sent message: ${message.content} to ${user.tag}`)) + * .catch(console.error); + */ + TextBasedChannel.applyToClass(User); module.exports = User; diff --git a/packages/discord.js/src/structures/UserSelectMenuBuilder.js b/packages/discord.js/src/structures/UserSelectMenuBuilder.js index 39db60fff326..61bdbb802fdc 100644 --- a/packages/discord.js/src/structures/UserSelectMenuBuilder.js +++ b/packages/discord.js/src/structures/UserSelectMenuBuilder.js @@ -1,6 +1,7 @@ 'use strict'; -const { UserSelectMenuBuilder: BuildersUserSelectMenu, isJSONEncodable } = require('@discordjs/builders'); +const { UserSelectMenuBuilder: BuildersUserSelectMenu } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { toSnakeCase } = require('../util/Transformers'); /** @@ -13,15 +14,12 @@ class UserSelectMenuBuilder extends BuildersUserSelectMenu { } /** - * Creates a new select menu builder from json data - * @param {JSONEncodable | APISelectMenuComponent} other The other data + * Creates a new select menu builder from JSON data + * @param {UserSelectMenuBuilder|UserSelectMenuComponent|APIUserSelectComponent} other The other data * @returns {UserSelectMenuBuilder} */ static from(other) { - if (isJSONEncodable(other)) { - return new this(other.toJSON()); - } - return new this(other); + return new this(isJSONEncodable(other) ? other.toJSON() : other); } } @@ -29,5 +27,5 @@ module.exports = UserSelectMenuBuilder; /** * @external BuildersUserSelectMenu - * @see {@link https://discord.js.org/#/docs/builders/main/class/UserSelectMenuBuilder} + * @see {@link https://discord.js.org/docs/packages/builders/stable/UserSelectMenuBuilder:Class} */ diff --git a/packages/discord.js/src/structures/UserSelectMenuInteraction.js b/packages/discord.js/src/structures/UserSelectMenuInteraction.js index d2af4176a5e7..5e232399708e 100644 --- a/packages/discord.js/src/structures/UserSelectMenuInteraction.js +++ b/packages/discord.js/src/structures/UserSelectMenuInteraction.js @@ -11,6 +11,13 @@ const Events = require('../util/Events'); class UserSelectMenuInteraction extends MessageComponentInteraction { constructor(client, data) { super(client, data); + const { resolved, values } = data.data; + + /** + * An array of the selected user ids + * @type {Snowflake[]} + */ + this.values = values ?? []; /** * Collection of the selected users @@ -24,24 +31,19 @@ class UserSelectMenuInteraction extends MessageComponentInteraction { */ this.members = new Collection(); - for (const user of Object.values(data.data.resolved.users)) { + for (const user of Object.values(resolved?.users ?? {})) { this.users.set(user.id, this.client.users._add(user)); } - if (data.data.resolved.members) { - for (const [id, member] of Object.entries(data.data.resolved.members)) { - const user = data.data.resolved.users[id]; - if (!user) { - this.client.emit( - Events.Debug, - `[UserSelectMenuInteraction] Received a member without a user, skipping ${id}`, - ); + for (const [id, member] of Object.entries(resolved?.members ?? {})) { + const user = resolved.users[id]; - continue; - } - - this.members.set(id, this.guild?.members._add({ user, ...member }) ?? { user, ...member }); + if (!user) { + this.client.emit(Events.Debug, `[UserSelectMenuInteraction] Received a member without a user, skipping ${id}`); + continue; } + + this.members.set(id, this.guild?.members._add({ user, ...member }) ?? { user, ...member }); } } } diff --git a/packages/discord.js/src/structures/VoiceChannel.js b/packages/discord.js/src/structures/VoiceChannel.js index 1bfc5dae66d7..d4f33ca1224b 100644 --- a/packages/discord.js/src/structures/VoiceChannel.js +++ b/packages/discord.js/src/structures/VoiceChannel.js @@ -2,71 +2,12 @@ const { PermissionFlagsBits } = require('discord-api-types/v10'); const BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel'); -const TextBasedChannel = require('./interfaces/TextBasedChannel'); -const MessageManager = require('../managers/MessageManager'); /** * Represents a guild voice channel on Discord. * @extends {BaseGuildVoiceChannel} - * @implements {TextBasedChannel} */ class VoiceChannel extends BaseGuildVoiceChannel { - constructor(guild, data, client) { - super(guild, data, client, false); - - /** - * A manager of the messages sent to this channel - * @type {MessageManager} - */ - this.messages = new MessageManager(this); - - /** - * If the guild considers this channel NSFW - * @type {boolean} - */ - this.nsfw = Boolean(data.nsfw); - - this._patch(data); - } - - _patch(data) { - super._patch(data); - - if ('video_quality_mode' in data) { - /** - * The camera video quality mode of the channel. - * @type {?VideoQualityMode} - */ - this.videoQualityMode = data.video_quality_mode; - } else { - this.videoQualityMode ??= null; - } - - if ('last_message_id' in data) { - /** - * The last message id sent in the channel, if one was sent - * @type {?Snowflake} - */ - this.lastMessageId = data.last_message_id; - } - - if ('messages' in data) { - for (const message of data.messages) this.messages._add(message); - } - - if ('rate_limit_per_user' in data) { - /** - * The rate limit per user (slowmode) for this channel in seconds - * @type {number} - */ - this.rateLimitPerUser = data.rate_limit_per_user; - } - - if ('nsfw' in data) { - this.nsfw = Boolean(data.nsfw); - } - } - /** * Whether the channel is joinable by the client user * @type {boolean} @@ -94,64 +35,22 @@ class VoiceChannel extends BaseGuildVoiceChannel { permissions.has(PermissionFlagsBits.Speak, false) ); } - - /** - * Sets the bitrate of the channel. - * @param {number} bitrate The new bitrate - * @param {string} [reason] Reason for changing the channel's bitrate - * @returns {Promise} - * @example - * // Set the bitrate of a voice channel - * voiceChannel.setBitrate(48_000) - * .then(vc => console.log(`Set bitrate to ${vc.bitrate}bps for ${vc.name}`)) - * .catch(console.error); - */ - setBitrate(bitrate, reason) { - return this.edit({ bitrate, reason }); - } - - /** - * Sets the user limit of the channel. - * @param {number} userLimit The new user limit - * @param {string} [reason] Reason for changing the user limit - * @returns {Promise} - * @example - * // Set the user limit of a voice channel - * voiceChannel.setUserLimit(42) - * .then(vc => console.log(`Set user limit to ${vc.userLimit} for ${vc.name}`)) - * .catch(console.error); - */ - setUserLimit(userLimit, reason) { - return this.edit({ userLimit, reason }); - } - - /** - * Sets the camera video quality mode of the channel. - * @param {VideoQualityMode} videoQualityMode The new camera video quality mode. - * @param {string} [reason] Reason for changing the camera video quality mode. - * @returns {Promise} - */ - setVideoQualityMode(videoQualityMode, reason) { - return this.edit({ videoQualityMode, reason }); - } - - // These are here only for documentation purposes - they are implemented by TextBasedChannel - /* eslint-disable no-empty-function */ - get lastMessage() {} - send() {} - sendTyping() {} - createMessageCollector() {} - awaitMessages() {} - createMessageComponentCollector() {} - awaitMessageComponent() {} - bulkDelete() {} - fetchWebhooks() {} - createWebhook() {} - setRateLimitPerUser() {} - setNSFW() {} } -TextBasedChannel.applyToClass(VoiceChannel, true, ['lastPinAt']); +/** + * Sets the bitrate of the channel. + * @method setBitrate + * @memberof VoiceChannel + * @instance + * @param {number} bitrate The new bitrate + * @param {string} [reason] Reason for changing the channel's bitrate + * @returns {Promise} + * @example + * // Set the bitrate of a voice channel + * voiceChannel.setBitrate(48_000) + * .then(channel => console.log(`Set bitrate to ${channel.bitrate}bps for ${channel.name}`)) + * .catch(console.error); + */ /** * Sets the RTC region of the channel. @@ -169,4 +68,29 @@ TextBasedChannel.applyToClass(VoiceChannel, true, ['lastPinAt']); * voiceChannel.setRTCRegion(null, 'We want to let Discord decide.'); */ +/** + * Sets the user limit of the channel. + * @method setUserLimit + * @memberof VoiceChannel + * @instance + * @param {number} userLimit The new user limit + * @param {string} [reason] Reason for changing the user limit + * @returns {Promise} + * @example + * // Set the user limit of a voice channel + * voiceChannel.setUserLimit(42) + * .then(channel => console.log(`Set user limit to ${channel.userLimit} for ${channel.name}`)) + * .catch(console.error); + */ + +/** + * Sets the camera video quality mode of the channel. + * @method setVideoQualityMode + * @memberof VoiceChannel + * @instance + * @param {VideoQualityMode} videoQualityMode The new camera video quality mode. + * @param {string} [reason] Reason for changing the camera video quality mode. + * @returns {Promise} + */ + module.exports = VoiceChannel; diff --git a/packages/discord.js/src/structures/VoiceState.js b/packages/discord.js/src/structures/VoiceState.js index 8a7b84e89e6d..ae510f2cf40e 100644 --- a/packages/discord.js/src/structures/VoiceState.js +++ b/packages/discord.js/src/structures/VoiceState.js @@ -208,7 +208,7 @@ class VoiceState extends Base { /** * Data to edit the logged in user's own voice state with, when in a stage channel - * @typedef {Object} VoiceStateEditData + * @typedef {Object} VoiceStateEditOptions * @property {boolean} [requestToSpeak] Whether or not the client is requesting to become a speaker. * Only available to the logged in user's own voice state. * @property {boolean} [suppressed] Whether or not the user should be suppressed. @@ -216,35 +216,35 @@ class VoiceState extends Base { /** * Edits this voice state. Currently only available when in a stage channel - * @param {VoiceStateEditData} data The data to edit the voice state with + * @param {VoiceStateEditOptions} options The options to provide * @returns {Promise} */ - async edit(data) { + async edit(options) { if (this.channel?.type !== ChannelType.GuildStageVoice) throw new DiscordjsError(ErrorCodes.VoiceNotStageChannel); const target = this.client.user.id === this.id ? '@me' : this.id; - if (target !== '@me' && typeof data.requestToSpeak !== 'undefined') { + if (target !== '@me' && options.requestToSpeak !== undefined) { throw new DiscordjsError(ErrorCodes.VoiceStateNotOwn); } - if (!['boolean', 'undefined'].includes(typeof data.requestToSpeak)) { + if (!['boolean', 'undefined'].includes(typeof options.requestToSpeak)) { throw new DiscordjsTypeError(ErrorCodes.VoiceStateInvalidType, 'requestToSpeak'); } - if (!['boolean', 'undefined'].includes(typeof data.suppressed)) { + if (!['boolean', 'undefined'].includes(typeof options.suppressed)) { throw new DiscordjsTypeError(ErrorCodes.VoiceStateInvalidType, 'suppressed'); } await this.client.rest.patch(Routes.guildVoiceState(this.guild.id, target), { body: { channel_id: this.channelId, - request_to_speak_timestamp: data.requestToSpeak + request_to_speak_timestamp: options.requestToSpeak ? new Date().toISOString() - : data.requestToSpeak === false + : options.requestToSpeak === false ? null : undefined, - suppress: data.suppressed, + suppress: options.suppressed, }, }); return this; diff --git a/packages/discord.js/src/structures/Webhook.js b/packages/discord.js/src/structures/Webhook.js index e6eccaed4134..efc02218e376 100644 --- a/packages/discord.js/src/structures/Webhook.js +++ b/packages/discord.js/src/structures/Webhook.js @@ -39,7 +39,11 @@ class Webhook { * @name Webhook#token * @type {?string} */ - Object.defineProperty(this, 'token', { value: data.token ?? null, writable: true, configurable: true }); + Object.defineProperty(this, 'token', { + value: data.token ?? null, + writable: true, + configurable: true, + }); if ('avatar' in data) { /** @@ -73,7 +77,7 @@ class Webhook { if ('channel_id' in data) { /** - * The channel the webhook belongs to + * The id of the channel the webhook belongs to * @type {Snowflake} */ this.channelId = data.channel_id; @@ -122,7 +126,7 @@ class Webhook { /** * Options that can be passed into send. - * @typedef {BaseMessageOptions} WebhookCreateMessageOptions + * @typedef {BaseMessageOptions} WebhookMessageCreateOptions * @property {boolean} [tts=false] Whether the message should be spoken aloud * @property {MessageFlags} [flags] Which flags to set for the message. * Only the {@link MessageFlags.SuppressEmbeds} flag can be set. @@ -135,15 +139,24 @@ class Webhook { /** * Options that can be passed into editMessage. - * @typedef {BaseMessageOptions} WebhookEditMessageOptions + * @typedef {BaseMessageOptions} WebhookMessageEditOptions * @property {Attachment[]} [attachments] Attachments to send with the message * @property {Snowflake} [threadId] The id of the thread this message belongs to * For interaction webhooks, this property is ignored */ + /** + * The channel the webhook belongs to + * @type {?(TextChannel|VoiceChannel|StageChannel|NewsChannel|ForumChannel)} + * @readonly + */ + get channel() { + return this.client.channels.resolve(this.channelId); + } + /** * Sends a message with this webhook. - * @param {string|MessagePayload|WebhookCreateMessageOptions} options The options to provide + * @param {string|MessagePayload|WebhookMessageCreateOptions} options The options to provide * @returns {Promise} * @example * // Send a basic message @@ -206,7 +219,12 @@ class Webhook { }); const { body, files } = await messagePayload.resolveFiles(); - const d = await this.client.rest.post(Routes.webhook(this.id, this.token), { body, files, query, auth: false }); + const d = await this.client.rest.post(Routes.webhook(this.id, this.token), { + body, + files, + query, + auth: false, + }); if (!this.client.channels) return d; return this.client.channels.cache.get(d.channel_id)?.messages._add(d, false) ?? new (getMessage())(this.client, d); @@ -243,7 +261,7 @@ class Webhook { /** * Options used to edit a {@link Webhook}. - * @typedef {Object} WebhookEditData + * @typedef {Object} WebhookEditOptions * @property {string} [name=this.name] The new name for the webhook * @property {?(BufferResolvable)} [avatar] The new avatar for the webhook * @property {GuildTextChannelResolvable} [channel] The new channel for the webhook @@ -252,7 +270,7 @@ class Webhook { /** * Edits this webhook. - * @param {WebhookEditData} options Options for editing the webhook + * @param {WebhookEditOptions} options Options for editing the webhook * @returns {Promise} */ async edit({ name = this.name, avatar, channel, reason }) { @@ -304,7 +322,7 @@ class Webhook { /** * Edits a message that was sent by this webhook. * @param {MessageResolvable|'@original'} message The message to edit - * @param {string|MessagePayload|WebhookEditMessageOptions} options The options to provide + * @param {string|MessagePayload|WebhookMessageEditOptions} options The options to provide * @returns {Promise} Returns the message edited by this webhook */ async editMessage(message, options) { @@ -349,7 +367,10 @@ class Webhook { * @returns {Promise} */ async delete(reason) { - await this.client.rest.delete(Routes.webhook(this.id, this.token), { reason, auth: !this.token }); + await this.client.rest.delete(Routes.webhook(this.id, this.token), { + reason, + auth: !this.token, + }); } /** diff --git a/packages/discord.js/src/structures/interfaces/Collector.js b/packages/discord.js/src/structures/interfaces/Collector.js index bcd7528a6c07..65f411744035 100644 --- a/packages/discord.js/src/structures/interfaces/Collector.js +++ b/packages/discord.js/src/structures/interfaces/Collector.js @@ -95,6 +95,20 @@ class Collector extends EventEmitter { if (options.time) this._timeout = setTimeout(() => this.stop('time'), options.time).unref(); if (options.idle) this._idletimeout = setTimeout(() => this.stop('idle'), options.idle).unref(); + + /** + * The timestamp at which this collector last collected an item + * @type {?number} + */ + this.lastCollectedTimestamp = null; + } + + /** + * The Date at which this collector last collected an item + * @type {?Date} + */ + get lastCollectedAt() { + return this.lastCollectedTimestamp && new Date(this.lastCollectedTimestamp); } /** @@ -118,6 +132,7 @@ class Collector extends EventEmitter { */ this.emit('collect', ...args); + this.lastCollectedTimestamp = Date.now(); if (this._idletimeout) { clearTimeout(this._idletimeout); this._idletimeout = setTimeout(() => this.stop('idle'), this.options.idle).unref(); diff --git a/packages/discord.js/src/structures/interfaces/InteractionResponses.js b/packages/discord.js/src/structures/interfaces/InteractionResponses.js index 5d07325756b0..15256e3d6c03 100644 --- a/packages/discord.js/src/structures/interfaces/InteractionResponses.js +++ b/packages/discord.js/src/structures/interfaces/InteractionResponses.js @@ -1,6 +1,6 @@ 'use strict'; -const { isJSONEncodable } = require('@discordjs/builders'); +const { isJSONEncodable } = require('@discordjs/util'); const { InteractionResponseType, MessageFlags, Routes, InteractionType } = require('discord-api-types/v10'); const { DiscordjsError, ErrorCodes } = require('../../errors'); const InteractionCollector = require('../InteractionCollector'); @@ -137,7 +137,8 @@ class InteractionResponses { } /** - * @typedef {WebhookEditMessageOptions} InteractionEditReplyOptions + * Options that can be passed into {@link InteractionResponses#editReply}. + * @typedef {WebhookMessageEditOptions} InteractionEditReplyOptions * @property {MessageResolvable|'@original'} [message='@original'] The response to edit */ @@ -244,7 +245,7 @@ class InteractionResponses { /** * Shows a modal component - * @param {APIModal|ModalData|Modal} modal The modal to show + * @param {ModalBuilder|ModalComponentData|APIModalInteractionResponseCallbackData} modal The modal to show * @returns {Promise} */ async showModal(modal) { @@ -254,6 +255,7 @@ class InteractionResponses { type: InteractionResponseType.Modal, data: isJSONEncodable(modal) ? modal.toJSON() : this.client.options.jsonTransformer(modal), }, + auth: false, }); this.replied = true; } diff --git a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js index b769f4d4af88..97bc337313ae 100644 --- a/packages/discord.js/src/structures/interfaces/TextBasedChannel.js +++ b/packages/discord.js/src/structures/interfaces/TextBasedChannel.js @@ -56,12 +56,12 @@ class TextBasedChannel { * The base message options for messages. * @typedef {Object} BaseMessageOptions * @property {string|null} [content=''] The content for the message. This can only be `null` when editing a message. - * @property {Embed[]|APIEmbed[]} [embeds] The embeds for the message + * @property {Array<(EmbedBuilder|Embed|APIEmbed)>} [embeds] The embeds for the message * @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content * (see [here](https://discord.com/developers/docs/resources/channel#allowed-mentions-object) for more details) - * @property {Array>|BufferResolvable[]|Attachment[]|AttachmentBuilder[]} [files] + * @property {Array<(AttachmentBuilder|Attachment|AttachmentPayload|BufferResolvable)>} [files] * The files to send with the message. - * @property {ActionRow[]|ActionRowOptions[]} [components] + * @property {Array<(ActionRowBuilder|ActionRow|APIActionRowComponent)>} [components] * Action rows containing interactive components for the message (buttons, select menus) */ @@ -75,13 +75,18 @@ class TextBasedChannel { /** * The options for sending a message. - * @typedef {BaseMessageOptions} MessageCreateOptions + * @typedef {BaseMessageOptions} BaseMessageCreateOptions * @property {boolean} [tts=false] Whether the message should be spoken aloud * @property {string} [nonce=''] The nonce for the message - * @property {ReplyOptions} [reply] The options for replying to a message * @property {StickerResolvable[]} [stickers=[]] The stickers to send in the message * @property {MessageFlags} [flags] Which flags to set for the message. - * Only `MessageFlags.SuppressEmbeds` can be set. + * Only `MessageFlags.SuppressEmbeds` and `MessageFlags.SuppressNotifications` can be set. + */ + + /** + * The options for sending a message. + * @typedef {BaseMessageCreateOptions} MessageCreateOptions + * @property {ReplyOptions} [reply] The options for replying to a message */ /** @@ -135,25 +140,6 @@ class TextBasedChannel { * }) * .then(console.log) * .catch(console.error); - * @example - * // Send an embed with a local image inside - * channel.send({ - * content: 'This is an embed', - * embeds: [ - * { - * thumbnail: { - * url: 'attachment://file.jpg' - * } - * } - * ], - * files: [{ - * attachment: 'entire/path/to/file.jpg', - * name: 'file.jpg', - * description: 'A description of the file' - * }] - * }) - * .then(console.log) - * .catch(console.error); */ async send(options) { const User = require('../User'); @@ -346,7 +332,7 @@ class TextBasedChannel { } /** - * Options used to create a {@link Webhook} in a {@link TextChannel} or a {@link NewsChannel}. + * Options used to create a {@link Webhook}. * @typedef {Object} ChannelWebhookCreateOptions * @property {string} name The name of the webhook * @property {?(BufferResolvable|Base64Resolvable)} [avatar] Avatar for the webhook diff --git a/packages/discord.js/src/util/APITypes.js b/packages/discord.js/src/util/APITypes.js index cfde0d4dbe95..d0a48660b01f 100644 --- a/packages/discord.js/src/util/APITypes.js +++ b/packages/discord.js/src/util/APITypes.js @@ -1,3 +1,5 @@ +/* eslint-disable max-len */ + /** * @external ActivityFlags * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ActivityFlags} @@ -28,6 +30,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIApplicationCommandOption} */ +/** + * @external APIAutoModerationAction + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIAutoModerationAction} + */ + /** * @external APIButtonComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIButtonComponent} @@ -38,6 +45,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIChannel} */ +/** + * @external APIChannelSelectComponent + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIChannelSelectComponent} + */ + /** * @external APIEmbed * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIEmbed} @@ -93,11 +105,21 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionGuildMember} */ +/** + * @external APIMentionableSelectComponent + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMentionableSelectComponent} + */ + /** * @external APIMessage * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIMessage} */ +/** + * @external APIMessageActionRowComponent + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMessageActionRowComponent} + */ + /** * @external APIMessageComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIMessageComponent} @@ -113,6 +135,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalInteractionResponse} */ +/** + * @external APIModalInteractionResponseCallbackData + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIModalInteractionResponseCallbackData} + */ + /** * @external APIModalComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIModalComponent} @@ -129,8 +156,8 @@ */ /** - * @external APISelectMenuComponent - * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APISelectMenuComponent} + * @external APIRoleSelectComponent + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIRoleSelectComponent} */ /** @@ -138,6 +165,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APISelectMenuOption} */ +/** + * @external APIStringSelectComponent + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIStringSelectComponent} + */ + /** * @external APITextInputComponent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APITextInputComponent} @@ -148,6 +180,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/interface/APIUser} */ +/** + * @external APIUserSelectComponent + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#APIUserSelectComponent} + */ + /** * @external ApplicationCommandType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationCommandType} @@ -168,6 +205,31 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationFlags} */ +/** + * @external ApplicationRoleConnectionMetadataType + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationRoleConnectionMetadataType} + */ + +/** + * @external AutoModerationActionType + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationActionType} + */ + +/** + * @external AutoModerationRuleEventType + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleEventType} + */ + +/** + * @external AutoModerationRuleTriggerType + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleTriggerType} + */ + +/** + * @external AutoModerationRuleKeywordPresetType + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationRuleKeywordPresetType} + */ + /** * @external AuditLogEvent * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AuditLogEvent} @@ -193,6 +255,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ComponentType} */ +/** + * @external ForumLayoutType + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ForumLayoutType} + */ + /** * @external GatewayCloseCodes * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GatewayCloseCodes} @@ -233,6 +300,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildMFALevel} */ +/** + * @external GuildMemberFlags + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildMemberFlags} + */ + /** * @external GuildNSFWLevel * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/GuildNSFWLevel} @@ -328,6 +400,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-payloads/common#PermissionFlagsBits} */ +/** + * @external RESTGetAPIGuildThreadsResult + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10#RESTGetAPIGuildThreadsResult} + */ + /** * @external RESTJSONErrorCodes * @see {@link https://discord-api-types.dev/api/discord-api-types-rest/common/enum/RESTJSONErrorCodes} diff --git a/packages/discord.js/src/util/BitField.js b/packages/discord.js/src/util/BitField.js index 786b2ea750e9..f0778f68807a 100644 --- a/packages/discord.js/src/util/BitField.js +++ b/packages/discord.js/src/util/BitField.js @@ -117,7 +117,9 @@ class BitField { */ serialize(...hasParams) { const serialized = {}; - for (const [flag, bit] of Object.entries(this.constructor.Flags)) serialized[flag] = this.has(bit, ...hasParams); + for (const [flag, bit] of Object.entries(this.constructor.Flags)) { + if (isNaN(flag)) serialized[flag] = this.has(bit, ...hasParams); + } return serialized; } @@ -127,7 +129,7 @@ class BitField { * @returns {string[]} */ toArray(...hasParams) { - return Object.keys(this.constructor.Flags).filter(bit => this.has(bit, ...hasParams)); + return [...this[Symbol.iterator](...hasParams)]; } toJSON() { @@ -138,8 +140,10 @@ class BitField { return this.bitfield; } - *[Symbol.iterator]() { - yield* this.toArray(); + *[Symbol.iterator](...hasParams) { + for (const bitName of Object.keys(this.constructor.Flags)) { + if (isNaN(bitName) && this.has(bitName, ...hasParams)) yield bitName; + } } /** @@ -162,8 +166,8 @@ class BitField { if (bit instanceof BitField) return bit.bitfield; if (Array.isArray(bit)) return bit.map(p => this.resolve(p)).reduce((prev, p) => prev | p, DefaultBit); if (typeof bit === 'string') { - if (typeof this.Flags[bit] !== 'undefined') return this.Flags[bit]; if (!isNaN(bit)) return typeof DefaultBit === 'bigint' ? BigInt(bit) : Number(bit); + if (this.Flags[bit] !== undefined) return this.Flags[bit]; } throw new DiscordjsRangeError(ErrorCodes.BitFieldInvalid, bit); } diff --git a/packages/discord.js/src/util/Channels.js b/packages/discord.js/src/util/Channels.js index 38e856c01170..a7c6caf8c34d 100644 --- a/packages/discord.js/src/util/Channels.js +++ b/packages/discord.js/src/util/Channels.js @@ -23,7 +23,7 @@ const getForumChannel = lazy(() => require('../structures/ForumChannel')); * @returns {Channel} Any kind of channel. * @ignore */ -function createChannel(client, data, guild, { allowUnknownGuild, fromInteraction } = {}) { +function createChannel(client, data, guild, { allowUnknownGuild } = {}) { let channel; if (!data.guild_id && !guild) { if ((data.recipients && data.type !== ChannelType.GroupDM) || data.type === ChannelType.DM) { @@ -59,7 +59,7 @@ function createChannel(client, data, guild, { allowUnknownGuild, fromInteraction case ChannelType.AnnouncementThread: case ChannelType.PublicThread: case ChannelType.PrivateThread: { - channel = new (getThreadChannel())(guild, data, client, fromInteraction); + channel = new (getThreadChannel())(guild, data, client); if (!allowUnknownGuild) channel.parent?.threads.cache.set(channel.id, channel); break; } diff --git a/packages/discord.js/src/util/Components.js b/packages/discord.js/src/util/Components.js index 42bee7f2afa0..1a2ccbcd24ad 100644 --- a/packages/discord.js/src/util/Components.js +++ b/packages/discord.js/src/util/Components.js @@ -150,8 +150,3 @@ const TextInputBuilder = require('../structures/TextInputBuilder'); const TextInputComponent = require('../structures/TextInputComponent'); const UserSelectMenuBuilder = require('../structures/UserSelectMenuBuilder'); const UserSelectMenuComponent = require('../structures/UserSelectMenuComponent'); - -/** - * @external JSONEncodable - * @see {@link https://discord.js.org/#/docs/builders/main/typedef/JSONEncodable} - */ diff --git a/packages/discord.js/src/util/Constants.js b/packages/discord.js/src/util/Constants.js index 3f06c3fd50d1..c2d3da95f403 100644 --- a/packages/discord.js/src/util/Constants.js +++ b/packages/discord.js/src/util/Constants.js @@ -1,6 +1,6 @@ 'use strict'; -const { ChannelType, MessageType, ComponentType } = require('discord-api-types/v10'); +const { ChannelType, MessageType, ComponentType, ImageFormat, StickerFormatType } = require('discord-api-types/v10'); /** * Max bulk deletable message age @@ -10,6 +10,7 @@ exports.MaxBulkDeletableMessageAge = 1_209_600_000; /** * The name of an item to be swept in Sweepers + * * `autoModerationRules` * * `applicationCommands` - both global and guild commands * * `bans` * * `emojis` @@ -27,6 +28,7 @@ exports.MaxBulkDeletableMessageAge = 1_209_600_000; * @typedef {string} SweeperKey */ exports.SweeperKeys = [ + 'autoModerationRules', 'applicationCommands', 'bans', 'emojis', @@ -64,9 +66,31 @@ exports.NonSystemMessageTypes = [ * * NewsChannel * * ThreadChannel * * VoiceChannel - * @typedef {TextChannel|NewsChannel|ThreadChannel|VoiceChannel} GuildTextBasedChannel + * * StageChannel + * @typedef {TextChannel|NewsChannel|ThreadChannel|VoiceChannel|StageChannel} GuildTextBasedChannel */ +/** + * The types of guild channels that are text-based. The available types are: + * * {@link ChannelType.GuildText} + * * {@link ChannelType.GuildAnnouncement} + * * {@link ChannelType.AnnouncementThread} + * * {@link ChannelType.PublicThread} + * * {@link ChannelType.PrivateThread} + * * {@link ChannelType.GuildVoice} + * * {@link ChannelType.GuildStageVoice} + * @typedef {ChannelType[]} GuildTextBasedChannelTypes + */ +exports.GuildTextBasedChannelTypes = [ + ChannelType.GuildText, + ChannelType.GuildAnnouncement, + ChannelType.AnnouncementThread, + ChannelType.PublicThread, + ChannelType.PrivateThread, + ChannelType.GuildVoice, + ChannelType.GuildStageVoice, +]; + /** * The channels that are text-based. * * DMChannel @@ -90,17 +114,10 @@ exports.NonSystemMessageTypes = [ * * {@link ChannelType.PublicThread} * * {@link ChannelType.PrivateThread} * * {@link ChannelType.GuildVoice} + * * {@link ChannelType.GuildStageVoice} * @typedef {ChannelType[]} TextBasedChannelTypes */ -exports.TextBasedChannelTypes = [ - ChannelType.DM, - ChannelType.GuildText, - ChannelType.GuildAnnouncement, - ChannelType.AnnouncementThread, - ChannelType.PublicThread, - ChannelType.PrivateThread, - ChannelType.GuildVoice, -]; +exports.TextBasedChannelTypes = [...exports.GuildTextBasedChannelTypes, ChannelType.DM]; /** * The types of channels that are threads. The available types are: @@ -136,6 +153,70 @@ exports.SelectMenuTypes = [ ComponentType.ChannelSelect, ]; +/** + * The types of messages that can be deleted. The available types are: + * * {@link MessageType.AutoModerationAction} + * * {@link MessageType.ChannelFollowAdd} + * * {@link MessageType.ChannelPinnedMessage} + * * {@link MessageType.ChatInputCommand} + * * {@link MessageType.ContextMenuCommand} + * * {@link MessageType.Default} + * * {@link MessageType.GuildBoost} + * * {@link MessageType.GuildBoostTier1} + * * {@link MessageType.GuildBoostTier2} + * * {@link MessageType.GuildBoostTier3} + * * {@link MessageType.GuildInviteReminder} + * * {@link MessageType.InteractionPremiumUpsell} + * * {@link MessageType.Reply} + * * {@link MessageType.RoleSubscriptionPurchase} + * * {@link MessageType.StageEnd} + * * {@link MessageType.StageRaiseHand} + * * {@link MessageType.StageSpeaker} + * * {@link MessageType.StageStart} + * * {@link MessageType.StageTopic} + * * {@link MessageType.ThreadCreated} + * * {@link MessageType.UserJoin} + * @typedef {MessageType[]} DeletableMessageTypes + */ +exports.DeletableMessageTypes = [ + MessageType.AutoModerationAction, + MessageType.ChannelFollowAdd, + MessageType.ChannelPinnedMessage, + MessageType.ChatInputCommand, + MessageType.ContextMenuCommand, + MessageType.Default, + MessageType.GuildBoost, + MessageType.GuildBoostTier1, + MessageType.GuildBoostTier2, + MessageType.GuildBoostTier3, + MessageType.GuildInviteReminder, + MessageType.InteractionPremiumUpsell, + MessageType.Reply, + MessageType.RoleSubscriptionPurchase, + MessageType.StageEnd, + MessageType.StageRaiseHand, + MessageType.StageSpeaker, + MessageType.StageStart, + MessageType.StageTopic, + MessageType.ThreadCreated, + MessageType.UserJoin, +]; + +/** + * A mapping between sticker formats and their respective image formats. + * * {@link StickerFormatType.PNG} -> {@link ImageFormat.PNG} + * * {@link StickerFormatType.APNG} -> {@link ImageFormat.PNG} + * * {@link StickerFormatType.Lottie} -> {@link ImageFormat.Lottie} + * * {@link StickerFormatType.GIF} -> {@link ImageFormat.GIF} + * @typedef {Object} StickerFormatExtensionMap + */ +exports.StickerFormatExtensionMap = { + [StickerFormatType.PNG]: ImageFormat.PNG, + [StickerFormatType.APNG]: ImageFormat.PNG, + [StickerFormatType.Lottie]: ImageFormat.Lottie, + [StickerFormatType.GIF]: ImageFormat.GIF, +}; + /** * @typedef {Object} Constants Constants that can be used in an enum or object-like way. * @property {number} MaxBulkDeletableMessageAge Max bulk deletable message age @@ -145,4 +226,5 @@ exports.SelectMenuTypes = [ * @property {ThreadChannelTypes} ThreadChannelTypes The types of channels that are threads * @property {VoiceBasedChannelTypes} VoiceBasedChannelTypes The types of channels that are voice-based * @property {SelectMenuTypes} SelectMenuTypes The types of components that are select menus. + * @property {Object} StickerFormatExtensionMap A mapping between sticker formats and their respective image formats. */ diff --git a/packages/discord.js/src/util/Events.js b/packages/discord.js/src/util/Events.js index 38f81a0a8513..34d31b930038 100644 --- a/packages/discord.js/src/util/Events.js +++ b/packages/discord.js/src/util/Events.js @@ -3,6 +3,10 @@ /** * @typedef {Object} Events * @property {string} ApplicationCommandPermissionsUpdate applicationCommandPermissionsUpdate + * @property {string} AutoModerationActionExecution autoModerationActionExecution + * @property {string} AutoModerationRuleCreate autoModerationRuleCreate + * @property {string} AutoModerationRuleDelete autoModerationRuleDelete + * @property {string} AutoModerationRuleUpdate autoModerationRuleUpdate * @property {string} CacheSweep cacheSweep * @property {string} ChannelCreate channelCreate * @property {string} ChannelDelete channelDelete @@ -11,6 +15,7 @@ * @property {string} ClientReady ready * @property {string} Debug debug * @property {string} Error error + * @property {string} GuildAuditLogEntryCreate guildAuditLogEntryCreate * @property {string} GuildBanAdd guildBanAdd * @property {string} GuildBanRemove guildBanRemove * @property {string} GuildCreate guildCreate @@ -79,6 +84,10 @@ */ module.exports = { ApplicationCommandPermissionsUpdate: 'applicationCommandPermissionsUpdate', + AutoModerationActionExecution: 'autoModerationActionExecution', + AutoModerationRuleCreate: 'autoModerationRuleCreate', + AutoModerationRuleDelete: 'autoModerationRuleDelete', + AutoModerationRuleUpdate: 'autoModerationRuleUpdate', CacheSweep: 'cacheSweep', ChannelCreate: 'channelCreate', ChannelDelete: 'channelDelete', @@ -87,6 +96,7 @@ module.exports = { ClientReady: 'ready', Debug: 'debug', Error: 'error', + GuildAuditLogEntryCreate: 'guildAuditLogEntryCreate', GuildBanAdd: 'guildBanAdd', GuildBanRemove: 'guildBanRemove', GuildCreate: 'guildCreate', diff --git a/packages/discord.js/src/util/Formatters.js b/packages/discord.js/src/util/Formatters.js index 7f3026811610..bd93a36a3a89 100644 --- a/packages/discord.js/src/util/Formatters.js +++ b/packages/discord.js/src/util/Formatters.js @@ -27,8 +27,8 @@ const { * @param {string} commandName The name of the application command * @param {string|Snowflake} subcommandGroupOrSubOrId * The subcommand group name, subcommand name, or application command id - * @param {?(string|Snowflake)} [subcommandNameOrId] The subcommand name or application command id - * @param {?string} [commandId] The id of the application command + * @param {string|Snowflake} [subcommandNameOrId] The subcommand name or application command id + * @param {string} [commandId] The id of the application command * @returns {string} */ diff --git a/packages/discord.js/src/util/GuildMemberFlagsBitField.js b/packages/discord.js/src/util/GuildMemberFlagsBitField.js new file mode 100644 index 000000000000..84ce6b903cf9 --- /dev/null +++ b/packages/discord.js/src/util/GuildMemberFlagsBitField.js @@ -0,0 +1,41 @@ +'use strict'; + +const { GuildMemberFlags } = require('discord-api-types/v10'); +const BitField = require('./BitField'); + +/** + * Data structure that makes it easy to interact with a {@link GuildMember#flags} bitfield. + * @extends {BitField} + */ +class GuildMemberFlagsBitField extends BitField { + /** + * Numeric guild guild member flags. + * @type {GuildMemberFlags} + * @memberof GuildMemberFlagsBitField + */ + static Flags = GuildMemberFlags; +} + +/** + * @name GuildMemberFlagsBitField + * @kind constructor + * @memberof GuildMemberFlagsBitField + * @param {BitFieldResolvable} [bits=0] Bit(s) to read from + */ + +/** + * Bitfield of the packed bits + * @type {number} + * @name GuildMemberFlagsBitField#bitfield + */ + +/** + * Data that can be resolved to give a guild member flag bitfield. This can be: + * * A string (see {@link GuildMemberFlagsBitField.Flags}) + * * A guild member flag + * * An instance of GuildMemberFlagsBitField + * * An Array of GuildMemberFlagsResolvable + * @typedef {string|number|GuildMemberFlagsBitField|GuildMemberFlagsResolvable[]} GuildMemberFlagsResolvable + */ + +exports.GuildMemberFlagsBitField = GuildMemberFlagsBitField; diff --git a/packages/discord.js/src/util/LimitedCollection.js b/packages/discord.js/src/util/LimitedCollection.js index a5874c8aae45..12a8360a1934 100644 --- a/packages/discord.js/src/util/LimitedCollection.js +++ b/packages/discord.js/src/util/LimitedCollection.js @@ -47,7 +47,7 @@ class LimitedCollection extends Collection { } set(key, value) { - if (this.maxSize === 0) return this; + if (this.maxSize === 0 && !this.keepOverLimit?.(value, key, this)) return this; if (this.size >= this.maxSize && !this.has(key)) { for (const [k, v] of this.entries()) { const keep = this.keepOverLimit?.(v, k, this) ?? false; diff --git a/packages/discord.js/src/util/Options.js b/packages/discord.js/src/util/Options.js index f6106f3bc5cf..9e31308e7590 100644 --- a/packages/discord.js/src/util/Options.js +++ b/packages/discord.js/src/util/Options.js @@ -1,8 +1,8 @@ 'use strict'; -const process = require('node:process'); -const { DefaultRestOptions } = require('@discordjs/rest'); +const { DefaultRestOptions, DefaultUserAgentAppendix } = require('@discordjs/rest'); const { toSnakeCase } = require('./Transformers'); +const { version } = require('../../package.json'); /** * @typedef {Function} CacheFactory @@ -35,7 +35,7 @@ const { toSnakeCase } = require('./Transformers'); * @property {IntentsResolvable} intents Intents to enable for this connection * @property {number} [waitGuildTimeout=15_000] Time in milliseconds that clients with the * {@link GatewayIntentBits.Guilds} gateway intent should wait for missing guilds to be received before being ready. - * @property {SweeperOptions} [sweepers={}] Options for cache sweeping + * @property {SweeperOptions} [sweepers=this.DefaultSweeperSettings] Options for cache sweeping * @property {WebsocketOptions} [ws] Options for the WebSocket * @property {RESTOptions} [rest] Options for the REST manager * @property {Function} [jsonTransformer] A function used to transform outgoing json data @@ -57,6 +57,16 @@ const { toSnakeCase } = require('./Transformers'); * This property is optional when the key is `invites`, `messages`, or `threads` and `lifetime` is set */ +/** + * A function to determine what strategy to use for sharding internally. + * ```js + * (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }) + * ``` + * @typedef {Function} BuildStrategyFunction + * @param {WSWebSocketManager} manager The WebSocketManager that is going to initiate the sharding + * @returns {IShardingStrategy} The strategy to use for sharding + */ + /** * WebSocket options (these are left as snake_case to match the API) * @typedef {Object} WebsocketOptions @@ -64,12 +74,21 @@ const { toSnakeCase } = require('./Transformers'); * sent in the initial guild member list, must be between 50 and 250 * @property {number} [version=10] The Discord gateway version to use Changing this can break the library; * only set this if you know what you are doing + * @property {BuildStrategyFunction} [buildStrategy] Builds the strategy to use for sharding */ /** * Contains various utilities for client options. */ class Options extends null { + /** + * The default user agent appendix. + * @type {string} + * @memberof Options + * @private + */ + static userAgentAppendix = `discord.js/${version} ${DefaultUserAgentAppendix}`.trimEnd(); + /** * The default client options. * @returns {ClientOptions} @@ -86,15 +105,12 @@ class Options extends null { sweepers: this.DefaultSweeperSettings, ws: { large_threshold: 50, - compress: false, - properties: { - os: process.platform, - browser: 'discord.js', - device: 'discord.js', - }, version: 10, }, - rest: DefaultRestOptions, + rest: { + ...DefaultRestOptions, + userAgentAppendix: this.userAgentAppendix, + }, jsonTransformer: toSnakeCase, }; } @@ -151,7 +167,7 @@ class Options extends null { } /** - * The default settings passed to {@link Options.cacheWithLimits}. + * The default settings passed to {@link ClientOptions.makeCache}. * The caches that this changes are: * * `MessageManager` - Limit to 200 messages * If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g. @@ -165,11 +181,11 @@ class Options extends null { } /** - * The default settings passed to {@link Options.sweepers} (for v14). + * The default settings passed to {@link ClientOptions.sweepers}. * The sweepers that this changes are: * * `threads` - Sweep archived threads every hour, removing those archived more than 4 hours ago * If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g. - * `sweepers: { ...Options.DefaultSweeperSettings, messages: { interval: 300, lifetime: 600 } })` + * `sweepers: { ...Options.DefaultSweeperSettings, messages: { interval: 300, lifetime: 600 } }` * @type {SweeperOptions} */ static get DefaultSweeperSettings() { @@ -186,5 +202,15 @@ module.exports = Options; /** * @external RESTOptions - * @see {@link https://discord.js.org/#/docs/rest/main/typedef/RESTOptions} + * @see {@link https://discord.js.org/docs/packages/rest/stable/RESTOptions:Interface} + */ + +/** + * @external WSWebSocketManager + * @see {@link https://discord.js.org/docs/packages/ws/stable/WebSocketManager:Class} + */ + +/** + * @external IShardingStrategy + * @see {@link https://discord.js.org/docs/packages/ws/stable/IShardingStrategy:Interface} */ diff --git a/packages/discord.js/src/util/Partials.js b/packages/discord.js/src/util/Partials.js index 3a73c9bee747..31d92231c1d6 100644 --- a/packages/discord.js/src/util/Partials.js +++ b/packages/discord.js/src/util/Partials.js @@ -5,7 +5,7 @@ const { createEnum } = require('./Enums'); /** * The enumeration for partials. * ```js - * const { Client, Partials } = require('discord.js'); + * import { Client, Partials } from 'discord.js'; * * const client = new Client({ * intents: [ diff --git a/packages/discord.js/src/util/Sweepers.js b/packages/discord.js/src/util/Sweepers.js index 83892592ac6f..6eb2dc65d0e2 100644 --- a/packages/discord.js/src/util/Sweepers.js +++ b/packages/discord.js/src/util/Sweepers.js @@ -8,7 +8,7 @@ const { DiscordjsTypeError, ErrorCodes } = require('../errors'); /** * @typedef {Function} GlobalSweepFilter * @returns {Function|null} Return `null` to skip sweeping, otherwise a function passed to `sweep()`, - * See {@link [Collection#sweep](https://discord.js.org/#/docs/collection/main/class/Collection?scrollTo=sweep)} + * See {@link [Collection#sweep](https://discord.js.org/docs/packages/collection/stable/Collection:Class#sweep)} * for the definition of this function. */ @@ -78,6 +78,16 @@ class Sweepers { return guildCommands + globalCommands; } + /** + * Sweeps all auto moderation rules and removes the ones which are indicated by the filter. + * @param {Function} filter The function used to determine + * which auto moderation rules will be removed from the caches + * @returns {number} Amount of auto moderation rules that were removed from the caches + */ + sweepAutoModerationRules(filter) { + return this._sweepGuildDirectProp('autoModerationRules', filter).items; + } + /** * Sweeps all guild bans and removes the ones which are indicated by the filter. * @param {Function} filter The function used to determine which bans will be removed from the caches. diff --git a/packages/discord.js/src/util/Transformers.js b/packages/discord.js/src/util/Transformers.js index 63edd0689549..f4d7af0ec6ab 100644 --- a/packages/discord.js/src/util/Transformers.js +++ b/packages/discord.js/src/util/Transformers.js @@ -1,5 +1,6 @@ 'use strict'; +const { isJSONEncodable } = require('@discordjs/util'); const snakeCase = require('lodash.snakecase'); /** @@ -10,8 +11,26 @@ const snakeCase = require('lodash.snakecase'); function toSnakeCase(obj) { if (typeof obj !== 'object' || !obj) return obj; if (obj instanceof Date) return obj; + if (isJSONEncodable(obj)) return toSnakeCase(obj.toJSON()); if (Array.isArray(obj)) return obj.map(toSnakeCase); return Object.fromEntries(Object.entries(obj).map(([key, value]) => [snakeCase(key), toSnakeCase(value)])); } -module.exports = { toSnakeCase }; +/** + * Transforms an API auto moderation action object to a camel-cased variant. + * @param {APIAutoModerationAction} autoModerationAction The action to transform + * @returns {AutoModerationAction} + * @ignore + */ +function _transformAPIAutoModerationAction(autoModerationAction) { + return { + type: autoModerationAction.type, + metadata: { + durationSeconds: autoModerationAction.metadata.duration_seconds ?? null, + channelId: autoModerationAction.metadata.channel_id ?? null, + customMessage: autoModerationAction.metadata.custom_message ?? null, + }, + }; +} + +module.exports = { toSnakeCase, _transformAPIAutoModerationAction }; diff --git a/packages/discord.js/src/util/UserFlagsBitField.js b/packages/discord.js/src/util/UserFlagsBitField.js index 7ab9616d1865..ea9f8352b065 100644 --- a/packages/discord.js/src/util/UserFlagsBitField.js +++ b/packages/discord.js/src/util/UserFlagsBitField.js @@ -11,6 +11,7 @@ class UserFlagsBitField extends BitField { /** * Numeric user flags. * @type {UserFlags} + * @memberof UserFlagsBitField */ static Flags = UserFlags; } diff --git a/packages/discord.js/src/util/Util.js b/packages/discord.js/src/util/Util.js index dc722e13f636..220b8a3b38da 100644 --- a/packages/discord.js/src/util/Util.js +++ b/packages/discord.js/src/util/Util.js @@ -53,233 +53,6 @@ function flatten(obj, ...props) { return out; } -/** - * Options used to escape markdown. - * @typedef {Object} EscapeMarkdownOptions - * @property {boolean} [codeBlock=true] Whether to escape code blocks - * @property {boolean} [inlineCode=true] Whether to escape inline code - * @property {boolean} [bold=true] Whether to escape bolds - * @property {boolean} [italic=true] Whether to escape italics - * @property {boolean} [underline=true] Whether to escape underlines - * @property {boolean} [strikethrough=true] Whether to escape strikethroughs - * @property {boolean} [spoiler=true] Whether to escape spoilers - * @property {boolean} [codeBlockContent=true] Whether to escape text inside code blocks - * @property {boolean} [inlineCodeContent=true] Whether to escape text inside inline code - * @property {boolean} [escape=true] Whether to escape escape characters - * @property {boolean} [heading=false] Whether to escape headings - * @property {boolean} [bulletedList=false] Whether to escape bulleted lists - * @property {boolean} [numberedList=false] Whether to escape numbered lists - * @property {boolean} [maskedLink=false] Whether to escape masked links - */ - -/** - * Escapes any Discord-flavour markdown in a string. - * @param {string} text Content to escape - * @param {EscapeMarkdownOptions} [options={}] Options for escaping the markdown - * @returns {string} - */ -function escapeMarkdown( - text, - { - codeBlock = true, - inlineCode = true, - bold = true, - italic = true, - underline = true, - strikethrough = true, - spoiler = true, - codeBlockContent = true, - inlineCodeContent = true, - escape = true, - heading = false, - bulletedList = false, - numberedList = false, - maskedLink = false, - } = {}, -) { - if (!codeBlockContent) { - return text - .split('```') - .map((subString, index, array) => { - if (index % 2 && index !== array.length - 1) return subString; - return escapeMarkdown(subString, { - inlineCode, - bold, - italic, - underline, - strikethrough, - spoiler, - inlineCodeContent, - escape, - heading, - bulletedList, - numberedList, - maskedLink, - }); - }) - .join(codeBlock ? '\\`\\`\\`' : '```'); - } - if (!inlineCodeContent) { - return text - .split(/(?<=^|[^`])`(?=[^`]|$)/g) - .map((subString, index, array) => { - if (index % 2 && index !== array.length - 1) return subString; - return escapeMarkdown(subString, { - codeBlock, - bold, - italic, - underline, - strikethrough, - spoiler, - escape, - heading, - bulletedList, - numberedList, - maskedLink, - }); - }) - .join(inlineCode ? '\\`' : '`'); - } - if (inlineCode) text = escapeInlineCode(text); - if (codeBlock) text = escapeCodeBlock(text); - if (italic) text = escapeItalic(text); - if (bold) text = escapeBold(text); - if (underline) text = escapeUnderline(text); - if (strikethrough) text = escapeStrikethrough(text); - if (spoiler) text = escapeSpoiler(text); - if (escape) text = escapeEscape(text); - if (heading) text = escapeHeading(text); - if (bulletedList) text = escapeBulletedList(text); - if (numberedList) text = escapeNumberedList(text); - if (maskedLink) text = escapeMaskedLink(text); - return text; -} - -/** - * Escapes code block markdown in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeCodeBlock(text) { - return text.replaceAll('```', '\\`\\`\\`'); -} - -/** - * Escapes inline code markdown in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeInlineCode(text) { - return text.replace(/(?<=^|[^`])``?(?=[^`]|$)/g, match => (match.length === 2 ? '\\`\\`' : '\\`')); -} - -/** - * Escapes italic markdown in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeItalic(text) { - let i = 0; - text = text.replace(/(?<=^|[^*])\*([^*]|\*\*|$)/g, (_, match) => { - if (match === '**') return ++i % 2 ? `\\*${match}` : `${match}\\*`; - return `\\*${match}`; - }); - i = 0; - return text.replace(/(?<=^|[^_])_([^_]|__|$)/g, (_, match) => { - if (match === '__') return ++i % 2 ? `\\_${match}` : `${match}\\_`; - return `\\_${match}`; - }); -} - -/** - * Escapes bold markdown in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeBold(text) { - let i = 0; - return text.replace(/\*\*(\*)?/g, (_, match) => { - if (match) return ++i % 2 ? `${match}\\*\\*` : `\\*\\*${match}`; - return '\\*\\*'; - }); -} - -/** - * Escapes underline markdown in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeUnderline(text) { - let i = 0; - return text.replace(/__(_)?/g, (_, match) => { - if (match) return ++i % 2 ? `${match}\\_\\_` : `\\_\\_${match}`; - return '\\_\\_'; - }); -} - -/** - * Escapes strikethrough markdown in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeStrikethrough(text) { - return text.replaceAll('~~', '\\~\\~'); -} - -/** - * Escapes spoiler markdown in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeSpoiler(text) { - return text.replaceAll('||', '\\|\\|'); -} - -/** - * Escapes escape characters in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeEscape(text) { - return text.replaceAll('\\', '\\\\'); -} - -/** - * Escapes heading characters in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeHeading(text) { - return text.replaceAll(/^( {0,2}[*-] +)?(#{1,3} )/gm, '$1\\$2'); -} - -/** - * Escapes bulleted list characters in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeBulletedList(text) { - return text.replaceAll(/^( *)[*-]( +)/gm, '$1\\-$2'); -} - -/** - * Escapes numbered list characters in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeNumberedList(text) { - return text.replaceAll(/^( *\d+)\./gm, '$1\\.'); -} - -/** - * Escapes masked link characters in a string. - * @param {string} text Content to escape - * @returns {string} - */ -function escapeMaskedLink(text) { - return text.replaceAll(/\[.+\]\(.+\)/gm, '\\$&'); -} - /** * @typedef {Object} FetchRecommendedShardCountOptions * @property {number} [guildsPerShard=1000] Number of guilds assigned per shard @@ -477,13 +250,14 @@ function resolveColor(color) { if (typeof color === 'string') { if (color === 'Random') return Math.floor(Math.random() * (0xffffff + 1)); if (color === 'Default') return 0; - color = Colors[color] ?? parseInt(color.replace('#', ''), 16); + if (/^#?[\da-f]{6}$/i.test(color)) return parseInt(color.replace('#', ''), 16); + color = Colors[color]; } else if (Array.isArray(color)) { color = (color[0] << 16) + (color[1] << 8) + color[2]; } if (color < 0 || color > 0xffffff) throw new DiscordjsRangeError(ErrorCodes.ColorRange); - else if (Number.isNaN(color)) throw new DiscordjsTypeError(ErrorCodes.ColorConvert); + if (typeof color !== 'number' || Number.isNaN(color)) throw new DiscordjsTypeError(ErrorCodes.ColorConvert); return color; } @@ -599,14 +373,6 @@ function parseWebhookURL(url) { module.exports = { flatten, - escapeMarkdown, - escapeCodeBlock, - escapeInlineCode, - escapeItalic, - escapeBold, - escapeUnderline, - escapeStrikethrough, - escapeSpoiler, fetchRecommendedShardCount, parseEmoji, resolvePartialEmoji, diff --git a/packages/discord.js/test/createGuild.js b/packages/discord.js/test/createGuild.js index 90e529a43182..21ac04ea16b5 100644 --- a/packages/discord.js/test/createGuild.js +++ b/packages/discord.js/test/createGuild.js @@ -26,7 +26,7 @@ client.on('ready', async () => { } catch (error) { console.error(error); } finally { - client.destroy(); + await client.destroy(); } }); diff --git a/packages/discord.js/test/escapeMarkdown.test.js b/packages/discord.js/test/escapeMarkdown.test.js deleted file mode 100644 index 246efce19982..000000000000 --- a/packages/discord.js/test/escapeMarkdown.test.js +++ /dev/null @@ -1,240 +0,0 @@ -'use strict'; - -/* eslint-env jest */ -/* eslint-disable max-len */ - -const Util = require('../src/util/Util'); -const testString = "`_Behold!_`\n||___~~***```js\n`use strict`;\nrequire('discord.js');```***~~___||"; -const testStringForums = - '# Title\n## Subtitle\n### Subsubtitle\n- Bullet list\n - # Title with bullet\n * Subbullet\n1. Number list\n 1. Sub number list'; - -describe('escapeCodeblock', () => { - test('shared', () => { - expect(Util.escapeCodeBlock(testString)).toEqual( - "`_Behold!_`\n||___~~***\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`***~~___||", - ); - }); - - test('basic', () => { - expect(Util.escapeCodeBlock('```test```')).toEqual('\\`\\`\\`test\\`\\`\\`'); - }); -}); - -describe('escapeInlineCode', () => { - test('shared', () => { - expect(Util.escapeInlineCode(testString)).toEqual( - "\\`_Behold!_\\`\n||___~~***```js\n\\`use strict\\`;\nrequire('discord.js');```***~~___||", - ); - }); - - test('basic', () => { - expect(Util.escapeInlineCode('`test`')).toEqual('\\`test\\`'); - }); -}); - -describe('escapeBold', () => { - test('shared', () => { - expect(Util.escapeBold(testString)).toEqual( - "`_Behold!_`\n||___~~*\\*\\*```js\n`use strict`;\nrequire('discord.js');```\\*\\**~~___||", - ); - }); - - test('basic', () => { - expect(Util.escapeBold('**test**')).toEqual('\\*\\*test\\*\\*'); - }); -}); - -describe('escapeItalic', () => { - test('shared', () => { - expect(Util.escapeItalic(testString)).toEqual( - "`\\_Behold!\\_`\n||\\___~~\\***```js\n`use strict`;\nrequire('discord.js');```**\\*~~__\\_||", - ); - }); - - test('basic (_)', () => { - expect(Util.escapeItalic('_test_')).toEqual('\\_test\\_'); - }); - - test('basic (*)', () => { - expect(Util.escapeItalic('*test*')).toEqual('\\*test\\*'); - }); -}); - -describe('escapeUnderline', () => { - test('shared', () => { - expect(Util.escapeUnderline(testString)).toEqual( - "`_Behold!_`\n||_\\_\\_~~***```js\n`use strict`;\nrequire('discord.js');```***~~\\_\\__||", - ); - }); - - test('basic', () => { - expect(Util.escapeUnderline('__test__')).toEqual('\\_\\_test\\_\\_'); - }); -}); - -describe('escapeStrikethrough', () => { - test('shared', () => { - expect(Util.escapeStrikethrough(testString)).toEqual( - "`_Behold!_`\n||___\\~\\~***```js\n`use strict`;\nrequire('discord.js');```***\\~\\~___||", - ); - }); - - test('basic', () => { - expect(Util.escapeStrikethrough('~~test~~')).toEqual('\\~\\~test\\~\\~'); - }); -}); - -describe('escapeSpoiler', () => { - test('shared', () => { - expect(Util.escapeSpoiler(testString)).toEqual( - "`_Behold!_`\n\\|\\|___~~***```js\n`use strict`;\nrequire('discord.js');```***~~___\\|\\|", - ); - }); - - test('basic', () => { - expect(Util.escapeSpoiler('||test||')).toEqual('\\|\\|test\\|\\|'); - }); -}); - -describe('escapeHeading', () => { - test('shared', () => { - expect(Util.escapeHeading(testStringForums)).toEqual( - '\\# Title\n\\## Subtitle\n\\### Subsubtitle\n- Bullet list\n - \\# Title with bullet\n * Subbullet\n1. Number list\n 1. Sub number list', - ); - }); - - test('basic', () => { - expect(Util.escapeHeading('# test')).toEqual('\\# test'); - }); -}); - -describe('escapeBulletedList', () => { - test('shared', () => { - expect(Util.escapeBulletedList(testStringForums)).toEqual( - '# Title\n## Subtitle\n### Subsubtitle\n\\- Bullet list\n \\- # Title with bullet\n \\* Subbullet\n1. Number list\n 1. Sub number list', - ); - }); - - test('basic', () => { - expect(Util.escapeBulletedList('- test')).toEqual('\\- test'); - }); -}); - -describe('escapeNumberedList', () => { - test('shared', () => { - expect(Util.escapeNumberedList(testStringForums)).toEqual( - '# Title\n## Subtitle\n### Subsubtitle\n- Bullet list\n - # Title with bullet\n * Subbullet\n1\\. Number list\n 1\\. Sub number list', - ); - }); - - test('basic', () => { - expect(Util.escapeNumberedList('1. test')).toEqual('1\\. test'); - }); -}); - -describe('escapeMaskedLink', () => { - test('basic', () => { - expect(Util.escapeMaskedLink('[test](https://discord.js.org)')).toEqual('\\[test](https://discord.js.org)'); - }); -}); - -describe('escapeMarkdown', () => { - test('shared', () => { - expect(Util.escapeMarkdown(testString)).toEqual( - "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('no codeBlock', () => { - expect(Util.escapeMarkdown(testString, { codeBlock: false })).toEqual( - "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*```js\n\\`use strict\\`;\nrequire('discord.js');```\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('no inlineCode', () => { - expect(Util.escapeMarkdown(testString, { inlineCode: false })).toEqual( - "`\\_Behold!\\_`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('no bold', () => { - expect(Util.escapeMarkdown(testString, { bold: false })).toEqual( - "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\***\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`**\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('no italic', () => { - expect(Util.escapeMarkdown(testString, { italic: false })).toEqual( - "\\`_Behold!_\\`\n\\|\\|_\\_\\_\\~\\~*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\**\\~\\~\\_\\__\\|\\|", - ); - }); - - test('no underline', () => { - expect(Util.escapeMarkdown(testString, { underline: false })).toEqual( - "\\`\\_Behold!\\_\\`\n\\|\\|\\___\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~__\\_\\|\\|", - ); - }); - - test('no strikethrough', () => { - expect(Util.escapeMarkdown(testString, { strikethrough: false })).toEqual( - "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_~~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*~~\\_\\_\\_\\|\\|", - ); - }); - - test('no spoiler', () => { - expect(Util.escapeMarkdown(testString, { spoiler: false })).toEqual( - "\\`\\_Behold!\\_\\`\n||\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_||", - ); - }); - - describe('code content', () => { - test('no code block content', () => { - expect(Util.escapeMarkdown(testString, { codeBlockContent: false })).toEqual( - "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('no inline code content', () => { - expect(Util.escapeMarkdown(testString, { inlineCodeContent: false })).toEqual( - "\\`_Behold!_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('neither inline code or code block content', () => { - expect(Util.escapeMarkdown(testString, { inlineCodeContent: false, codeBlockContent: false })) - // eslint-disable-next-line max-len - .toEqual( - "\\`_Behold!_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('neither code blocks or code block content', () => { - expect(Util.escapeMarkdown(testString, { codeBlock: false, codeBlockContent: false })).toEqual( - "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*```js\n`use strict`;\nrequire('discord.js');```\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('neither inline code or inline code content', () => { - expect(Util.escapeMarkdown(testString, { inlineCode: false, inlineCodeContent: false })).toEqual( - "`_Behold!_`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", - ); - }); - - test('edge-case odd number of fences with no code block content', () => { - expect( - Util.escapeMarkdown('**foo** ```**bar**``` **fizz** ``` **buzz**', { - codeBlock: false, - codeBlockContent: false, - }), - ).toEqual('\\*\\*foo\\*\\* ```**bar**``` \\*\\*fizz\\*\\* ``` \\*\\*buzz\\*\\*'); - }); - - test('edge-case odd number of backticks with no inline code content', () => { - expect( - Util.escapeMarkdown('**foo** `**bar**` **fizz** ` **buzz**', { inlineCode: false, inlineCodeContent: false }), - ).toEqual('\\*\\*foo\\*\\* `**bar**` \\*\\*fizz\\*\\* ` \\*\\*buzz\\*\\*'); - }); - }); -}); - -/* eslint-enable max-len, no-undef */ diff --git a/packages/discord.js/test/shard.js b/packages/discord.js/test/shard.js index a5dfbe8e1a28..f27b30562a79 100644 --- a/packages/discord.js/test/shard.js +++ b/packages/discord.js/test/shard.js @@ -28,9 +28,9 @@ process.send(123); client.on('ready', () => { console.log('Ready', client.options.shards); if (client.options.shards === 0) { - setTimeout(() => { + setTimeout(async () => { console.log('kek dying'); - client.destroy(); + await client.destroy(); }, 5_000); } }); diff --git a/packages/discord.js/test/templateCreateGuild.js b/packages/discord.js/test/templateCreateGuild.js index 42730c567188..adf0e319b8cf 100644 --- a/packages/discord.js/test/templateCreateGuild.js +++ b/packages/discord.js/test/templateCreateGuild.js @@ -20,7 +20,7 @@ client } catch (error) { console.error(error); } finally { - client.destroy(); + await client.destroy(); } }) .login(token) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 437db959f4d5..026d487a17ff 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1,3 +1,6 @@ +// DOM types required for undici +/// + import { ActionRowBuilder as BuilderActionRow, MessageActionRowComponentBuilder, @@ -32,10 +35,12 @@ import { AnyComponentBuilder, ComponentBuilder, type RestOrArray, + ApplicationCommandOptionAllowedChannelTypes, } from '@discordjs/builders'; import { Awaitable, JSONEncodable } from '@discordjs/util'; import { Collection } from '@discordjs/collection'; import { BaseImageURLOptions, ImageURLOptions, RawFile, REST, RESTOptions } from '@discordjs/rest'; +import { WebSocketManager as WSWebSocketManager, IShardingStrategy, SessionInfo } from '@discordjs/ws'; import { APIActionRowComponent, APIApplicationCommandInteractionData, @@ -139,6 +144,19 @@ import { APIMessageRoleSelectInteractionData, APIMessageMentionableSelectInteractionData, APIMessageChannelSelectInteractionData, + AutoModerationRuleKeywordPresetType, + AutoModerationActionType, + AutoModerationRuleEventType, + AutoModerationRuleTriggerType, + AuditLogRuleTriggerType, + GatewayAutoModerationActionExecutionDispatchData, + APIAutoModerationRule, + ForumLayoutType, + ApplicationRoleConnectionMetadataType, + APIApplicationRoleConnectionMetadata, + ImageFormat, + GuildMemberFlags, + RESTGetAPIGuildThreadsResult, } from 'discord-api-types/v10'; import { ChildProcess } from 'node:child_process'; import { EventEmitter } from 'node:events'; @@ -220,6 +238,7 @@ declare module 'node:events' { export class Activity { private constructor(presence: Presence, data?: RawActivityData); + public readonly presence: Presence; public applicationId: Snowflake | null; public assets: RichPresenceAssets | null; public buttons: string[]; @@ -277,11 +296,11 @@ export class ActionRowBuilder >, ); - public static from( + public static from( other: - | JSONEncodable> - | APIActionRowComponent, - ): ActionRowBuilder; + | JSONEncodable>> + | APIActionRowComponent>, + ): ActionRowBuilder; } export type MessageActionRowComponent = @@ -319,6 +338,63 @@ export abstract class AnonymousGuild extends BaseGuild { public splashURL(options?: ImageURLOptions): string | null; } +export class AutoModerationActionExecution { + private constructor(data: GatewayAutoModerationActionExecutionDispatchData, guild: Guild); + public guild: Guild; + public action: AutoModerationAction; + public ruleId: Snowflake; + public ruleTriggerType: AutoModerationRuleTriggerType; + public get user(): User | null; + public userId: Snowflake; + public get channel(): GuildTextBasedChannel | ForumChannel | null; + public channelId: Snowflake | null; + public get member(): GuildMember | null; + public messageId: Snowflake | null; + public alertSystemMessageId: Snowflake | null; + public content: string; + public matchedKeyword: string | null; + public matchedContent: string | null; + public get autoModerationRule(): AutoModerationRule | null; +} + +export class AutoModerationRule extends Base { + private constructor(client: Client, data: APIAutoModerationRule, guild: Guild); + public id: Snowflake; + public guild: Guild; + public name: string; + public creatorId: Snowflake; + public eventType: AutoModerationRuleEventType; + public triggerType: AutoModerationRuleTriggerType; + public triggerMetadata: AutoModerationTriggerMetadata; + public actions: AutoModerationAction[]; + public enabled: boolean; + public exemptRoles: Collection; + public exemptChannels: Collection; + public edit(options: AutoModerationRuleEditOptions): Promise; + public delete(reason?: string): Promise; + public setName(name: string, reason?: string): Promise; + public setEventType(eventType: AutoModerationRuleEventType, reason?: string): Promise; + public setKeywordFilter(keywordFilter: string[], reason?: string): Promise; + public setRegexPatterns(regexPatterns: string[], reason?: string): Promise; + public setPresets(presets: AutoModerationRuleKeywordPresetType[], reason?: string): Promise; + public setAllowList(allowList: string[], reason?: string): Promise; + public setMentionTotalLimit(mentionTotalLimit: number, reason?: string): Promise; + public setMentionRaidProtectionEnabled( + mentionRaidProtectionEnabled: boolean, + reason?: string, + ): Promise; + public setActions(actions: AutoModerationActionOptions[], reason?: string): Promise; + public setEnabled(enabled?: boolean, reason?: string): Promise; + public setExemptRoles( + roles: Collection | RoleResolvable[], + reason?: string, + ): Promise; + public setExemptChannels( + channels: Collection | GuildChannelResolvable[], + reason?: string, + ): Promise; +} + export abstract class Application extends Base { protected constructor(client: Client, data: RawApplicationData); public get createdAt(): Date; @@ -359,6 +435,7 @@ export class ApplicationCommand extends Base { >; public type: ApplicationCommandType; public version: Snowflake; + public nsfw: boolean; public delete(): Promise>; public edit(data: Partial): Promise>; public setName(name: string): Promise>; @@ -391,6 +468,16 @@ export class ApplicationCommand extends Base { private static isAPICommandData(command: object): command is RESTPostAPIApplicationCommandsJSONBody; } +export class ApplicationRoleConnectionMetadata { + private constructor(data: APIApplicationRoleConnectionMetadata); + public name: string; + public nameLocalizations: LocalizationMap | null; + public description: string; + public descriptionLocalizations: LocalizationMap | null; + public key: string; + public type: ApplicationRoleConnectionMetadataType; +} + export type ApplicationResolvable = Application | Activity | Snowflake; export class ApplicationFlagsBitField extends BitField { @@ -398,6 +485,8 @@ export class ApplicationFlagsBitField extends BitField { public static resolve(bit?: BitFieldResolvable): number; } +export type AutoModerationRuleResolvable = AutoModerationRule | Snowflake; + export abstract class Base { public constructor(client: Client); public readonly client: Client; @@ -493,12 +582,17 @@ export class InteractionResponse { public interaction: Interaction>; public client: Client; public id: Snowflake; + public get createdAt(): Date; + public get createdTimestamp(): number; public awaitMessageComponent( options?: AwaitMessageCollectorOptionsParams, ): Promise[T]>; public createMessageComponentCollector( options?: MessageCollectorOptionsParams, ): InteractionCollector[T]>; + public delete(): Promise; + public edit(options: string | MessagePayload | WebhookMessageEditOptions): Promise; + public fetch(): Promise; } export abstract class BaseGuild extends Base { @@ -535,7 +629,7 @@ export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, tr public nsfw: boolean; public threads: GuildTextThreadManager; public topic: string | null; - public createInvite(options?: CreateInviteOptions): Promise; + public createInvite(options?: InviteCreateOptions): Promise; public fetchInvites(cache?: boolean): Promise>; public setDefaultAutoArchiveDuration( defaultAutoArchiveDuration: ThreadAutoArchiveDuration, @@ -546,17 +640,26 @@ export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, tr public setType(type: ChannelType.GuildAnnouncement, reason?: string): Promise; } -export class BaseGuildVoiceChannel extends GuildChannel { +export class BaseGuildVoiceChannel extends TextBasedChannelMixin(GuildChannel, true, [ + 'lastPinTimestamp', + 'lastPinAt', +]) { public constructor(guild: Guild, data?: RawGuildChannelData); - public get members(): Collection; + public bitrate: number; public get full(): boolean; public get joinable(): boolean; + public get members(): Collection; + public nsfw: boolean; + public rateLimitPerUser: number | null; public rtcRegion: string | null; - public bitrate: number; public userLimit: number; - public createInvite(options?: CreateInviteOptions): Promise; - public setRTCRegion(rtcRegion: string | null, reason?: string): Promise; + public videoQualityMode: VideoQualityMode | null; + public createInvite(options?: InviteCreateOptions): Promise; public fetchInvites(cache?: boolean): Promise>; + public setBitrate(bitrate: number, reason?: string): Promise; + public setRTCRegion(rtcRegion: string | null, reason?: string): Promise; + public setUserLimit(userLimit: number, reason?: string): Promise; + public setVideoQualityMode(videoQualityMode: VideoQualityMode, reason?: string): Promise; } export type EnumLike = Record; @@ -612,7 +715,7 @@ export class ButtonComponent extends Component { public get style(): ButtonStyle; public get label(): string | null; public get emoji(): APIMessageComponentEmoji | null; - public get disabled(): boolean | null; + public get disabled(): boolean; public get customId(): string | null; public get url(): string | null; } @@ -629,7 +732,7 @@ export class StringSelectMenuBuilder extends BuilderStringSelectMenuComponent { public constructor(data?: Partial); private static normalizeEmoji( selectMenuOption: JSONEncodable | SelectMenuComponentOptionData, - ): (APISelectMenuOption | SelectMenuOptionBuilder)[]; + ): (APISelectMenuOption | StringSelectMenuOptionBuilder)[]; public override addOptions( ...options: RestOrArray ): this; @@ -642,6 +745,8 @@ export class StringSelectMenuBuilder extends BuilderStringSelectMenuComponent { export { /** @deprecated Use {@link StringSelectMenuBuilder} instead */ StringSelectMenuBuilder as SelectMenuBuilder, + /** @deprecated Use {@link StringSelectMenuOptionBuilder} instead */ + StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, }; export class UserSelectMenuBuilder extends BuilderUserSelectMenuComponent { @@ -666,10 +771,10 @@ export class ChannelSelectMenuBuilder extends BuilderChannelSelectMenuComponent public static from(other: JSONEncodable | APISelectMenuComponent): ChannelSelectMenuBuilder; } -export class SelectMenuOptionBuilder extends BuildersSelectMenuOption { +export class StringSelectMenuOptionBuilder extends BuildersSelectMenuOption { public constructor(data?: SelectMenuComponentOptionData | APISelectMenuOption); public override setEmoji(emoji: ComponentEmojiResolvable): this; - public static from(other: JSONEncodable | APISelectMenuOption): SelectMenuOptionBuilder; + public static from(other: JSONEncodable | APISelectMenuOption): StringSelectMenuOptionBuilder; } export class ModalBuilder extends BuildersModal { @@ -693,7 +798,7 @@ export class BaseSelectMenuComponent extend public get maxValues(): number | null; public get minValues(): number | null; public get customId(): string; - public get disabled(): boolean | null; + public get disabled(): boolean; } export class StringSelectMenuComponent extends BaseSelectMenuComponent { @@ -793,6 +898,8 @@ export type CategoryChannelType = Exclude< export class CategoryChannel extends GuildChannel { public get children(): CategoryChannelChildManager; public type: ChannelType.GuildCategory; + public get parent(): null; + public parentId: null; } export type CategoryChannelResolvable = Snowflake | CategoryChannel; @@ -849,7 +956,7 @@ export class Client extends BaseClient { public users: UserManager; public voice: ClientVoiceManager; public ws: WebSocketManager; - public destroy(): void; + public destroy(): Promise; public fetchGuildPreview(guild: GuildResolvable): Promise; public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise; public fetchGuildTemplate(template: GuildTemplateResolvable): Promise; @@ -900,8 +1007,13 @@ export class ClientApplication extends Application { public customInstallURL: string | null; public owner: User | Team | null; public get partial(): boolean; + public roleConnectionsVerificationURL: string | null; public rpcOrigins: string[]; public fetch(): Promise; + public fetchRoleConnectionMetadataRecords(): Promise; + public editRoleConnectionMetadataRecords( + records: ApplicationRoleConnectionMetadataEditOptions[], + ): Promise; } export class ClientPresence extends Presence { @@ -915,7 +1027,7 @@ export class ClientUser extends User { public mfaEnabled: boolean; public get presence(): ClientPresence; public verified: boolean; - public edit(data: ClientUserEditData): Promise; + public edit(options: ClientUserEditOptions): Promise; public setActivity(options?: ActivityOptions): ClientPresence; public setActivity(name: string, options?: ActivityOptions): ClientPresence; public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence; @@ -927,6 +1039,7 @@ export class ClientUser extends User { export class Options extends null { private constructor(); + private static userAgentAppendix: string; public static get DefaultMakeCacheSettings(): CacheWithLimitsOptions; public static get DefaultSweeperSettings(): SweeperOptions; public static createDefault(): ClientOptions; @@ -957,6 +1070,8 @@ export abstract class Collector extends EventEmi public readonly client: Client; public collected: Collection; + public lastCollectedTimestamp: number | null; + public get lastCollectedAt(): Date | null; public ended: boolean; public get endReason(): string | null; public filter: CollectorFilter<[V, ...F]>; @@ -1027,13 +1142,13 @@ export class CommandInteractionOptionResolver; private _getTypedOption( name: string, - type: ApplicationCommandOptionType, + allowedTypes: ApplicationCommandOptionType[], properties: (keyof ApplicationCommandOption)[], required: boolean, ): CommandInteractionOption | null; @@ -1047,8 +1162,36 @@ export class CommandInteractionOptionResolver['channel']>; - public getChannel(name: string, required?: boolean): NonNullable['channel']> | null; + public getChannel( + name: string, + required: true, + channelTypes?: readonly T[], + ): Extract< + NonNullable['channel']>, + { + // The `type` property of the PublicThreadChannel class is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread` + // If the user only passed one of those channel types, the Extract<> would have resolved to `never` + // Hence the need for this ternary + type: T extends ChannelType.PublicThread | ChannelType.AnnouncementThread + ? ChannelType.PublicThread | ChannelType.AnnouncementThread + : T; + } + >; + public getChannel( + name: string, + required?: boolean, + channelTypes?: readonly T[], + ): Extract< + NonNullable['channel']>, + { + // The `type` property of the PublicThreadChannel class is typed as `ChannelType.PublicThread | ChannelType.AnnouncementThread` + // If the user only passed one of those channel types, the Extract<> would have resolved to `never` + // Hence the need for this ternary + type: T extends ChannelType.PublicThread | ChannelType.AnnouncementThread + ? ChannelType.PublicThread | ChannelType.AnnouncementThread + : T; + } + > | null; public getString(name: string, required: true): string; public getString(name: string, required?: boolean): string | null; public getInteger(name: string, required: true): number; @@ -1157,6 +1300,7 @@ export class Guild extends AnonymousGuild { public maxVideoChannelUsers: number | null; public approximateMemberCount: number | null; public approximatePresenceCount: number | null; + public autoModerationRules: AutoModerationRuleManager; public available: boolean; public bans: GuildBanManager; public channels: GuildChannelManager; @@ -1171,6 +1315,7 @@ export class Guild extends AnonymousGuild { public large: boolean; public maximumMembers: number | null; public maximumPresences: number | null; + public maxStageVideoChannelUsers: number | null; public memberCount: number; public members: GuildMemberManager; public mfaLevel: GuildMFALevel; @@ -1184,6 +1329,8 @@ export class Guild extends AnonymousGuild { public roles: RoleManager; public get rulesChannel(): TextChannel | null; public rulesChannelId: Snowflake | null; + public get safetyAlertsChannel(): TextChannel | null; + public safetyAlertsChannelId: Snowflake | null; public scheduledEvents: GuildScheduledEventManager; public get shard(): WebSocketShard; public shardId: number; @@ -1202,8 +1349,8 @@ export class Guild extends AnonymousGuild { public createTemplate(name: string, description?: string): Promise; public delete(): Promise; public discoverySplashURL(options?: ImageURLOptions): string | null; - public edit(data: GuildEditData): Promise; - public editWelcomeScreen(data: WelcomeScreenEditData): Promise; + public edit(options: GuildEditOptions): Promise; + public editWelcomeScreen(options: WelcomeScreenEditOptions): Promise; public equals(guild: Guild): boolean; public fetchAuditLogs( options?: GuildAuditLogsFetchOptions, @@ -1218,6 +1365,7 @@ export class Guild extends AnonymousGuild { public fetchWidget(): Promise; public fetchWidgetSettings(): Promise; public leave(): Promise; + public disableInvites(disabled?: boolean): Promise; public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise; public setAFKTimeout(afkTimeout: number, reason?: string): Promise; public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise; @@ -1239,6 +1387,7 @@ export class Guild extends AnonymousGuild { public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise; public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise; public setRulesChannel(rulesChannel: TextChannelResolvable | null, reason?: string): Promise; + public setSafetyAlertsChannel(safetyAlertsChannel: TextChannelResolvable | null, reason?: string): Promise; public setSplash(splash: BufferResolvable | Base64Resolvable | null, reason?: string): Promise; public setSystemChannel(systemChannel: TextChannelResolvable | null, reason?: string): Promise; public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise; @@ -1255,6 +1404,7 @@ export class GuildAuditLogs private webhooks: Collection; private integrations: Collection; private guildScheduledEvents: Collection; + private autoModerationRules: Collection; public entries: Collection>; public toJSON(): unknown; } @@ -1269,19 +1419,21 @@ export class GuildAuditLogsEntry< : GuildAuditLogsTargetType, TResolvedType = TAction extends null ? AuditLogEvent : TAction, > { - private constructor(logs: GuildAuditLogs, guild: Guild, data: RawGuildAuditLogEntryData); + private constructor(guild: Guild, data: RawGuildAuditLogEntryData, logs?: GuildAuditLogs); public static Targets: GuildAuditLogsTargets; public action: TResolvedType; public actionType: TActionType; public changes: AuditLogChange[]; public get createdAt(): Date; public get createdTimestamp(): number; + public executorId: Snowflake | null; public executor: User | null; public extra: TResolvedType extends keyof GuildAuditLogsEntryExtraField ? GuildAuditLogsEntryExtraField[TResolvedType] : null; public id: Snowflake; public reason: string | null; + public targetId: Snowflake | null; public target: TTargetType extends keyof GuildAuditLogsEntryTargetField ? GuildAuditLogsEntryTargetField[TTargetType] : Role | GuildEmoji | { id: Snowflake } | null; @@ -1323,7 +1475,7 @@ export abstract class GuildChannel extends BaseChannel { public get viewable(): boolean; public clone(options?: GuildChannelCloneOptions): Promise; public delete(reason?: string): Promise; - public edit(data: GuildChannelEditOptions): Promise; + public edit(options: GuildChannelEditOptions): Promise; public equals(channel: GuildChannel): boolean; public lockPermissions(): Promise; public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly; @@ -1348,14 +1500,24 @@ export class GuildEmoji extends BaseGuildEmoji { public get roles(): GuildEmojiRoleManager; public get url(): string; public delete(reason?: string): Promise; - public edit(data: GuildEmojiEditData): Promise; + public edit(options: GuildEmojiEditOptions): Promise; public equals(other: GuildEmoji | unknown): boolean; public fetchAuthor(): Promise; public setName(name: string, reason?: string): Promise; } +export type GuildMemberFlagsString = keyof typeof GuildMemberFlags; + +export type GuildMemberFlagsResolvable = BitFieldResolvable; + +export class GuildMemberFlagsBitField extends BitField { + public static Flags: GuildMemberFlags; + public static resolve(bit?: BitFieldResolvable): number; +} + export class GuildMember extends PartialTextBasedChannel(Base) { private constructor(client: Client, data: RawGuildMemberData, guild: Guild); + private _roles: Snowflake[]; public avatar: string | null; public get bannable(): boolean; public get dmChannel(): DMChannel | null; @@ -1367,6 +1529,7 @@ export class GuildMember extends PartialTextBasedChannel(Base) { public pending: boolean; public get communicationDisabledUntil(): Date | null; public communicationDisabledUntilTimestamp: number | null; + public flags: Readonly; public get joinedAt(): Date | null; public joinedTimestamp: number | null; public get kickable(): boolean; @@ -1389,13 +1552,14 @@ export class GuildMember extends PartialTextBasedChannel(Base) { public createDM(force?: boolean): Promise; public deleteDM(): Promise; public displayAvatarURL(options?: ImageURLOptions): string; - public edit(data: GuildMemberEditData): Promise; + public edit(options: GuildMemberEditOptions): Promise; public isCommunicationDisabled(): this is GuildMember & { communicationDisabledUntilTimestamp: number; readonly communicationDisabledUntil: Date; }; public kick(reason?: string): Promise; public permissionsIn(channel: GuildChannelResolvable): Readonly; + public setFlags(flags: GuildMemberFlagsResolvable, reason?: string): Promise; public setNickname(nickname: string | null, reason?: string): Promise; public toJSON(): unknown; public toString(): UserMention; @@ -1451,7 +1615,7 @@ export class GuildScheduledEvent): string | null; - public createInviteURL(options?: CreateGuildScheduledEventInviteURLOptions): Promise; + public createInviteURL(options?: GuildScheduledEventInviteURLCreateOptions): Promise; public edit>( options: GuildScheduledEventEditOptions, ): Promise>; @@ -1494,7 +1658,7 @@ export class GuildTemplate extends Base { public unSynced: boolean | null; public createGuild(name: string, icon?: BufferResolvable | Base64Resolvable): Promise; public delete(): Promise; - public edit(options?: EditGuildTemplateOptions): Promise; + public edit(options?: GuildTemplateEditOptions): Promise; public sync(): Promise; public static GuildTemplatesPattern: RegExp; } @@ -1600,7 +1764,7 @@ export class BaseInteraction extends Base public type: InteractionType; public user: User; public version: number; - public appPermissions: Readonly | null; + public appPermissions: CacheTypeReducer>; public memberPermissions: CacheTypeReducer>; public locale: Locale; public guildLocale: CacheTypeReducer; @@ -1616,7 +1780,7 @@ export class BaseInteraction extends Base public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction; public isModalSubmit(): this is ModalSubmitInteraction; public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction; - /** @deprecated Use {@link BaseInteraction#isStringSelectMenu} instead */ + /** @deprecated Use {@link isStringSelectMenu} instead. */ public isSelectMenu(): this is StringSelectMenuInteraction; public isAnySelectMenu(): this is AnySelectMenuInteraction; public isStringSelectMenu(): this is StringSelectMenuInteraction; @@ -1665,7 +1829,7 @@ export class InteractionWebhook extends PartialWebhookMixin() { public send(options: string | MessagePayload | InteractionReplyOptions): Promise; public editMessage( message: MessageResolvable | '@original', - options: string | MessagePayload | WebhookEditMessageOptions, + options: string | MessagePayload | WebhookMessageEditOptions, ): Promise; public fetchMessage(message: Snowflake | '@original'): Promise; } @@ -1795,7 +1959,7 @@ export class Message extends Base { public id: Snowflake; public interaction: MessageInteraction | null; public get member(): GuildMember | null; - public mentions: MessageMentions; + public mentions: MessageMentions; public nonce: string | number | null; public get partial(): false; public get pinnable(): boolean; @@ -1803,6 +1967,7 @@ export class Message extends Base { public reactions: ReactionManager; public stickers: Collection; public position: number | null; + public roleSubscriptionData: RoleSubscriptionData | null; public system: boolean; public get thread(): AnyThreadChannel | null; public tts: boolean; @@ -1855,17 +2020,19 @@ export class AttachmentBuilder { export class Attachment { private constructor(data: APIAttachment); - public attachment: BufferResolvable | Stream; + private attachment: BufferResolvable | Stream; public contentType: string | null; public description: string | null; + public duration: number | null; public ephemeral: boolean; public height: number | null; public id: Snowflake; - public name: string | null; + public name: string; public proxyURL: string; public size: number; public get spoiler(): boolean; public url: string; + public waveform: string | null; public width: number | null; public toJSON(): unknown; } @@ -1954,7 +2121,7 @@ export class MessageFlagsBitField extends BitField { public static resolve(bit?: BitFieldResolvable): number; } -export class MessageMentions { +export class MessageMentions { private constructor( message: Message, users: APIUser[] | Collection, @@ -1970,9 +2137,9 @@ export class MessageMentions { public get channels(): Collection; public readonly client: Client; public everyone: boolean; - public readonly guild: Guild; + public readonly guild: If; public has(data: UserResolvable | RoleResolvable | ChannelResolvable, options?: MessageMentionsHasOptions): boolean; - public get members(): Collection | null; + public get members(): If>; public get parsedUsers(): Collection; public repliedUser: User | null; public roles: Collection; @@ -1991,8 +2158,8 @@ export class MessageMentions { export type MessagePayloadOption = | MessageCreateOptions | MessageEditOptions - | WebhookCreateMessageOptions - | WebhookEditMessageOptions + | WebhookMessageCreateOptions + | WebhookMessageEditOptions | InteractionReplyOptions | InteractionUpdateOptions; @@ -2037,6 +2204,7 @@ export class MessageReaction { public remove(): Promise; public fetch(): Promise; public toJSON(): unknown; + public valueOf(): Snowflake | string; } export interface ModalComponentData { @@ -2060,17 +2228,15 @@ export interface TextInputModalData extends BaseModalData { export interface ActionRowModalData { type: ComponentType.ActionRow; - components: ModalData[]; + components: TextInputModalData[]; } -export type ModalData = TextInputModalData | ActionRowModalData; - export class ModalSubmitFields { constructor(components: ModalActionRowComponent[][]); - public components: ActionRow; + public components: ActionRowModalData[]; public fields: Collection; - public getField(customId: string, type: T): { type: T } & ModalData; - public getField(customId: string, type?: ComponentType): ModalData; + public getField(customId: string, type: T): { type: T } & TextInputModalData; + public getField(customId: string, type?: ComponentType): TextInputModalData; public getTextInputValue(customId: string): string; } @@ -2185,11 +2351,12 @@ export class ForumChannel extends TextBasedChannelMixin(GuildChannel, true, [ public nsfw: boolean; public topic: string | null; public defaultSortOrder: SortOrderType | null; + public defaultForumLayout: ForumLayoutType; public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise; public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise; public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise; - public createInvite(options?: CreateInviteOptions): Promise; + public createInvite(options?: InviteCreateOptions): Promise; public fetchInvites(cache?: boolean): Promise>; public setDefaultAutoArchiveDuration( defaultAutoArchiveDuration: ThreadAutoArchiveDuration, @@ -2197,6 +2364,7 @@ export class ForumChannel extends TextBasedChannelMixin(GuildChannel, true, [ ): Promise; public setTopic(topic: string | null, reason?: string): Promise; public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise; + public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise; } export class PermissionOverwrites extends Base { @@ -2287,6 +2455,7 @@ export class ReactionEmoji extends Emoji { export class RichPresenceAssets { private constructor(activity: Activity, assets: RawRichPresenceAssets); + public readonly activity: Activity; public largeImage: Snowflake | null; public largeText: string | null; public smallImage: Snowflake | null; @@ -2317,7 +2486,7 @@ export class Role extends Base { public icon: string | null; public unicodeEmoji: string | null; public delete(reason?: string): Promise; - public edit(data: EditRoleOptions): Promise; + public edit(options: RoleEditOptions): Promise; public equals(role: Role): boolean; public iconURL(options?: ImageURLOptions): string | null; public permissionsIn( @@ -2371,8 +2540,12 @@ export class UserSelectMenuInteraction< UserSelectMenuComponent | APIUserSelectComponent >; public componentType: ComponentType.UserSelect; + public values: Snowflake[]; public users: Collection; - public members: Collection>; + public members: Collection< + Snowflake, + CacheTypeReducer + >; public inGuild(): this is UserSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is UserSelectMenuInteraction<'cached'>; public inRawGuild(): this is UserSelectMenuInteraction<'raw'>; @@ -2390,7 +2563,8 @@ export class RoleSelectMenuInteraction< RoleSelectMenuComponent | APIRoleSelectComponent >; public componentType: ComponentType.RoleSelect; - public roles: Collection>; + public values: Snowflake[]; + public roles: Collection>; public inGuild(): this is RoleSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is RoleSelectMenuInteraction<'cached'>; public inRawGuild(): this is RoleSelectMenuInteraction<'raw'>; @@ -2408,9 +2582,13 @@ export class MentionableSelectMenuInteraction< MentionableSelectMenuComponent | APIMentionableSelectComponent >; public componentType: ComponentType.MentionableSelect; + public values: Snowflake[]; public users: Collection; - public members: Collection>; - public roles: Collection>; + public members: Collection< + Snowflake, + CacheTypeReducer + >; + public roles: Collection>; public inGuild(): this is MentionableSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is MentionableSelectMenuInteraction<'cached'>; public inRawGuild(): this is MentionableSelectMenuInteraction<'raw'>; @@ -2428,7 +2606,11 @@ export class ChannelSelectMenuInteraction< ChannelSelectMenuComponent | APIChannelSelectComponent >; public componentType: ComponentType.ChannelSelect; - public channels: Collection>; + public values: Snowflake[]; + public channels: Collection< + Snowflake, + CacheTypeReducer + >; public inGuild(): this is ChannelSelectMenuInteraction<'raw' | 'cached'>; public inCachedGuild(): this is ChannelSelectMenuInteraction<'cached'>; public inRawGuild(): this is ChannelSelectMenuInteraction<'raw'>; @@ -2571,9 +2753,9 @@ export { } from '@sapphire/snowflake'; export class StageChannel extends BaseGuildVoiceChannel { + public get stageInstance(): StageInstance | null; public topic: string | null; public type: ChannelType.GuildStageVoice; - public get stageInstance(): StageInstance | null; public createStageInstance(options: StageInstanceCreateOptions): Promise; public setTopic(topic: string): Promise; } @@ -2626,7 +2808,7 @@ export class Sticker extends Base { public fetch(): Promise; public fetchPack(): Promise; public fetchUser(): Promise; - public edit(data?: GuildStickerEditData): Promise; + public edit(options?: GuildStickerEditOptions): Promise; public delete(reason?: string): Promise; public equals(other: Sticker | unknown): boolean; } @@ -2658,6 +2840,12 @@ export class Sweepers { SweeperDefinitions['applicationCommands'][1] >, ): number; + public sweepAutoModerationRules( + filter: CollectionSweepFilter< + SweeperDefinitions['autoModerationRules'][0], + SweeperDefinitions['autoModerationRules'][1] + >, + ): number; public sweepBans(filter: CollectionSweepFilter): number; public sweepEmojis( filter: CollectionSweepFilter, @@ -2765,7 +2953,7 @@ export class ThreadChannel extends TextBasedCha 'createWebhook', 'setNSFW', ]) { - private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client, fromInteraction?: boolean); + private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client); public archived: boolean | null; public get archivedAt(): Date | null; public archiveTimestamp: number | null; @@ -2798,7 +2986,7 @@ export class ThreadChannel extends TextBasedCha public type: ThreadChannelType; public get unarchivable(): boolean; public delete(reason?: string): Promise; - public edit(data: ThreadEditData): Promise; + public edit(options: ThreadEditOptions): Promise; public join(): Promise; public leave(): Promise; public permissionsFor(memberOrRole: GuildMember | Role, checkAdmin?: boolean): Readonly; @@ -2816,14 +3004,18 @@ export class ThreadChannel extends TextBasedCha public setInvitable(invitable?: boolean, reason?: string): Promise; public setLocked(locked?: boolean, reason?: string): Promise; public setName(name: string, reason?: string): Promise; + // The following 3 methods can only be run on forum threads. public setAppliedTags(appliedTags: Snowflake[], reason?: string): Promise>; + public pin(reason?: string): Promise>; + public unpin(reason?: string): Promise>; public toString(): ChannelMention; } -export class ThreadMember extends Base { - private constructor(thread: ThreadChannel, data?: RawThreadMemberData); +export class ThreadMember extends Base { + private constructor(thread: ThreadChannel, data: RawThreadMemberData, extra?: unknown); public flags: ThreadMemberFlagsBitField; - public get guildMember(): GuildMember | null; + private member: If; + public get guildMember(): HasMemberData extends true ? GuildMember : GuildMember | null; public id: Snowflake; public get joinedAt(): Date | null; public joinedTimestamp: number | null; @@ -2866,13 +3058,16 @@ export class User extends PartialTextBasedChannel(Base) { public get createdAt(): Date; public get createdTimestamp(): number; public discriminator: string; + public get displayName(): string; public get defaultAvatarURL(): string; public get dmChannel(): DMChannel | null; public flags: Readonly | null; + public globalName: string | null; public get hexAccentColor(): HexColorString | null | undefined; public id: Snowflake; public get partial(): false; public system: boolean; + /** @deprecated Use {@link User#username} instead. */ public get tag(): string; public username: string; public avatarURL(options?: ImageURLOptions): string | null; @@ -2909,19 +3104,6 @@ export function cleanContent(str: string, channel: TextBasedChannel): string; export function discordSort( collection: Collection, ): Collection; -export function escapeMarkdown(text: string, options?: EscapeMarkdownOptions): string; -export function escapeCodeBlock(text: string): string; -export function escapeInlineCode(text: string): string; -export function escapeBold(text: string): string; -export function escapeItalic(text: string): string; -export function escapeUnderline(text: string): string; -export function escapeStrikethrough(text: string): string; -export function escapeSpoiler(text: string): string; -export function escapeEscape(text: string): string; -export function escapeHeading(text: string): string; -export function escapeBulletedList(text: string): string; -export function escapeNumberedList(text: string): string; -export function escapeMaskedLink(text: string): string; export function cleanCodeBlockContent(text: string): string; export function fetchRecommendedShardCount(token: string, options?: FetchRecommendedShardCountOptions): Promise; export function flatten(obj: unknown, ...props: Record[]): unknown; @@ -2966,12 +3148,11 @@ export interface MappedComponentTypes { [ComponentType.TextInput]: TextInputComponent; } -export interface CreateChannelOptions { +export interface ChannelCreateOptions { allowFromUnknownGuild?: boolean; - fromInteraction?: boolean; } -export function createChannel(client: Client, data: APIChannel, options?: CreateChannelOptions): Channel; +export function createChannel(client: Client, data: APIChannel, options?: ChannelCreateOptions): Channel; export function createComponent( data: APIMessageComponent & { type: T }, @@ -3027,18 +3208,9 @@ export type ComponentData = | ModalActionRowComponentData | ActionRowData; -export class VoiceChannel extends TextBasedChannelMixin(BaseGuildVoiceChannel, true, [ - 'lastPinTimestamp', - 'lastPinAt', -]) { - public videoQualityMode: VideoQualityMode | null; +export class VoiceChannel extends BaseGuildVoiceChannel { public get speakable(): boolean; public type: ChannelType.GuildVoice; - public nsfw: boolean; - public rateLimitPerUser: number | null; - public setBitrate(bitrate: number, reason?: string): Promise; - public setUserLimit(userLimit: number, reason?: string): Promise; - public setVideoQualityMode(videoQualityMode: VideoQualityMode, reason?: string): Promise; } export class VoiceRegion { @@ -3076,7 +3248,7 @@ export class VoiceState extends Base { public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise; public setRequestToSpeak(request?: boolean): Promise; public setSuppressed(suppressed?: boolean): Promise; - public edit(data: VoiceStateEditData): Promise; + public edit(options: VoiceStateEditOptions): Promise; } export class Webhook extends WebhookMixin() { @@ -3093,6 +3265,7 @@ export class Webhook extends WebhookMixin() { public token: string | null; public type: WebhookType; public applicationId: Snowflake | null; + public get channel(): TextChannel | VoiceChannel | NewsChannel | ForumChannel | StageChannel | null; public isUserCreated(): this is this & { type: WebhookType.Incoming; applicationId: null; @@ -3118,10 +3291,10 @@ export class Webhook extends WebhookMixin() { public editMessage( message: MessageResolvable, - options: string | MessagePayload | WebhookEditMessageOptions, + options: string | MessagePayload | WebhookMessageEditOptions, ): Promise; public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise; - public send(options: string | MessagePayload | WebhookCreateMessageOptions): Promise; + public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise; } export class WebhookClient extends WebhookMixin(BaseClient) { @@ -3131,19 +3304,16 @@ export class WebhookClient extends WebhookMixin(BaseClient) { public token: string; public editMessage( message: MessageResolvable, - options: string | MessagePayload | WebhookEditMessageOptions, + options: string | MessagePayload | WebhookMessageEditOptions, ): Promise; public fetchMessage(message: Snowflake, options?: WebhookFetchMessageOptions): Promise; - public send(options: string | MessagePayload | WebhookCreateMessageOptions): Promise; + public send(options: string | MessagePayload | WebhookMessageCreateOptions): Promise; } export class WebSocketManager extends EventEmitter { private constructor(client: Client); - private totalShards: number | string; - private shardQueue: Set; private readonly packetQueue: unknown[]; private destroyed: boolean; - private reconnecting: boolean; public readonly client: Client; public gateway: string | null; @@ -3154,12 +3324,10 @@ export class WebSocketManager extends EventEmitter { public on(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this; public once(event: GatewayDispatchEvents, listener: (data: any, shardId: number) => void): this; - private debug(message: string, shard?: WebSocketShard): void; + private debug(message: string, shardId?: number): void; private connect(): Promise; - private createShards(): Promise; - private reconnect(): Promise; private broadcast(packet: unknown): void; - private destroy(): void; + private destroy(): Promise; private handlePacket(packet?: unknown, shard?: WebSocketShard): boolean; private checkShardsReady(): void; private triggerClientReady(): void; @@ -3176,26 +3344,11 @@ export interface WebSocketShardEventTypes { export class WebSocketShard extends EventEmitter { private constructor(manager: WebSocketManager, id: number); - private sequence: number; private closeSequence: number; - private sessionId: string | null; - private resumeURL: string | null; + private sessionInfo: SessionInfo | null; public lastPingTimestamp: number; - private lastHeartbeatAcked: boolean; - private readonly ratelimit: { - queue: unknown[]; - total: number; - remaining: number; - time: 60e3; - timer: NodeJS.Timeout | null; - }; - private connection: WebSocket | null; - private helloTimeout: NodeJS.Timeout | null; - private eventsAttached: boolean; private expectedGuilds: Set | null; private readyTimeout: NodeJS.Timeout | null; - private closeEmitted: boolean; - private wsCloseTimeout: NodeJS.Timeout | null; public manager: WebSocketManager; public id: number; @@ -3203,27 +3356,10 @@ export class WebSocketShard extends EventEmitter { public ping: number; private debug(message: string): void; - private connect(): Promise; - private onOpen(): void; - private onMessage(event: MessageEvent): void; - private onError(error: ErrorEvent | unknown): void; - private onClose(event: CloseEvent): void; - private onPacket(packet: unknown): void; + private onReadyPacket(packet: unknown): void; + private gotGuild(guildId: Snowflake): void; private checkReady(): void; - private setHelloTimeout(time?: number): void; - private setWsCloseTimeout(time?: number): void; - private setHeartbeatTimer(time: number): void; - private sendHeartbeat(): void; - private ackHeartbeat(): void; - private identify(): void; - private identifyNew(): void; - private identifyResume(): void; - private _send(data: unknown): void; - private processQueue(): void; - private destroy(destroyOptions?: { closeCode?: number; reset?: boolean; emit?: boolean; log?: boolean }): void; private emitClose(event?: CloseEvent): void; - private _cleanupConnection(): void; - private _emitDestroyed(): void; public send(data: unknown, important?: boolean): void; @@ -3243,6 +3379,7 @@ export class Widget extends Base { private _patch(data: RawWidgetData): void; public fetch(): Promise; public id: Snowflake; + public name: string; public instantInvite?: string; public channels: Collection; public members: Collection; @@ -3294,14 +3431,40 @@ export type NonSystemMessageType = | MessageType.ChatInputCommand | MessageType.ContextMenuCommand; +export type DeletableMessageType = + | MessageType.AutoModerationAction + | MessageType.ChannelFollowAdd + | MessageType.ChannelPinnedMessage + | MessageType.ChatInputCommand + | MessageType.ContextMenuCommand + | MessageType.Default + | MessageType.GuildBoost + | MessageType.GuildBoostTier1 + | MessageType.GuildBoostTier2 + | MessageType.GuildBoostTier3 + | MessageType.GuildInviteReminder + | MessageType.InteractionPremiumUpsell + | MessageType.Reply + | MessageType.RoleSubscriptionPurchase + | MessageType.StageEnd + | MessageType.StageRaiseHand + | MessageType.StageSpeaker + | MessageType.StageStart + | MessageType.StageTopic + | MessageType.ThreadCreated + | MessageType.UserJoin; + export const Constants: { MaxBulkDeletableMessageAge: 1_209_600_000; SweeperKeys: SweeperKey[]; NonSystemMessageTypes: NonSystemMessageType[]; TextBasedChannelTypes: TextBasedChannelTypes[]; + GuildTextBasedChannelTypes: GuildTextBasedChannelTypes[]; ThreadChannelTypes: ThreadChannelType[]; VoiceBasedChannelTypes: VoiceBasedChannelTypes[]; SelectMenuTypes: SelectMenuType[]; + DeletableMessageTypes: DeletableMessageType[]; + StickerFormatExtensionMap: Record; }; export const version: string; @@ -3319,16 +3482,23 @@ export enum DiscordjsErrorCodes { TokenMissing = 'TokenMissing', ApplicationCommandPermissionsTokenMissing = 'ApplicationCommandPermissionsTokenMissing', + /** @deprecated */ WSCloseRequested = 'WSCloseRequested', + /** @deprecated */ WSConnectionExists = 'WSConnectionExists', + /** @deprecated */ WSNotOpen = 'WSNotOpen', ManagerDestroyed = 'ManagerDestroyed', BitFieldInvalid = 'BitFieldInvalid', + /** @deprecated */ ShardingInvalid = 'ShardingInvalid', + /** @deprecated */ ShardingRequired = 'ShardingRequired', + /** @deprecated */ InvalidIntents = 'InvalidIntents', + /** @deprecated */ DisallowedIntents = 'DisallowedIntents', ShardingNoShards = 'ShardingNoShards', ShardingInProcess = 'ShardingInProcess', @@ -3413,7 +3583,10 @@ export enum DiscordjsErrorCodes { EmojiType = 'EmojiType', EmojiManaged = 'EmojiManaged', + MissingManageGuildExpressionsPermission = 'MissingManageGuildExpressionsPermission', + /** @deprecated Use {@link MissingManageGuildExpressionsPermission} instead. */ MissingManageEmojisAndStickersPermission = 'MissingManageEmojisAndStickersPermission', + NotGuildSticker = 'NotGuildSticker', ReactionResolveUser = 'ReactionResolveUser', @@ -3448,6 +3621,7 @@ export enum DiscordjsErrorCodes { ModalSubmitInteractionFieldType = 'ModalSubmitInteractionFieldType', InvalidMissingScopes = 'InvalidMissingScopes', + InvalidScopesWithPermissions = 'InvalidScopesWithPermissions', NotImplemented = 'NotImplemented', @@ -3494,6 +3668,7 @@ export abstract class DataManager extends BaseManager { export abstract class CachedManager extends DataManager { protected constructor(client: Client, holds: Constructable); + private readonly _cache: Collection; private _add(data: unknown, cache?: boolean, { id, extras }?: { id: K; extras: unknown[] }): Holds; } @@ -3536,9 +3711,11 @@ export class ApplicationCommandManager< id?: Snowflake, options?: FetchApplicationCommandOptions, ): Promise>; - public set(commands: ApplicationCommandDataResolvable[]): Promise>; public set( - commands: ApplicationCommandDataResolvable[], + commands: readonly ApplicationCommandDataResolvable[], + ): Promise>; + public set( + commands: readonly ApplicationCommandDataResolvable[], guildId: Snowflake, ): Promise>; private static transformCommand(command: ApplicationCommandDataResolvable): RESTPostAPIApplicationCommandsJSONBody; @@ -3571,21 +3748,21 @@ export class ApplicationCommandPermissionsManager< options: | (FetchSingleOptions & { token: string; - channels?: (GuildChannelResolvable | ChannelPermissionConstant)[]; - roles?: (RoleResolvable | RolePermissionConstant)[]; - users: UserResolvable[]; + channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; + roles?: readonly (RoleResolvable | RolePermissionConstant)[]; + users: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; - channels?: (GuildChannelResolvable | ChannelPermissionConstant)[]; - roles: (RoleResolvable | RolePermissionConstant)[]; - users?: UserResolvable[]; + channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; + roles: readonly (RoleResolvable | RolePermissionConstant)[]; + users?: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; - channels: (GuildChannelResolvable | ChannelPermissionConstant)[]; - roles?: (RoleResolvable | RolePermissionConstant)[]; - users?: UserResolvable[]; + channels: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; + roles?: readonly (RoleResolvable | RolePermissionConstant)[]; + users?: readonly UserResolvable[]; }), ): Promise; public set( @@ -3594,6 +3771,23 @@ export class ApplicationCommandPermissionsManager< private permissionsPath(guildId: Snowflake, commandId?: Snowflake): string; } +export class AutoModerationRuleManager extends CachedManager< + Snowflake, + AutoModerationRule, + AutoModerationRuleResolvable +> { + private constructor(guild: Guild, iterable: unknown); + public guild: Guild; + public create(options: AutoModerationRuleCreateOptions): Promise; + public edit( + autoModerationRule: AutoModerationRuleResolvable, + options: AutoModerationRuleEditOptions, + ): Promise; + public fetch(options: AutoModerationRuleResolvable | FetchAutoModerationRuleOptions): Promise; + public fetch(options?: FetchAutoModerationRulesOptions): Promise>; + public delete(autoModerationRule: AutoModerationRuleResolvable, reason?: string): Promise; +} + export class BaseGuildEmojiManager extends CachedManager { protected constructor(client: Client, iterable?: Iterable); public resolveIdentifier(emoji: EmojiIdentifierResolvable): string | null; @@ -3670,6 +3864,7 @@ export class GuildChannelManager extends CachedManager; public setPositions(channelPositions: readonly ChannelPosition[]): Promise; public fetchActiveThreads(cache?: boolean): Promise; + private rawFetchGuildActiveThreads(): Promise; public delete(channel: GuildChannelResolvable, reason?: string): Promise; } @@ -3681,7 +3876,7 @@ export class GuildEmojiManager extends BaseGuildEmojiManager { public fetch(id?: undefined, options?: BaseFetchOptions): Promise>; public fetchAuthor(emoji: EmojiResolvable): Promise; public delete(emoji: EmojiResolvable, reason?: string): Promise; - public edit(emoji: EmojiResolvable, data: GuildEmojiEditData): Promise; + public edit(emoji: EmojiResolvable, options: GuildEmojiEditOptions): Promise; } export class GuildEmojiRoleManager extends DataManager { @@ -3720,7 +3915,7 @@ export class GuildMemberManager extends CachedManager; public add(user: UserResolvable, options: AddGuildMemberOptions): Promise; public ban(user: UserResolvable, options?: BanOptions): Promise; - public edit(user: UserResolvable, data: GuildMemberEditData): Promise; + public edit(user: UserResolvable, options: GuildMemberEditOptions): Promise; public fetch( options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }), ): Promise; @@ -3748,7 +3943,7 @@ export class GuildBanManager extends CachedManager { private constructor(guild: Guild, iterable?: Iterable); public guild: Guild; - public create(channel: GuildInvitableChannelResolvable, options?: CreateInviteOptions): Promise; + public create(channel: GuildInvitableChannelResolvable, options?: InviteCreateOptions): Promise; public fetch(options: InviteResolvable | FetchInviteOptions): Promise; public fetch(options?: FetchInvitesOptions): Promise>; public delete(invite: InviteResolvable, reason?: string): Promise; @@ -3781,7 +3976,7 @@ export class GuildStickerManager extends CachedManager); public guild: Guild; public create(options: GuildStickerCreateOptions): Promise; - public edit(sticker: StickerResolvable, data?: GuildStickerEditData): Promise; + public edit(sticker: StickerResolvable, data?: GuildStickerEditOptions): Promise; public delete(sticker: StickerResolvable, reason?: string): Promise; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise; public fetch(id?: Snowflake, options?: BaseFetchOptions): Promise>; @@ -3886,8 +4081,8 @@ export class RoleManager extends CachedManager public botRoleFor(user: UserResolvable): Role | null; public fetch(id: Snowflake, options?: BaseFetchOptions): Promise; public fetch(id?: undefined, options?: BaseFetchOptions): Promise>; - public create(options?: CreateRoleOptions): Promise; - public edit(role: RoleResolvable, options: EditRoleOptions): Promise; + public create(options?: RoleCreateOptions): Promise; + public edit(role: RoleResolvable, options: RoleEditOptions): Promise; public delete(role: RoleResolvable, reason?: string): Promise; public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise; public setPositions(rolePositions: readonly RolePosition[]): Promise; @@ -3911,8 +4106,12 @@ export class ThreadManager extends CachedManage protected constructor(channel: TextChannel | NewsChannel | ForumChannel, iterable?: Iterable); public channel: If; public fetch(options: ThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise; + public fetch( + options: FetchThreadsOptions & { archived: FetchArchivedThreadOptions }, + cacheOptions?: { cache?: boolean }, + ): Promise; public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise; - public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise; + public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise; public fetchActive(cache?: boolean): Promise; } @@ -3929,8 +4128,18 @@ export class ThreadMemberManager extends CachedManager; + + public fetch( + options: ThreadMember | ((FetchThreadMemberOptions & { withMember: true }) | { member: ThreadMember }), + ): Promise>; + public fetch(options: ThreadMemberResolvable | FetchThreadMemberOptions): Promise; - public fetch(options?: FetchThreadMembersOptions): Promise>; + + public fetch( + options: FetchThreadMembersWithGuildMemberDataOptions, + ): Promise>>; + + public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise>; public fetchMe(options?: BaseFetchOptions): Promise; public remove(id: Snowflake | '@me', reason?: string): Promise; } @@ -4012,11 +4221,11 @@ export interface PartialWebhookFields { deleteMessage(message: MessageResolvable | APIMessage | '@original', threadId?: Snowflake): Promise; editMessage( message: MessageResolvable | '@original', - options: string | MessagePayload | WebhookEditMessageOptions, + options: string | MessagePayload | WebhookMessageEditOptions, ): Promise; fetchMessage(message: Snowflake | '@original', options?: WebhookFetchMessageOptions): Promise; send( - options: string | MessagePayload | InteractionReplyOptions | WebhookCreateMessageOptions, + options: string | MessagePayload | InteractionReplyOptions | WebhookMessageCreateOptions, ): Promise; } @@ -4024,7 +4233,7 @@ export interface WebhookFields extends PartialWebhookFields { get createdAt(): Date; get createdTimestamp(): number; delete(reason?: string): Promise; - edit(options: WebhookEditData): Promise; + edit(options: WebhookEditOptions): Promise; sendSlackMessage(body: unknown): Promise; } @@ -4062,6 +4271,7 @@ export interface BaseApplicationCommandData { nameLocalizations?: LocalizationMap; dmPermission?: boolean; defaultMemberPermissions?: PermissionResolvable | null; + nsfw?: boolean; } export interface AttachmentData { @@ -4111,7 +4321,7 @@ export interface ChatInputApplicationCommandData extends BaseApplicationCommandD description: string; descriptionLocalizations?: LocalizationMap; type?: ApplicationCommandType.ChatInput; - options?: ApplicationCommandOptionData[]; + options?: readonly ApplicationCommandOptionData[]; } export type ApplicationCommandData = @@ -4121,13 +4331,13 @@ export type ApplicationCommandData = export interface ApplicationCommandChannelOptionData extends BaseApplicationCommandOptionsData { type: CommandOptionChannelResolvableType; - channelTypes?: ChannelType[]; - channel_types?: ChannelType[]; + channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[]; + channel_types?: readonly ApplicationCommandOptionAllowedChannelTypes[]; } export interface ApplicationCommandChannelOption extends BaseApplicationCommandOptionsData { type: ApplicationCommandOptionType.Channel; - channelTypes?: ChannelType[]; + channelTypes?: readonly ApplicationCommandOptionAllowedChannelTypes[]; } export interface ApplicationCommandRoleOptionData extends BaseApplicationCommandOptionsData { @@ -4197,14 +4407,14 @@ export interface ApplicationCommandAutocompleteStringOptionData export interface ApplicationCommandChoicesData extends Omit { type: CommandOptionChoiceResolvableType; - choices?: ApplicationCommandOptionChoiceData[]; + choices?: readonly ApplicationCommandOptionChoiceData[]; autocomplete?: false; } export interface ApplicationCommandChoicesOption extends Omit { type: CommandOptionChoiceResolvableType; - choices?: ApplicationCommandOptionChoiceData[]; + choices?: readonly ApplicationCommandOptionChoiceData[]; autocomplete?: false; } @@ -4246,22 +4456,25 @@ export interface ApplicationCommandBooleanOption extends BaseApplicationCommandO export interface ApplicationCommandSubGroupData extends Omit { type: ApplicationCommandOptionType.SubcommandGroup; - options?: ApplicationCommandSubCommandData[]; + options: readonly ApplicationCommandSubCommandData[]; } export interface ApplicationCommandSubGroup extends Omit { type: ApplicationCommandOptionType.SubcommandGroup; - options?: ApplicationCommandSubCommand[]; + options?: readonly ApplicationCommandSubCommand[]; } export interface ApplicationCommandSubCommandData extends Omit { type: ApplicationCommandOptionType.Subcommand; - options?: Exclude[]; + options?: readonly Exclude< + ApplicationCommandOptionData, + ApplicationCommandSubGroupData | ApplicationCommandSubCommandData + >[]; } export interface ApplicationCommandSubCommand extends Omit { type: ApplicationCommandOptionType.Subcommand; - options?: Exclude[]; + options?: readonly Exclude[]; } export interface ApplicationCommandNonOptionsData extends BaseApplicationCommandOptionsData { @@ -4317,11 +4530,11 @@ export interface ApplicationCommandPermissionsUpdateData { id: Snowflake; guildId: Snowflake; applicationId: Snowflake; - permissions: ApplicationCommandPermissions[]; + permissions: readonly ApplicationCommandPermissions[]; } export interface EditApplicationCommandPermissionsMixin { - permissions: ApplicationCommandPermissions[]; + permissions: readonly ApplicationCommandPermissions[]; token: string; } @@ -4340,12 +4553,41 @@ export type ApplicationCommandResolvable = ApplicationCommand | Snowflake; export type ApplicationFlagsString = keyof typeof ApplicationFlags; +export interface ApplicationRoleConnectionMetadataEditOptions { + name: string; + nameLocalizations?: LocalizationMap | null; + description: string; + descriptionLocalizations?: LocalizationMap | null; + key: string; + type: ApplicationRoleConnectionMetadataType; +} + export interface AuditLogChange { key: APIAuditLogChange['key']; old?: APIAuditLogChange['old_value']; new?: APIAuditLogChange['new_value']; } +export interface AutoModerationAction { + type: AutoModerationActionType; + metadata: AutoModerationActionMetadata; +} + +export interface AutoModerationActionMetadata { + channelId: Snowflake | null; + durationSeconds: number | null; + customMessage: string | null; +} + +export interface AutoModerationTriggerMetadata { + keywordFilter: string[]; + regexPatterns: string[]; + presets: AutoModerationRuleKeywordPresetType[]; + allowList: string[]; + mentionTotalLimit: number | null; + mentionRaidProtectionEnabled: boolean; +} + export type AwaitMessageComponentOptions = Omit< MessageComponentCollectorOptions, 'max' | 'maxComponents' | 'maxUsers' @@ -4397,6 +4639,7 @@ export type BitFieldResolvable = export type BufferResolvable = Buffer | string; export interface Caches { + AutoModerationRuleManager: [manager: typeof AutoModerationRuleManager, holds: typeof AutoModerationRule]; ApplicationCommandManager: [manager: typeof ApplicationCommandManager, holds: typeof ApplicationCommand]; BaseGuildEmojiManager: [manager: typeof BaseGuildEmojiManager, holds: typeof GuildEmoji]; GuildEmojiManager: [manager: typeof GuildEmojiManager, holds: typeof GuildEmoji]; @@ -4431,8 +4674,8 @@ export type CacheConstructors = { // Narrowing the type of `manager.name` doesn't propagate type information to `holds` and the return type. export type CacheFactory = ( manager: CacheConstructors[keyof Caches], - holds: Caches[typeof manager['name']][1], -) => typeof manager['prototype'] extends DataManager ? Collection : never; + holds: Caches[(typeof manager)['name']][1], +) => (typeof manager)['prototype'] extends DataManager ? Collection : never; export type CacheWithLimitsOptions = { [K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager @@ -4456,6 +4699,7 @@ export interface CategoryCreateChannelOptions { defaultReactionEmoji?: DefaultReactionEmoji; defaultAutoArchiveDuration?: ThreadAutoArchiveDuration; defaultSortOrder?: SortOrderType; + defaultForumLayout?: ForumLayoutType; reason?: string; } @@ -4484,11 +4728,18 @@ export interface ChannelWebhookCreateOptions { } export interface WebhookCreateOptions extends ChannelWebhookCreateOptions { - channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | Snowflake; + channel: TextChannel | NewsChannel | VoiceChannel | StageChannel | ForumChannel | Snowflake; } export interface ClientEvents { applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData]; + autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution]; + autoModerationRuleCreate: [autoModerationRule: AutoModerationRule]; + autoModerationRuleDelete: [autoModerationRule: AutoModerationRule]; + autoModerationRuleUpdate: [ + oldAutoModerationRule: AutoModerationRule | null, + newAutoModerationRule: AutoModerationRule, + ]; cacheSweep: [message: string]; channelCreate: [channel: NonThreadGuildBasedChannel]; channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel]; @@ -4503,6 +4754,7 @@ export interface ClientEvents { emojiDelete: [emoji: GuildEmoji]; emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji]; error: [error: Error]; + guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild]; guildBanAdd: [ban: GuildBan]; guildBanRemove: [ban: GuildBan]; guildCreate: [guild: Guild]; @@ -4515,7 +4767,7 @@ export interface ClientEvents { guildMembersChunk: [ members: Collection, guild: Guild, - data: { count: number; index: number; nonce: string | undefined }, + data: { index: number; count: number; notFound: unknown[]; nonce: string | undefined }, ]; guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember]; guildUpdate: [oldGuild: Guild, newGuild: Guild]; @@ -4603,16 +4855,17 @@ export interface ClientPresenceStatusData { desktop?: ClientPresenceStatus; } -export interface ClientUserEditData { +export interface ClientUserEditOptions { username?: string; avatar?: BufferResolvable | Base64Resolvable | null; } export interface CloseEvent { + /** @deprecated */ wasClean: boolean; code: number; + /** @deprecated */ reason: string; - target: WebSocket; } export type CollectorFilter = (...args: T) => boolean | Promise; @@ -4704,7 +4957,12 @@ export declare const Colors: { export enum Events { ApplicationCommandPermissionsUpdate = 'applicationCommandPermissionsUpdate', + AutoModerationActionExecution = 'autoModerationActionExecution', + AutoModerationRuleCreate = 'autoModerationRuleCreate', + AutoModerationRuleDelete = 'autoModerationRuleDelete', + AutoModerationRuleUpdate = 'autoModerationRuleUpdate', ClientReady = 'ready', + GuildAuditLogEntryCreate = 'guildAuditLogEntryCreate', GuildCreate = 'guildCreate', GuildDelete = 'guildDelete', GuildUpdate = 'guildUpdate', @@ -4805,15 +5063,15 @@ export enum Status { Resuming = 8, } -export interface CreateGuildScheduledEventInviteURLOptions extends CreateInviteOptions { +export interface GuildScheduledEventInviteURLCreateOptions extends InviteCreateOptions { channel?: GuildInvitableChannelResolvable; } -export interface CreateRoleOptions extends RoleData { +export interface RoleCreateOptions extends RoleData { reason?: string; } -export interface EditRoleOptions extends RoleData { +export interface RoleEditOptions extends RoleData { reason?: string; } @@ -4832,7 +5090,7 @@ export interface CrosspostedChannel { export type DateResolvable = Date | number | string; -export interface EditGuildTemplateOptions { +export interface GuildTemplateEditOptions { name?: string; description?: string; } @@ -4843,7 +5101,11 @@ export interface EmbedField { inline: boolean; } -export type EmojiIdentifierResolvable = string | EmojiResolvable; +export type EmojiIdentifierResolvable = + | EmojiResolvable + | `${'' | 'a:'}${string}:${Snowflake}` + | `<${'' | 'a'}:${string}:${Snowflake}>` + | string; export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji; @@ -4854,23 +5116,6 @@ export interface ErrorEvent { target: WebSocket; } -export interface EscapeMarkdownOptions { - codeBlock?: boolean; - inlineCode?: boolean; - bold?: boolean; - italic?: boolean; - underline?: boolean; - strikethrough?: boolean; - spoiler?: boolean; - codeBlockContent?: boolean; - inlineCodeContent?: boolean; - escape?: boolean; - heading?: boolean; - bulletedList?: boolean; - numberedList?: boolean; - maskedLink?: boolean; -} - export interface FetchApplicationCommandOptions extends BaseFetchOptions { guildId?: Snowflake; locale?: LocaleString; @@ -4884,6 +5129,14 @@ export interface FetchArchivedThreadOptions { limit?: number; } +export interface FetchAutoModerationRuleOptions extends BaseFetchOptions { + autoModerationRule: AutoModerationRuleResolvable; +} + +export interface FetchAutoModerationRulesOptions { + cache?: boolean; +} + export interface FetchBanOptions extends BaseFetchOptions { user: UserResolvable; } @@ -4901,7 +5154,11 @@ export interface FetchChannelOptions extends BaseFetchOptions { export interface FetchedThreads { threads: Collection; - hasMore?: boolean; + members: Collection; +} + +export interface FetchedThreadsMore extends FetchedThreads { + hasMore: boolean; } export interface FetchGuildOptions extends BaseFetchOptions { @@ -4950,7 +5207,6 @@ export interface FetchMembersOptions { withPresences?: boolean; time?: number; nonce?: string; - force?: boolean; } export interface FetchMessageOptions extends BaseFetchOptions { @@ -4972,15 +5228,27 @@ export interface FetchReactionUsersOptions { export interface FetchThreadMemberOptions extends BaseFetchOptions { member: ThreadMemberResolvable; + withMember?: boolean; } -export interface FetchThreadMembersOptions { +export interface FetchThreadMembersWithGuildMemberDataOptions { + withMember: true; + after?: Snowflake; + limit?: number; cache?: boolean; } +export interface FetchThreadMembersWithoutGuildMemberDataOptions { + withMember?: false; + cache?: boolean; +} + +export type FetchThreadMembersOptions = + | FetchThreadMembersWithGuildMemberDataOptions + | FetchThreadMembersWithoutGuildMemberDataOptions; + export interface FetchThreadsOptions { archived?: FetchArchivedThreadOptions; - active?: boolean; } export interface AttachmentPayload { @@ -5040,6 +5308,12 @@ interface GuildAuditLogsTypes { [AuditLogEvent.ThreadUpdate]: ['Thread', 'Update']; [AuditLogEvent.ThreadDelete]: ['Thread', 'Delete']; [AuditLogEvent.ApplicationCommandPermissionUpdate]: ['ApplicationCommand', 'Update']; + [AuditLogEvent.AutoModerationRuleCreate]: ['AutoModerationRule', 'Create']; + [AuditLogEvent.AutoModerationRuleUpdate]: ['AutoModerationRule', 'Update']; + [AuditLogEvent.AutoModerationRuleDelete]: ['AutoModerationRule', 'Delete']; + [AuditLogEvent.AutoModerationBlockMessage]: ['AutoModerationRule', 'Create']; + [AuditLogEvent.AutoModerationFlagToChannel]: ['AutoModerationRule', 'Create']; + [AuditLogEvent.AutoModerationUserCommunicationDisabled]: ['AutoModerationRule', 'Create']; } export type GuildAuditLogsActionType = GuildAuditLogsTypes[keyof GuildAuditLogsTypes][1] | 'All'; @@ -5071,6 +5345,21 @@ export interface GuildAuditLogsEntryExtraField { [AuditLogEvent.StageInstanceDelete]: StageChannel | { id: Snowflake }; [AuditLogEvent.StageInstanceUpdate]: StageChannel | { id: Snowflake }; [AuditLogEvent.ApplicationCommandPermissionUpdate]: { applicationId: Snowflake }; + [AuditLogEvent.AutoModerationBlockMessage]: { + autoModerationRuleName: string; + autoModerationRuleTriggerType: AuditLogRuleTriggerType; + channel: GuildTextBasedChannel | { id: Snowflake }; + }; + [AuditLogEvent.AutoModerationFlagToChannel]: { + autoModerationRuleName: string; + autoModerationRuleTriggerType: AuditLogRuleTriggerType; + channel: GuildTextBasedChannel | { id: Snowflake }; + }; + [AuditLogEvent.AutoModerationUserCommunicationDisabled]: { + autoModerationRuleName: string; + autoModerationRuleTriggerType: AuditLogRuleTriggerType; + channel: GuildTextBasedChannel | { id: Snowflake }; + }; } export interface GuildAuditLogsEntryTargetField { @@ -5085,11 +5374,13 @@ export interface GuildAuditLogsEntryTargetField { before?: Snowflake | GuildAuditLogsEntry; + after?: Snowflake | GuildAuditLogsEntry; limit?: number; user?: UserResolvable; type?: T; @@ -5107,6 +5398,31 @@ export type GuildBanResolvable = GuildBan | UserResolvable; export type GuildChannelResolvable = Snowflake | GuildBasedChannel; +export interface AutoModerationRuleCreateOptions { + name: string; + eventType: AutoModerationRuleEventType; + triggerType: AutoModerationRuleTriggerType; + triggerMetadata?: AutoModerationTriggerMetadataOptions; + actions: AutoModerationActionOptions[]; + enabled?: boolean; + exemptRoles?: Collection | RoleResolvable[]; + exemptChannels?: Collection | GuildChannelResolvable[]; + reason?: string; +} + +export interface AutoModerationRuleEditOptions extends Partial> {} + +export interface AutoModerationTriggerMetadataOptions extends Partial {} + +export interface AutoModerationActionOptions { + type: AutoModerationActionType; + metadata?: AutoModerationActionMetadataOptions; +} + +export interface AutoModerationActionMetadataOptions extends Partial> { + channel?: GuildTextChannelResolvable | ThreadChannel; +} + export interface GuildChannelCreateOptions extends Omit { parent?: CategoryChannelResolvable | null; type?: Exclude< @@ -5143,6 +5459,7 @@ export interface GuildChannelEditOptions { defaultThreadRateLimitPerUser?: number; flags?: ChannelFlagsResolvable; defaultSortOrder?: SortOrderType | null; + defaultForumLayout?: ForumLayoutType; reason?: string; } @@ -5153,16 +5470,16 @@ export interface GuildChannelOverwriteOptions { export interface GuildCreateOptions { name: string; - afkChannelId?: Snowflake | number; - afkTimeout?: number; - channels?: PartialChannelData[]; + icon?: BufferResolvable | Base64Resolvable | null; + verificationLevel?: GuildVerificationLevel; defaultMessageNotifications?: GuildDefaultMessageNotifications; explicitContentFilter?: GuildExplicitContentFilter; - icon?: BufferResolvable | Base64Resolvable | null; roles?: PartialRoleData[]; - systemChannelFlags?: SystemChannelFlagsResolvable; + channels?: PartialChannelData[]; + afkChannelId?: Snowflake | number; + afkTimeout?: number; systemChannelId?: Snowflake | number; - verificationLevel?: GuildVerificationLevel; + systemChannelFlags?: SystemChannelFlagsResolvable; } export interface GuildWidgetSettings { @@ -5170,26 +5487,27 @@ export interface GuildWidgetSettings { channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | null; } -export interface GuildEditData { +export interface GuildEditOptions { name?: string; verificationLevel?: GuildVerificationLevel | null; - explicitContentFilter?: GuildExplicitContentFilter | null; defaultMessageNotifications?: GuildDefaultMessageNotifications | null; - afkChannel?: VoiceChannelResolvable | null; - systemChannel?: TextChannelResolvable | null; - systemChannelFlags?: SystemChannelFlagsResolvable; + explicitContentFilter?: GuildExplicitContentFilter | null; afkTimeout?: number; + afkChannel?: VoiceChannelResolvable | null; icon?: BufferResolvable | Base64Resolvable | null; owner?: GuildMemberResolvable; splash?: BufferResolvable | Base64Resolvable | null; discoverySplash?: BufferResolvable | Base64Resolvable | null; banner?: BufferResolvable | Base64Resolvable | null; + systemChannel?: TextChannelResolvable | null; + systemChannelFlags?: SystemChannelFlagsResolvable; rulesChannel?: TextChannelResolvable | null; publicUpdatesChannel?: TextChannelResolvable | null; + safetyAlertsChannel?: TextChannelResolvable | null; preferredLocale?: Locale | null; - premiumProgressBarEnabled?: boolean; - description?: string | null; features?: `${GuildFeature}`[]; + description?: string | null; + premiumProgressBarEnabled?: boolean; reason?: string; } @@ -5200,7 +5518,7 @@ export interface GuildEmojiCreateOptions { reason?: string; } -export interface GuildEmojiEditData { +export interface GuildEmojiEditOptions { name?: string; roles?: Collection | RoleResolvable[]; reason?: string; @@ -5214,20 +5532,21 @@ export interface GuildStickerCreateOptions { reason?: string; } -export interface GuildStickerEditData { +export interface GuildStickerEditOptions { name?: string; description?: string | null; tags?: string; reason?: string; } -export interface GuildMemberEditData { +export interface GuildMemberEditOptions { nick?: string | null; roles?: Collection | readonly RoleResolvable[]; mute?: boolean; deaf?: boolean; channel?: GuildVoiceChannelResolvable | null; communicationDisabledUntil?: DateResolvable | null; + flags?: GuildMemberFlagsResolvable; reason?: string; } @@ -5327,7 +5646,7 @@ export interface IntegrationAccount { name: string; } -export type IntegrationType = 'twitch' | 'youtube' | 'discord'; +export type IntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription'; export type CollectedInteraction = | StringSelectMenuInteraction @@ -5381,7 +5700,7 @@ export interface InviteGenerationOptions { export type GuildInvitableChannelResolvable = TextChannel | VoiceChannel | NewsChannel | StageChannel | Snowflake; -export interface CreateInviteOptions { +export interface InviteCreateOptions { temporary?: boolean; maxAge?: number; maxUses?: number; @@ -5523,7 +5842,10 @@ export interface MessageCreateOptions extends BaseMessageOptions { nonce?: string | number; reply?: ReplyOptions; stickers?: StickerResolvable[]; - flags?: BitFieldResolvable, MessageFlags.SuppressEmbeds>; + flags?: BitFieldResolvable< + Extract, + MessageFlags.SuppressEmbeds | MessageFlags.SuppressNotifications + >; } export type GuildForumThreadMessageCreateOptions = BaseMessageOptions & @@ -5535,13 +5857,7 @@ export interface MessageEditOptions extends Omit flags?: BitFieldResolvable, MessageFlags.SuppressEmbeds>; } -export type MessageReactionResolvable = - | MessageReaction - | Snowflake - | `${string}:${Snowflake}` - | `<:${string}:${Snowflake}>` - | `` - | string; +export type MessageReactionResolvable = MessageReaction | Snowflake | string; export interface MessageReference { channelId: Snowflake; @@ -5561,7 +5877,7 @@ export interface BaseSelectMenuComponentData extends BaseComponentData { export interface StringSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.StringSelect; - options?: SelectMenuComponentOptionData[]; + options: SelectMenuComponentOptionData[]; } export interface UserSelectMenuComponentData extends BaseSelectMenuComponentData { @@ -5774,10 +6090,20 @@ export interface RolePosition { export type RoleResolvable = Role | Snowflake; +export interface RoleSubscriptionData { + roleSubscriptionListingId: Snowflake; + tierName: string; + totalMonthsSubscribed: number; + isRenewal: boolean; +} + export interface RoleTagData { botId?: Snowflake; integrationId?: Snowflake; premiumSubscriberRole?: true; + subscriptionListingId?: Snowflake; + availableForPurchase?: true; + guildConnections?: true; } export interface SetChannelPositionOptions { @@ -5848,6 +6174,7 @@ export interface LifetimeSweepOptions { export interface SweeperDefinitions { applicationCommands: [Snowflake, ApplicationCommand]; + autoModerationRules: [Snowflake, AutoModerationRule]; bans: [Snowflake, GuildBan]; emojis: [Snowflake, GuildEmoji]; invites: [string, Invite, true]; @@ -5893,6 +6220,8 @@ export type TextBasedChannel = Exclude< export type TextBasedChannelTypes = TextBasedChannel['type']; +export type GuildTextBasedChannelTypes = Exclude; + export type VoiceBasedChannel = Extract; export type GuildBasedChannel = Extract; @@ -5901,7 +6230,7 @@ export type CategoryChildChannel = Exclude; -export type GuildTextBasedChannel = Exclude, ForumChannel>; +export type GuildTextBasedChannel = Extract; export type TextChannelResolvable = Snowflake | TextChannel; @@ -5922,7 +6251,7 @@ export interface GuildForumThreadCreateOptions extends StartThreadOptions { appliedTags?: Snowflake[]; } -export interface ThreadEditData { +export interface ThreadEditOptions { name?: string; archived?: boolean; autoArchiveDuration?: ThreadAutoArchiveDuration; @@ -5949,7 +6278,7 @@ export type VoiceBasedChannelTypes = VoiceBasedChannel['type']; export type VoiceChannelResolvable = Snowflake | VoiceChannel; -export interface VoiceStateEditData { +export interface VoiceStateEditOptions { requestToSpeak?: boolean; suppressed?: boolean; } @@ -5967,18 +6296,18 @@ export interface WebhookClientDataURL { export type WebhookClientOptions = Pick; -export interface WebhookEditData { +export interface WebhookEditOptions { name?: string; avatar?: BufferResolvable | null; - channel?: GuildTextChannelResolvable; + channel?: GuildTextChannelResolvable | VoiceChannel | ForumChannel | StageChannel; reason?: string; } -export interface WebhookEditMessageOptions extends Omit { +export interface WebhookMessageEditOptions extends Omit { threadId?: Snowflake; } -export interface InteractionEditReplyOptions extends WebhookEditMessageOptions { +export interface InteractionEditReplyOptions extends WebhookMessageEditOptions { message?: MessageResolvable | '@original'; } @@ -5986,7 +6315,7 @@ export interface WebhookFetchMessageOptions { threadId?: Snowflake; } -export interface WebhookCreateMessageOptions extends Omit { +export interface WebhookMessageCreateOptions extends Omit { username?: string; avatarURL?: string; threadId?: Snowflake; @@ -5995,15 +6324,8 @@ export interface WebhookCreateMessageOptions extends Omit + expectType(autoModerationActionExecution), +); + +client.on('autoModerationRuleCreate', ({ client }) => expectType>(client)); +client.on('autoModerationRuleDelete', ({ client }) => expectType>(client)); + +client.on('autoModerationRuleUpdate', (oldAutoModerationRule, { client: newClient }) => { + expectType>(oldAutoModerationRule!.client); + expectType>(newClient); +}); client.on('channelCreate', ({ client }) => expectType>(client)); client.on('channelDelete', ({ client }) => expectType>(client)); @@ -349,6 +381,10 @@ client.on('messageCreate', async message => { expectType(message.channel); expectType(message.guild); expectType(message.member); + + expectType>(message.mentions); + expectType(message.guild); + expectType>(message.mentions.members); } expectType(message.channel); @@ -556,6 +592,9 @@ client.on('presenceUpdate', (oldPresence, { client }) => { expectType>(client); }); +declare const slashCommandBuilder: SlashCommandBuilder; +declare const contextMenuCommandBuilder: ContextMenuCommandBuilder; + client.on('ready', async client => { expectType>(client); console.log(`Client is logged in as ${client.user.tag} and ready!`); @@ -1129,7 +1168,7 @@ client.on('guildCreate', async g => { new ButtonBuilder(), { type: ComponentType.Button, style: ButtonStyle.Primary, label: 'string', customId: 'foo' }, { type: ComponentType.Button, style: ButtonStyle.Link, label: 'test', url: 'test' }, - { type: ComponentType.StringSelect, customId: 'foo' }, + { type: ComponentType.StringSelect, customId: 'foo', options: [{ label: 'label', value: 'value' }] }, new StringSelectMenuBuilder(), // @ts-expect-error { type: ComponentType.TextInput, style: TextInputStyle.Paragraph, customId: 'foo', label: 'test' }, @@ -1143,7 +1182,7 @@ client.on('guildCreate', async g => { components: [ { type: ComponentType.Button, style: ButtonStyle.Primary, label: 'string', customId: 'foo' }, { type: ComponentType.Button, style: ButtonStyle.Link, label: 'test', url: 'test' }, - { type: ComponentType.StringSelect, customId: 'foo' }, + { type: ComponentType.StringSelect, customId: 'foo', options: [{ label: 'label', value: 'value' }] }, ], }); @@ -1324,7 +1363,7 @@ declare const applicationCommandManager: ApplicationCommandManager; applicationCommandManager.set([applicationCommandData]), ); expectType>>( - applicationCommandManager.set([applicationCommandData], '0'), + applicationCommandManager.set([applicationCommandData] as const, '0'), ); // Test inference of choice values. @@ -1346,6 +1385,41 @@ declare const applicationCommandManager: ApplicationCommandManager; } } +declare const applicationCommandPermissionsManager: ApplicationCommandPermissionsManager< + {}, + {}, + Guild | null, + Snowflake +>; +{ + applicationCommandPermissionsManager.add({ permissions: [], token: '' }); + applicationCommandPermissionsManager.add({ permissions: [] as const, token: '' }); + applicationCommandPermissionsManager.set({ permissions: [], token: '' }); + applicationCommandPermissionsManager.set({ permissions: [] as const, token: '' }); + applicationCommandPermissionsManager.remove({ channels: [], roles: [], users: [], token: '' }); + + applicationCommandPermissionsManager.remove({ + channels: [] as const, + roles: [] as const, + users: [] as const, + token: '', + }); +} + +declare const chatInputApplicationCommandData: ChatInputApplicationCommandData; +{ + chatInputApplicationCommandData.options = []; + chatInputApplicationCommandData.options = [] as const; +} + +declare const applicationCommandChannelOptionData: ApplicationCommandChannelOptionData; +declare const applicationCommandChannelOption: ApplicationCommandChannelOption; +{ + applicationCommandChannelOptionData.channelTypes = [] as const; + applicationCommandChannelOptionData.channel_types = [] as const; + applicationCommandChannelOption.channelTypes = [] as const; +} + declare const applicationNonChoiceOptionData: ApplicationCommandOptionData & { type: CommandOptionNonChoiceResolvableType; }; @@ -1356,10 +1430,52 @@ declare const applicationNonChoiceOptionData: ApplicationCommandOptionData & { applicationNonChoiceOptionData.choices; } +declare const applicationCommandChoicesData: ApplicationCommandChoicesData; +declare const applicationCommandChoicesOption: ApplicationCommandChoicesOption; +{ + applicationCommandChoicesData.choices = []; + applicationCommandChoicesData.choices = [] as const; + applicationCommandChoicesOption.choices = []; + applicationCommandChoicesOption.choices = [] as const; +} + +declare const applicationCommandSubCommandData: ApplicationCommandSubCommandData; +declare const applicationCommandSubCommand: ApplicationCommandSubCommand; +{ + applicationCommandSubCommandData.options = []; + applicationCommandSubCommandData.options = [] as const; + applicationCommandSubCommand.options = []; + applicationCommandSubCommand.options = [] as const; +} + declare const applicationSubGroupCommandData: ApplicationCommandSubGroupData; +declare const applicationCommandSubGroup: ApplicationCommandSubGroup; { expectType(applicationSubGroupCommandData.type); - expectType(applicationSubGroupCommandData.options); + applicationSubGroupCommandData.options = []; + applicationSubGroupCommandData.options = [] as const; + applicationCommandSubGroup.options = []; + applicationCommandSubGroup.options = [] as const; +} + +declare const autoModerationRuleManager: AutoModerationRuleManager; +{ + expectType>(autoModerationRuleManager.fetch('1234567890')); + expectType>(autoModerationRuleManager.fetch({ autoModerationRule: '1234567890' })); + expectType>( + autoModerationRuleManager.fetch({ autoModerationRule: '1234567890', cache: false }), + ); + expectType>( + autoModerationRuleManager.fetch({ autoModerationRule: '1234567890', force: true }), + ); + expectType>( + autoModerationRuleManager.fetch({ autoModerationRule: '1234567890', cache: false, force: true }), + ); + expectType>>(autoModerationRuleManager.fetch()); + expectType>>(autoModerationRuleManager.fetch({})); + expectType>>(autoModerationRuleManager.fetch({ cache: false })); + // @ts-expect-error The `force` option cannot be used alongside fetching all auto moderation rules. + autoModerationRuleManager.fetch({ force: false }); } declare const guildApplicationCommandManager: GuildApplicationCommandManager; @@ -1425,6 +1541,22 @@ declare const guildChannelManager: GuildChannelManager; expectType(message.guild); expectType(message.guildId); expectType(message.channel.messages.channel); + + expectType>(message.mentions); + expectType(message.mentions.guild); + expectType(message.mentions.members); +} + +declare const threadManager: ThreadManager; +{ + expectType>(threadManager.fetch('12345678901234567')); + expectType>(threadManager.fetch('12345678901234567', { cache: true, force: false })); + expectType>(threadManager.fetch()); + expectType>(threadManager.fetch({})); + expectType>(threadManager.fetch({ archived: { limit: 4 } })); + + // @ts-expect-error The force option has no effect here. + threadManager.fetch({ archived: {} }, { force: true }); } declare const guildForumThreadManager: GuildForumThreadManager; @@ -1435,6 +1567,28 @@ declare const guildTextThreadManager: GuildTextThreadManager< >; expectType(guildTextThreadManager.channel); +declare const guildMemberManager: GuildMemberManager; +{ + expectType>(guildMemberManager.fetch('12345678901234567')); + expectType>(guildMemberManager.fetch({ user: '12345678901234567' })); + expectType>(guildMemberManager.fetch({ user: '12345678901234567', cache: true, force: false })); + expectType>(guildMemberManager.fetch({ user: '12345678901234567', cache: true, force: false })); + expectType>>(guildMemberManager.fetch()); + expectType>>(guildMemberManager.fetch({})); + expectType>>(guildMemberManager.fetch({ user: ['12345678901234567'] })); + expectType>>(guildMemberManager.fetch({ withPresences: false })); + expectType>(guildMemberManager.fetch({ user: '12345678901234567', withPresences: true })); + + expectType>>( + guildMemberManager.fetch({ query: 'test', user: ['12345678901234567'], nonce: 'test' }), + ); + + // @ts-expect-error The cache & force options have no effect here. + guildMemberManager.fetch({ cache: true, force: false }); + // @ts-expect-error The force option has no effect here. + guildMemberManager.fetch({ user: ['12345678901234567'], cache: true, force: false }); +} + declare const messageManager: MessageManager; { expectType>(messageManager.fetch('1234567890')); @@ -1475,17 +1629,29 @@ declare const guildBanManager: GuildBanManager; guildBanManager.fetch({ user: '1234567890', after: '1234567890', cache: true, force: false }); } +declare const threadMemberWithGuildMember: ThreadMember; declare const threadMemberManager: ThreadMemberManager; { expectType>(threadMemberManager.fetch('12345678')); expectType>(threadMemberManager.fetch({ member: '12345678', cache: false })); expectType>(threadMemberManager.fetch({ member: '12345678', force: true })); - expectType>(threadMemberManager.fetch({ member: '12345678', cache: false, force: true })); + expectType>>(threadMemberManager.fetch({ member: threadMemberWithGuildMember })); + expectType>>(threadMemberManager.fetch({ member: '12345678901234567', withMember: true })); expectType>>(threadMemberManager.fetch()); expectType>>(threadMemberManager.fetch({})); - expectType>>(threadMemberManager.fetch({ cache: true })); + + expectType>>>( + threadMemberManager.fetch({ cache: true, limit: 50, withMember: true, after: '12345678901234567' }), + ); + + expectType>>( + threadMemberManager.fetch({ cache: true, withMember: false }), + ); + // @ts-expect-error The `force` option cannot be used alongside fetching all thread members. threadMemberManager.fetch({ cache: true, force: false }); + // @ts-expect-error `withMember` needs to be `true` to receive paginated results. + threadMemberManager.fetch({ withMember: false, limit: 5, after: '12345678901234567' }); } declare const typing: Typing; @@ -1700,6 +1866,23 @@ client.on('interactionCreate', async interaction => { expectType(interaction.options.getChannel('test', true)); expectType(interaction.options.getRole('test', true)); + + expectType(interaction.options.getChannel('test', true, [ChannelType.PublicThread])); + expectType(interaction.options.getChannel('test', true, [ChannelType.AnnouncementThread])); + expectType( + interaction.options.getChannel('test', true, [ChannelType.PublicThread, ChannelType.AnnouncementThread]), + ); + expectType(interaction.options.getChannel('test', true, [ChannelType.PrivateThread])); + + expectType(interaction.options.getChannel('test', true, [ChannelType.GuildText])); + expectType(interaction.options.getChannel('test', false, [ChannelType.GuildText])); + expectType( + interaction.options.getChannel('test', true, [ChannelType.GuildForum, ChannelType.GuildVoice]), + ); + expectType(interaction.options.getChannel('test', true, [ChannelType.GuildText] as const)); + expectType( + interaction.options.getChannel('test', false, [ChannelType.GuildForum, ChannelType.GuildVoice]), + ); } else { // @ts-expect-error consumeCachedCommand(interaction); @@ -1877,7 +2060,12 @@ declare const GuildTextBasedChannel: GuildTextBasedChannel; expectType(TextBasedChannel); expectType< - ChannelType.GuildText | ChannelType.DM | ChannelType.GuildAnnouncement | ChannelType.GuildVoice | ThreadChannelType + | ChannelType.GuildText + | ChannelType.DM + | ChannelType.GuildAnnouncement + | ChannelType.GuildVoice + | ChannelType.GuildStageVoice + | ThreadChannelType >(TextBasedChannelTypes); expectType(VoiceBasedChannel); expectType(GuildBasedChannel); @@ -1984,6 +2172,24 @@ EmbedBuilder.from(embedData); declare const embedComp: Embed; EmbedBuilder.from(embedComp); +declare const actionRowData: APIActionRowComponent; +ActionRowBuilder.from(actionRowData); + +declare const actionRowComp: ActionRow; +ActionRowBuilder.from(actionRowComp); + +declare const buttonsActionRowData: APIActionRowComponent; +declare const buttonsActionRowComp: ActionRow; + +expectType>(ActionRowBuilder.from(buttonsActionRowData)); +expectType>(ActionRowBuilder.from(buttonsActionRowComp)); + +declare const anyComponentsActionRowData: APIActionRowComponent; +declare const anyComponentsActionRowComp: ActionRow; + +expectType(ActionRowBuilder.from(anyComponentsActionRowData)); +expectType(ActionRowBuilder.from(anyComponentsActionRowComp)); + declare const stageChannel: StageChannel; declare const partialGroupDMChannel: PartialGroupDMChannel; @@ -2054,3 +2260,10 @@ if (anySelectMenu.isStringSelectMenu()) { } else if (anySelectMenu.isMentionableSelectMenu()) { expectType(anySelectMenu); } + +client.on('guildAuditLogEntryCreate', (auditLogEntry, guild) => { + expectType(auditLogEntry); + expectType(guild); +}); + +expectType>(guildMember.flags); diff --git a/packages/docgen/.gitignore b/packages/docgen/.gitignore index 5189c6c61a41..538c22f97306 100644 --- a/packages/docgen/.gitignore +++ b/packages/docgen/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,11 +15,8 @@ pids .env # Dist -dist/ -typings/ - -docs/**/* +dist # Miscellaneous -.tmp/ -coverage/ +.turbo +.tmp diff --git a/packages/docgen/.prettierignore b/packages/docgen/.prettierignore index 8b94c7d45e03..eea99aa9b684 100644 --- a/packages/docgen/.prettierignore +++ b/packages/docgen/.prettierignore @@ -1,8 +1,2 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +dist diff --git a/packages/docgen/README.md b/packages/docgen/README.md index ca28fa9ece23..1e95968428c1 100644 --- a/packages/docgen/README.md +++ b/packages/docgen/README.md @@ -10,6 +10,7 @@

Vercel + Cloudflare Workers

@@ -18,7 +19,7 @@ - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -27,16 +28,16 @@ ## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/ [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/docgen/package.json b/packages/docgen/package.json index 8ed9a8b67565..271ae220121b 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -33,29 +33,31 @@ ], "repository": { "type": "git", - "url": "https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/docgen" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { - "commander": "^9.4.1", - "jsdoc-to-markdown": "^7.1.1", - "tslib": "^2.4.0", - "typedoc": "^0.23.17" + "commander": "^10.0.1", + "jsdoc-to-markdown": "^8.0.0", + "tslib": "^2.5.2", + "typedoc": "^0.24.7" }, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", + "@favware/cliff-jumper": "^2.0.0", "@types/jsdoc-to-markdown": "^7.0.3", - "@types/node": "16.11.68", + "@types/node": "16.18.32", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4" }, "engines": { "node": ">=16.9.0" diff --git a/packages/docgen/src/types/param.ts b/packages/docgen/src/types/param.ts index 8c64148cc777..9994bbb361d6 100644 --- a/packages/docgen/src/types/param.ts +++ b/packages/docgen/src/types/param.ts @@ -13,7 +13,7 @@ export class DocumentedParam extends DocumentedItem name: data.name, // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing, no-param-reassign description: data.comment?.summary?.reduce((prev, curr) => (prev += curr.text), '').trim() || undefined, - optional: data.flags.isOptional || typeof data.defaultValue !== 'undefined', + optional: data.flags.isOptional || data.defaultValue !== undefined, default: (data.defaultValue === '...' ? undefined : data.defaultValue) ?? (data.comment?.blockTags diff --git a/packages/docgen/src/types/typedef.ts b/packages/docgen/src/types/typedef.ts index e41f9871e318..4c6e75e9d717 100644 --- a/packages/docgen/src/types/typedef.ts +++ b/packages/docgen/src/types/typedef.ts @@ -86,7 +86,7 @@ export class DocumentedTypeDef extends DocumentedItem (prev += curr.text), '').trim() || undefined, - optional: child.flags.isOptional || typeof child.defaultValue !== 'undefined', + optional: child.flags.isOptional || child.defaultValue !== undefined, default: (child.defaultValue === '...' ? undefined : child.defaultValue) ?? (child.comment?.blockTags @@ -131,7 +131,7 @@ export class DocumentedTypeDef extends DocumentedItem (prev += curr.text), '').trim() || undefined, - optional: param.flags.isOptional || typeof param.defaultValue !== 'undefined', + optional: param.flags.isOptional || param.defaultValue !== undefined, default: (param.defaultValue === '...' ? undefined : param.defaultValue) ?? (param.comment?.blockTags diff --git a/packages/docgen/tsup.config.js b/packages/docgen/tsup.config.ts similarity index 100% rename from packages/docgen/tsup.config.js rename to packages/docgen/tsup.config.ts diff --git a/packages/formatters/.cliff-jumperrc.json b/packages/formatters/.cliff-jumperrc.json new file mode 100644 index 000000000000..3f2cbd07934f --- /dev/null +++ b/packages/formatters/.cliff-jumperrc.json @@ -0,0 +1,5 @@ +{ + "name": "formatters", + "org": "discordjs", + "packagePath": "packages/formatters" +} diff --git a/packages/formatters/.eslintrc.json b/packages/formatters/.eslintrc.json new file mode 100644 index 000000000000..99ef7cec8051 --- /dev/null +++ b/packages/formatters/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../../.eslintrc.json" +} diff --git a/packages/formatters/.gitignore b/packages/formatters/.gitignore new file mode 100644 index 000000000000..90500960f32b --- /dev/null +++ b/packages/formatters/.gitignore @@ -0,0 +1,28 @@ +# Packages +node_modules + +# Log files +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Env +.env + +# Dist +dist +dist-docs + +# Docs +docs/**/* +!docs/README.md + +# Miscellaneous +.turbo +.tmp +coverage diff --git a/packages/formatters/.lintstagedrc.js b/packages/formatters/.lintstagedrc.js new file mode 100644 index 000000000000..dc17706a55ac --- /dev/null +++ b/packages/formatters/.lintstagedrc.js @@ -0,0 +1 @@ +module.exports = require('../../.lintstagedrc.json'); diff --git a/packages/formatters/.prettierignore b/packages/formatters/.prettierignore new file mode 100644 index 000000000000..fc03103c7b8c --- /dev/null +++ b/packages/formatters/.prettierignore @@ -0,0 +1,6 @@ +.turbo +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/formatters/.prettierrc.js b/packages/formatters/.prettierrc.js new file mode 100644 index 000000000000..f004026c7647 --- /dev/null +++ b/packages/formatters/.prettierrc.js @@ -0,0 +1 @@ +module.exports = require('../../.prettierrc.json'); diff --git a/packages/formatters/CHANGELOG.md b/packages/formatters/CHANGELOG.md new file mode 100644 index 000000000000..0eb93f02c4c9 --- /dev/null +++ b/packages/formatters/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +# [@discordjs/formatters@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.3.0...@discordjs/formatters@0.3.1) - (2023-05-01) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) +- **formatters:** Enhance the documentation (#9364) ([23e0ac5](https://github.com/discordjs/discord.js/commit/23e0ac56f456c39d925e2644ec3ca209d4410a99)) + +# [@discordjs/formatters@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.2.0...@discordjs/formatters@0.3.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +# [@discordjs/formatters@0.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.1.0...@discordjs/formatters@0.2.0) - (2023-03-12) + +## Features + +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) +- Moved the escapeX functions from discord.js to @discord.js/formatters (#8957) ([13ce78a](https://github.com/discordjs/discord.js/commit/13ce78af6e3aedc793f53a099a6a615df44311f7)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +# [@discordjs/formatters@0.1.0](https://github.com/discordjs/discord.js/tree/@discordjs/formatters@0.1.0) - (2022-12-16) + +## Features + +- Add `@discordjs/formatters` (#8889) ([3fca638](https://github.com/discordjs/discord.js/commit/3fca638a8470dcea2f79ddb9f18526dbc0017c88)) + diff --git a/packages/formatters/LICENSE b/packages/formatters/LICENSE new file mode 100644 index 000000000000..e2baac17a44a --- /dev/null +++ b/packages/formatters/LICENSE @@ -0,0 +1,191 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2021 Noel Buechler + Copyright 2021 Vlad Frangu + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/formatters/README.md b/packages/formatters/README.md new file mode 100644 index 000000000000..6cce0f0c75f1 --- /dev/null +++ b/packages/formatters/README.md @@ -0,0 +1,81 @@ +
+
+

+ discord.js +

+
+

+ Discord server + npm version + npm downloads + Build status + Code coverage +

+

+ Vercel + Cloudflare Workers +

+
+ +## About + +`@discordjs/formatters` is a collection of functions for formatting strings to be used on Discord. + +## Installation + +**Node.js 16.9.0 or newer is required.** + +```sh +npm install @discordjs/formatters +yarn add @discordjs/formatters +pnpm add @discordjs/formatters +``` + +## Example usage + +````ts +import { codeBlock } from '@discordjs/formatters'; + +const formattedCode = codeBlock('hello world!'); +console.log(formattedCode); + +// Prints: +// ``` +// hello world! +// ``` +```` + +## Links + +- [Website][website] ([source][website-source]) +- [Documentation][documentation] +- [Guide][guide] ([source][guide-source]) + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. +- [discord.js Discord server][discord] +- [Discord API Discord server][discord-api] +- [GitHub][source] +- [npm][npm] +- [Related libraries][related-libs] + +## Contributing + +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. +See [the contribution guide][contributing] if you'd like to submit a PR. + +## Help + +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. + +[website]: https://discord.js.org +[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website +[documentation]: https://discord.js.org/docs/packages/formatters/stable +[guide]: https://discordjs.guide/ +[guide-source]: https://github.com/discordjs/guide +[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html +[discord]: https://discord.gg/djs +[discord-api]: https://discord.gg/discord-api +[source]: https://github.com/discordjs/discord.js/tree/main/packages/formatters +[npm]: https://www.npmjs.com/package/@discordjs/formatters +[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries +[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md diff --git a/packages/formatters/__tests__/escapers.test.ts b/packages/formatters/__tests__/escapers.test.ts new file mode 100644 index 000000000000..11cb83c1bff7 --- /dev/null +++ b/packages/formatters/__tests__/escapers.test.ts @@ -0,0 +1,264 @@ +import { describe, test, expect } from 'vitest'; +import { + escapeCodeBlock, + escapeInlineCode, + escapeItalic, + escapeBold, + escapeUnderline, + escapeStrikethrough, + escapeMaskedLink, + escapeSpoiler, + escapeHeading, + escapeBulletedList, + escapeNumberedList, + escapeMarkdown, +} from '../src/index.js'; + +const testString = "`_Behold!_`\n||___~~***```js\n`use strict`;\nrequire('discord.js');```***~~___||"; +const testStringForums = + '# Title\n## Subtitle\n### Subsubtitle\n- Bullet list\n - # Title with bullet\n * Subbullet\n1. Number list\n 1. Sub number list'; + +describe('Markdown escapers', () => { + describe('escapeCodeblock', () => { + test('shared', () => { + expect(escapeCodeBlock(testString)).toEqual( + "`_Behold!_`\n||___~~***\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`***~~___||", + ); + }); + + test('basic', () => { + expect(escapeCodeBlock('```test```')).toEqual('\\`\\`\\`test\\`\\`\\`'); + }); + }); + + describe('escapeInlineCode', () => { + test('shared', () => { + expect(escapeInlineCode(testString)).toEqual( + "\\`_Behold!_\\`\n||___~~***```js\n\\`use strict\\`;\nrequire('discord.js');```***~~___||", + ); + }); + + test('basic', () => { + expect(escapeInlineCode('`test`')).toEqual('\\`test\\`'); + }); + }); + + describe('escapeBold', () => { + test('shared', () => { + expect(escapeBold(testString)).toEqual( + "`_Behold!_`\n||___~~*\\*\\*```js\n`use strict`;\nrequire('discord.js');```\\*\\**~~___||", + ); + }); + + test('basic', () => { + expect(escapeBold('**test**')).toEqual('\\*\\*test\\*\\*'); + }); + }); + + describe('escapeItalic', () => { + test('shared', () => { + expect(escapeItalic(testString)).toEqual( + "`\\_Behold!\\_`\n||\\___~~\\***```js\n`use strict`;\nrequire('discord.js');```**\\*~~__\\_||", + ); + }); + + test('basic (_)', () => { + expect(escapeItalic('_test_')).toEqual('\\_test\\_'); + }); + + test('basic (*)', () => { + expect(escapeItalic('*test*')).toEqual('\\*test\\*'); + }); + + test('emoji', () => { + const testOne = 'This is a test with _emojis_ <:Frost_ed_Wreath:1053399941210443826> and **bold text**.'; + expect(escapeItalic(testOne)).toEqual( + 'This is a test with \\_emojis\\_ <:Frost_ed_Wreath:1053399941210443826> and **bold text**.', + ); + }); + }); + + describe('escapeUnderline', () => { + test('shared', () => { + expect(escapeUnderline(testString)).toEqual( + "`_Behold!_`\n||_\\_\\_~~***```js\n`use strict`;\nrequire('discord.js');```***~~\\_\\__||", + ); + }); + + test('basic', () => { + expect(escapeUnderline('__test__')).toEqual('\\_\\_test\\_\\_'); + }); + + test('emoji', () => { + const testTwo = 'This is a test with __emojis__ <:Frost__ed__Wreath:1053399939654352978> and **bold text**.'; + expect(escapeUnderline(testTwo)).toBe( + 'This is a test with \\_\\_emojis\\_\\_ <:Frost__ed__Wreath:1053399939654352978> and **bold text**.', + ); + }); + }); + + describe('escapeStrikethrough', () => { + test('shared', () => { + expect(escapeStrikethrough(testString)).toEqual( + "`_Behold!_`\n||___\\~\\~***```js\n`use strict`;\nrequire('discord.js');```***\\~\\~___||", + ); + }); + + test('basic', () => { + expect(escapeStrikethrough('~~test~~')).toEqual('\\~\\~test\\~\\~'); + }); + }); + + describe('escapeSpoiler', () => { + test('shared', () => { + expect(escapeSpoiler(testString)).toEqual( + "`_Behold!_`\n\\|\\|___~~***```js\n`use strict`;\nrequire('discord.js');```***~~___\\|\\|", + ); + }); + + test('basic', () => { + expect(escapeSpoiler('||test||')).toEqual('\\|\\|test\\|\\|'); + }); + }); + + describe('escapeHeading', () => { + test('shared', () => { + expect(escapeHeading(testStringForums)).toEqual( + '\\# Title\n\\## Subtitle\n\\### Subsubtitle\n- Bullet list\n - \\# Title with bullet\n * Subbullet\n1. Number list\n 1. Sub number list', + ); + }); + + test('basic', () => { + expect(escapeHeading('# test')).toEqual('\\# test'); + }); + }); + + describe('escapeBulletedList', () => { + test('shared', () => { + expect(escapeBulletedList(testStringForums)).toEqual( + '# Title\n## Subtitle\n### Subsubtitle\n\\- Bullet list\n \\- # Title with bullet\n \\* Subbullet\n1. Number list\n 1. Sub number list', + ); + }); + + test('basic', () => { + expect(escapeBulletedList('- test')).toEqual('\\- test'); + }); + }); + + describe('escapeNumberedList', () => { + test('shared', () => { + expect(escapeNumberedList(testStringForums)).toEqual( + '# Title\n## Subtitle\n### Subsubtitle\n- Bullet list\n - # Title with bullet\n * Subbullet\n1\\. Number list\n 1\\. Sub number list', + ); + }); + + test('basic', () => { + expect(escapeNumberedList('1. test')).toEqual('1\\. test'); + }); + }); + + describe('escapeMaskedLink', () => { + test('basic', () => { + expect(escapeMaskedLink('[test](https://discord.js.org)')).toEqual('\\[test](https://discord.js.org)'); + }); + }); + + describe('escapeMarkdown', () => { + test('shared', () => { + expect(escapeMarkdown(testString)).toEqual( + "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('no codeBlock', () => { + expect(escapeMarkdown(testString, { codeBlock: false })).toEqual( + "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*```js\n\\`use strict\\`;\nrequire('discord.js');```\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('no inlineCode', () => { + expect(escapeMarkdown(testString, { inlineCode: false })).toEqual( + "`\\_Behold!\\_`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('no bold', () => { + expect(escapeMarkdown(testString, { bold: false })).toEqual( + "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\***\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`**\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('no italic', () => { + expect(escapeMarkdown(testString, { italic: false })).toEqual( + "\\`_Behold!_\\`\n\\|\\|_\\_\\_\\~\\~*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\**\\~\\~\\_\\__\\|\\|", + ); + }); + + test('no underline', () => { + expect(escapeMarkdown(testString, { underline: false })).toEqual( + "\\`\\_Behold!\\_\\`\n\\|\\|\\___\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~__\\_\\|\\|", + ); + }); + + test('no strikethrough', () => { + expect(escapeMarkdown(testString, { strikethrough: false })).toEqual( + "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_~~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*~~\\_\\_\\_\\|\\|", + ); + }); + + test('no spoiler', () => { + expect(escapeMarkdown(testString, { spoiler: false })).toEqual( + "\\`\\_Behold!\\_\\`\n||\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_||", + ); + }); + + describe('code content', () => { + test('no code block content', () => { + expect(escapeMarkdown(testString, { codeBlockContent: false })).toEqual( + "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('no inline code content', () => { + expect(escapeMarkdown(testString, { inlineCodeContent: false })).toEqual( + "\\`_Behold!_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n\\`use strict\\`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('neither inline code or code block content', () => { + expect(escapeMarkdown(testString, { inlineCodeContent: false, codeBlockContent: false })) + // eslint-disable-next-line max-len + .toEqual( + "\\`_Behold!_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('neither code blocks or code block content', () => { + expect(escapeMarkdown(testString, { codeBlock: false, codeBlockContent: false })).toEqual( + "\\`\\_Behold!\\_\\`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*```js\n`use strict`;\nrequire('discord.js');```\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('neither inline code or inline code content', () => { + expect(escapeMarkdown(testString, { inlineCode: false, inlineCodeContent: false })).toEqual( + "`_Behold!_`\n\\|\\|\\_\\_\\_\\~\\~\\*\\*\\*\\`\\`\\`js\n`use strict`;\nrequire('discord.js');\\`\\`\\`\\*\\*\\*\\~\\~\\_\\_\\_\\|\\|", + ); + }); + + test('edge-case odd number of fences with no code block content', () => { + expect( + escapeMarkdown('**foo** ```**bar**``` **fizz** ``` **buzz**', { + codeBlock: false, + codeBlockContent: false, + }), + ).toEqual('\\*\\*foo\\*\\* ```**bar**``` \\*\\*fizz\\*\\* ``` \\*\\*buzz\\*\\*'); + }); + + test('edge-case odd number of backticks with no inline code content', () => { + expect( + escapeMarkdown('**foo** `**bar**` **fizz** ` **buzz**', { inlineCode: false, inlineCodeContent: false }), + ).toEqual('\\*\\*foo\\*\\* `**bar**` \\*\\*fizz\\*\\* ` \\*\\*buzz\\*\\*'); + }); + }); + }); +}); diff --git a/packages/builders/__tests__/messages/formatters.test.ts b/packages/formatters/__tests__/formatters.test.ts similarity index 93% rename from packages/builders/__tests__/messages/formatters.test.ts rename to packages/formatters/__tests__/formatters.test.ts index 6624ff11f8ce..b6d3ea075fc4 100644 --- a/packages/builders/__tests__/messages/formatters.test.ts +++ b/packages/formatters/__tests__/formatters.test.ts @@ -23,7 +23,7 @@ import { TimestampStyles, underscore, userMention, -} from '../../src/index.js'; +} from '../src/index.js'; describe('Message formatters', () => { describe('codeBlock', () => { @@ -240,16 +240,19 @@ describe('Message formatters', () => { }); describe('Faces', () => { - test('GIVEN Faces.Shrug THEN returns "¯\\_(ツ)\\_/¯"', () => { - expect<'¯\\_(ツ)\\_/¯'>(Faces.Shrug).toEqual('¯\\_(ツ)\\_/¯'); + // prettier-ignore + /* eslint-disable no-useless-escape */ + test('GIVEN Faces.Shrug THEN returns "¯\_(ツ)_/¯"', () => { + expect<'¯\_(ツ)_/¯'>(Faces.Shrug).toEqual('¯\_(ツ)_/¯'); }); + /* eslint-enable no-useless-escape */ - test('GIVEN Faces.Tableflip THEN returns "(╯°□°)╯︵ ┻━┻"', () => { - expect<'(╯°□°)╯︵ ┻━┻'>(Faces.Tableflip).toEqual('(╯°□°)╯︵ ┻━┻'); + test('GIVEN Faces.Tableflip THEN returns "(╯°□°)╯︵ ┻━┻"', () => { + expect<'(╯°□°)╯︵ ┻━┻'>(Faces.Tableflip).toEqual('(╯°□°)╯︵ ┻━┻'); }); - test('GIVEN Faces.Unflip THEN returns "┬─┬ ノ( ゜-゜ノ)"', () => { - expect<'┬─┬ ノ( ゜-゜ノ)'>(Faces.Unflip).toEqual('┬─┬ ノ( ゜-゜ノ)'); + test('GIVEN Faces.Unflip THEN returns "┬─┬ノ( º _ ºノ)"', () => { + expect<'┬─┬ノ( º _ ºノ)'>(Faces.Unflip).toEqual('┬─┬ノ( º _ ºノ)'); }); }); }); diff --git a/packages/formatters/api-extractor-docs.json b/packages/formatters/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/formatters/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/formatters/api-extractor.json b/packages/formatters/api-extractor.json new file mode 100644 index 000000000000..1d13f8d43171 --- /dev/null +++ b/packages/formatters/api-extractor.json @@ -0,0 +1,6 @@ +{ + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/formatters" + } +} diff --git a/packages/formatters/cliff.toml b/packages/formatters/cliff.toml new file mode 100644 index 000000000000..a9114b13ebdd --- /dev/null +++ b/packages/formatters/cliff.toml @@ -0,0 +1,63 @@ +[changelog] +header = """ +# Changelog + +All notable changes to this project will be documented in this file.\n +""" +body = """ +{% if version %}\ + # [{{ version | trim_start_matches(pat="v") }}]\ + {% if previous %}\ + {% if previous.version %}\ + (https://github.com/discordjs/discord.js/compare/{{ previous.version }}...{{ version }})\ + {% else %}\ + (https://github.com/discordjs/discord.js/tree/{{ version }})\ + {% endif %}\ + {% endif %} \ + - ({{ timestamp | date(format="%Y-%m-%d") }}) +{% else %}\ + # [unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ## {{ group | upper_first }} + {% for commit in commits %} + - {% if commit.scope %}\ + **{{commit.scope}}:** \ + {% endif %}\ + {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/discordjs/discord.js/commit/{{ commit.id }}))\ + {% if commit.breaking %}\ + {% for breakingChange in commit.footers %}\ + \n{% raw %} {% endraw %}- **{{ breakingChange.token }}{{ breakingChange.separator }}** {{ breakingChange.value }}\ + {% endfor %}\ + {% endif %}\ + {% endfor %} +{% endfor %}\n +""" +trim = true +footer = "" + +[git] +conventional_commits = true +filter_unconventional = true +commit_parsers = [ + { message = "^feat", group = "Features"}, + { message = "^fix", group = "Bug Fixes"}, + { message = "^docs", group = "Documentation"}, + { message = "^perf", group = "Performance"}, + { message = "^refactor", group = "Refactor"}, + { message = "^typings", group = "Typings"}, + { message = "^types", group = "Typings"}, + { message = ".*deprecated", body = ".*deprecated", group = "Deprecation"}, + { message = "^revert", skip = true}, + { message = "^style", group = "Styling"}, + { message = "^test", group = "Testing"}, + { message = "^chore", skip = true}, + { message = "^ci", skip = true}, + { message = "^build", skip = true}, + { body = ".*security", group = "Security"}, +] +filter_commits = true +tag_pattern = "@discordjs/formatters@[0-9]*" +ignore_tags = "" +topo_order = true +sort_commits = "newest" diff --git a/packages/formatters/docs/README.md b/packages/formatters/docs/README.md new file mode 100644 index 000000000000..d93fbf8890ba --- /dev/null +++ b/packages/formatters/docs/README.md @@ -0,0 +1 @@ +## [View the documentation here.](https://discord.js.org/docs/packages/formatters/main) diff --git a/packages/formatters/package.json b/packages/formatters/package.json new file mode 100644 index 000000000000..3ae3a0daa176 --- /dev/null +++ b/packages/formatters/package.json @@ -0,0 +1,72 @@ +{ + "name": "@discordjs/formatters", + "version": "0.3.1", + "description": "A set of functions to format strings for Discord.", + "scripts": { + "test": "vitest run", + "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", + "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", + "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", + "prepack": "yarn build && yarn lint", + "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/formatters/*'", + "release": "cliff-jumper" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "typings": "./dist/index.d.ts", + "exports": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "directories": { + "lib": "src", + "test": "__tests__" + }, + "files": [ + "dist" + ], + "contributors": [ + "Crawl ", + "SpaceEEC ", + "Vlad Frangu ", + "Aura Román " + ], + "license": "Apache-2.0", + "keywords": [], + "repository": { + "type": "git", + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/formatters" + }, + "bugs": { + "url": "https://github.com/discordjs/discord.js/issues" + }, + "homepage": "https://discord.js.org", + "dependencies": { + "discord-api-types": "^0.37.42" + }, + "devDependencies": { + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "16.18.32", + "@vitest/coverage-c8": "^0.31.1", + "cross-env": "^7.0.3", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" + }, + "engines": { + "node": ">=16.9.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/formatters/src/escapers.ts b/packages/formatters/src/escapers.ts new file mode 100644 index 000000000000..1c89ce193167 --- /dev/null +++ b/packages/formatters/src/escapers.ts @@ -0,0 +1,313 @@ +/* eslint-disable prefer-named-capture-group */ + +/** + * The options that affect what will be escaped. + */ +export interface EscapeMarkdownOptions { + /** + * Whether to escape bold text. + * + * @defaultValue `true` + */ + bold?: boolean; + + /** + * Whether to escape bulleted lists. + * + * @defaultValue `false` + */ + bulletedList?: boolean; + + /** + * Whether to escape code blocks. + * + * @defaultValue `true` + */ + codeBlock?: boolean; + + /** + * Whether to escape text inside code blocks. + * + * @defaultValue `true` + */ + codeBlockContent?: boolean; + + /** + * Whether to escape `\`. + * + * @defaultValue `true` + */ + escape?: boolean; + + /** + * Whether to escape headings. + * + * @defaultValue `false` + */ + heading?: boolean; + + /** + * Whether to escape inline code. + * + * @defaultValue `true` + */ + inlineCode?: boolean; + + /** + * Whether to escape text inside inline code. + * + * @defaultValue `true` + */ + inlineCodeContent?: boolean; + /** + * Whether to escape italics. + * + * @defaultValue `true` + */ + italic?: boolean; + + /** + * Whether to escape masked links. + * + * @defaultValue `false` + */ + maskedLink?: boolean; + + /** + * Whether to escape numbered lists. + * + * @defaultValue `false` + */ + numberedList?: boolean; + + /** + * Whether to escape spoilers. + * + * @defaultValue `true` + */ + spoiler?: boolean; + + /** + * Whether to escape strikethroughs. + * + * @defaultValue `true` + */ + strikethrough?: boolean; + + /** + * Whether to escape underlines. + * + * @defaultValue `true` + */ + underline?: boolean; +} + +/** + * Escapes any Discord-flavored markdown in a string. + * + * @param text - Content to escape + * @param options - Options for escaping the markdown + */ +export function escapeMarkdown(text: string, options: EscapeMarkdownOptions = {}): string { + const { + codeBlock = true, + inlineCode = true, + bold = true, + italic = true, + underline = true, + strikethrough = true, + spoiler = true, + codeBlockContent = true, + inlineCodeContent = true, + escape = true, + heading = false, + bulletedList = false, + numberedList = false, + maskedLink = false, + } = options; + + if (!codeBlockContent) { + return text + .split('```') + .map((subString, index, array) => { + if (index % 2 && index !== array.length - 1) return subString; + return escapeMarkdown(subString, { + inlineCode, + bold, + italic, + underline, + strikethrough, + spoiler, + inlineCodeContent, + escape, + heading, + bulletedList, + numberedList, + maskedLink, + }); + }) + .join(codeBlock ? '\\`\\`\\`' : '```'); + } + + if (!inlineCodeContent) { + return text + .split(/(?<=^|[^`])`(?=[^`]|$)/g) + .map((subString, index, array) => { + if (index % 2 && index !== array.length - 1) return subString; + return escapeMarkdown(subString, { + codeBlock, + bold, + italic, + underline, + strikethrough, + spoiler, + escape, + heading, + bulletedList, + numberedList, + maskedLink, + }); + }) + .join(inlineCode ? '\\`' : '`'); + } + + let res = text; + if (escape) res = escapeEscape(res); + if (inlineCode) res = escapeInlineCode(res); + if (codeBlock) res = escapeCodeBlock(res); + if (italic) res = escapeItalic(res); + if (bold) res = escapeBold(res); + if (underline) res = escapeUnderline(res); + if (strikethrough) res = escapeStrikethrough(res); + if (spoiler) res = escapeSpoiler(res); + if (heading) res = escapeHeading(res); + if (bulletedList) res = escapeBulletedList(res); + if (numberedList) res = escapeNumberedList(res); + if (maskedLink) res = escapeMaskedLink(res); + return res; +} + +/** + * Escapes code block markdown in a string. + * + * @param text - Content to escape + */ +export function escapeCodeBlock(text: string): string { + return text.replaceAll('```', '\\`\\`\\`'); +} + +/** + * Escapes inline code markdown in a string. + * + * @param text - Content to escape + */ +export function escapeInlineCode(text: string): string { + return text.replaceAll(/(?<=^|[^`])``?(?=[^`]|$)/g, (match) => (match.length === 2 ? '\\`\\`' : '\\`')); +} + +/** + * Escapes italic markdown in a string. + * + * @param text - Content to escape + */ +export function escapeItalic(text: string): string { + let idx = 0; + const newText = text.replaceAll(/(?<=^|[^*])\*([^*]|\*\*|$)/g, (_, match) => { + if (match === '**') return ++idx % 2 ? `\\*${match}` : `${match}\\*`; + return `\\*${match}`; + }); + idx = 0; + return newText.replaceAll(/(?<=^|[^_])(?)([^_]|__|$)/g, (_, match) => { + if (match === '__') return ++idx % 2 ? `\\_${match}` : `${match}\\_`; + return `\\_${match}`; + }); +} + +/** + * Escapes bold markdown in a string. + * + * @param text - Content to escape + */ +export function escapeBold(text: string): string { + let idx = 0; + return text.replaceAll(/\*\*(\*)?/g, (_, match) => { + if (match) return ++idx % 2 ? `${match}\\*\\*` : `\\*\\*${match}`; + return '\\*\\*'; + }); +} + +/** + * Escapes underline markdown in a string. + * + * @param text - Content to escape + */ +export function escapeUnderline(text: string): string { + let idx = 0; + return text.replaceAll(/(?)/g, (_, match) => { + if (match) return ++idx % 2 ? `${match}\\_\\_` : `\\_\\_${match}`; + return '\\_\\_'; + }); +} + +/** + * Escapes strikethrough markdown in a string. + * + * @param text - Content to escape + */ +export function escapeStrikethrough(text: string): string { + return text.replaceAll('~~', '\\~\\~'); +} + +/** + * Escapes spoiler markdown in a string. + * + * @param text - Content to escape + */ +export function escapeSpoiler(text: string): string { + return text.replaceAll('||', '\\|\\|'); +} + +/** + * Escapes escape characters in a string. + * + * @param text - Content to escape + */ +export function escapeEscape(text: string): string { + return text.replaceAll('\\', '\\\\'); +} + +/** + * Escapes heading characters in a string. + * + * @param text - Content to escape + */ +export function escapeHeading(text: string): string { + return text.replaceAll(/^( {0,2})([*-] )?( *)(#{1,3} )/gm, '$1$2$3\\$4'); +} + +/** + * Escapes bulleted list characters in a string. + * + * @param text - Content to escape + */ +export function escapeBulletedList(text: string): string { + return text.replaceAll(/^( *)([*-])( +)/gm, '$1\\$2$3'); +} + +/** + * Escapes numbered list characters in a string. + * + * @param text - Content to escape + */ +export function escapeNumberedList(text: string): string { + return text.replaceAll(/^( *\d+)\./gm, '$1\\.'); +} + +/** + * Escapes masked link characters in a string. + * + * @param text - Content to escape + */ +export function escapeMaskedLink(text: string): string { + return text.replaceAll(/\[.+]\(.+\)/gm, '\\$&'); +} diff --git a/packages/builders/src/messages/formatters.ts b/packages/formatters/src/formatters.ts similarity index 55% rename from packages/builders/src/messages/formatters.ts rename to packages/formatters/src/formatters.ts index 2d89d2ccdb3f..1faeb0c4544a 100644 --- a/packages/builders/src/messages/formatters.ts +++ b/packages/formatters/src/formatters.ts @@ -2,26 +2,31 @@ import type { URL } from 'node:url'; import type { Snowflake } from 'discord-api-types/globals'; /** - * Wraps the content inside a codeblock with no language + * Wraps the content inside a code block with no language. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function codeBlock(content: C): `\`\`\`\n${C}\n\`\`\``; /** - * Wraps the content inside a codeblock with the specified language + * Wraps the content inside a code block with the specified language. * - * @param language - The language for the codeblock + * @typeParam L - This is inferred by the supplied language + * @typeParam C - This is inferred by the supplied content + * @param language - The language for the code block * @param content - The content to wrap */ export function codeBlock(language: L, content: C): `\`\`\`${L}\n${C}\n\`\`\``; + export function codeBlock(language: string, content?: string): string { - return typeof content === 'undefined' ? `\`\`\`\n${language}\n\`\`\`` : `\`\`\`${language}\n${content}\n\`\`\``; + return content === undefined ? `\`\`\`\n${language}\n\`\`\`` : `\`\`\`${language}\n${content}\n\`\`\``; } /** - * Wraps the content inside \`backticks\`, which formats it as inline code + * Wraps the content inside \`backticks\` which formats it as inline code. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function inlineCode(content: C): `\`${C}\`` { @@ -29,8 +34,9 @@ export function inlineCode(content: C): `\`${C}\`` { } /** - * Formats the content into italic text + * Formats the content into italic text. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function italic(content: C): `_${C}_` { @@ -38,8 +44,9 @@ export function italic(content: C): `_${C}_` { } /** - * Formats the content into bold text + * Formats the content into bold text. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function bold(content: C): `**${C}**` { @@ -47,8 +54,9 @@ export function bold(content: C): `**${C}**` { } /** - * Formats the content into underscored text + * Formats the content into underscored text. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function underscore(content: C): `__${C}__` { @@ -56,8 +64,9 @@ export function underscore(content: C): `__${C}__` { } /** - * Formats the content into strike-through text + * Formats the content into strike-through text. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function strikethrough(content: C): `~~${C}~~` { @@ -65,8 +74,10 @@ export function strikethrough(content: C): `~~${C}~~` { } /** - * Formats the content into a quote. This needs to be at the start of the line for Discord to format it + * Formats the content into a quote. * + * @remarks This needs to be at the start of the line for Discord to format it. + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function quote(content: C): `> ${C}` { @@ -74,8 +85,10 @@ export function quote(content: C): `> ${C}` { } /** - * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it + * Formats the content into a block quote. * + * @remarks This needs to be at the start of the line for Discord to format it. + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function blockQuote(content: C): `>>> ${C}` { @@ -83,41 +96,48 @@ export function blockQuote(content: C): `>>> ${C}` { } /** - * Wraps the URL into `<>`, which stops it from embedding + * Wraps the URL into `<>` which stops it from embedding. * + * @typeParam C - This is inferred by the supplied content * @param url - The URL to wrap */ export function hideLinkEmbed(url: C): `<${C}>`; /** - * Wraps the URL into `<>`, which stops it from embedding + * Wraps the URL into `<>` which stops it from embedding. * * @param url - The URL to wrap */ export function hideLinkEmbed(url: URL): `<${string}>`; + export function hideLinkEmbed(url: URL | string) { return `<${url}>`; } /** - * Formats the content and the URL into a masked URL + * Formats the content and the URL into a masked URL. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to display * @param url - The URL the content links to */ export function hyperlink(content: C, url: URL): `[${C}](${string})`; /** - * Formats the content and the URL into a masked URL + * Formats the content and the URL into a masked URL. * + * @typeParam C - This is inferred by the supplied content + * @typeParam U - This is inferred by the supplied URL * @param content - The content to display * @param url - The URL the content links to */ export function hyperlink(content: C, url: U): `[${C}](${U})`; /** - * Formats the content and the URL into a masked URL + * Formats the content and the URL into a masked URL with a custom tooltip. * + * @typeParam C - This is inferred by the supplied content + * @typeParam T - This is inferred by the supplied title * @param content - The content to display * @param url - The URL the content links to * @param title - The title shown when hovering on the masked link @@ -129,8 +149,11 @@ export function hyperlink( ): `[${C}](${string} "${T}")`; /** - * Formats the content and the URL into a masked URL + * Formats the content and the URL into a masked URL with a custom tooltip. * + * @typeParam C - This is inferred by the supplied content + * @typeParam U - This is inferred by the supplied URL + * @typeParam T - This is inferred by the supplied title * @param content - The content to display * @param url - The URL the content links to * @param title - The title shown when hovering on the masked link @@ -140,13 +163,15 @@ export function hyperlink( url: U, title: T, ): `[${C}](${U} "${T}")`; + export function hyperlink(content: string, url: URL | string, title?: string) { return title ? `[${content}](${url} "${title}")` : `[${content}](${url})`; } /** - * Wraps the content inside spoiler (hidden text) + * Formats the content into a spoiler. * + * @typeParam C - This is inferred by the supplied content * @param content - The content to wrap */ export function spoiler(content: C): `||${C}||` { @@ -154,39 +179,46 @@ export function spoiler(content: C): `||${C}||` { } /** - * Formats a user ID into a user mention + * Formats a user id into a user mention. * - * @param userId - The user ID to format + * @typeParam C - This is inferred by the supplied user id + * @param userId - The user id to format */ export function userMention(userId: C): `<@${C}>` { return `<@${userId}>`; } /** - * Formats a channel ID into a channel mention + * Formats a channel id into a channel mention. * - * @param channelId - The channel ID to format + * @typeParam C - This is inferred by the supplied channel id + * @param channelId - The channel id to format */ export function channelMention(channelId: C): `<#${C}>` { return `<#${channelId}>`; } /** - * Formats a role ID into a role mention + * Formats a role id into a role mention. * - * @param roleId - The role ID to format + * @typeParam C - This is inferred by the supplied role id + * @param roleId - The role id to format */ export function roleMention(roleId: C): `<@&${C}>` { return `<@&${roleId}>`; } /** - * Formats an application command name, subcommand group name, subcommand name, and ID into an application command mention + * Formats an application command name, subcommand group name, subcommand name, and id into an application command mention. * + * @typeParam N - This is inferred by the supplied command name + * @typeParam G - This is inferred by the supplied subcommand group name + * @typeParam S - This is inferred by the supplied subcommand name + * @typeParam I - This is inferred by the supplied command id * @param commandName - The application command name to format * @param subcommandGroupName - The subcommand group name to format * @param subcommandName - The subcommand name to format - * @param commandId - The application command ID to format + * @param commandId - The application command id to format */ export function chatInputApplicationCommandMention< N extends string, @@ -196,11 +228,14 @@ export function chatInputApplicationCommandMention< >(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): ``; /** - * Formats an application command name, subcommand name, and ID into an application command mention + * Formats an application command name, subcommand name, and id into an application command mention. * + * @typeParam N - This is inferred by the supplied command name + * @typeParam S - This is inferred by the supplied subcommand name + * @typeParam I - This is inferred by the supplied command id * @param commandName - The application command name to format * @param subcommandName - The subcommand name to format - * @param commandId - The application command ID to format + * @param commandId - The application command id to format */ export function chatInputApplicationCommandMention( commandName: N, @@ -209,24 +244,18 @@ export function chatInputApplicationCommandMention`; /** - * Formats an application command name and ID into an application command mention + * Formats an application command name and id into an application command mention. * + * @typeParam N - This is inferred by the supplied command name + * @typeParam I - This is inferred by the supplied command id * @param commandName - The application command name to format - * @param commandId - The application command ID to format + * @param commandId - The application command id to format */ export function chatInputApplicationCommandMention( commandName: N, commandId: I, ): ``; -/** - * Formats an application command name, subcommand group name, subcommand name, and ID into an application command mention - * - * @param commandName - The application command name to format - * @param subcommandGroupName - The subcommand group name to format - * @param subcommandName - The subcommand name to format - * @param commandId - The application command ID to format - */ export function chatInputApplicationCommandMention< N extends string, G extends Snowflake | string, @@ -238,11 +267,11 @@ export function chatInputApplicationCommandMention< subcommandName?: S, commandId?: I, ): `` | `` | `` { - if (typeof commandId !== 'undefined') { + if (commandId !== undefined) { return ``; } - if (typeof subcommandName !== 'undefined') { + if (subcommandName !== undefined) { return ``; } @@ -250,26 +279,31 @@ export function chatInputApplicationCommandMention< } /** - * Formats an emoji ID into a fully qualified emoji identifier + * Formats a non-animated emoji id into a fully qualified emoji identifier. * - * @param emojiId - The emoji ID to format + * @typeParam C - This is inferred by the supplied emoji id + * @param emojiId - The emoji id to format */ export function formatEmoji(emojiId: C, animated?: false): `<:_:${C}>`; /** - * Formats an emoji ID into a fully qualified emoji identifier + * Formats an animated emoji id into a fully qualified emoji identifier. * - * @param emojiId - The emoji ID to format - * @param animated - Whether the emoji is animated or not. Defaults to `false` + * @typeParam C - This is inferred by the supplied emoji id + * @param emojiId - The emoji id to format + * @param animated - Whether the emoji is animated */ export function formatEmoji(emojiId: C, animated?: true): ``; /** - * Formats an emoji ID into a fully qualified emoji identifier + * Formats an emoji id into a fully qualified emoji identifier. * - * @param emojiId - The emoji ID to format - * @param animated - Whether the emoji is animated or not. Defaults to `false` + * @typeParam C - This is inferred by the supplied emoji id + * @param emojiId - The emoji id to format + * @param animated - Whether the emoji is animated */ +export function formatEmoji(emojiId: C, animated?: boolean): `<:_:${C}>` | ``; + export function formatEmoji(emojiId: C, animated = false): `<:_:${C}>` | `` { return `<${animated ? 'a' : ''}:_:${emojiId}>`; } @@ -277,6 +311,7 @@ export function formatEmoji(emojiId: C, animated = false): /** * Formats a channel link for a direct message channel. * + * @typeParam C - This is inferred by the supplied channel id * @param channelId - The channel's id */ export function channelLink(channelId: C): `https://discord.com/channels/@me/${C}`; @@ -284,6 +319,8 @@ export function channelLink(channelId: C): `https://discord /** * Formats a channel link for a guild channel. * + * @typeParam C - This is inferred by the supplied channel id + * @typeParam G - This is inferred by the supplied guild id * @param channelId - The channel's id * @param guildId - The guild's id */ @@ -302,6 +339,8 @@ export function channelLink( /** * Formats a message link for a direct message channel. * + * @typeParam C - This is inferred by the supplied channel id + * @typeParam M - This is inferred by the supplied message id * @param channelId - The channel's id * @param messageId - The message's id */ @@ -313,6 +352,9 @@ export function messageLink( /** * Formats a message link for a guild channel. * + * @typeParam C - This is inferred by the supplied channel id + * @typeParam M - This is inferred by the supplied message id + * @typeParam G - This is inferred by the supplied guild id * @param channelId - The channel's id * @param messageId - The message's id * @param guildId - The guild's id @@ -328,38 +370,43 @@ export function messageLink`; /** - * Formats a date given a format style + * Formats a date given a format style. * + * @typeParam S - This is inferred by the supplied {@link TimestampStylesString} * @param date - The date to format * @param style - The style to use */ export function time(date: Date, style: S): ``; /** - * Formats the given timestamp into a short date-time string + * Formats the given timestamp into a short date-time string. * - * @param seconds - The time to format, represents an UNIX timestamp in seconds + * @typeParam C - This is inferred by the supplied timestamp + * @param seconds - A Unix timestamp in seconds */ export function time(seconds: C): ``; /** - * Formats the given timestamp into a short date-time string + * Formats the given timestamp into a short date-time string. * - * @param seconds - The time to format, represents an UNIX timestamp in seconds + * @typeParam C - This is inferred by the supplied timestamp + * @typeParam S - This is inferred by the supplied {@link TimestampStylesString} + * @param seconds - A Unix timestamp in seconds * @param style - The style to use */ export function time(seconds: C, style: S): ``; + export function time(timeOrSeconds?: Date | number, style?: TimestampStylesString): string { if (typeof timeOrSeconds !== 'number') { // eslint-disable-next-line no-param-reassign @@ -370,66 +417,83 @@ export function time(timeOrSeconds?: Date | number, style?: TimestampStylesStrin } /** - * The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles} supported by Discord + * The {@link https://discord.com/developers/docs/reference#message-formatting-timestamp-styles | message formatting timestamp styles} + * supported by Discord. */ export const TimestampStyles = { /** - * Short time format, consisting of hours and minutes, e.g. 16:20 + * Short time format, consisting of hours and minutes. + * + * @example `16:20` */ ShortTime: 't', /** - * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30 + * Long time format, consisting of hours, minutes, and seconds. + * + * @example `16:20:30` */ LongTime: 'T', /** - * Short date format, consisting of day, month, and year, e.g. 20/04/2021 + * Short date format, consisting of day, month, and year. + * + * @example `20/04/2021` */ ShortDate: 'd', /** - * Long date format, consisting of day, month, and year, e.g. 20 April 2021 + * Long date format, consisting of day, month, and year. + * + * @example `20 April 2021` */ LongDate: 'D', /** - * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20 + * Short date-time format, consisting of short date and short time formats. + * + * @example `20 April 2021 16:20` */ ShortDateTime: 'f', /** - * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20 + * Long date-time format, consisting of long date and short time formats. + * + * @example `Tuesday, 20 April 2021 16:20` */ LongDateTime: 'F', /** - * Relative time format, consisting of a relative duration format, e.g. 2 months ago + * Relative time format, consisting of a relative duration format. + * + * @example `2 months ago` */ RelativeTime: 'R', -} as const; +} as const satisfies Record; /** - * The possible values, see {@link TimestampStyles} for more information + * The possible {@link TimestampStyles} values. */ -export type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles]; +export type TimestampStylesString = (typeof TimestampStyles)[keyof typeof TimestampStyles]; +// prettier-ignore /** - * An enum with all the available faces from Discord's native slash commands + * All the available faces from Discord's native slash commands. */ export enum Faces { /** - * ¯\\_(ツ)\\_/¯ + * `¯\_(ツ)_/¯` */ - Shrug = '¯\\_(ツ)\\_/¯', + // eslint-disable-next-line no-useless-escape + Shrug = '¯\_(ツ)_/¯', /** - * (╯°□°)╯︵ ┻━┻ + * `(╯°□°)╯︵ ┻━┻` */ - Tableflip = '(╯°□°)╯︵ ┻━┻', + Tableflip = '(╯°□°)╯︵ ┻━┻', /** - * ┬─┬ ノ( ゜-゜ノ) + * `┬─┬ノ( º _ ºノ)` */ - Unflip = '┬─┬ ノ( ゜-゜ノ)', + Unflip = '┬─┬ノ( º _ ºノ)', } diff --git a/packages/formatters/src/index.ts b/packages/formatters/src/index.ts new file mode 100644 index 000000000000..ca131c9f6899 --- /dev/null +++ b/packages/formatters/src/index.ts @@ -0,0 +1,2 @@ +export * from './escapers.js'; +export * from './formatters.js'; diff --git a/packages/formatters/tsconfig.docs.json b/packages/formatters/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/formatters/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/formatters/tsconfig.eslint.json b/packages/formatters/tsconfig.eslint.json new file mode 100644 index 000000000000..d04d4be3aedc --- /dev/null +++ b/packages/formatters/tsconfig.eslint.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "**/*.js", + "**/*.mjs", + "**/*.jsx", + "**/*.test.ts", + "**/*.test.js", + "**/*.test.mjs", + "**/*.spec.ts", + "**/*.spec.js", + "**/*.spec.mjs" + ], + "exclude": [] +} diff --git a/packages/formatters/tsconfig.json b/packages/formatters/tsconfig.json new file mode 100644 index 000000000000..fd8b5e417b9f --- /dev/null +++ b/packages/formatters/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*.ts"] +} diff --git a/packages/scripts/src/template/default/tsup.config.js b/packages/formatters/tsup.config.ts similarity index 100% rename from packages/scripts/src/template/default/tsup.config.js rename to packages/formatters/tsup.config.ts diff --git a/packages/next/.cliff-jumperrc.json b/packages/next/.cliff-jumperrc.json new file mode 100644 index 000000000000..bd921ffebffc --- /dev/null +++ b/packages/next/.cliff-jumperrc.json @@ -0,0 +1,5 @@ +{ + "name": "next", + "org": "discordjs", + "packagePath": "packages/next" +} diff --git a/packages/next/.eslintrc.json b/packages/next/.eslintrc.json new file mode 100644 index 000000000000..99ef7cec8051 --- /dev/null +++ b/packages/next/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../../.eslintrc.json" +} diff --git a/packages/next/.gitignore b/packages/next/.gitignore new file mode 100644 index 000000000000..90500960f32b --- /dev/null +++ b/packages/next/.gitignore @@ -0,0 +1,28 @@ +# Packages +node_modules + +# Log files +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Env +.env + +# Dist +dist +dist-docs + +# Docs +docs/**/* +!docs/README.md + +# Miscellaneous +.turbo +.tmp +coverage diff --git a/packages/next/.lintstagedrc.js b/packages/next/.lintstagedrc.js new file mode 100644 index 000000000000..dc17706a55ac --- /dev/null +++ b/packages/next/.lintstagedrc.js @@ -0,0 +1 @@ +module.exports = require('../../.lintstagedrc.json'); diff --git a/packages/next/.prettierignore b/packages/next/.prettierignore new file mode 100644 index 000000000000..fc03103c7b8c --- /dev/null +++ b/packages/next/.prettierignore @@ -0,0 +1,6 @@ +.turbo +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/next/.prettierrc.js b/packages/next/.prettierrc.js new file mode 100644 index 000000000000..f004026c7647 --- /dev/null +++ b/packages/next/.prettierrc.js @@ -0,0 +1 @@ +module.exports = require('../../.prettierrc.json'); diff --git a/packages/next/LICENSE b/packages/next/LICENSE new file mode 100644 index 000000000000..e633a147b210 --- /dev/null +++ b/packages/next/LICENSE @@ -0,0 +1,188 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/next/README.md b/packages/next/README.md new file mode 100644 index 000000000000..dd1fa4f3cfa4 --- /dev/null +++ b/packages/next/README.md @@ -0,0 +1,59 @@ +
+
+

+ discord.js +

+
+

+ Discord server + Build status +

+

+ Vercel + Cloudflare Workers +

+
+ +## Installation + +**Node.js 18.13.0 or newer is required.** + +```sh +npm install @discordjs/next +yarn add @discordjs/next +pnpm add @discordjs/next +``` + +## Links + +- [Website][website] ([source][website-source]) +- [Guide][guide] ([source][guide-source]) + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. +- [discord.js Discord server][discord] +- [Discord API Discord server][discord-api] +- [GitHub][source] +- [npm][npm] +- [Related libraries][related-libs] + +## Contributing + +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. +See [the contribution guide][contributing] if you'd like to submit a PR. + +## Help + +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. + +[website]: https://discord.js.org +[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website +[documentation]: https://discord.js.org/docs/packages/next/stable +[guide]: https://discordjs.guide/ +[guide-source]: https://github.com/discordjs/guide +[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html +[discord]: https://discord.gg/djs +[discord-api]: https://discord.gg/discord-api +[source]: https://github.com/discordjs/discord.js/tree/main/packages/next +[npm]: https://www.npmjs.com/package/@discordjs/next +[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries +[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md diff --git a/packages/next/__tests__/fake.test.ts b/packages/next/__tests__/fake.test.ts new file mode 100644 index 000000000000..19b44a8d5c13 --- /dev/null +++ b/packages/next/__tests__/fake.test.ts @@ -0,0 +1,5 @@ +import { describe, test, expect } from 'vitest'; + +describe('@discordjs/next', () => { + test.todo('Should totally write tests'); +}); diff --git a/packages/next/api-extractor-docs.json b/packages/next/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/next/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/next/api-extractor.json b/packages/next/api-extractor.json new file mode 100644 index 000000000000..29f304a77e29 --- /dev/null +++ b/packages/next/api-extractor.json @@ -0,0 +1,6 @@ +{ + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/next" + } +} diff --git a/packages/next/cliff.toml b/packages/next/cliff.toml new file mode 100644 index 000000000000..e6b5b5298f92 --- /dev/null +++ b/packages/next/cliff.toml @@ -0,0 +1,63 @@ +[changelog] +header = """ +# Changelog + +All notable changes to this project will be documented in this file.\n +""" +body = """ +{% if version %}\ + # [{{ version | trim_start_matches(pat="v") }}]\ + {% if previous %}\ + {% if previous.version %}\ + (https://github.com/discordjs/discord.js/compare/{{ previous.version }}...{{ version }})\ + {% else %}\ + (https://github.com/discordjs/discord.js/tree/{{ version }})\ + {% endif %}\ + {% endif %} \ + - ({{ timestamp | date(format="%Y-%m-%d") }}) +{% else %}\ + # [unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ## {{ group | upper_first }} + {% for commit in commits %} + - {% if commit.scope %}\ + **{{commit.scope}}:** \ + {% endif %}\ + {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/discordjs/discord.js/commit/{{ commit.id }}))\ + {% if commit.breaking %}\ + {% for breakingChange in commit.footers %}\ + \n{% raw %} {% endraw %}- **{{ breakingChange.token }}{{ breakingChange.separator }}** {{ breakingChange.value }}\ + {% endfor %}\ + {% endif %}\ + {% endfor %} +{% endfor %}\n +""" +trim = true +footer = "" + +[git] +conventional_commits = true +filter_unconventional = true +commit_parsers = [ + { message = "^feat", group = "Features"}, + { message = "^fix", group = "Bug Fixes"}, + { message = "^docs", group = "Documentation"}, + { message = "^perf", group = "Performance"}, + { message = "^refactor", group = "Refactor"}, + { message = "^typings", group = "Typings"}, + { message = "^types", group = "Typings"}, + { message = ".*deprecated", body = ".*deprecated", group = "Deprecation"}, + { message = "^revert", skip = true}, + { message = "^style", group = "Styling"}, + { message = "^test", group = "Testing"}, + { message = "^chore", skip = true}, + { message = "^ci", skip = true}, + { message = "^build", skip = true}, + { body = ".*security", group = "Security"}, +] +filter_commits = true +tag_pattern = "@discordjs/next@[0-9]*" +ignore_tags = "" +topo_order = true +sort_commits = "newest" diff --git a/packages/next/docs/README.md b/packages/next/docs/README.md new file mode 100644 index 000000000000..c815ed0b6e6b --- /dev/null +++ b/packages/next/docs/README.md @@ -0,0 +1 @@ +## [View the documentation here.](https://discord.js.org/docs/packages/next/main) diff --git a/packages/next/package.json b/packages/next/package.json new file mode 100644 index 000000000000..2f5365cafd19 --- /dev/null +++ b/packages/next/package.json @@ -0,0 +1,87 @@ +{ + "name": "@discordjs/next", + "version": "0.1.0", + "description": "A powerful TypeScript library for interacting with the Discord API", + "scripts": { + "test": "vitest run", + "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", + "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", + "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", + "prepack": "yarn build && yarn lint", + "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/next/*'", + "release": "cliff-jumper" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "typings": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./*": { + "types": "./dist/exports/*.d.ts", + "import": "./dist/exports/*.mjs", + "require": "./dist/exports/*.js" + } + }, + "directories": { + "lib": "src", + "test": "__tests__" + }, + "files": [ + "dist" + ], + "contributors": [ + "Crawl ", + "SpaceEEC ", + "Vlad Frangu ", + "Aura Román " + ], + "license": "Apache-2.0", + "keywords": [], + "repository": { + "type": "git", + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/next" + }, + "bugs": { + "url": "https://github.com/discordjs/discord.js/issues" + }, + "homepage": "https://discord.js.org", + "dependencies": { + "@discordjs/builders": "workspace:^", + "@discordjs/collection": "workspace:^", + "@discordjs/core": "workspace:^", + "@discordjs/formatters": "workspace:^", + "@discordjs/rest": "workspace:^", + "@discordjs/util": "workspace:^", + "@discordjs/ws": "workspace:^", + "discord-api-types": "^0.37.42" + }, + "devDependencies": { + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "18.16.14", + "@vitest/coverage-c8": "^0.31.1", + "cross-env": "^7.0.3", + "esbuild-plugin-version-injector": "^1.1.0", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" + }, + "engines": { + "node": ">=18.13.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/next/src/exports/builders.ts b/packages/next/src/exports/builders.ts new file mode 100644 index 000000000000..091ccf3fbb0d --- /dev/null +++ b/packages/next/src/exports/builders.ts @@ -0,0 +1 @@ +export * from '@discordjs/builders'; diff --git a/packages/next/src/exports/collection.ts b/packages/next/src/exports/collection.ts new file mode 100644 index 000000000000..4bd4c637c477 --- /dev/null +++ b/packages/next/src/exports/collection.ts @@ -0,0 +1 @@ +export * from '@discordjs/collection'; diff --git a/packages/next/src/exports/core.ts b/packages/next/src/exports/core.ts new file mode 100644 index 000000000000..b0a7573a5728 --- /dev/null +++ b/packages/next/src/exports/core.ts @@ -0,0 +1 @@ +export * from '@discordjs/core'; diff --git a/packages/next/src/exports/discord-api-types.ts b/packages/next/src/exports/discord-api-types.ts new file mode 100644 index 000000000000..86ea8c302564 --- /dev/null +++ b/packages/next/src/exports/discord-api-types.ts @@ -0,0 +1 @@ +export * from 'discord-api-types/v10'; diff --git a/packages/next/src/exports/formatters.ts b/packages/next/src/exports/formatters.ts new file mode 100644 index 000000000000..34e6a6b51b91 --- /dev/null +++ b/packages/next/src/exports/formatters.ts @@ -0,0 +1 @@ +export * from '@discordjs/formatters'; diff --git a/packages/next/src/exports/rest.ts b/packages/next/src/exports/rest.ts new file mode 100644 index 000000000000..303d3773872d --- /dev/null +++ b/packages/next/src/exports/rest.ts @@ -0,0 +1 @@ +export * from '@discordjs/rest'; diff --git a/packages/next/src/exports/util.ts b/packages/next/src/exports/util.ts new file mode 100644 index 000000000000..b19367fb3f78 --- /dev/null +++ b/packages/next/src/exports/util.ts @@ -0,0 +1 @@ +export * from '@discordjs/util'; diff --git a/packages/next/src/exports/ws.ts b/packages/next/src/exports/ws.ts new file mode 100644 index 000000000000..2e9c971827d1 --- /dev/null +++ b/packages/next/src/exports/ws.ts @@ -0,0 +1 @@ +export * from '@discordjs/ws'; diff --git a/packages/next/src/index.ts b/packages/next/src/index.ts new file mode 100644 index 000000000000..92ace86ea505 --- /dev/null +++ b/packages/next/src/index.ts @@ -0,0 +1,6 @@ +/** + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/next/#readme | @discordjs/next} version + * that you are currently using. + */ +// This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/next/tsconfig.docs.json b/packages/next/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/next/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/next/tsconfig.eslint.json b/packages/next/tsconfig.eslint.json new file mode 100644 index 000000000000..d04d4be3aedc --- /dev/null +++ b/packages/next/tsconfig.eslint.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true + }, + "include": [ + "**/*.ts", + "**/*.tsx", + "**/*.js", + "**/*.mjs", + "**/*.jsx", + "**/*.test.ts", + "**/*.test.js", + "**/*.test.mjs", + "**/*.spec.ts", + "**/*.spec.js", + "**/*.spec.mjs" + ], + "exclude": [] +} diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json new file mode 100644 index 000000000000..fd8b5e417b9f --- /dev/null +++ b/packages/next/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*.ts"] +} diff --git a/packages/voice/tsup.config.js b/packages/next/tsup.config.ts similarity index 83% rename from packages/voice/tsup.config.js rename to packages/next/tsup.config.ts index afd45736d47b..0910377a793a 100644 --- a/packages/voice/tsup.config.js +++ b/packages/next/tsup.config.ts @@ -2,5 +2,6 @@ import { esbuildPluginVersionInjector } from 'esbuild-plugin-version-injector'; import { createTsupConfig } from '../../tsup.config.js'; export default createTsupConfig({ + entry: ['src/index.ts', 'src/exports/*.ts'], esbuildPlugins: [esbuildPluginVersionInjector()], }); diff --git a/packages/proxy-container/.gitignore b/packages/proxy-container/.gitignore index b5e30aac1365..538c22f97306 100644 --- a/packages/proxy-container/.gitignore +++ b/packages/proxy-container/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,18 +15,8 @@ pids .env # Dist -dist/ -typings/ -docs/**/* -!docs/index.yml -!docs/README.md +dist # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo .turbo - -# Yarn files -.yarn/install-state.gz -.yarn/build-state.yml +.tmp diff --git a/packages/proxy-container/.prettierignore b/packages/proxy-container/.prettierignore index 553e0ea6c783..eea99aa9b684 100644 --- a/packages/proxy-container/.prettierignore +++ b/packages/proxy-container/.prettierignore @@ -1,8 +1,2 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ +dist diff --git a/packages/proxy-container/Dockerfile b/packages/proxy-container/Dockerfile index f5bb0f048651..419d00c49d05 100644 --- a/packages/proxy-container/Dockerfile +++ b/packages/proxy-container/Dockerfile @@ -1,18 +1,26 @@ -FROM node:16-alpine +FROM node:18-alpine AS builder + +RUN apk update +RUN apk add --no-cache libc6-compat WORKDIR /usr/proxy -# First copy over dependencies separate from src for better caching -COPY package.json yarn.lock tsconfig.json .yarnrc.yml tsup.config.js ./ -COPY .yarn ./.yarn -COPY ./packages/proxy-container/package.json ./packages/proxy-container/ +COPY manifests . + +RUN npm install --global is-ci husky + +RUN yarn install --immutable --inline-builds +RUN rm -rf .yarn/cache -WORKDIR /usr/proxy/packages/proxy-container +FROM node:18-alpine AS runner + +WORKDIR /usr/proxy -RUN yarn workspaces focus +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 proxy +USER proxy -# Next up, copy over our src and build it, then prune deps for prod -COPY ./packages/proxy-container ./ -RUN yarn build && yarn workspaces focus --production +COPY --from=builder /usr/proxy . +COPY packs . -CMD ["node", "--enable-source-maps", "./dist/index.js"] +CMD ["node", "--enable-source-maps", "dist/index.js"] diff --git a/packages/proxy-container/README.md b/packages/proxy-container/README.md index 825f04228969..6821bb725c49 100644 --- a/packages/proxy-container/README.md +++ b/packages/proxy-container/README.md @@ -12,6 +12,7 @@

Vercel + Cloudflare Workers

@@ -23,7 +24,7 @@ Quickly spin up an instance: -`docker run -d --restart unless-stopped --name proxy -p 127.0.0.1:8080:8080 -e DISCORD_TOKEN=abc discordjs/proxy` +`docker run -d --restart unless-stopped --name proxy -p 127.0.0.1:8080:8080 discordjs/proxy` Use it: @@ -48,12 +49,15 @@ const rest = new REST({ }); ``` +**Do note that you should not use the same proxy with multiple bots. We cannot guarantee you won't hit rate limits. +Webhooks with tokens or other requests that don't include the Authorization header are okay, though!** + ## Links - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -61,16 +65,16 @@ const rest = new REST({ ## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/ [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/proxy-container/package.json b/packages/proxy-container/package.json index 762696582c3f..1ae75104fbfc 100644 --- a/packages/proxy-container/package.json +++ b/packages/proxy-container/package.json @@ -7,10 +7,10 @@ "lint": "prettier --check . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "prepack": "yarn lint && yarn test && yarn build" + "prepack": "yarn lint && yarn build" }, "type": "module", - "module": "./dist/index.js", + "main": "./dist/index.js", "directories": { "lib": "src" }, @@ -36,26 +36,28 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/proxy-container" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { - "@discordjs/proxy": "^1.2.0", - "@discordjs/rest": "^1.3.0", - "tslib": "^2.4.0" + "@discordjs/proxy": "workspace:^", + "@discordjs/rest": "workspace:^", + "tslib": "^2.5.2" }, "devDependencies": { - "@types/node": "16.11.68", + "@types/node": "18.16.14", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4" }, "engines": { "node": ">=16.9.0" diff --git a/packages/proxy-container/src/index.ts b/packages/proxy-container/src/index.ts index dff6f964e1a4..0af44f7f5cd1 100644 --- a/packages/proxy-container/src/index.ts +++ b/packages/proxy-container/src/index.ts @@ -3,12 +3,8 @@ import process from 'node:process'; import { proxyRequests } from '@discordjs/proxy'; import { REST } from '@discordjs/rest'; -if (!process.env.DISCORD_TOKEN) { - throw new Error('A DISCORD_TOKEN env var is required'); -} - // We want to let upstream handle retrying -const api = new REST({ rejectOnRateLimit: () => true, retries: 0 }).setToken(process.env.DISCORD_TOKEN); +const api = new REST({ rejectOnRateLimit: () => true, retries: 0 }); const server = createServer(proxyRequests(api)); const port = Number.parseInt(process.env.PORT ?? '8080', 10); diff --git a/packages/proxy-container/tsup.config.js b/packages/proxy-container/tsup.config.ts similarity index 100% rename from packages/proxy-container/tsup.config.js rename to packages/proxy-container/tsup.config.ts diff --git a/packages/proxy/.gitignore b/packages/proxy/.gitignore index 86b93e929ae6..90500960f32b 100644 --- a/packages/proxy/.gitignore +++ b/packages/proxy/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,14 @@ pids .env # Dist -dist/ -typings/ +dist +dist-docs + +# Docs docs/**/* -!docs/index.json !docs/README.md # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp +coverage diff --git a/packages/proxy/.prettierignore b/packages/proxy/.prettierignore index 8b94c7d45e03..fc03103c7b8c 100644 --- a/packages/proxy/.prettierignore +++ b/packages/proxy/.prettierignore @@ -1,8 +1,6 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/proxy/CHANGELOG.md b/packages/proxy/CHANGELOG.md index c697d90aaba3..ff6fbade1585 100644 --- a/packages/proxy/CHANGELOG.md +++ b/packages/proxy/CHANGELOG.md @@ -2,6 +2,46 @@ All notable changes to this project will be documented in this file. +# [@discordjs/proxy@1.4.1](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.4.0...@discordjs/proxy@1.4.1) - (2023-05-01) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +## Refactor + +- **proxy:** Rely on auth header instead (#9422) ([a49ed0a](https://github.com/discordjs/discord.js/commit/a49ed0a2d5934ad7af2e9cfbf7c5ccf171599591)) + +# [@discordjs/proxy@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.3.0...@discordjs/proxy@1.4.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +# [@discordjs/proxy@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.2.1...@discordjs/proxy@1.3.0) - (2023-03-12) + +## Documentation + +- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26)) + +## Features + +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) + +# [@discordjs/proxy@1.2.1](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.2.0...@discordjs/proxy@1.2.1) - (2022-11-25) + +## Bug Fixes + +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + # [@discordjs/proxy@1.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.1.0...@discordjs/proxy@1.2.0) - (2022-10-07) ## Bug Fixes diff --git a/packages/proxy/README.md b/packages/proxy/README.md index 6a43e174c92f..6058d7263fe0 100644 --- a/packages/proxy/README.md +++ b/packages/proxy/README.md @@ -13,18 +13,19 @@

Vercel + Cloudflare Workers

## About -`@discordjs/proxy` is a powerful wrapper around `@discordjs/rest` for running an HTTP proxy in front of Discord's API +`@discordjs/proxy` is a powerful wrapper around `@discordjs/rest` for running an HTTP proxy in front of Discord's API. ## Installation **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install @discordjs/proxy yarn add @discordjs/proxy pnpm add @discordjs/proxy @@ -35,7 +36,7 @@ pnpm add @discordjs/proxy - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -50,12 +51,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/proxy +[documentation]: https://discord.js.org/docs/packages/proxy/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/proxy/__tests__/proxyRequests.test.ts b/packages/proxy/__tests__/proxyRequests.test.ts index 6069fda2bdb5..23bc8f94eea6 100644 --- a/packages/proxy/__tests__/proxyRequests.test.ts +++ b/packages/proxy/__tests__/proxyRequests.test.ts @@ -2,7 +2,7 @@ import { createServer } from 'node:http'; import { REST } from '@discordjs/rest'; import supertest from 'supertest'; import { MockAgent, setGlobalDispatcher, type Interceptable } from 'undici'; -import type { MockInterceptor } from 'undici/types/mock-interceptor'; +import type { MockInterceptor } from 'undici/types/mock-interceptor.js'; import { beforeEach, afterAll, afterEach, test, expect } from 'vitest'; import { proxyRequests } from '../src/index.js'; diff --git a/packages/proxy/api-extractor-docs.json b/packages/proxy/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/proxy/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/proxy/api-extractor.json b/packages/proxy/api-extractor.json index bc73f2cc022e..3afa1ed6fb39 100644 --- a/packages/proxy/api-extractor.json +++ b/packages/proxy/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/proxy" + } } diff --git a/packages/proxy/cliff.toml b/packages/proxy/cliff.toml index f77a4ef9e1e8..1bd765ac9043 100644 --- a/packages/proxy/cliff.toml +++ b/packages/proxy/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/proxy@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/proxy/docs/README.md b/packages/proxy/docs/README.md index 22582e3d083f..428efdf70744 100644 --- a/packages/proxy/docs/README.md +++ b/packages/proxy/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/proxy) +## [View the documentation here.](https://discord.js.org/docs/packages/proxy/main) diff --git a/packages/proxy/docs/index.json b/packages/proxy/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/proxy/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/proxy/package.json b/packages/proxy/package.json index d2e0b1ced365..9b60f369797e 100644 --- a/packages/proxy/package.json +++ b/packages/proxy/package.json @@ -1,14 +1,15 @@ { "name": "@discordjs/proxy", - "version": "1.2.0", + "version": "1.4.1", "description": "Tools for running an HTTP proxy for Discord's API", "scripts": { "test": "vitest run", "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn lint && yarn test && yarn build", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/proxy/*'", "release": "cliff-jumper" @@ -17,9 +18,9 @@ "module": "./dist/index.mjs", "typings": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src", @@ -47,33 +48,35 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/proxy" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { - "@discordjs/rest": "^1.0.0", + "@discordjs/rest": "workspace:^", "@discordjs/util": "workspace:^", - "tslib": "^2.4.0", - "undici": "^5.11.0" + "tslib": "^2.5.2", + "undici": "^5.22.1" }, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/node": "16.11.68", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "18.16.14", "@types/supertest": "^2.0.12", - "@vitest/coverage-c8": "^0.24.3", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "supertest": "^6.3.0", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "supertest": "^6.3.3", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/proxy/src/handlers/proxyRequests.ts b/packages/proxy/src/handlers/proxyRequests.ts index 5f4704efb96a..c243982ad0ae 100644 --- a/packages/proxy/src/handlers/proxyRequests.ts +++ b/packages/proxy/src/handlers/proxyRequests.ts @@ -1,19 +1,7 @@ import { URL } from 'node:url'; -import { - DiscordAPIError, - HTTPError, - RateLimitError, - type RequestMethod, - type REST, - type RouteLike, -} from '@discordjs/rest'; -import { - populateAbortErrorResponse, - populateGeneralErrorResponse, - populateSuccessfulResponse, - populateRatelimitErrorResponse, -} from '../util/responseHelpers.js'; -import type { RequestHandler } from '../util/util'; +import type { RequestMethod, REST, RouteLike } from '@discordjs/rest'; +import { populateSuccessfulResponse, populateErrorResponse } from '../util/responseHelpers.js'; +import type { RequestHandler } from '../util/util.js'; /** * Creates an HTTP handler used to forward requests to Discord @@ -36,29 +24,33 @@ export function proxyRequests(rest: REST): RequestHandler { // eslint-disable-next-line unicorn/no-unsafe-regex, prefer-named-capture-group const fullRoute = parsedUrl.pathname.replace(/^\/api(\/v\d+)?/, '') as RouteLike; + const headers: Record = { + 'Content-Type': req.headers['content-type']!, + }; + + if (req.headers.authorization) { + headers.authorization = req.headers.authorization; + } + try { const discordResponse = await rest.raw({ body: req, fullRoute, // This type cast is technically incorrect, but we want Discord to throw Method Not Allowed for us method: method as RequestMethod, + // We forward the auth header anyway + auth: false, passThroughBody: true, query: parsedUrl.searchParams, - headers: { - 'Content-Type': req.headers['content-type']!, - }, + headers, }); await populateSuccessfulResponse(res, discordResponse); } catch (error) { - if (error instanceof DiscordAPIError || error instanceof HTTPError) { - populateGeneralErrorResponse(res, error); - } else if (error instanceof RateLimitError) { - populateRatelimitErrorResponse(res, error); - } else if (error instanceof Error && error.name === 'AbortError') { - populateAbortErrorResponse(res); - } else { - // Unclear if there's better course of action here for unknown erorrs. Any web framework allows to pass in an error handler for something like this + const knownError = populateErrorResponse(res, error); + if (!knownError) { + // Unclear if there's better course of action here for unknown errors. + // Any web framework allows to pass in an error handler for something like this // at which point the user could dictate what to do with the error - otherwise we could just 500 throw error; } diff --git a/packages/proxy/src/util/responseHelpers.ts b/packages/proxy/src/util/responseHelpers.ts index 7127ab633426..0c036aac85e1 100644 --- a/packages/proxy/src/util/responseHelpers.ts +++ b/packages/proxy/src/util/responseHelpers.ts @@ -1,7 +1,7 @@ import type { ServerResponse } from 'node:http'; +import { Readable } from 'node:stream'; import { pipeline } from 'node:stream/promises'; -import type { DiscordAPIError, HTTPError, RateLimitError } from '@discordjs/rest'; -import type { Dispatcher } from 'undici'; +import { DiscordAPIError, HTTPError, RateLimitError, type ResponseLike } from '@discordjs/rest'; /** * Populates a server response with the data from a Discord 2xx REST response @@ -9,19 +9,21 @@ import type { Dispatcher } from 'undici'; * @param res - The server response to populate * @param data - The data to populate the response with */ -export async function populateSuccessfulResponse(res: ServerResponse, data: Dispatcher.ResponseData): Promise { - res.statusCode = data.statusCode; +export async function populateSuccessfulResponse(res: ServerResponse, data: ResponseLike): Promise { + res.statusCode = data.status; - for (const header of Object.keys(data.headers)) { + for (const [header, value] of data.headers) { // Strip ratelimit headers - if (header.startsWith('x-ratelimit')) { + if (/^x-ratelimit/i.test(header)) { continue; } - res.setHeader(header, data.headers[header]!); + res.setHeader(header, value); } - await pipeline(data.body, res); + if (data.body) { + await pipeline(data.body instanceof Readable ? data.body : Readable.fromWeb(data.body), res); + } } /** @@ -59,3 +61,24 @@ export function populateAbortErrorResponse(res: ServerResponse): void { res.statusCode = 504; res.statusMessage = 'Upstream timed out'; } + +/** + * Tries to populate a server response from an error object + * + * @param res - The server response to populate + * @param error - The error to check and use + * @returns - True if the error is known and the response object was populated, otherwise false + */ +export function populateErrorResponse(res: ServerResponse, error: unknown): boolean { + if (error instanceof DiscordAPIError || error instanceof HTTPError) { + populateGeneralErrorResponse(res, error); + } else if (error instanceof RateLimitError) { + populateRatelimitErrorResponse(res, error); + } else if (error instanceof Error && error.name === 'AbortError') { + populateAbortErrorResponse(res); + } else { + return false; + } + + return true; +} diff --git a/packages/proxy/tsconfig.docs.json b/packages/proxy/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/proxy/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/proxy/tsup.config.js b/packages/proxy/tsup.config.ts similarity index 100% rename from packages/proxy/tsup.config.js rename to packages/proxy/tsup.config.ts diff --git a/packages/rest/.gitignore b/packages/rest/.gitignore index 86b93e929ae6..90500960f32b 100644 --- a/packages/rest/.gitignore +++ b/packages/rest/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,14 @@ pids .env # Dist -dist/ -typings/ +dist +dist-docs + +# Docs docs/**/* -!docs/index.json !docs/README.md # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp +coverage diff --git a/packages/rest/.prettierignore b/packages/rest/.prettierignore index 8b94c7d45e03..fc03103c7b8c 100644 --- a/packages/rest/.prettierignore +++ b/packages/rest/.prettierignore @@ -1,8 +1,6 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/rest/CHANGELOG.md b/packages/rest/CHANGELOG.md index ad9627c72818..deabd9bd9b32 100644 --- a/packages/rest/CHANGELOG.md +++ b/packages/rest/CHANGELOG.md @@ -2,6 +2,73 @@ All notable changes to this project will be documented in this file. +# [@discordjs/rest@1.7.1](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.0...@discordjs/rest@1.7.1) - (2023-05-01) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef)) +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +# [@discordjs/rest@1.7.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.6.0...@discordjs/rest@1.7.0) - (2023-04-01) + +## Bug Fixes + +- **handlers:** Create burst handler for interaction callbacks (#8996) ([db8df10](https://github.com/discordjs/discord.js/commit/db8df104c5e70a12f35b54e5f3f7c897068dde6f)) +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) +- **rest:** Remove `const enum`s in favour of regular enums (#9243) ([229ad07](https://github.com/discordjs/discord.js/commit/229ad077ff52d8706d68ed4d31983619a32eba45)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +# [@discordjs/rest@1.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.5.0...@discordjs/rest@1.6.0) - (2023-03-12) + +## Bug Fixes + +- **snowflake:** Snowflakes length (#9144) ([955e8fe](https://github.com/discordjs/discord.js/commit/955e8fe312c42ad4937cc1994d1d81e517c413c8)) +- **RequestManager:** Inference of image/apng (#9014) ([ecb4281](https://github.com/discordjs/discord.js/commit/ecb4281d1e2d9a0a427605f75352cbf74ffb2d7c)) + +## Documentation + +- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26)) +- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28)) + +## Features + +- **Sticker:** Add support for gif stickers (#9038) ([6a9875d](https://github.com/discordjs/discord.js/commit/6a9875da054a875a4711394547d47439bbe66fb6)) +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +# [@discordjs/rest@1.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.4.0...@discordjs/rest@1.5.0) - (2022-12-16) + +## Features + +- **core:** Add support for role connections (#8930) ([3d6fa24](https://github.com/discordjs/discord.js/commit/3d6fa248c07b2278504bbe8bafa17a3294971fd9)) + +# [@discordjs/rest@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.3.0...@discordjs/rest@1.4.0) - (2022-11-28) + +## Bug Fixes + +- **SequentialHandler:** Downlevel ECONNRESET errors (#8785) ([5a70057](https://github.com/discordjs/discord.js/commit/5a70057826b47fb8251f3d836a536de689444ca1)) +- Make ratelimit timeout require event loop to be active (#8779) ([68d5712](https://github.com/discordjs/discord.js/commit/68d5712deae85532604d93b4505f0953d664cde7)) +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Features + +- Add `@discordjs/core` (#8736) ([2127b32](https://github.com/discordjs/discord.js/commit/2127b32d26dedeb44ec43d16ec2e2046919f9bb0)) +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) + +## Refactor + +- Update `makeURLSearchParams` to accept readonly non-`Record`s (#8868) ([8376e2d](https://github.com/discordjs/discord.js/commit/8376e2dbcd38697ce62615d9a539fd198fbc4713)) + # [@discordjs/rest@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.2.0...@discordjs/rest@1.3.0) - (2022-10-08) ## Bug Fixes diff --git a/packages/rest/README.md b/packages/rest/README.md index d36725a314af..0fc87632729b 100644 --- a/packages/rest/README.md +++ b/packages/rest/README.md @@ -13,14 +13,21 @@

Vercel + Cloudflare Workers

+## About + +`@discordjs/rest` is a module that allows you to easily make REST requests to the Discord API. + ## Installation **Node.js 16.9.0 or newer is required.** -```sh-session +Note: native fetch (not recommended) is unavailable in this node version, either use a newer node version or use the more performant `undiciRequest` strategy (default) + +```sh npm install @discordjs/rest yarn add @discordjs/rest pnpm add @discordjs/rest @@ -30,7 +37,7 @@ pnpm add @discordjs/rest Install all required dependencies: -```sh-session +```sh npm install @discordjs/rest discord-api-types yarn add @discordjs/rest discord-api-types pnpm add @discordjs/rest discord-api-types @@ -75,12 +82,31 @@ try { } ``` +Send a basic message in an edge environment: + +```js +import { REST } from '@discordjs/rest'; +import { Routes } from 'discord-api-types/v10'; + +const rest = new REST({ version: '10', makeRequest: fetch }).setToken(TOKEN); + +try { + await rest.post(Routes.channelMessages(CHANNEL_ID), { + body: { + content: 'A message via REST from the edge!', + }, + }); +} catch (error) { + console.error(error); +} +``` + ## Links - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -95,12 +121,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/rest +[documentation]: https://discord.js.org/docs/packages/rest/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/rest/__tests__/BurstHandler.test.ts b/packages/rest/__tests__/BurstHandler.test.ts new file mode 100644 index 000000000000..f052bc038600 --- /dev/null +++ b/packages/rest/__tests__/BurstHandler.test.ts @@ -0,0 +1,140 @@ +/* eslint-disable id-length */ +/* eslint-disable promise/prefer-await-to-then */ +import { performance } from 'node:perf_hooks'; +import { MockAgent, setGlobalDispatcher } from 'undici'; +import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor'; +import { beforeEach, afterEach, test, expect } from 'vitest'; +import { DiscordAPIError, REST, BurstHandlerMajorIdKey } from '../src/index.js'; +import { BurstHandler } from '../src/lib/handlers/BurstHandler.js'; +import { genPath } from './util.js'; + +const callbackKey = `Global(POST:/interactions/:id/:token/callback):${BurstHandlerMajorIdKey}`; +const callbackPath = new RegExp(genPath('/interactions/[0-9]{17,19}/.+/callback')); + +const api = new REST(); + +let mockAgent: MockAgent; +let mockPool: Interceptable; + +beforeEach(() => { + mockAgent = new MockAgent(); + mockAgent.disableNetConnect(); + setGlobalDispatcher(mockAgent); + + mockPool = mockAgent.get('https://discord.com'); + api.setAgent(mockAgent); +}); + +afterEach(async () => { + await mockAgent.close(); +}); + +// @discordjs/rest uses the `content-type` header to detect whether to parse +// the response as JSON or as an ArrayBuffer. +const responseOptions: MockInterceptor.MockResponseOptions = { + headers: { + 'content-type': 'application/json', + }, +}; + +test('Interaction callback creates burst handler', async () => { + mockPool.intercept({ path: callbackPath, method: 'POST' }).reply(200); + + expect(api.requestManager.handlers.get(callbackKey)).toBe(undefined); + expect( + await api.post('/interactions/1234567890123456789/totallyarealtoken/callback', { + auth: false, + body: { type: 4, data: { content: 'Reply' } }, + }), + // TODO: This should be ArrayBuffer, there is a bug in undici request + ).toBeInstanceOf(Uint8Array); + expect(api.requestManager.handlers.get(callbackKey)).toBeInstanceOf(BurstHandler); +}); + +test('Requests are handled in bursts', async () => { + mockPool.intercept({ path: callbackPath, method: 'POST' }).reply(200).delay(100).times(3); + + // Return the current time on these results as their response does not indicate anything + const [a, b, c] = await Promise.all([ + api + .post('/interactions/1234567890123456789/totallyarealtoken/callback', { + auth: false, + body: { type: 4, data: { content: 'Reply1' } }, + }) + .then(() => performance.now()), + api + .post('/interactions/2345678901234567890/anotherveryrealtoken/callback', { + auth: false, + body: { type: 4, data: { content: 'Reply2' } }, + }) + .then(() => performance.now()), + api + .post('/interactions/3456789012345678901/nowaytheresanotherone/callback', { + auth: false, + body: { type: 4, data: { content: 'Reply3' } }, + }) + .then(() => performance.now()), + ]); + + expect(b - a).toBeLessThan(10); + expect(c - a).toBeLessThan(10); +}); + +test('Handle 404', async () => { + mockPool + .intercept({ path: callbackPath, method: 'POST' }) + .reply(404, { message: 'Unknown interaction', code: 10_062 }, responseOptions); + + const promise = api.post('/interactions/1234567890123456788/definitelynotarealinteraction/callback', { + auth: false, + body: { type: 4, data: { content: 'Malicious' } }, + }); + await expect(promise).rejects.toThrowError('Unknown interaction'); + await expect(promise).rejects.toBeInstanceOf(DiscordAPIError); +}); + +let unexpected429 = true; +test('Handle unexpected 429', async () => { + mockPool + .intercept({ + path: callbackPath, + method: 'POST', + }) + .reply(() => { + if (unexpected429) { + unexpected429 = false; + return { + statusCode: 429, + data: '', + responseOptions: { + headers: { + 'retry-after': '1', + via: '1.1 google', + }, + }, + }; + } + + return { + statusCode: 200, + data: { test: true }, + responseOptions, + }; + }) + .times(2); + + const previous = performance.now(); + let firstResolvedTime: number; + const unexpectedLimit = api + .post('/interactions/1234567890123456789/totallyarealtoken/callback', { + auth: false, + body: { type: 4, data: { content: 'Reply' } }, + }) + .then((res) => { + firstResolvedTime = performance.now(); + return res; + }); + + expect(await unexpectedLimit).toStrictEqual({ test: true }); + expect(performance.now()).toBeGreaterThanOrEqual(previous + 1_000); +}); diff --git a/packages/rest/__tests__/REST.test.ts b/packages/rest/__tests__/REST.test.ts index ee9c854a137b..521d3cd21557 100644 --- a/packages/rest/__tests__/REST.test.ts +++ b/packages/rest/__tests__/REST.test.ts @@ -1,19 +1,25 @@ -import { Buffer } from 'node:buffer'; +import { Buffer, File as NativeFile } from 'node:buffer'; import { URLSearchParams } from 'node:url'; import { DiscordSnowflake } from '@sapphire/snowflake'; import type { Snowflake } from 'discord-api-types/v10'; import { Routes } from 'discord-api-types/v10'; -import type { FormData } from 'undici'; -import { File, MockAgent, setGlobalDispatcher } from 'undici'; -import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor'; -import { beforeEach, afterEach, test, expect } from 'vitest'; +import { type FormData, fetch } from 'undici'; +import { File as UndiciFile, MockAgent, setGlobalDispatcher } from 'undici'; +import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor.js'; +import { beforeEach, afterEach, test, expect, vitest } from 'vitest'; import { REST } from '../src/index.js'; import { genPath } from './util.js'; +const File = NativeFile ?? UndiciFile; + const newSnowflake: Snowflake = DiscordSnowflake.generate().toString(); const api = new REST().setToken('A-Very-Fake-Token'); +const makeRequestMock = vitest.fn(fetch); + +const fetchApi = new REST({ makeRequest: makeRequestMock }).setToken('A-Very-Fake-Token'); + // @discordjs/rest uses the `content-type` header to detect whether to parse // the response as JSON or as an ArrayBuffer. const responseOptions: MockInterceptor.MockResponseOptions = { @@ -112,6 +118,22 @@ test('simple POST', async () => { expect(await api.post('/simplePost')).toStrictEqual({ test: true }); }); +test('simple POST with fetch', async () => { + mockPool + .intercept({ + path: genPath('/fetchSimplePost'), + method: 'POST', + }) + .reply(() => ({ + data: { test: true }, + statusCode: 200, + responseOptions, + })); + + expect(await fetchApi.post('/fetchSimplePost')).toStrictEqual({ test: true }); + expect(makeRequestMock).toHaveBeenCalledTimes(1); +}); + test('simple PUT 2', async () => { mockPool .intercept({ @@ -157,11 +179,11 @@ test('getAuth', async () => { path: genPath('/getAuth'), method: 'GET', }) - .reply((from) => ({ - data: { auth: (from.headers as unknown as Record).Authorization ?? null }, - statusCode: 200, + .reply( + 200, + (from) => ({ auth: (from.headers as unknown as Record).Authorization ?? null }), responseOptions, - })) + ) .times(3); // default @@ -188,11 +210,13 @@ test('getReason', async () => { path: genPath('/getReason'), method: 'GET', }) - .reply((from) => ({ - data: { reason: (from.headers as unknown as Record)['X-Audit-Log-Reason'] ?? null }, - statusCode: 200, + .reply( + 200, + (from) => ({ + reason: (from.headers as unknown as Record)['X-Audit-Log-Reason'] ?? null, + }), responseOptions, - })) + ) .times(3); // default diff --git a/packages/rest/__tests__/RequestHandler.test.ts b/packages/rest/__tests__/RequestHandler.test.ts index d9c5746a5d5c..eb0cc06977e5 100644 --- a/packages/rest/__tests__/RequestHandler.test.ts +++ b/packages/rest/__tests__/RequestHandler.test.ts @@ -1,9 +1,9 @@ /* eslint-disable id-length */ /* eslint-disable promise/prefer-await-to-then */ import { performance } from 'node:perf_hooks'; -import { setInterval, clearInterval, setTimeout } from 'node:timers'; +import { setInterval, clearInterval } from 'node:timers'; import { MockAgent, setGlobalDispatcher } from 'undici'; -import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor'; +import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor.js'; import { beforeEach, afterEach, test, expect, vitest } from 'vitest'; import { DiscordAPIError, HTTPError, RateLimitError, REST, RESTEvents } from '../src/index.js'; import { genPath } from './util.js'; @@ -360,7 +360,7 @@ test('Handle unexpected 429', async () => { const previous = performance.now(); let firstResolvedTime: number; let secondResolvedTime: number; - const unexepectedSublimit = api.get('/unexpected').then((res) => { + const unexpectedSublimit = api.get('/unexpected').then((res) => { firstResolvedTime = performance.now(); return res; }); @@ -369,7 +369,7 @@ test('Handle unexpected 429', async () => { return res; }); - expect(await unexepectedSublimit).toStrictEqual({ test: true }); + expect(await unexpectedSublimit).toStrictEqual({ test: true }); expect(await queuedSublimit).toStrictEqual({ test: true }); expect(performance.now()).toBeGreaterThanOrEqual(previous + 1_000); // @ts-expect-error: This is intentional @@ -492,7 +492,7 @@ test('server responding too slow', async () => { const promise = api2.get('/slow'); - await expect(promise).rejects.toThrowError('Request aborted'); + await expect(promise).rejects.toThrowError('aborted'); }, 1_000); test('Unauthorized', async () => { @@ -570,8 +570,8 @@ test('abort', async () => { controller.abort(); // Abort mid-execution: - await expect(bP2).rejects.toThrowError('Request aborted'); + await expect(bP2).rejects.toThrowError('aborted'); // Abort scheduled: - await expect(cP2).rejects.toThrowError('Request aborted'); + await expect(cP2).rejects.toThrowError('Request aborted manually'); }); diff --git a/packages/rest/__tests__/Util.test.ts b/packages/rest/__tests__/UndiciRequest.test.ts similarity index 52% rename from packages/rest/__tests__/Util.test.ts rename to packages/rest/__tests__/UndiciRequest.test.ts index ad4cbb5c74b2..783555ec88f8 100644 --- a/packages/rest/__tests__/Util.test.ts +++ b/packages/rest/__tests__/UndiciRequest.test.ts @@ -1,22 +1,37 @@ import { Blob, Buffer } from 'node:buffer'; import { URLSearchParams } from 'node:url'; -import { test, expect } from 'vitest'; -import { resolveBody, parseHeader } from '../src/lib/utils/utils.js'; +import { MockAgent, setGlobalDispatcher } from 'undici'; +import type { Interceptable, MockInterceptor } from 'undici/types/mock-interceptor.js'; +import { beforeEach, afterEach, test, expect, vitest } from 'vitest'; +import { REST } from '../src/index.js'; +import { makeRequest, resolveBody } from '../src/strategies/undiciRequest.js'; +import { genPath } from './util.js'; -test('GIVEN string parseHeader returns string', () => { - const header = 'application/json'; +const makeRequestMock = vitest.fn(makeRequest); - expect(parseHeader(header)).toEqual(header); -}); +const api = new REST({ makeRequest: makeRequestMock }).setToken('A-Very-Fake-Token'); + +// @discordjs/rest uses the `content-type` header to detect whether to parse +// the response as JSON or as an ArrayBuffer. +const responseOptions: MockInterceptor.MockResponseOptions = { + headers: { + 'content-type': 'application/json', + }, +}; + +let mockAgent: MockAgent; +let mockPool: Interceptable; -test('GIVEN string[] parseHeader returns string', () => { - const header = ['application/json', 'wait sorry I meant text/html']; +beforeEach(() => { + mockAgent = new MockAgent(); + mockAgent.disableNetConnect(); // prevent actual requests to Discord + setGlobalDispatcher(mockAgent); // enabled the mock client to intercept requests - expect(parseHeader(header)).toEqual(header.join(';')); + mockPool = mockAgent.get('https://discord.com'); }); -test('GIVEN undefined parseHeader return undefined', () => { - expect(parseHeader(undefined)).toBeUndefined(); +afterEach(async () => { + await mockAgent.close(); }); test('resolveBody', async () => { @@ -43,7 +58,7 @@ test('resolveBody', async () => { } }, }; - await expect(resolveBody(iterable)).resolves.toStrictEqual(new Uint8Array([1, 2, 3, 1, 2, 3, 1, 2, 3])); + await expect(resolveBody(iterable)).resolves.toStrictEqual(Buffer.from([1, 2, 3, 1, 2, 3, 1, 2, 3])); const asyncIterable: AsyncIterable = { [Symbol.asyncIterator]() { @@ -66,3 +81,19 @@ test('resolveBody', async () => { // @ts-expect-error: This test is ensuring that this throws await expect(resolveBody(true)).rejects.toThrow(TypeError); }); + +test('use passed undici request', async () => { + mockPool + .intercept({ + path: genPath('/simplePost'), + method: 'POST', + }) + .reply(() => ({ + data: { test: true }, + statusCode: 200, + responseOptions, + })); + + expect(await api.post('/simplePost')).toStrictEqual({ test: true }); + expect(makeRequestMock).toHaveBeenCalledTimes(1); +}); diff --git a/packages/rest/__tests__/utils.test.ts b/packages/rest/__tests__/utils.test.ts index 90482b9ada56..f924f17916df 100644 --- a/packages/rest/__tests__/utils.test.ts +++ b/packages/rest/__tests__/utils.test.ts @@ -58,4 +58,31 @@ describe('makeURLSearchParams', () => { expect([...params.entries()]).toEqual([['foo', 'bar']]); }); }); + + describe('types', () => { + interface TestInput { + foo: string; + } + + test("GIVEN object without index signature THEN TypeScript doesn't raise a type error", () => { + // Previously, `makeURLSearchParams` used `Record` as an input, but that meant that it + // couldn't accept most interfaces, since they don't have an index signature. This test is to make sure + // non-Records can be used without casting. + + const input = { foo: 'bar' } as TestInput; + const params = makeURLSearchParams(input); + + expect([...params.entries()]).toEqual([['foo', 'bar']]); + }); + + test("GIVEN readonly object on a non-readonly generic type THEN TypeScript doesn't raise a type error", () => { + // While `Readonly` type was always accepted in `makeURLSearchParams`, this test is to ensure that we can + // use the generic type and accept `Readonly` rather than only [possibly] mutable `T`. + + const input = Object.freeze({ foo: 'bar' } as TestInput); + const params = makeURLSearchParams(input); + + expect([...params.entries()]).toEqual([['foo', 'bar']]); + }); + }); }); diff --git a/packages/rest/api-extractor-docs.json b/packages/rest/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/rest/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/rest/api-extractor.json b/packages/rest/api-extractor.json index bc73f2cc022e..3b0add5b1028 100644 --- a/packages/rest/api-extractor.json +++ b/packages/rest/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/rest" + } } diff --git a/packages/rest/cliff.toml b/packages/rest/cliff.toml index 9d3e82ab5b61..7cc93d936efd 100644 --- a/packages/rest/cliff.toml +++ b/packages/rest/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/rest@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/rest/docs/README.md b/packages/rest/docs/README.md index 08cc4b4c66d8..67629c684db0 100644 --- a/packages/rest/docs/README.md +++ b/packages/rest/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/rest) +## [View the documentation here.](https://discord.js.org/docs/packages/rest/main) diff --git a/packages/rest/docs/index.json b/packages/rest/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/rest/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/rest/package.json b/packages/rest/package.json index cb40dd28a283..eb959817c4bb 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -1,14 +1,15 @@ { "name": "@discordjs/rest", - "version": "1.3.0", + "version": "1.7.1", "description": "The REST API for discord.js", "scripts": { "test": "vitest run", "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn lint && yarn test && yarn build", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/rest/*'", "release": "cliff-jumper" @@ -17,9 +18,16 @@ "module": "./dist/index.mjs", "typings": "./dist/index.d.ts", "exports": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./*": { + "types": "./dist/strategies/*.d.ts", + "import": "./dist/strategies/*.mjs", + "require": "./dist/strategies/*.js" + } }, "directories": { "lib": "src", @@ -45,7 +53,8 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/rest" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" @@ -55,26 +64,27 @@ "@discordjs/collection": "workspace:^", "@discordjs/util": "workspace:^", "@sapphire/async-queue": "^1.5.0", - "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.37.15", - "file-type": "^18.0.0", - "tslib": "^2.4.0", - "undici": "^5.11.0" + "@sapphire/snowflake": "^3.5.1", + "discord-api-types": "^0.37.42", + "file-type": "^18.4.0", + "tslib": "^2.5.2", + "undici": "^5.22.1" }, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/node": "16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "18.16.14", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "esbuild-plugin-version-injector": "^1.0.0", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "esbuild-plugin-version-injector": "^1.1.0", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/rest/src/index.ts b/packages/rest/src/index.ts index 67945f24e560..b6af7b7ef7df 100644 --- a/packages/rest/src/index.ts +++ b/packages/rest/src/index.ts @@ -5,12 +5,11 @@ export * from './lib/errors/RateLimitError.js'; export * from './lib/RequestManager.js'; export * from './lib/REST.js'; export * from './lib/utils/constants.js'; -export { makeURLSearchParams, parseResponse } from './lib/utils/utils.js'; +export { calculateUserDefaultAvatarIndex, makeURLSearchParams, parseResponse } from './lib/utils/utils.js'; /** * The {@link https://github.com/discordjs/discord.js/blob/main/packages/rest/#readme | @discordjs/rest} version * that you are currently using. */ // This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild -// eslint-disable-next-line @typescript-eslint/no-inferrable-types -export const version: string = '[VI]{{inject}}[/VI]'; +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/rest/src/lib/CDN.ts b/packages/rest/src/lib/CDN.ts index 327225fd4aed..a42966bd8829 100644 --- a/packages/rest/src/lib/CDN.ts +++ b/packages/rest/src/lib/CDN.ts @@ -1,4 +1,5 @@ /* eslint-disable jsdoc/check-param-names */ + import { URL } from 'node:url'; import { ALLOWED_EXTENSIONS, @@ -118,12 +119,15 @@ export class CDN { } /** - * Generates the default avatar URL for a discriminator. + * Generates a default avatar URL * - * @param discriminator - The discriminator modulo 5 + * @param index - The default avatar index + * @remarks + * To calculate the index for a user do `(userId >> 22) % 6`, + * or `discriminator % 5` if they're using the legacy username system. */ - public defaultAvatar(discriminator: number): string { - return this.makeURL(`/embed/avatars/${discriminator}`, { extension: 'png' }); + public defaultAvatar(index: number): string { + return this.makeURL(`/embed/avatars/${index}`, { extension: 'png' }); } /** @@ -219,12 +223,11 @@ export class CDN { * * @param stickerId - The sticker id * @param extension - The extension of the sticker + * @privateRemarks + * Stickers cannot have a `.webp` extension, so we default to a `.png` */ - public sticker(stickerId: string, extension?: StickerExtension): string { - return this.makeURL(`/stickers/${stickerId}`, { - allowedExtensions: ALLOWED_STICKER_EXTENSIONS, - extension: extension ?? 'png', // Stickers cannot have a `.webp` extension, so we default to a `.png` - }); + public sticker(stickerId: string, extension: StickerExtension = 'png'): string { + return this.makeURL(`/stickers/${stickerId}`, { allowedExtensions: ALLOWED_STICKER_EXTENSIONS, extension }); } /** diff --git a/packages/rest/src/lib/REST.ts b/packages/rest/src/lib/REST.ts index d4bd5f5b75fc..4b24ab208639 100644 --- a/packages/rest/src/lib/REST.ts +++ b/packages/rest/src/lib/REST.ts @@ -1,6 +1,8 @@ import { EventEmitter } from 'node:events'; +import type { Readable } from 'node:stream'; +import type { ReadableStream } from 'node:stream/web'; import type { Collection } from '@discordjs/collection'; -import type { request, Dispatcher } from 'undici'; +import type { Dispatcher, RequestInit, Response } from 'undici'; import { CDN } from './CDN.js'; import { RequestManager, @@ -11,7 +13,7 @@ import { type RequestData, type RouteLike, } from './RequestManager.js'; -import type { IHandler } from './handlers/IHandler.js'; +import type { IHandler } from './interfaces/Handler.js'; import { DefaultRestOptions, RESTEvents } from './utils/constants.js'; import { parseResponse } from './utils/utils.js'; @@ -22,7 +24,7 @@ export interface RESTOptions { /** * The agent to set globally */ - agent: Dispatcher; + agent: Dispatcher | null; /** * The base api path, without version * @@ -39,7 +41,7 @@ export interface RESTOptions { /** * The cdn path * - * @defaultValue 'https://cdn.discordapp.com' + * @defaultValue `'https://cdn.discordapp.com'` */ cdn: string; /** @@ -79,6 +81,13 @@ export interface RESTOptions { * @defaultValue `0` */ invalidRequestWarningInterval: number; + /** + * The method called to perform the actual HTTP request given a url and web `fetch` options + * For example, to use global fetch, simply provide `makeRequest: fetch` + * + * @defaultValue `undici.request` + */ + makeRequest(url: string, init: RequestInit): Promise; /** * The extra offset to add to rate limits in milliseconds * @@ -110,7 +119,7 @@ export interface RESTOptions { /** * Extra information to add to the user agent * - * @defaultValue `Node.js ${process.version}` + * @defaultValue DefaultUserAgentAppendix */ userAgentAppendix: string; /** @@ -179,7 +188,7 @@ export interface APIRequest { /** * Additional HTTP options for this request */ - options: RequestOptions; + options: RequestInit; /** * The full path used to make the request */ @@ -194,6 +203,11 @@ export interface APIRequest { route: string; } +export interface ResponseLike + extends Pick { + body: Readable | ReadableStream | null; +} + export interface InvalidRequestWarningData { /** * Number of invalid requests that have been made in the window @@ -212,7 +226,7 @@ export interface RestEvents { newListener: [name: string, listener: (...args: any) => void]; rateLimited: [rateLimitInfo: RateLimitData]; removeListener: [name: string, listener: (...args: any) => void]; - response: [request: APIRequest, response: Dispatcher.ResponseData]; + response: [request: APIRequest, response: ResponseLike]; restDebug: [info: string]; } @@ -233,8 +247,6 @@ export interface REST { ((event?: Exclude) => this); } -export type RequestOptions = Exclude[1], undefined>; - export class REST extends EventEmitter { public readonly cdn: CDN; diff --git a/packages/rest/src/lib/RequestManager.ts b/packages/rest/src/lib/RequestManager.ts index 2e2732c53a4a..7b3abb8f6569 100644 --- a/packages/rest/src/lib/RequestManager.ts +++ b/packages/rest/src/lib/RequestManager.ts @@ -5,12 +5,18 @@ import type { URLSearchParams } from 'node:url'; import { Collection } from '@discordjs/collection'; import { lazy } from '@discordjs/util'; import { DiscordSnowflake } from '@sapphire/snowflake'; -import { FormData, type RequestInit, type BodyInit, type Dispatcher, type Agent } from 'undici'; -import type { RESTOptions, RestEvents, RequestOptions } from './REST.js'; -import type { IHandler } from './handlers/IHandler.js'; +import type { RequestInit, BodyInit, Dispatcher, Agent } from 'undici'; +import type { RESTOptions, ResponseLike, RestEvents } from './REST.js'; +import { BurstHandler } from './handlers/BurstHandler.js'; import { SequentialHandler } from './handlers/SequentialHandler.js'; -import { DefaultRestOptions, DefaultUserAgent, RESTEvents } from './utils/constants.js'; -import { resolveBody } from './utils/utils.js'; +import type { IHandler } from './interfaces/Handler.js'; +import { + BurstHandlerMajorIdKey, + DefaultRestOptions, + DefaultUserAgent, + OverwrittenMimeTypes, + RESTEvents, +} from './utils/constants.js'; // Make this a lazy dynamic import as file-type is a pure ESM package const getFileType = lazy(async () => import('file-type')); @@ -88,7 +94,7 @@ export interface RequestData { /** * Reason to show in the audit logs */ - reason?: string; + reason?: string | undefined; /** * The signal to abort the queue entry or the REST call, where applicable */ @@ -113,7 +119,7 @@ export interface RequestHeaders { /** * Possible API methods to be used when doing requests */ -export const enum RequestMethod { +export enum RequestMethod { Delete = 'DELETE', Get = 'GET', Patch = 'PATCH', @@ -316,7 +322,7 @@ export class RequestManager extends EventEmitter { * @param request - All the information needed to make a request * @returns The response from the api request */ - public async queueRequest(request: InternalRequest): Promise { + public async queueRequest(request: InternalRequest): Promise { // Generalize the endpoint to its route data const routeId = RequestManager.generateRouteData(request.fullRoute, request.method); // Get the bucket hash for the generic route, or point to a global route otherwise @@ -351,7 +357,10 @@ export class RequestManager extends EventEmitter { */ private createHandler(hash: string, majorParameter: string) { // Create the async request queue to handle requests - const queue = new SequentialHandler(this, hash, majorParameter); + const queue = + majorParameter === BurstHandlerMajorIdKey + ? new BurstHandler(this, hash, majorParameter) + : new SequentialHandler(this, hash, majorParameter); // Save the queue based on its id this.handlers.set(queue.id, queue); @@ -363,7 +372,7 @@ export class RequestManager extends EventEmitter { * * @param request - The request data */ - private async resolveRequest(request: InternalRequest): Promise<{ fetchOptions: RequestOptions; url: string }> { + private async resolveRequest(request: InternalRequest): Promise<{ fetchOptions: RequestInit; url: string }> { const { options } = this; let query = ''; @@ -419,7 +428,14 @@ export class RequestManager extends EventEmitter { if (Buffer.isBuffer(file.data)) { // Try to infer the content type from the buffer if one isn't passed const { fileTypeFromBuffer } = await getFileType(); - const contentType = file.contentType ?? (await fileTypeFromBuffer(file.data))?.mime; + let contentType = file.contentType; + if (!contentType) { + const parsedType = (await fileTypeFromBuffer(file.data))?.mime; + if (parsedType) { + contentType = OverwrittenMimeTypes[parsedType as keyof typeof OverwrittenMimeTypes] ?? parsedType; + } + } + formData.append(fileKey, new Blob([file.data], { type: contentType }), file.name); } else { formData.append(fileKey, new Blob([`${file.data}`], { type: file.contentType }), file.name); @@ -453,20 +469,18 @@ export class RequestManager extends EventEmitter { } } - finalBody = await resolveBody(finalBody); + const method = request.method.toUpperCase(); - const fetchOptions: RequestOptions = { + // The non null assertions in the following block are due to exactOptionalPropertyTypes, they have been tested to work with undefined + const fetchOptions: RequestInit = { + // Set body to null on get / head requests. This does not follow fetch spec (likely because it causes subtle bugs) but is aligned with what request was doing + body: ['GET', 'HEAD'].includes(method) ? null : finalBody!, headers: { ...request.headers, ...additionalHeaders, ...headers } as Record, - method: request.method.toUpperCase() as Dispatcher.HttpMethod, + method, + // Prioritize setting an agent per request, use the agent for this instance otherwise. + dispatcher: request.dispatcher ?? this.agent ?? undefined!, }; - if (finalBody !== undefined) { - fetchOptions.body = finalBody as Exclude; - } - - // Prioritize setting an agent per request, use the agent for this instance otherwise. - fetchOptions.dispatcher = request.dispatcher ?? this.agent ?? undefined!; - return { url, fetchOptions }; } @@ -492,14 +506,22 @@ export class RequestManager extends EventEmitter { * @internal */ private static generateRouteData(endpoint: RouteLike, method: RequestMethod): RouteData { - const majorIdMatch = /^\/(?:channels|guilds|webhooks)\/(\d{16,19})/.exec(endpoint); + if (endpoint.startsWith('/interactions/') && endpoint.endsWith('/callback')) { + return { + majorParameter: BurstHandlerMajorIdKey, + bucketRoute: '/interactions/:id/:token/callback', + original: endpoint, + }; + } + + const majorIdMatch = /^\/(?:channels|guilds|webhooks)\/(\d{17,19})/.exec(endpoint); // Get the major id for this route - global otherwise const majorId = majorIdMatch?.[1] ?? 'global'; const baseRoute = endpoint // Strip out all ids - .replace(/\d{16,19}/g, ':id') + .replaceAll(/\d{17,19}/g, ':id') // Strip out reaction as they fall under the same bucket .replace(/\/reactions\/(.*)/, '/reactions/:reaction'); @@ -508,7 +530,7 @@ export class RequestManager extends EventEmitter { // Hard-Code Old Message Deletion Exception (2 week+ old messages are a different bucket) // https://github.com/discord/discord-api-docs/issues/1295 if (method === RequestMethod.Delete && baseRoute === '/channels/:id/messages/:id') { - const id = /\d{16,19}$/.exec(endpoint)![0]!; + const id = /\d{17,19}$/.exec(endpoint)![0]!; const timestamp = DiscordSnowflake.timestampFrom(id); if (Date.now() - timestamp > 1_000 * 60 * 60 * 24 * 14) { exceptions += '/Delete Old Message'; diff --git a/packages/rest/src/lib/errors/RateLimitError.ts b/packages/rest/src/lib/errors/RateLimitError.ts index 7c47fc56c582..cb6b7c1df74b 100644 --- a/packages/rest/src/lib/errors/RateLimitError.ts +++ b/packages/rest/src/lib/errors/RateLimitError.ts @@ -1,4 +1,4 @@ -import type { RateLimitData } from '../REST'; +import type { RateLimitData } from '../REST.js'; export class RateLimitError extends Error implements RateLimitData { public timeToReset: number; diff --git a/packages/rest/src/lib/global/fetch.d.ts b/packages/rest/src/lib/global/fetch.d.ts new file mode 100644 index 000000000000..8522b42bae77 --- /dev/null +++ b/packages/rest/src/lib/global/fetch.d.ts @@ -0,0 +1,5 @@ +import type * as undici from 'undici'; + +declare global { + export const { fetch, FormData, Headers, Request, Response }: typeof undici; +} diff --git a/packages/rest/src/lib/handlers/BurstHandler.ts b/packages/rest/src/lib/handlers/BurstHandler.ts new file mode 100644 index 000000000000..971ac32d60a6 --- /dev/null +++ b/packages/rest/src/lib/handlers/BurstHandler.ts @@ -0,0 +1,146 @@ +import { setTimeout as sleep } from 'node:timers/promises'; +import type { RequestInit } from 'undici'; +import type { ResponseLike } from '../REST.js'; +import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager.js'; +import type { IHandler } from '../interfaces/Handler.js'; +import { RESTEvents } from '../utils/constants.js'; +import { onRateLimit } from '../utils/utils.js'; +import { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js'; + +/** + * The structure used to handle burst requests for a given bucket. + * Burst requests have no ratelimit handling but allow for pre- and post-processing + * of data in the same manner as sequentially queued requests. + * + * @remarks + * This queue may still emit a rate limit error if an unexpected 429 is hit + */ +export class BurstHandler implements IHandler { + /** + * {@inheritdoc IHandler.id} + */ + public readonly id: string; + + /** + * {@inheritDoc IHandler.inactive} + */ + public inactive = false; + + /** + * @param manager - The request manager + * @param hash - The hash that this RequestHandler handles + * @param majorParameter - The major parameter for this handler + */ + public constructor( + private readonly manager: RequestManager, + private readonly hash: string, + private readonly majorParameter: string, + ) { + this.id = `${hash}:${majorParameter}`; + } + + /** + * Emits a debug message + * + * @param message - The message to debug + */ + private debug(message: string) { + this.manager.emit(RESTEvents.Debug, `[REST ${this.id}] ${message}`); + } + + /** + * {@inheritDoc IHandler.queueRequest} + */ + public async queueRequest( + routeId: RouteData, + url: string, + options: RequestInit, + requestData: HandlerRequestData, + ): Promise { + return this.runRequest(routeId, url, options, requestData); + } + + /** + * The method that actually makes the request to the API, and updates info about the bucket accordingly + * + * @param routeId - The generalized API route with literal ids for major parameters + * @param url - The fully resolved URL to make the request to + * @param options - The fetch options needed to make the request + * @param requestData - Extra data from the user's request needed for errors and additional processing + * @param retries - The number of retries this request has already attempted (recursion) + */ + private async runRequest( + routeId: RouteData, + url: string, + options: RequestInit, + requestData: HandlerRequestData, + retries = 0, + ): Promise { + const method = options.method ?? 'get'; + + const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries); + + // Retry requested + if (res === null) { + // eslint-disable-next-line no-param-reassign + return this.runRequest(routeId, url, options, requestData, ++retries); + } + + const status = res.status; + let retryAfter = 0; + const retry = res.headers.get('Retry-After'); + + // Amount of time in milliseconds until we should retry if rate limited (globally or otherwise) + if (retry) retryAfter = Number(retry) * 1_000 + this.manager.options.offset; + + // Count the invalid requests + if (status === 401 || status === 403 || status === 429) { + incrementInvalidCount(this.manager); + } + + if (status >= 200 && status < 300) { + return res; + } else if (status === 429) { + // Unexpected ratelimit + const isGlobal = res.headers.has('X-RateLimit-Global'); + await onRateLimit(this.manager, { + timeToReset: retryAfter, + limit: Number.POSITIVE_INFINITY, + method, + hash: this.hash, + url, + route: routeId.bucketRoute, + majorParameter: this.majorParameter, + global: isGlobal, + }); + this.debug( + [ + 'Encountered unexpected 429 rate limit', + ` Global : ${isGlobal}`, + ` Method : ${method}`, + ` URL : ${url}`, + ` Bucket : ${routeId.bucketRoute}`, + ` Major parameter: ${routeId.majorParameter}`, + ` Hash : ${this.hash}`, + ` Limit : ${Number.POSITIVE_INFINITY}`, + ` Retry After : ${retryAfter}ms`, + ` Sublimit : None`, + ].join('\n'), + ); + + // We are bypassing all other limits, but an encountered limit should be respected (it's probably a non-punished rate limit anyways) + await sleep(retryAfter); + + // Since this is not a server side issue, the next request should pass, so we don't bump the retries counter + return this.runRequest(routeId, url, options, requestData, retries); + } else { + const handled = await handleErrors(this.manager, res, method, url, requestData, retries); + if (handled === null) { + // eslint-disable-next-line no-param-reassign + return this.runRequest(routeId, url, options, requestData, ++retries); + } + + return handled; + } + } +} diff --git a/packages/rest/src/lib/handlers/SequentialHandler.ts b/packages/rest/src/lib/handlers/SequentialHandler.ts index 4f5e5ccde7b8..f18919b18fe9 100644 --- a/packages/rest/src/lib/handlers/SequentialHandler.ts +++ b/packages/rest/src/lib/handlers/SequentialHandler.ts @@ -1,25 +1,12 @@ -import { setTimeout, clearTimeout } from 'node:timers'; import { setTimeout as sleep } from 'node:timers/promises'; import { AsyncQueue } from '@sapphire/async-queue'; -import { request, type Dispatcher } from 'undici'; -import type { RateLimitData, RequestOptions } from '../REST'; -import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager'; -import { DiscordAPIError, type DiscordErrorData, type OAuthErrorData } from '../errors/DiscordAPIError.js'; -import { HTTPError } from '../errors/HTTPError.js'; -import { RateLimitError } from '../errors/RateLimitError.js'; +import type { RequestInit } from 'undici'; +import type { RateLimitData, ResponseLike } from '../REST.js'; +import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager.js'; +import type { IHandler } from '../interfaces/Handler.js'; import { RESTEvents } from '../utils/constants.js'; -import { hasSublimit, parseHeader, parseResponse, shouldRetry } from '../utils/utils.js'; -import type { IHandler } from './IHandler.js'; - -/** - * Invalid request limiting is done on a per-IP basis, not a per-token basis. - * The best we can do is track invalid counts process-wide (on the theory that - * users could have multiple bots run from one process) rather than per-bot. - * Therefore, store these at file scope here rather than in the client's - * RESTManager object. - */ -let invalidCount = 0; -let invalidCountResetTime: number | null = null; +import { hasSublimit, onRateLimit } from '../utils/utils.js'; +import { handleErrors, incrementInvalidCount, makeNetworkRequest } from './Shared.js'; const enum QueueType { Standard, @@ -27,7 +14,7 @@ const enum QueueType { } /** - * The structure used to handle requests for a given bucket + * The structure used to handle sequential requests for a given bucket */ export class SequentialHandler implements IHandler { /** @@ -141,31 +128,15 @@ export class SequentialHandler implements IHandler { this.manager.globalDelay = null; } - /* - * Determines whether the request should be queued or whether a RateLimitError should be thrown - */ - private async onRateLimit(rateLimitData: RateLimitData) { - const { options } = this.manager; - if (!options.rejectOnRateLimit) return; - - const shouldThrow = - typeof options.rejectOnRateLimit === 'function' - ? await options.rejectOnRateLimit(rateLimitData) - : options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase())); - if (shouldThrow) { - throw new RateLimitError(rateLimitData); - } - } - /** * {@inheritDoc IHandler.queueRequest} */ public async queueRequest( routeId: RouteData, url: string, - options: RequestOptions, + options: RequestInit, requestData: HandlerRequestData, - ): Promise { + ): Promise { let queue = this.#asyncQueue; let queueType = QueueType.Standard; // Separate sublimited requests when already sublimited @@ -224,10 +195,10 @@ export class SequentialHandler implements IHandler { private async runRequest( routeId: RouteData, url: string, - options: RequestOptions, + options: RequestInit, requestData: HandlerRequestData, retries = 0, - ): Promise { + ): Promise { /* * After calculations have been done, pre-emptively stop further requests * Potentially loop until this task can run if e.g. the global rate limit is hit twice @@ -269,7 +240,7 @@ export class SequentialHandler implements IHandler { // Let library users know they have hit a rate limit this.manager.emit(RESTEvents.RateLimited, rateLimitData); // Determine whether a RateLimitError should be thrown - await this.onRateLimit(rateLimitData); + await onRateLimit(this.manager, rateLimitData); // When not erroring, emit debug for what is happening if (isGlobal) { this.debug(`Global rate limit hit, blocking all requests for ${timeout}ms`); @@ -291,57 +262,22 @@ export class SequentialHandler implements IHandler { const method = options.method ?? 'get'; - const controller = new AbortController(); - const timeout = setTimeout(() => controller.abort(), this.manager.options.timeout).unref(); - if (requestData.signal) { - // The type polyfill is required because Node.js's types are incomplete. - const signal = requestData.signal as PolyFillAbortSignal; - // If the user signal was aborted, abort the controller, else abort the local signal. - // The reason why we don't re-use the user's signal, is because users may use the same signal for multiple - // requests, and we do not want to cause unexpected side-effects. - if (signal.aborted) controller.abort(); - else signal.addEventListener('abort', () => controller.abort()); - } - - let res: Dispatcher.ResponseData; - try { - res = await request(url, { ...options, signal: controller.signal }); - } catch (error: unknown) { - if (!(error instanceof Error)) throw error; - // Retry the specified number of times if needed - if (shouldRetry(error) && retries !== this.manager.options.retries) { - // eslint-disable-next-line no-param-reassign - return await this.runRequest(routeId, url, options, requestData, ++retries); - } - - throw error; - } finally { - clearTimeout(timeout); - } + const res = await makeNetworkRequest(this.manager, routeId, url, options, requestData, retries); - if (this.manager.listenerCount(RESTEvents.Response)) { - this.manager.emit( - RESTEvents.Response, - { - method, - path: routeId.original, - route: routeId.bucketRoute, - options, - data: requestData, - retries, - }, - { ...res }, - ); + // Retry requested + if (res === null) { + // eslint-disable-next-line no-param-reassign + return this.runRequest(routeId, url, options, requestData, ++retries); } - const status = res.statusCode; + const status = res.status; let retryAfter = 0; - const limit = parseHeader(res.headers['x-ratelimit-limit']); - const remaining = parseHeader(res.headers['x-ratelimit-remaining']); - const reset = parseHeader(res.headers['x-ratelimit-reset-after']); - const hash = parseHeader(res.headers['x-ratelimit-bucket']); - const retry = parseHeader(res.headers['retry-after']); + const limit = res.headers.get('X-RateLimit-Limit'); + const remaining = res.headers.get('X-RateLimit-Remaining'); + const reset = res.headers.get('X-RateLimit-Reset-After'); + const hash = res.headers.get('X-RateLimit-Bucket'); + const retry = res.headers.get('Retry-After'); // Update the total number of requests that can be made before the rate limit resets this.limit = limit ? Number(limit) : Number.POSITIVE_INFINITY; @@ -373,7 +309,7 @@ export class SequentialHandler implements IHandler { // Handle retryAfter, which means we have actually hit a rate limit let sublimitTimeout: number | null = null; if (retryAfter > 0) { - if (res.headers['x-ratelimit-global'] !== undefined) { + if (res.headers.has('X-RateLimit-Global')) { this.manager.globalRemaining = 0; this.manager.globalReset = Date.now() + retryAfter; } else if (!this.localLimited) { @@ -388,26 +324,10 @@ export class SequentialHandler implements IHandler { // Count the invalid requests if (status === 401 || status === 403 || status === 429) { - if (!invalidCountResetTime || invalidCountResetTime < Date.now()) { - invalidCountResetTime = Date.now() + 1_000 * 60 * 10; - invalidCount = 0; - } - - invalidCount++; - - const emitInvalid = - this.manager.options.invalidRequestWarningInterval > 0 && - invalidCount % this.manager.options.invalidRequestWarningInterval === 0; - if (emitInvalid) { - // Let library users know periodically about invalid requests - this.manager.emit(RESTEvents.InvalidRequestWarning, { - count: invalidCount, - remainingTime: invalidCountResetTime - Date.now(), - }); - } + incrementInvalidCount(this.manager); } - if (status >= 200 && status < 300) { + if (res.ok) { return res; } else if (status === 429) { // A rate limit was hit - this may happen if the route isn't associated with an official bucket hash yet, or when first globally rate limited @@ -425,7 +345,7 @@ export class SequentialHandler implements IHandler { timeout = this.timeToReset; } - await this.onRateLimit({ + await onRateLimit(this.manager, { timeToReset: timeout, limit, method, @@ -475,36 +395,14 @@ export class SequentialHandler implements IHandler { // Since this is not a server side issue, the next request should pass, so we don't bump the retries counter return this.runRequest(routeId, url, options, requestData, retries); - } else if (status >= 500 && status < 600) { - // Retry the specified number of times for possible server side issues - if (retries !== this.manager.options.retries) { + } else { + const handled = await handleErrors(this.manager, res, method, url, requestData, retries); + if (handled === null) { // eslint-disable-next-line no-param-reassign return this.runRequest(routeId, url, options, requestData, ++retries); } - // We are out of retries, throw an error - throw new HTTPError(status, method, url, requestData); - } else { - // Handle possible malformed requests - if (status >= 400 && status < 500) { - // If we receive this status code, it means the token we had is no longer valid. - if (status === 401 && requestData.auth) { - this.manager.setToken(null!); - } - - // The request will not succeed for some reason, parse the error returned from the api - const data = (await parseResponse(res)) as DiscordErrorData | OAuthErrorData; - // throw the API error - throw new DiscordAPIError(data, 'code' in data ? data.code : data.error, status, method, url, requestData); - } - - return res; + return handled; } } } - -interface PolyFillAbortSignal { - readonly aborted: boolean; - addEventListener(type: 'abort', listener: () => void): void; - removeEventListener(type: 'abort', listener: () => void): void; -} diff --git a/packages/rest/src/lib/handlers/Shared.ts b/packages/rest/src/lib/handlers/Shared.ts new file mode 100644 index 000000000000..42c3278b4bb0 --- /dev/null +++ b/packages/rest/src/lib/handlers/Shared.ts @@ -0,0 +1,155 @@ +import { setTimeout, clearTimeout } from 'node:timers'; +import { Response } from 'undici'; +import type { RequestInit } from 'undici'; +import type { ResponseLike } from '../REST.js'; +import type { HandlerRequestData, RequestManager, RouteData } from '../RequestManager.js'; +import type { DiscordErrorData, OAuthErrorData } from '../errors/DiscordAPIError.js'; +import { DiscordAPIError } from '../errors/DiscordAPIError.js'; +import { HTTPError } from '../errors/HTTPError.js'; +import { RESTEvents } from '../utils/constants.js'; +import { parseResponse, shouldRetry } from '../utils/utils.js'; + +/** + * Invalid request limiting is done on a per-IP basis, not a per-token basis. + * The best we can do is track invalid counts process-wide (on the theory that + * users could have multiple bots run from one process) rather than per-bot. + * Therefore, store these at file scope here rather than in the client's + * RESTManager object. + */ +let invalidCount = 0; +let invalidCountResetTime: number | null = null; + +/** + * Increment the invalid request count and emit warning if necessary + * + * @internal + */ +export function incrementInvalidCount(manager: RequestManager) { + if (!invalidCountResetTime || invalidCountResetTime < Date.now()) { + invalidCountResetTime = Date.now() + 1_000 * 60 * 10; + invalidCount = 0; + } + + invalidCount++; + + const emitInvalid = + manager.options.invalidRequestWarningInterval > 0 && + invalidCount % manager.options.invalidRequestWarningInterval === 0; + if (emitInvalid) { + // Let library users know periodically about invalid requests + manager.emit(RESTEvents.InvalidRequestWarning, { + count: invalidCount, + remainingTime: invalidCountResetTime - Date.now(), + }); + } +} + +/** + * Performs the actual network request for a request handler + * + * @param manager - The manager that holds options and emits informational events + * @param routeId - The generalized api route with literal ids for major parameters + * @param url - The fully resolved url to make the request to + * @param options - The fetch options needed to make the request + * @param requestData - Extra data from the user's request needed for errors and additional processing + * @param retries - The number of retries this request has already attempted (recursion occurs on the handler) + * @returns The respond from the network or `null` when the request should be retried + * @internal + */ +export async function makeNetworkRequest( + manager: RequestManager, + routeId: RouteData, + url: string, + options: RequestInit, + requestData: HandlerRequestData, + retries: number, +) { + const controller = new AbortController(); + const timeout = setTimeout(() => controller.abort(), manager.options.timeout).unref(); + if (requestData.signal) { + // If the user signal was aborted, abort the controller, else abort the local signal. + // The reason why we don't re-use the user's signal, is because users may use the same signal for multiple + // requests, and we do not want to cause unexpected side-effects. + if (requestData.signal.aborted) controller.abort(); + else requestData.signal.addEventListener('abort', () => controller.abort()); + } + + let res: ResponseLike; + try { + res = await manager.options.makeRequest(url, { ...options, signal: controller.signal }); + } catch (error: unknown) { + if (!(error instanceof Error)) throw error; + // Retry the specified number of times if needed + if (shouldRetry(error) && retries !== manager.options.retries) { + // Retry is handled by the handler upon receiving null + return null; + } + + throw error; + } finally { + clearTimeout(timeout); + } + + if (manager.listenerCount(RESTEvents.Response)) { + manager.emit( + RESTEvents.Response, + { + method: options.method ?? 'get', + path: routeId.original, + route: routeId.bucketRoute, + options, + data: requestData, + retries, + }, + res instanceof Response ? res.clone() : { ...res }, + ); + } + + return res; +} + +/** + * Handles 5xx and 4xx errors (not 429's) conventionally. 429's should be handled before calling this function + * + * @param manager - The manager that holds options and emits informational events + * @param res - The response received from {@link makeNetworkRequest} + * @param method - The method used to make the request + * @param url - The fully resolved url to make the request to + * @param requestData - Extra data from the user's request needed for errors and additional processing + * @param retries - The number of retries this request has already attempted (recursion occurs on the handler) + * @returns - The response if the status code is not handled or null to request a retry + */ +export async function handleErrors( + manager: RequestManager, + res: ResponseLike, + method: string, + url: string, + requestData: HandlerRequestData, + retries: number, +) { + const status = res.status; + if (status >= 500 && status < 600) { + // Retry the specified number of times for possible server side issues + if (retries !== manager.options.retries) { + return null; + } + + // We are out of retries, throw an error + throw new HTTPError(status, method, url, requestData); + } else { + // Handle possible malformed requests + if (status >= 400 && status < 500) { + // If we receive this status code, it means the token we had is no longer valid. + if (status === 401 && requestData.auth) { + manager.setToken(null!); + } + + // The request will not succeed for some reason, parse the error returned from the api + const data = (await parseResponse(res)) as DiscordErrorData | OAuthErrorData; + // throw the API error + throw new DiscordAPIError(data, 'code' in data ? data.code : data.error, status, method, url, requestData); + } + + return res; + } +} diff --git a/packages/rest/src/lib/handlers/IHandler.ts b/packages/rest/src/lib/interfaces/Handler.ts similarity index 82% rename from packages/rest/src/lib/handlers/IHandler.ts rename to packages/rest/src/lib/interfaces/Handler.ts index d1c0b6c110e9..c8cbc6c4d768 100644 --- a/packages/rest/src/lib/handlers/IHandler.ts +++ b/packages/rest/src/lib/interfaces/Handler.ts @@ -1,5 +1,5 @@ -import type { Dispatcher } from 'undici'; -import type { RequestOptions } from '../REST'; +import type { RequestInit } from 'undici'; +import type { ResponseLike } from '../REST.js'; import type { HandlerRequestData, RouteData } from '../RequestManager.js'; export interface IHandler { @@ -22,7 +22,7 @@ export interface IHandler { queueRequest( routeId: RouteData, url: string, - options: RequestOptions, + options: RequestInit, requestData: HandlerRequestData, - ): Promise; + ): Promise; } diff --git a/packages/rest/src/lib/utils/constants.ts b/packages/rest/src/lib/utils/constants.ts index 2057ae259252..98f84ac9d4fd 100644 --- a/packages/rest/src/lib/utils/constants.ts +++ b/packages/rest/src/lib/utils/constants.ts @@ -1,18 +1,22 @@ import process from 'node:process'; +import { lazy } from '@discordjs/util'; import { APIVersion } from 'discord-api-types/v10'; -import { Agent } from 'undici'; import type { RESTOptions } from '../REST.js'; -export const DefaultUserAgent = `DiscordBot (https://discord.js.org, [VI]{{inject}}[/VI])`; +const getUndiciRequest = lazy(async () => { + return import('../../strategies/undiciRequest.js'); +}); -export const DefaultRestOptions: Required = { - get agent() { - return new Agent({ - connect: { - timeout: 30_000, - }, - }); - }, +export const DefaultUserAgent = + `DiscordBot (https://discord.js.org, [VI]{{inject}}[/VI])` as `DiscordBot (https://discord.js.org, ${string})`; + +/** + * The default string to append onto the user agent. + */ +export const DefaultUserAgentAppendix = process.release?.name === 'node' ? `Node.js/${process.version}` : ''; + +export const DefaultRestOptions = { + agent: null, api: 'https://discord.com/api', authPrefix: 'Bot', cdn: 'https://cdn.discordapp.com', @@ -23,17 +27,21 @@ export const DefaultRestOptions: Required = { rejectOnRateLimit: null, retries: 3, timeout: 15_000, - userAgentAppendix: `Node.js ${process.version}`, + userAgentAppendix: DefaultUserAgentAppendix, version: APIVersion, hashSweepInterval: 14_400_000, // 4 Hours hashLifetime: 86_400_000, // 24 Hours handlerSweepInterval: 3_600_000, // 1 Hour -}; + async makeRequest(...args) { + const strategy = await getUndiciRequest(); + return strategy.makeRequest(...args); + }, +} as const satisfies Required; /** * The events that the REST manager emits */ -export const enum RESTEvents { +export enum RESTEvents { Debug = 'restDebug', HandlerSweep = 'handlerSweep', HashSweep = 'hashSweep', @@ -42,10 +50,17 @@ export const enum RESTEvents { Response = 'response', } -export const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const; -export const ALLOWED_STICKER_EXTENSIONS = ['png', 'json'] as const; -export const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const; +export const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const satisfies readonly string[]; +export const ALLOWED_STICKER_EXTENSIONS = ['png', 'json', 'gif'] as const satisfies readonly string[]; +export const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const satisfies readonly number[]; + +export type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number]; +export type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number]; +export type ImageSize = (typeof ALLOWED_SIZES)[number]; + +export const OverwrittenMimeTypes = { + // https://github.com/discordjs/discord.js/issues/8557 + 'image/apng': 'image/png', +} as const satisfies Readonly>; -export type ImageExtension = typeof ALLOWED_EXTENSIONS[number]; -export type StickerExtension = typeof ALLOWED_STICKER_EXTENSIONS[number]; -export type ImageSize = typeof ALLOWED_SIZES[number]; +export const BurstHandlerMajorIdKey = 'burst'; diff --git a/packages/rest/src/lib/utils/utils.ts b/packages/rest/src/lib/utils/utils.ts index 6034fdaa5a41..07d63e542d86 100644 --- a/packages/rest/src/lib/utils/utils.ts +++ b/packages/rest/src/lib/utils/utils.ts @@ -1,18 +1,8 @@ -import { Blob, Buffer } from 'node:buffer'; import { URLSearchParams } from 'node:url'; -import { types } from 'node:util'; -import type { RESTPatchAPIChannelJSONBody } from 'discord-api-types/v10'; -import { FormData, type Dispatcher, type RequestInit } from 'undici'; -import type { RequestOptions } from '../REST.js'; -import { RequestMethod } from '../RequestManager.js'; - -export function parseHeader(header: string[] | string | undefined): string | undefined { - if (header === undefined || typeof header === 'string') { - return header; - } - - return header.join(';'); -} +import type { RESTPatchAPIChannelJSONBody, Snowflake } from 'discord-api-types/v10'; +import type { RateLimitData, ResponseLike } from '../REST.js'; +import { type RequestManager, RequestMethod } from '../RequestManager.js'; +import { RateLimitError } from '../errors/RateLimitError.js'; function serializeSearchParam(value: unknown): string | null { switch (typeof value) { @@ -43,7 +33,7 @@ function serializeSearchParam(value: unknown): string | null { * @param options - The options to use * @returns A populated URLSearchParams instance */ -export function makeURLSearchParams(options?: Record) { +export function makeURLSearchParams(options?: Readonly) { const params = new URLSearchParams(); if (!options) return params; @@ -60,13 +50,12 @@ export function makeURLSearchParams(options?: Record) { * * @param res - The fetch response */ -export async function parseResponse(res: Dispatcher.ResponseData): Promise { - const header = parseHeader(res.headers['content-type']); - if (header?.startsWith('application/json')) { - return res.body.json(); +export async function parseResponse(res: ResponseLike): Promise { + if (res.headers.get('Content-Type')?.startsWith('application/json')) { + return res.json(); } - return res.body.arrayBuffer(); + return res.arrayBuffer(); } /** @@ -93,49 +82,6 @@ export function hasSublimit(bucketRoute: string, body?: unknown, method?: string return true; } -export async function resolveBody(body: RequestInit['body']): Promise { - // eslint-disable-next-line no-eq-null, eqeqeq - if (body == null) { - return null; - } else if (typeof body === 'string') { - return body; - } else if (types.isUint8Array(body)) { - return body; - } else if (types.isArrayBuffer(body)) { - return new Uint8Array(body); - } else if (body instanceof URLSearchParams) { - return body.toString(); - } else if (body instanceof DataView) { - return new Uint8Array(body.buffer); - } else if (body instanceof Blob) { - return new Uint8Array(await body.arrayBuffer()); - } else if (body instanceof FormData) { - return body; - } else if ((body as Iterable)[Symbol.iterator]) { - const chunks = [...(body as Iterable)]; - const length = chunks.reduce((a, b) => a + b.length, 0); - - const uint8 = new Uint8Array(length); - let lengthUsed = 0; - - return chunks.reduce((a, b) => { - a.set(b, lengthUsed); - lengthUsed += b.length; - return a; - }, uint8); - } else if ((body as AsyncIterable)[Symbol.asyncIterator]) { - const chunks: Uint8Array[] = []; - - for await (const chunk of body as AsyncIterable) { - chunks.push(chunk); - } - - return Buffer.concat(chunks); - } - - throw new TypeError(`Unable to resolve body.`); -} - /** * Check whether an error indicates that a retry can be attempted * @@ -148,3 +94,30 @@ export function shouldRetry(error: Error | NodeJS.ErrnoException) { // Downlevel ECONNRESET to retry as it may be recoverable return ('code' in error && error.code === 'ECONNRESET') || error.message.includes('ECONNRESET'); } + +/** + * Determines whether the request should be queued or whether a RateLimitError should be thrown + * + * @internal + */ +export async function onRateLimit(manager: RequestManager, rateLimitData: RateLimitData) { + const { options } = manager; + if (!options.rejectOnRateLimit) return; + + const shouldThrow = + typeof options.rejectOnRateLimit === 'function' + ? await options.rejectOnRateLimit(rateLimitData) + : options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase())); + if (shouldThrow) { + throw new RateLimitError(rateLimitData); + } +} + +/** + * Calculates the default avatar index for a given user id. + * + * @param userId - The user id to calculate the default avatar index for + */ +export function calculateUserDefaultAvatarIndex(userId: Snowflake) { + return Number(BigInt(userId) >> 22n) % 6; +} diff --git a/packages/rest/src/strategies/undiciRequest.ts b/packages/rest/src/strategies/undiciRequest.ts new file mode 100644 index 000000000000..691ab365f268 --- /dev/null +++ b/packages/rest/src/strategies/undiciRequest.ts @@ -0,0 +1,70 @@ +import { Buffer } from 'node:buffer'; +import { URLSearchParams } from 'node:url'; +import { types } from 'node:util'; +import { type RequestInit, request } from 'undici'; +import type { ResponseLike } from '../index.js'; + +export type RequestOptions = Exclude[1], undefined>; + +export async function makeRequest(url: string, init: RequestInit): Promise { + // The cast is necessary because `headers` and `method` are narrower types in `undici.request` + // our request path guarantees they are of acceptable type for `undici.request` + const options = { + ...init, + body: await resolveBody(init.body), + } as RequestOptions; + const res = await request(url, options); + return { + body: res.body, + async arrayBuffer() { + return res.body.arrayBuffer(); + }, + async json() { + return res.body.json(); + }, + async text() { + return res.body.text(); + }, + get bodyUsed() { + return res.body.bodyUsed; + }, + headers: new Headers(res.headers as Record), + status: res.statusCode, + ok: res.statusCode >= 200 && res.statusCode < 300, + }; +} + +export async function resolveBody(body: RequestInit['body']): Promise> { + // eslint-disable-next-line no-eq-null, eqeqeq + if (body == null) { + return null; + } else if (typeof body === 'string') { + return body; + } else if (types.isUint8Array(body)) { + return body; + } else if (types.isArrayBuffer(body)) { + return new Uint8Array(body); + } else if (body instanceof URLSearchParams) { + return body.toString(); + } else if (body instanceof DataView) { + return new Uint8Array(body.buffer); + } else if (body instanceof Blob) { + return new Uint8Array(await body.arrayBuffer()); + } else if (body instanceof FormData) { + return body; + } else if ((body as Iterable)[Symbol.iterator]) { + const chunks = [...(body as Iterable)]; + + return Buffer.concat(chunks); + } else if ((body as AsyncIterable)[Symbol.asyncIterator]) { + const chunks: Uint8Array[] = []; + + for await (const chunk of body as AsyncIterable) { + chunks.push(chunk); + } + + return Buffer.concat(chunks); + } + + throw new TypeError(`Unable to resolve body.`); +} diff --git a/packages/rest/tsconfig.docs.json b/packages/rest/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/rest/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/rest/tsup.config.ts b/packages/rest/tsup.config.ts new file mode 100644 index 000000000000..10ddbde0c605 --- /dev/null +++ b/packages/rest/tsup.config.ts @@ -0,0 +1,7 @@ +import { esbuildPluginVersionInjector } from 'esbuild-plugin-version-injector'; +import { createTsupConfig } from '../../tsup.config.js'; + +export default createTsupConfig({ + entry: ['src/index.ts', 'src/strategies/*.ts'], + esbuildPlugins: [esbuildPluginVersionInjector()], +}); diff --git a/packages/scripts/.eslintignore b/packages/scripts/.eslintignore new file mode 100644 index 000000000000..b1bd5ce82202 --- /dev/null +++ b/packages/scripts/.eslintignore @@ -0,0 +1 @@ +src/template diff --git a/packages/scripts/.eslintrc.json b/packages/scripts/.eslintrc.json index 6e2ebbf370f5..99ef7cec8051 100644 --- a/packages/scripts/.eslintrc.json +++ b/packages/scripts/.eslintrc.json @@ -1,4 +1,3 @@ { - "extends": "../../.eslintrc.json", - "ignorePatterns": "src/template/**/*" + "extends": "../../.eslintrc.json" } diff --git a/packages/scripts/.gitignore b/packages/scripts/.gitignore index 77327af27f7a..8150f3511c2e 100644 --- a/packages/scripts/.gitignore +++ b/packages/scripts/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,9 @@ pids .env # Dist -dist/ -typings/ - -docs/**/* +dist # Miscellaneous -.tmp/ -coverage/ - -searchIndex/ +.turbo +.tmp +coverage diff --git a/packages/scripts/.prettierignore b/packages/scripts/.prettierignore index 98eb791dbcaa..76348206aa96 100644 --- a/packages/scripts/.prettierignore +++ b/packages/scripts/.prettierignore @@ -1,9 +1,3 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ -src/template/ +coverage +dist diff --git a/packages/scripts/README.md b/packages/scripts/README.md index fe008a45a356..8c7f351278f4 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -10,15 +10,15 @@

Vercel + Cloudflare Workers

## Links - [Website][website] ([source][website-source]) -- [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -26,16 +26,15 @@ ## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the[documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/scripts [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 4714b6a1f3b1..652522b3a652 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -13,9 +13,9 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src" @@ -36,7 +36,8 @@ ], "repository": { "type": "git", - "url": "https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/scripts" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" @@ -44,27 +45,28 @@ "homepage": "https://discord.js.org", "dependencies": { "@discordjs/api-extractor-utils": "workspace:^", - "@microsoft/api-extractor-model": "7.24.0", - "@microsoft/tsdoc": "0.14.1", - "@microsoft/tsdoc-config": "0.16.1", - "commander": "^9.4.1", - "fs-extra": "^10.1.0", - "tslib": "^2.4.0", - "undici": "^5.11.0", - "yaml": "^2.1.3" + "@microsoft/api-extractor-model": "7.27.0", + "@microsoft/tsdoc": "0.14.2", + "@microsoft/tsdoc-config": "0.16.2", + "commander": "^10.0.1", + "fs-extra": "^11.1.1", + "tslib": "^2.5.2", + "undici": "^5.22.1", + "yaml": "2.3.0" }, "devDependencies": { - "@types/fs-extra": "^9.0.13", - "@types/node": "16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@types/fs-extra": "^11.0.1", + "@types/node": "16.18.32", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/scripts/src/createPackage.ts b/packages/scripts/src/createPackage.ts index fca7313a6111..ff5b45a6e2d4 100644 --- a/packages/scripts/src/createPackage.ts +++ b/packages/scripts/src/createPackage.ts @@ -4,6 +4,7 @@ import { chdir } from 'node:process'; import { copy } from 'fs-extra'; import { parse as parseYAML, stringify as stringifyYAML } from 'yaml'; import cliffJumperJSON from './template/.cliff-jumperrc.json'; +import apiExtractorJSON from './template/api-extractor.json'; import templateJSON from './template/template.package.json'; interface LabelerData { @@ -11,22 +12,33 @@ interface LabelerData { name: string; } +function sortYAMLObject(yaml: Record) { + const sortedYAML: typeof yaml = {}; + for (const key of Object.keys(yaml).sort((a, b) => a.localeCompare(b))) sortedYAML[key] = yaml[key]!; + return sortedYAML; +} + export async function createPackage(packageName: string, packageDescription?: string) { + const packageDir = join('packages', packageName); + // Make directory for package - await mkdir(`packages/${packageName}`); + await mkdir(packageDir); // Change to subdirectory - chdir(`packages/${packageName}`); + chdir(packageDir); // Create folder structure await Promise.all([mkdir('src'), mkdir('__tests__')]); - // Create files - await writeFile('src/index.ts', `console.log('Hello, from @discord.js/${packageName}');`); - - await writeFile('.eslintrc.json', await readFile('../scripts/src/template/template.eslintrc.json', 'utf8')); + const templateDir = join('..', 'scripts', 'src', 'template'); - await writeFile('.lintstagedrc.js', await readFile('../scripts/src/template/template.lintstagedrc.js', 'utf8')); + // Create files + await writeFile(join('src', 'index.ts'), `console.log('Hello, from @discordjs/${packageName}');`); + await writeFile('.eslintrc.json', await readFile(join(templateDir, 'template.eslintrc.json'), 'utf8')); + await writeFile('.gitignore', await readFile(join(templateDir, 'template.gitignore'), 'utf8')); + await writeFile('.lintstagedrc.js', await readFile(join(templateDir, 'template.lintstagedrc.js'), 'utf8')); + await writeFile('.prettierignore', await readFile(join(templateDir, 'template.prettierignore'), 'utf8')); + await writeFile('.prettierrc.js', await readFile(join(templateDir, 'template.prettierrc.js'), 'utf8')); const packageJSON = { ...templateJSON, @@ -37,14 +49,14 @@ export async function createPackage(packageName: string, packageDescription?: st // Edit changelog script packageJSON.scripts.changelog = packageJSON.scripts.changelog.replace('{name}', packageName); + // Edit repository directory + packageJSON.repository.directory = packageJSON.repository.directory.replace('{name}', packageName); + // Create package.json await writeFile(`package.json`, JSON.stringify(packageJSON, null, 2)); // Update cliff.toml - const cliffTOML = (await readFile(join('..', 'scripts/src/template/cliff.toml'), 'utf8')).replace( - '{name}', - packageName, - ); + const cliffTOML = (await readFile(join(templateDir, 'cliff.toml'), 'utf8')).replace('{name}', packageName); await writeFile('cliff.toml', cliffTOML); @@ -53,22 +65,40 @@ export async function createPackage(packageName: string, packageDescription?: st await writeFile('.cliff-jumperrc.json', JSON.stringify(newCliffJumperJSON, null, 2)); + // Update api-extractor.json + const newApiExtractorJSON = { ...apiExtractorJSON }; + newApiExtractorJSON.docModel.projectFolderUrl = newApiExtractorJSON.docModel.projectFolderUrl.replace( + '{name}', + packageName, + ); + + await writeFile('api-extractor.json', JSON.stringify(newApiExtractorJSON, null, 2)); + // Move to github directory - chdir('../../.github'); + chdir(join('..', '..', '.github')); const labelsYAML = parseYAML(await readFile('labels.yml', 'utf8')) as LabelerData[]; labelsYAML.push({ name: `packages:${packageName}`, color: 'fbca04' }); + labelsYAML.sort((a, b) => a.name.localeCompare(b.name)); + await writeFile('labels.yml', stringifyYAML(labelsYAML)); const labelerYAML = parseYAML(await readFile('labeler.yml', 'utf8')) as Record; - labelerYAML[`packages/${packageName}`] = [`packages:${packageName}/*`, `packages:${packageName}/**/*`]; + labelerYAML[`packages:${packageName}`] = [`packages/${packageName}/*`, `packages/${packageName}/**/*`]; + + await writeFile('labeler.yml', stringifyYAML(sortYAMLObject(labelerYAML))); + + const issueLabelerYAML = parseYAML(await readFile('issue-labeler.yml', 'utf8')) as Record; + issueLabelerYAML[`packages:${packageName}`] = [ + `### Which (application|package|application or package) is this (bug report|feature request) for\\?\\n\\n${packageName}\\n`, + ]; - await writeFile('labeler.yml', stringifyYAML(labelerYAML)); + await writeFile('issue-labeler.yml', stringifyYAML(sortYAMLObject(issueLabelerYAML))); // Move back to root chdir('..'); // Copy default files over - await copy('packages/scripts/src/template/default', `packages/${packageName}`); + await copy(join('packages', 'scripts', 'src', 'template', 'default'), packageDir); } diff --git a/packages/scripts/src/generateIndex.ts b/packages/scripts/src/generateIndex.ts index e7e17f2cc727..2a06645e1176 100644 --- a/packages/scripts/src/generateIndex.ts +++ b/packages/scripts/src/generateIndex.ts @@ -3,10 +3,10 @@ import { join } from 'node:path'; import { cwd } from 'node:process'; import { generatePath } from '@discordjs/api-extractor-utils'; import { + ApiModel, ApiDeclaredItem, ApiItemContainerMixin, ApiItem, - ApiModel, type ApiPackage, ApiItemKind, } from '@microsoft/api-extractor-model'; @@ -28,11 +28,22 @@ export interface MemberJSON { summary: string | null; } -export const PACKAGES = ['builders', 'collection', 'proxy', 'rest', 'util', 'voice', 'ws']; +export const PACKAGES = [ + 'brokers', + 'builders', + 'collection', + 'core', + 'formatters', + 'next', + 'proxy', + 'rest', + 'util', + 'voice', + 'ws', +]; let idx = 0; -export function createApiModel(data: any) { - const model = new ApiModel(); +export function addPackageToModel(model: ApiModel, data: any) { const tsdocConfiguration = new TSDocConfiguration(); const tsdocConfigFile = TSDocConfigFile.loadFromObject(data.metadata.tsdocConfig); tsdocConfigFile.configureParser(tsdocConfiguration); @@ -54,7 +65,7 @@ export function createApiModel(data: any) { * @param item - The API item to resolve the summary text for. */ export function tryResolveSummaryText(item: ApiDeclaredItem): string | null { - if (!item.tsdocComment) { + if (!item?.tsdocComment) { return null; } @@ -104,7 +115,7 @@ export function visitNodes(item: ApiItem, tag: string) { continue; } - if (member.kind === ApiItemKind.Constructor) { + if (member.kind === ApiItemKind.Constructor || member.kind === ApiItemKind.Namespace) { continue; } @@ -141,7 +152,7 @@ export async function generateIndex(model: ApiModel, packageName: string, tag = ); } -export async function generateAllIndicies() { +export async function generateAllIndices() { for (const pkg of PACKAGES) { const response = await request(`https://docs.discordjs.dev/api/info?package=${pkg}`); const versions = await response.body.json(); @@ -152,7 +163,7 @@ export async function generateAllIndicies() { const versionRes = await request(`https://docs.discordjs.dev/docs/${pkg}/${version}.api.json`); const data = await versionRes.body.json(); - const model = createApiModel(data); + const model = addPackageToModel(new ApiModel(), data); await generateIndex(model, pkg, version); } } diff --git a/packages/scripts/src/template/api-extractor.json b/packages/scripts/src/template/api-extractor.json new file mode 100644 index 000000000000..90119488b814 --- /dev/null +++ b/packages/scripts/src/template/api-extractor.json @@ -0,0 +1,6 @@ +{ + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/{name}" + } +} diff --git a/packages/scripts/src/template/cliff.toml b/packages/scripts/src/template/cliff.toml index 1e382a3b105a..22a56f2464e7 100644 --- a/packages/scripts/src/template/cliff.toml +++ b/packages/scripts/src/template/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/{name}@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/scripts/src/template/default/LICENSE b/packages/scripts/src/template/default/LICENSE index e633a147b210..499c2386f1a9 100644 --- a/packages/scripts/src/template/default/LICENSE +++ b/packages/scripts/src/template/default/LICENSE @@ -175,6 +175,8 @@ END OF TERMS AND CONDITIONS + Copyright 2023 Noel Buechler + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/scripts/src/template/default/api-extractor-docs.json b/packages/scripts/src/template/default/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/scripts/src/template/default/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/scripts/src/template/default/api-extractor.json b/packages/scripts/src/template/default/api-extractor.json deleted file mode 100644 index bc73f2cc022e..000000000000 --- a/packages/scripts/src/template/default/api-extractor.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../api-extractor.json" -} diff --git a/packages/scripts/src/template/default/tsconfig.docs.json b/packages/scripts/src/template/default/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/scripts/src/template/default/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/scripts/src/template/default/tsup.config.ts b/packages/scripts/src/template/default/tsup.config.ts new file mode 100644 index 000000000000..3d4480d6d4aa --- /dev/null +++ b/packages/scripts/src/template/default/tsup.config.ts @@ -0,0 +1,3 @@ +import { createTsupConfig } from '../../tsup.config.js'; + +export default createTsupConfig({}); diff --git a/packages/scripts/src/template/template.gitignore b/packages/scripts/src/template/template.gitignore new file mode 100644 index 000000000000..90500960f32b --- /dev/null +++ b/packages/scripts/src/template/template.gitignore @@ -0,0 +1,28 @@ +# Packages +node_modules + +# Log files +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Env +.env + +# Dist +dist +dist-docs + +# Docs +docs/**/* +!docs/README.md + +# Miscellaneous +.turbo +.tmp +coverage diff --git a/packages/scripts/src/template/template.package.json b/packages/scripts/src/template/template.package.json index ccf5cef016a5..d40b762d3ed1 100644 --- a/packages/scripts/src/template/template.package.json +++ b/packages/scripts/src/template/template.package.json @@ -5,9 +5,10 @@ "scripts": { "test": "vitest run", "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn build && yarn lint", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/{name}/*'", "release": "cliff-jumper" @@ -16,9 +17,9 @@ "module": "./dist/index.mjs", "typings": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src", @@ -35,7 +36,8 @@ "keywords": [], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/{name}" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" @@ -43,18 +45,18 @@ "homepage": "https://discord.js.org", "dependencies": {}, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.32.0", - "@types/node": "^16.11.64", - "@vitest/coverage-c8": "^0.24.1", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.34.4", + "@types/node": "16.18.23", + "@vitest/coverage-c8": "^0.30.1", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.38", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsup": "^6.2.3", - "typescript": "^4.8.4", - "vitest": "^0.24.1" + "eslint": "^8.38.0", + "eslint-config-neon": "^0.1.42", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.7", + "tsup": "^6.7.0", + "typescript": "^5.0.4", + "vitest": "^0.29.8" }, "engines": { "node": ">=16.9.0" diff --git a/packages/scripts/src/template/template.prettierignore b/packages/scripts/src/template/template.prettierignore new file mode 100644 index 000000000000..fc03103c7b8c --- /dev/null +++ b/packages/scripts/src/template/template.prettierignore @@ -0,0 +1,6 @@ +.turbo +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/scripts/src/template/template.prettierrc.js b/packages/scripts/src/template/template.prettierrc.js new file mode 100644 index 000000000000..f004026c7647 --- /dev/null +++ b/packages/scripts/src/template/template.prettierrc.js @@ -0,0 +1 @@ +module.exports = require('../../.prettierrc.json'); diff --git a/packages/scripts/tsconfig.eslint.json b/packages/scripts/tsconfig.eslint.json index d04d4be3aedc..686a4aaaea03 100644 --- a/packages/scripts/tsconfig.eslint.json +++ b/packages/scripts/tsconfig.eslint.json @@ -15,6 +15,5 @@ "**/*.spec.ts", "**/*.spec.js", "**/*.spec.mjs" - ], - "exclude": [] + ] } diff --git a/packages/scripts/tsup.config.js b/packages/scripts/tsup.config.ts similarity index 100% rename from packages/scripts/tsup.config.js rename to packages/scripts/tsup.config.ts diff --git a/packages/ui/.eslintrc.json b/packages/ui/.eslintrc.json index 97a5ac896bc2..d014984eac0e 100644 --- a/packages/ui/.eslintrc.json +++ b/packages/ui/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["../../.eslintrc.json", "neon/react", "neon/prettier"], + "extends": ["../../.eslintrc.json", "neon/react", "plugin:storybook/recommended", "@unocss", "neon/prettier"], "settings": { "react": { "version": "detect" @@ -7,6 +7,11 @@ }, "rules": { "react/react-in-jsx-scope": 0, - "react/jsx-filename-extension": [1, { "extensions": [".tsx"] }] + "react/jsx-filename-extension": [ + 1, + { + "extensions": [".tsx"] + } + ] } } diff --git a/packages/ui/.gitignore b/packages/ui/.gitignore index 86b93e929ae6..9c4c6802a5d8 100644 --- a/packages/ui/.gitignore +++ b/packages/ui/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,10 @@ pids .env # Dist -dist/ -typings/ -docs/**/* -!docs/index.json -!docs/README.md +dist +storybook-static # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp +coverage diff --git a/packages/ui/.ladle/components.tsx b/packages/ui/.ladle/components.tsx deleted file mode 100644 index da883dad6be2..000000000000 --- a/packages/ui/.ladle/components.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import type { GlobalProvider } from '@ladle/react'; -import '@unocss/reset/tailwind.css'; -import 'uno.css'; - -export const Provider: GlobalProvider = ({ children }) => <>{children}; diff --git a/packages/ui/.prettierignore b/packages/ui/.prettierignore index 553e0ea6c783..b6d224904811 100644 --- a/packages/ui/.prettierignore +++ b/packages/ui/.prettierignore @@ -1,8 +1,4 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ +coverage +dist +storybook-static diff --git a/packages/ui/.storybook/main.ts b/packages/ui/.storybook/main.ts new file mode 100644 index 000000000000..793fcc952628 --- /dev/null +++ b/packages/ui/.storybook/main.ts @@ -0,0 +1,21 @@ +import type { StorybookConfig } from '@storybook/react-vite'; + +export default { + stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'], + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-interactions', + '@storybook/addon-styling', + ], + core: { + builder: '@storybook/builder-vite', + }, + framework: { + name: '@storybook/react-vite', + options: {}, + }, + docs: { + autodocs: 'tag', + }, +} satisfies StorybookConfig; diff --git a/packages/ui/.storybook/preview.css b/packages/ui/.storybook/preview.css new file mode 100644 index 000000000000..1c99f07dfdf1 --- /dev/null +++ b/packages/ui/.storybook/preview.css @@ -0,0 +1,7 @@ +html { + color-scheme: light; +} + +html.dark { + color-scheme: dark; +} diff --git a/packages/ui/.storybook/preview.ts b/packages/ui/.storybook/preview.ts new file mode 100644 index 000000000000..122acf724494 --- /dev/null +++ b/packages/ui/.storybook/preview.ts @@ -0,0 +1,28 @@ +import type { Preview } from '@storybook/react'; +import { withThemeByClassName } from '@storybook/addon-styling'; + +import '@unocss/reset/tailwind-compat.css'; +import './preview.css'; +import 'virtual:uno.css'; + +export default { + parameters: { + actions: { argTypesRegex: '^on[A-Z].*' }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, + }, +} satisfies Preview; + +export const decorators = [ + withThemeByClassName({ + themes: { + light: 'bg-light-600', + dark: 'dark bg-dark-600', + }, + defaultTheme: 'light', + }), +]; diff --git a/packages/ui/README.md b/packages/ui/README.md index 7757b5951a66..0a59d9f6b6b5 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -10,6 +10,7 @@

Vercel + Cloudflare Workers

@@ -18,7 +19,7 @@ - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -26,16 +27,16 @@ ## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/ [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/ui/api-extractor-docs.json b/packages/ui/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/ui/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/ui/cliff.toml b/packages/ui/cliff.toml index cc35ad876a37..199a5b60a610 100644 --- a/packages/ui/cliff.toml +++ b/packages/ui/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/ui-components@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/ui/package.json b/packages/ui/package.json index 807e6ab999d0..c345bc17abbc 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -10,14 +10,16 @@ "prepack": "yarn build && yarn lint", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/ui/*'", "release": "cliff-jumper", - "storybook": "ladle serve" + "storybook": "storybook dev -p 6006", + "build-storybook": "storybook build", + "chromatic": "chromatic" }, "type": "module", - "module": "./dist/ui.js", + "main": "./dist/index.js", "typings": "./dist/index.d.ts", "exports": { - "import": "./dist/ui.js", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" }, "sideEffects": false, "directories": { @@ -36,37 +38,52 @@ "keywords": [], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/ui" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { - "ariakit": "^2.0.0-next.41", + "@react-icons/all-files": "^4.1.0", + "ariakit": "^2.0.0-next.44", "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-icons": "^4.6.0" + "react-dom": "^18.2.0" }, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@ladle/react": "^2.4.5", - "@types/node": "16.11.68", - "@types/react": "^18.0.21", - "@types/react-dom": "^18.0.6", - "@unocss/reset": "^0.45.30", - "@vitejs/plugin-react": "^2.1.0", - "@vitest/coverage-c8": "^0.24.3", + "@favware/cliff-jumper": "^2.0.0", + "@react-icons/all-files": "^4.1.0", + "@storybook/addon-essentials": "^7.0.15", + "@storybook/addon-interactions": "^7.0.15", + "@storybook/addon-links": "^7.0.15", + "@storybook/addon-styling": "^1.0.8", + "@storybook/blocks": "^7.0.15", + "@storybook/react": "^7.0.15", + "@storybook/react-vite": "^7.0.15", + "@storybook/testing-library": "^0.1.0", + "@types/node": "16.18.32", + "@types/react": "^18.2.6", + "@types/react-dom": "^18.2.4", + "@unocss/eslint-config": "^0.52.3", + "@unocss/reset": "^0.52.3", + "@vitejs/plugin-react": "^4.0.0", + "@vitest/coverage-c8": "^0.31.1", + "chromatic": "^6.17.4", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "typescript": "^4.8.4", - "unocss": "^0.45.30", - "vite": "^3.1.8", - "vite-plugin-dts": "^1.6.6", - "vitest": "^0.24.3" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "eslint-plugin-storybook": "^0.6.12", + "prettier": "^2.8.8", + "prop-types": "^15.8.1", + "storybook": "^7.0.15", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "unocss": "^0.52.3", + "vite": "^4.3.9", + "vite-plugin-dts": "^2.3.0", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/ui/src/lib/components/Alert.stories.tsx b/packages/ui/src/lib/components/Alert.stories.tsx new file mode 100644 index 000000000000..d32196fc9e85 --- /dev/null +++ b/packages/ui/src/lib/components/Alert.stories.tsx @@ -0,0 +1,19 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { Alert } from './Alert.jsx'; + +export default { + title: 'Alert', + component: Alert, + tags: ['autodocs'], +} satisfies Meta; + +type Story = StoryObj; + +export const Default = { + render: ({ children, ...args }) => {children}, + args: { + type: 'info', + title: 'Test', + children: 'Test Content', + }, +} satisfies Story; diff --git a/packages/ui/src/lib/components/Alert.tsx b/packages/ui/src/lib/components/Alert.tsx index e50156634fc6..e0822b40f311 100644 --- a/packages/ui/src/lib/components/Alert.tsx +++ b/packages/ui/src/lib/components/Alert.tsx @@ -1,5 +1,7 @@ +import { VscFlame } from '@react-icons/all-files/vsc/VscFlame'; +import { VscInfo } from '@react-icons/all-files/vsc/VscInfo'; +import { VscWarning } from '@react-icons/all-files/vsc/VscWarning'; import type { PropsWithChildren } from 'react'; -import { VscFlame, VscInfo, VscWarning } from 'react-icons/vsc'; export interface IAlert { title?: string | undefined; @@ -46,18 +48,18 @@ export function Alert({ title, type, children }: PropsWithChildren) { const { text, border, icon } = resolveType(type); return ( -
+
{children}
-
-
+
+
{icon} - {title} + {title ? {title} : null}
-
+
diff --git a/packages/ui/src/lib/components/Section.stories.tsx b/packages/ui/src/lib/components/Section.stories.tsx index 3f4307dd01c6..af472d3f9c22 100644 --- a/packages/ui/src/lib/components/Section.stories.tsx +++ b/packages/ui/src/lib/components/Section.stories.tsx @@ -1,58 +1,18 @@ -import type { Story } from '@ladle/react'; -import type { PropsWithChildren } from 'react'; -import { Section, type SectionOptions } from './Section.jsx'; +import type { Meta, StoryObj } from '@storybook/react'; +import { Section } from './Section.jsx'; -export const Default = () =>
Test 1234
; +export default { + title: 'Section', + component: Section, + tags: ['autodocs'], +} satisfies Meta; -export const Padded = () => ( -
- Test 1234 -
-); +type Story = StoryObj; -export const Background = () => ( -
- Test 1234 -
-); - -export const Dense = () => ( -
- Test 1234 -
-); - -export const Gutter = () => ( -
- Test 1234 -
-); - -export const Playground: Story> = ({ - title, - background, - defaultClosed, - dense, - gutter, - padded, -}: PropsWithChildren) => ( -
- Test 1234 -
-); - -Playground.args = { - title: 'Test', - background: true, - defaultClosed: false, - dense: false, - gutter: true, - padded: true, -}; +export const Default = { + render: ({ children, ...args }) =>
{children}
, + args: { + title: 'Test', + children: 'Test Content', + }, +} satisfies Story; diff --git a/packages/ui/src/lib/components/Section.tsx b/packages/ui/src/lib/components/Section.tsx index e4da574c520d..8d90f00d9824 100644 --- a/packages/ui/src/lib/components/Section.tsx +++ b/packages/ui/src/lib/components/Section.tsx @@ -1,11 +1,14 @@ +'use client'; + +import { VscChevronDown } from '@react-icons/all-files/vsc/VscChevronDown'; import { Disclosure, DisclosureContent, useDisclosureState } from 'ariakit/disclosure'; import type { PropsWithChildren } from 'react'; -import { VscChevronDown } from 'react-icons/vsc'; export interface SectionOptions { background?: boolean | undefined; + buttonClassName?: string; + className?: string; defaultClosed?: boolean | undefined; - dense?: boolean | undefined; gutter?: boolean | undefined; icon?: JSX.Element | undefined; padded?: boolean | undefined; @@ -16,18 +19,23 @@ export function Section({ title, icon, padded = false, - dense = false, defaultClosed = false, background = false, gutter = false, children, + className = '', + buttonClassName = '', }: PropsWithChildren) { const disclosure = useDisclosureState({ defaultOpen: !defaultClosed }); return ( -
+
@@ -45,7 +53,7 @@ export function Section({ className={`${background ? 'bg-light-700 dark:bg-dark-500 rounded' : ''} ${gutter ? 'mt-2' : ''}`} state={disclosure} > - {padded ?
{children}
: children} + {padded ?
{children}
: children}
); diff --git a/packages/ui/src/lib/components/discord/DiscordMessages.stories.tsx b/packages/ui/src/lib/components/discord/DiscordMessages.stories.tsx new file mode 100644 index 000000000000..f3d734c90f1d --- /dev/null +++ b/packages/ui/src/lib/components/discord/DiscordMessages.stories.tsx @@ -0,0 +1,165 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { DiscordMessage } from './Message.jsx'; +import { DiscordMessageEmbed } from './MessageEmbed.jsx'; +import { DiscordMessages } from './Messages.jsx'; + +export default { + title: 'DiscordMessages', + component: DiscordMessages, + tags: ['autodocs'], +} satisfies Meta; + +type Story = StoryObj; + +export const Default = { + render: ({ ...args }) => ( + + + A _`DiscordMessage`_ must be within _`DiscordMessages`_. + + + It's much better to see the source code of this page to replicate and learn! + + + This message depicts the use of embeds. + <> + + This is a description. You can put a description here. It must be descriptive! + + + Multiple embeds! + + + + + + Interactions are supported! I definitely used a command. + + + Display colors are supported as well! + + + ), + args: { + rounded: false, + }, +} satisfies Story; diff --git a/packages/ui/src/lib/components/discord/Message.tsx b/packages/ui/src/lib/components/discord/Message.tsx index fc0e85c07928..f0586853075f 100644 --- a/packages/ui/src/lib/components/discord/Message.tsx +++ b/packages/ui/src/lib/components/discord/Message.tsx @@ -1,7 +1,18 @@ import type { PropsWithChildren, ReactNode } from 'react'; -import { DiscordMessageAuthor, type IDiscordMessageAuthor } from './MessageAuthor.jsx'; -import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './MessageInteraction.jsx'; -import { DiscordMessageReply, type IDiscordMessageReply } from './MessageReply.jsx'; +import { DiscordMessageAuthor, type IDiscordMessageAuthor } from './MessageAuthor.js'; +import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './MessageInteraction.js'; +import { DiscordMessageReply, type IDiscordMessageReply } from './MessageReply.js'; + +export interface IDiscordMessage { + author?: IDiscordMessageAuthor | undefined; + authorNode?: ReactNode | undefined; + followUp?: boolean; + interaction?: IDiscordMessageInteraction | undefined; + interactionNode?: ReactNode | undefined; + reply?: IDiscordMessageReply | undefined; + replyNode?: ReactNode | undefined; + time?: string | undefined; +} export function DiscordMessage({ reply, @@ -13,16 +24,7 @@ export function DiscordMessage({ followUp, time, children, -}: PropsWithChildren<{ - author?: IDiscordMessageAuthor | undefined; - authorNode?: ReactNode | undefined; - followUp?: boolean; - interaction?: IDiscordMessageInteraction | undefined; - interactionNode?: ReactNode | undefined; - reply?: IDiscordMessageReply | undefined; - replyNode?: ReactNode | undefined; - time?: string | undefined; -}>) { +}: PropsWithChildren) { return (
{followUp ? ( {time} @@ -50,7 +52,7 @@ export function DiscordMessage({ ) : ( authorNode )} -
+
{children}
diff --git a/packages/ui/src/lib/components/discord/MessageAuthor.tsx b/packages/ui/src/lib/components/discord/MessageAuthor.tsx index 6e76d63ce809..0e41f81bb68d 100644 --- a/packages/ui/src/lib/components/discord/MessageAuthor.tsx +++ b/packages/ui/src/lib/components/discord/MessageAuthor.tsx @@ -1,11 +1,15 @@ +import { FiCheck } from '@react-icons/all-files/fi/FiCheck'; + export interface IDiscordMessageAuthor { avatar: string; bot?: boolean; + color?: string; time: string; username: string; + verified?: boolean; } -export function DiscordMessageAuthor({ avatar, username, bot, time }: IDiscordMessageAuthor) { +export function DiscordMessageAuthor({ avatar, bot, verified, color, time, username }: IDiscordMessageAuthor) { return ( <> -

- - {username} +

+ + + {username} + {bot ? ( - - BOT + + {verified ? : null} BOT ) : null} diff --git a/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx b/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx index e72f2d64433c..78688fd61619 100644 --- a/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx +++ b/packages/ui/src/lib/components/discord/MessageAuthorReply.tsx @@ -1,19 +1,26 @@ +import { FiCheck } from '@react-icons/all-files/fi/FiCheck'; + export interface IDiscordMessageAuthorReply { avatar: string; bot?: boolean; + color?: string; username: string; + verified?: boolean; } -export function DiscordMessageAuthorReply({ avatar, bot, username }: IDiscordMessageAuthorReply) { +export function DiscordMessageAuthorReply({ avatar, bot, verified, color, username }: IDiscordMessageAuthorReply) { return ( <> - {`${username}'s + {`${username}'s {bot ? ( -
- BOT +
+ {verified ? : null} BOT
) : null} - + {username} diff --git a/packages/ui/src/lib/components/discord/MessageBaseReply.tsx b/packages/ui/src/lib/components/discord/MessageBaseReply.tsx index 1c3727bbb9c1..b6b4ec022094 100644 --- a/packages/ui/src/lib/components/discord/MessageBaseReply.tsx +++ b/packages/ui/src/lib/components/discord/MessageBaseReply.tsx @@ -1,5 +1,5 @@ import type { PropsWithChildren, ReactNode } from 'react'; -import { DiscordMessageAuthorReply, type IDiscordMessageAuthorReply } from './MessageAuthorReply.jsx'; +import { DiscordMessageAuthorReply, type IDiscordMessageAuthorReply } from './MessageAuthorReply.js'; export function DiscordMessageBaseReply({ author, @@ -8,10 +8,10 @@ export function DiscordMessageBaseReply({ }: PropsWithChildren<{ author?: IDiscordMessageAuthorReply | undefined; authorNode?: ReactNode | undefined }>) { return (
-
+
{author ? : authorNode}
{children} diff --git a/packages/ui/src/lib/components/discord/MessageEmbed.tsx b/packages/ui/src/lib/components/discord/MessageEmbed.tsx index 7a4163485237..ae743794924e 100644 --- a/packages/ui/src/lib/components/discord/MessageEmbed.tsx +++ b/packages/ui/src/lib/components/discord/MessageEmbed.tsx @@ -1,13 +1,20 @@ import type { PropsWithChildren, ReactNode } from 'react'; -import { DiscordMessageEmbedAuthor, type IDiscordMessageEmbedAuthor } from './MessageEmbedAuthor.jsx'; -import { DiscordMessageEmbedFooter, type IDiscordMessageEmbedFooter } from './MessageEmbedFooter.jsx'; -import { DiscordMessageEmbedTitle, type IDiscordMessageEmbedTitle } from './MessageEmbedTitle.jsx'; +import { DiscordMessageEmbedAuthor, type IDiscordMessageEmbedAuthor } from './MessageEmbedAuthor.js'; +import type { IDiscordMessageEmbedField } from './MessageEmbedField.js'; +import { DiscordMessageEmbedFields } from './MessageEmbedFields.js'; +import { DiscordMessageEmbedFooter, type IDiscordMessageEmbedFooter } from './MessageEmbedFooter.js'; +import { DiscordMessageEmbedImage, type IDiscordMessageEmbedImage } from './MessageEmbedImage.js'; +import { DiscordMessageEmbedThumbnail, type IDiscordMessageEmbedThumbnail } from './MessageEmbedThumbnail.js'; +import { DiscordMessageEmbedTitle, type IDiscordMessageEmbedTitle } from './MessageEmbedTitle.js'; export interface IDiscordMessageEmbed { author?: IDiscordMessageEmbedAuthor | undefined; authorNode?: ReactNode | undefined; + fields?: IDiscordMessageEmbedField[]; footer?: IDiscordMessageEmbedFooter | undefined; footerNode?: ReactNode | undefined; + image?: IDiscordMessageEmbedImage; + thumbnail?: IDiscordMessageEmbedThumbnail; title?: IDiscordMessageEmbedTitle | undefined; titleNode?: ReactNode | undefined; } @@ -15,22 +22,29 @@ export interface IDiscordMessageEmbed { export function DiscordMessageEmbed({ author, authorNode, + fields, title, titleNode, + image, children, + thumbnail, footer, footerNode, }: PropsWithChildren) { return (
-
-
-
+
+
+
{author ? : authorNode ?? null} {title ? : titleNode ?? null} {children ?
{children}
: null} + {fields ? : null} + {image ? : null} {footer ? : footerNode ?? null}
+ + {thumbnail ? : null}
diff --git a/packages/ui/src/lib/components/discord/MessageEmbedAuthor.tsx b/packages/ui/src/lib/components/discord/MessageEmbedAuthor.tsx index 793970d23b61..c0dafd25aec7 100644 --- a/packages/ui/src/lib/components/discord/MessageEmbedAuthor.tsx +++ b/packages/ui/src/lib/components/discord/MessageEmbedAuthor.tsx @@ -1,13 +1,25 @@ export interface IDiscordMessageEmbedAuthor { avatar: string; + url?: string; username: string; } -export function DiscordMessageEmbedAuthor({ avatar, username }: IDiscordMessageEmbedAuthor) { +export function DiscordMessageEmbedAuthor({ avatar, url, username }: IDiscordMessageEmbedAuthor) { return (
{`${username}'s - {username} + {url ? ( + + {username} + + ) : ( + {username} + )}
); } diff --git a/packages/ui/src/lib/components/discord/MessageEmbedField.tsx b/packages/ui/src/lib/components/discord/MessageEmbedField.tsx new file mode 100644 index 000000000000..49fdf6a58abb --- /dev/null +++ b/packages/ui/src/lib/components/discord/MessageEmbedField.tsx @@ -0,0 +1,14 @@ +export interface IDiscordMessageEmbedField { + inline?: boolean; + name: string; + value: string; +} + +export function DiscordMessageEmbedField({ name, value, inline }: IDiscordMessageEmbedField) { + return ( +
+ {name} + {value} +
+ ); +} diff --git a/packages/ui/src/lib/components/discord/MessageEmbedFields.tsx b/packages/ui/src/lib/components/discord/MessageEmbedFields.tsx new file mode 100644 index 000000000000..2c99e095978d --- /dev/null +++ b/packages/ui/src/lib/components/discord/MessageEmbedFields.tsx @@ -0,0 +1,15 @@ +import { DiscordMessageEmbedField, type IDiscordMessageEmbedField } from './MessageEmbedField.js'; + +export interface IDiscordMessageEmbedFields { + fields: IDiscordMessageEmbedField[]; +} + +export function DiscordMessageEmbedFields({ fields }: IDiscordMessageEmbedFields) { + return ( +
+ {fields.map((field, idx) => ( + + ))} +
+ ); +} diff --git a/packages/ui/src/lib/components/discord/MessageEmbedFooter.tsx b/packages/ui/src/lib/components/discord/MessageEmbedFooter.tsx index c4a0687e3d60..9c571c8c479c 100644 --- a/packages/ui/src/lib/components/discord/MessageEmbedFooter.tsx +++ b/packages/ui/src/lib/components/discord/MessageEmbedFooter.tsx @@ -1,7 +1,17 @@ export interface IDiscordMessageEmbedFooter { - content: string; + content?: string; + icon?: string; + timestamp?: string; } -export function DiscordMessageEmbedFooter({ content }: IDiscordMessageEmbedFooter) { - return
{content}
; +export function DiscordMessageEmbedFooter({ content, icon, timestamp }: IDiscordMessageEmbedFooter) { + return ( +
+ {icon ? : null} + + {content} + {content && timestamp ? : null} + {timestamp} +
+ ); } diff --git a/packages/ui/src/lib/components/discord/MessageEmbedImage.tsx b/packages/ui/src/lib/components/discord/MessageEmbedImage.tsx new file mode 100644 index 000000000000..c0e284749f3b --- /dev/null +++ b/packages/ui/src/lib/components/discord/MessageEmbedImage.tsx @@ -0,0 +1,10 @@ +export interface IDiscordMessageEmbedImage { + alt: string; + height: number; + url: string; + width: number; +} + +export function DiscordMessageEmbedImage({ alt, height, url, width }: IDiscordMessageEmbedImage) { + return {alt}; +} diff --git a/packages/ui/src/lib/components/discord/MessageEmbedThumbnail.tsx b/packages/ui/src/lib/components/discord/MessageEmbedThumbnail.tsx new file mode 100644 index 000000000000..bfa14a80c970 --- /dev/null +++ b/packages/ui/src/lib/components/discord/MessageEmbedThumbnail.tsx @@ -0,0 +1,8 @@ +export interface IDiscordMessageEmbedThumbnail { + alt: string; + image: string; +} + +export function DiscordMessageEmbedThumbnail({ alt, image }: IDiscordMessageEmbedThumbnail) { + return {alt}; +} diff --git a/packages/ui/src/lib/components/discord/MessageEmbedTitle.tsx b/packages/ui/src/lib/components/discord/MessageEmbedTitle.tsx index 0e3f2c75d5f4..068cd808125f 100644 --- a/packages/ui/src/lib/components/discord/MessageEmbedTitle.tsx +++ b/packages/ui/src/lib/components/discord/MessageEmbedTitle.tsx @@ -1,7 +1,19 @@ export interface IDiscordMessageEmbedTitle { title: string; + url?: string; } -export function DiscordMessageEmbedTitle({ title }: IDiscordMessageEmbedTitle) { - return
{title}
; +export function DiscordMessageEmbedTitle({ title, url }: IDiscordMessageEmbedTitle) { + return url ? ( + + {title} + + ) : ( +
{title}
+ ); } diff --git a/packages/ui/src/lib/components/discord/MessageInteraction.tsx b/packages/ui/src/lib/components/discord/MessageInteraction.tsx index 97db2020b32d..f8d9e9c4b3fa 100644 --- a/packages/ui/src/lib/components/discord/MessageInteraction.tsx +++ b/packages/ui/src/lib/components/discord/MessageInteraction.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.jsx'; -import { DiscordMessageBaseReply } from './MessageBaseReply.jsx'; +import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.js'; +import { DiscordMessageBaseReply } from './MessageBaseReply.js'; export interface IDiscordMessageInteraction { author?: IDiscordMessageAuthorReply | undefined; @@ -12,7 +12,7 @@ export function DiscordMessageInteraction({ author, authorNode, command }: IDisc return ( used -
{command}
+
{command}
); } diff --git a/packages/ui/src/lib/components/discord/MessageReply.tsx b/packages/ui/src/lib/components/discord/MessageReply.tsx index fad8e302039c..d565028f3de6 100644 --- a/packages/ui/src/lib/components/discord/MessageReply.tsx +++ b/packages/ui/src/lib/components/discord/MessageReply.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.jsx'; -import { DiscordMessageBaseReply } from './MessageBaseReply.jsx'; +import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.js'; +import { DiscordMessageBaseReply } from './MessageBaseReply.js'; export interface IDiscordMessageReply { author?: IDiscordMessageAuthorReply | undefined; diff --git a/packages/ui/src/lib/components/discord/Messages.tsx b/packages/ui/src/lib/components/discord/Messages.tsx index 0521781f9719..64f2da76cfd4 100644 --- a/packages/ui/src/lib/components/discord/Messages.tsx +++ b/packages/ui/src/lib/components/discord/Messages.tsx @@ -1,6 +1,10 @@ import type { PropsWithChildren } from 'react'; -export function DiscordMessages({ rounded, children }: PropsWithChildren<{ rounded?: boolean }>) { +export interface IDiscordMessages { + rounded?: boolean; +} + +export function DiscordMessages({ rounded, children }: PropsWithChildren) { return (

Vercel + Cloudflare Workers

+## About + +`@discordjs/util` is a collection of utility functions for use with discord.js. + ## Installation **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install @discordjs/util yarn add @discordjs/util pnpm add @discordjs/util @@ -28,7 +33,7 @@ pnpm add @discordjs/util - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -43,12 +48,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/util +[documentation]: https://discord.js.org/docs/packages/util/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/util/__tests__/range.test.ts b/packages/util/__tests__/range.test.ts index 2b9a37e7c69c..1a822ed7eab9 100644 --- a/packages/util/__tests__/range.test.ts +++ b/packages/util/__tests__/range.test.ts @@ -2,11 +2,15 @@ import { describe, test, expect } from 'vitest'; import { range } from '../src/index.js'; describe('range', () => { - test('GIVEN valid range THEN valid array is returned', () => { - expect(range(0, 5)).toEqual([0, 1, 2, 3, 4, 5]); + test('GIVEN valid range and then valid numbers are returned', () => { + expect([...range(5)]).toEqual([0, 1, 2, 3, 4]); }); - test('GIVEN valid range with step THEN valid array is returned', () => { - expect(range(0, 10, 2)).toEqual([0, 2, 4, 6, 8, 10]); + test('GIVEN valid range with start and end THEN valid numbers are returned', () => { + expect([...range({ start: 0, end: 5 })]).toEqual([0, 1, 2, 3, 4]); + }); + + test('GIVEN valid range with start, end and step THEN valid numbers are returned', () => { + expect([...range({ start: 0, end: 11, step: 2 })]).toEqual([0, 2, 4, 6, 8, 10]); }); }); diff --git a/packages/util/__tests__/types/Equatable.test-d.ts b/packages/util/__tests__/types/Equatable.test-d.ts index 86c579192940..db918b432390 100644 --- a/packages/util/__tests__/types/Equatable.test-d.ts +++ b/packages/util/__tests__/types/Equatable.test-d.ts @@ -1,5 +1,5 @@ import { expectType } from 'tsd'; -import type { Equatable } from '../../dist'; +import type { Equatable } from '../../dist/index.js'; import { isEquatable } from '../../src/index.js'; declare const unknownObj: unknown; diff --git a/packages/util/__tests__/types/JSONEncodable.test-d.ts b/packages/util/__tests__/types/JSONEncodable.test-d.ts index 7f28e6485d39..710cf014aa5a 100644 --- a/packages/util/__tests__/types/JSONEncodable.test-d.ts +++ b/packages/util/__tests__/types/JSONEncodable.test-d.ts @@ -1,5 +1,5 @@ import { expectType } from 'tsd'; -import type { JSONEncodable } from '../../dist'; +import type { JSONEncodable } from '../../dist/index.js'; import { isJSONEncodable } from '../../src/index.js'; declare const unknownObj: unknown; diff --git a/packages/util/api-extractor-docs.json b/packages/util/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/util/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/util/api-extractor.json b/packages/util/api-extractor.json index bc73f2cc022e..68794c3c11a9 100644 --- a/packages/util/api-extractor.json +++ b/packages/util/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/util" + } } diff --git a/packages/util/cliff.toml b/packages/util/cliff.toml index 3a92205f55a1..f624c9e709f8 100644 --- a/packages/util/cliff.toml +++ b/packages/util/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/util@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/util/docs/README.md b/packages/util/docs/README.md index 08cc4b4c66d8..91304bab12c2 100644 --- a/packages/util/docs/README.md +++ b/packages/util/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/rest) +## [View the documentation here.](https://discord.js.org/docs/packages/util/main) diff --git a/packages/util/docs/index.json b/packages/util/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/util/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/util/package.json b/packages/util/package.json index 37a7c2093ab4..d0c58aa39fd5 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,14 +1,15 @@ { "name": "@discordjs/util", - "version": "0.1.0", + "version": "0.3.1", "description": "Utilities shared across Discord.js packages", "scripts": { "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", "test": "vitest run && tsd", "lint": "prettier --check . && TIMING=1 eslint src --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && TIMING=1 eslint src --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn lint && yarn test && yarn build", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/util/*'", "release": "cliff-jumper" @@ -17,9 +18,9 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src" @@ -44,26 +45,28 @@ ], "repository": { "type": "git", - "url": "https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/util" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/node": "16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "16.18.32", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "prettier": "^2.7.1", - "tsd": "^0.24.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "vitest": "^0.24.3" + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsd": "^0.28.1", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "vitest": "^0.31.1" }, "engines": { "node": ">=16.9.0" diff --git a/packages/util/src/functions/calculateShardId.ts b/packages/util/src/functions/calculateShardId.ts new file mode 100644 index 000000000000..2e33e912de12 --- /dev/null +++ b/packages/util/src/functions/calculateShardId.ts @@ -0,0 +1,9 @@ +/** + * Calculates the shard id for a given guild id. + * + * @param guildId - The guild id to calculate the shard id for + * @param shardCount - The total number of shards + */ +export function calculateShardId(guildId: string, shardCount: number) { + return Number(BigInt(guildId) >> 22n) % shardCount; +} diff --git a/packages/util/src/functions/index.ts b/packages/util/src/functions/index.ts index 93173c1d2f2d..f5fdc6654663 100644 --- a/packages/util/src/functions/index.ts +++ b/packages/util/src/functions/index.ts @@ -1,2 +1,3 @@ export * from './lazy.js'; export * from './range.js'; +export * from './calculateShardId.js'; diff --git a/packages/util/src/functions/range.ts b/packages/util/src/functions/range.ts index 24c8e4b82161..8262773f6a1b 100644 --- a/packages/util/src/functions/range.ts +++ b/packages/util/src/functions/range.ts @@ -1,20 +1,61 @@ /** - * Yields the numbers in the given range as an array + * Options for creating a range + */ +export interface RangeOptions { + /** + * The end of the range (exclusive) + */ + end: number; + /** + * The start of the range (inclusive) + */ + start: number; + /** + * The amount to increment by + * + * @defaultValue `1` + */ + step?: number; +} + +/** + * A generator to yield numbers in a given range * - * @param start - The start of the range - * @param end - The end of the range (inclusive) - * @param step - The amount to increment between each number + * @remarks + * This method is end-exclusive, for example the last number yielded by `range(5)` is 4. If you + * prefer for the end to be included add 1 to the range or `end` option. + * @param range - A number representing the the range to yield (exclusive) or an object with start, end and step * @example * Basic range * ```ts - * range(3, 5); // [3, 4, 5] + * for (const number of range(5)) { + * console.log(number); + * } + * // Prints 0, 1, 2, 3, 4 * ``` * @example * Range with a step * ```ts - * range(3, 10, 2); // [3, 5, 7, 9] + * for (const number of range({ start: 3, end: 10, step: 2 })) { + * console.log(number); + * } + * // Prints 3, 5, 7, 9 * ``` */ -export function range(start: number, end: number, step = 1): number[] { - return Array.from({ length: (end - start) / step + 1 }, (_, index) => start + index * step); +export function* range(range: RangeOptions | number) { + let rangeEnd: number; + let start = 0; + let step = 1; + + if (typeof range === 'number') { + rangeEnd = range; + } else { + start = range.start; + rangeEnd = range.end; + step = range.step ?? 1; + } + + for (let index = start; index < rangeEnd; index += step) { + yield index; + } } diff --git a/packages/util/tsconfig.docs.json b/packages/util/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/util/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/util/tsup.config.js b/packages/util/tsup.config.ts similarity index 100% rename from packages/util/tsup.config.js rename to packages/util/tsup.config.ts diff --git a/packages/voice/.eslintignore b/packages/voice/.eslintignore deleted file mode 100644 index cd4efd8e5b27..000000000000 --- a/packages/voice/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -*.d.ts diff --git a/packages/voice/.eslintrc.json b/packages/voice/.eslintrc.json index f2acef1280ab..757cfc84aff8 100644 --- a/packages/voice/.eslintrc.json +++ b/packages/voice/.eslintrc.json @@ -1,12 +1,7 @@ { "extends": "../../.eslintrc.json", - "plugins": ["eslint-plugin-tsdoc"], "rules": { "import/extensions": 0, "no-restricted-globals": 0 - }, - "parserOptions": { - "project": "./tsconfig.eslint.json", - "extraFileExtensions": [".mjs"] } } diff --git a/packages/voice/.gitignore b/packages/voice/.gitignore index 0d090a04fe0f..90500960f32b 100644 --- a/packages/voice/.gitignore +++ b/packages/voice/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -11,14 +11,18 @@ pids *.pid *.seed +# Env +.env + # Dist -dist/ -typings/ +dist +dist-docs +# Docs docs/**/* -!docs/index.json !docs/README.md # Miscellaneous -.tmp/ -coverage/ +.turbo +.tmp +coverage diff --git a/packages/voice/.prettierignore b/packages/voice/.prettierignore index 8b94c7d45e03..fc03103c7b8c 100644 --- a/packages/voice/.prettierignore +++ b/packages/voice/.prettierignore @@ -1,8 +1,6 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ \ No newline at end of file +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/voice/CHANGELOG.md b/packages/voice/CHANGELOG.md index a4a57d8c9b05..7b6dcff5ded7 100644 --- a/packages/voice/CHANGELOG.md +++ b/packages/voice/CHANGELOG.md @@ -2,6 +2,45 @@ All notable changes to this project will be documented in this file. +# [@discordjs/voice@0.16.0](https://github.com/discordjs/discord.js/compare/@discordjs/voice@0.15.0...@discordjs/voice@0.16.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) + +# [@discordjs/voice@0.15.0](https://github.com/discordjs/discord.js/compare/@discordjs/voice@0.14.0...@discordjs/voice@0.15.0) - (2023-03-12) + +## Bug Fixes + +- **Voice:** Send keep alives without awaiting a response (#9202) ([c6d98fa](https://github.com/discordjs/discord.js/commit/c6d98fa0c55a482cd4a81abd6f08290c29839b1b)) + +## Documentation + +- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28)) + +## Features + +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) + +# [@discordjs/voice@0.14.0](https://github.com/discordjs/discord.js/compare/@discordjs/voice@0.13.0...@discordjs/voice@0.14.0) - (2022-11-28) + +## Bug Fixes + +- Voice postbuild script (#8741) ([5ffabb1](https://github.com/discordjs/discord.js/commit/5ffabb119fa3a35266ab31545a4a4b9a049eacce)) +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Features + +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) + # [@discordjs/voice@0.13.0](https://github.com/discordjs/discord.js/compare/@discordjs/voice@0.11.0...@discordjs/voice@0.13.0) - (2022-10-08) ## Bug Fixes diff --git a/packages/voice/README.md b/packages/voice/README.md index 6e0121187f23..9120b0e7bf82 100644 --- a/packages/voice/README.md +++ b/packages/voice/README.md @@ -13,12 +13,13 @@

Vercel + Cloudflare Workers

## About -An implementation of the Discord Voice API for Node.js, written in TypeScript. +`@discordjs/voice` is a TypeScript implementation of the Discord Voice API for Node.js. **Features:** @@ -33,7 +34,7 @@ An implementation of the Discord Voice API for Node.js, written in TypeScript. **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install @discordjs/voice yarn add @discordjs/voice pnpm add @discordjs/voice @@ -73,7 +74,7 @@ The [voice-examples][voice-examples] repository contains examples on how to use - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -88,12 +89,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/voice +[documentation]: https://discord.js.org/docs/packages/voice/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/voice/__tests__/VoiceUDPSocket.test.ts b/packages/voice/__tests__/VoiceUDPSocket.test.ts index b78969d5b4b4..ef1f1e01275f 100644 --- a/packages/voice/__tests__/VoiceUDPSocket.test.ts +++ b/packages/voice/__tests__/VoiceUDPSocket.test.ts @@ -121,23 +121,6 @@ describe('VoiceUDPSocket#performIPDiscovery', () => { expect(closed).toEqual(false); }); - test('Emits an error when no response received to keep alive messages', async () => { - const fake = new FakeSocket(); - fake.send = jest.fn(); - createSocket.mockImplementation(() => fake as any); - socket = new VoiceUDPSocket({ ip: '1.2.3.4', port: 25_565 }); - - let closed = false; - socket.on('close', () => (closed = true)); - - for (let index = 0; index < 15; index++) { - jest.advanceTimersToNextTimer(); - await wait(); - } - - expect(closed).toEqual(true); - }); - test('Recovers from intermittent responses', async () => { const fake = new FakeSocket(); const fakeSend = jest.fn(); diff --git a/packages/voice/api-extractor-docs.json b/packages/voice/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/voice/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/voice/api-extractor.json b/packages/voice/api-extractor.json index bc73f2cc022e..87d282f16a76 100644 --- a/packages/voice/api-extractor.json +++ b/packages/voice/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/voice" + } } diff --git a/packages/voice/cliff.toml b/packages/voice/cliff.toml index acfa4518fa89..f30101ef27c2 100644 --- a/packages/voice/cliff.toml +++ b/packages/voice/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/voice@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/voice/docs/README.md b/packages/voice/docs/README.md index 197a74e13303..c9c4f646f6e1 100644 --- a/packages/voice/docs/README.md +++ b/packages/voice/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/voice) +## [View the documentation here.](https://discord.js.org/docs/packages/voice/main) diff --git a/packages/voice/docs/index.json b/packages/voice/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/voice/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/voice/package.json b/packages/voice/package.json index 6eacc40ac6ce..2ca7edec2a74 100644 --- a/packages/voice/package.json +++ b/packages/voice/package.json @@ -1,14 +1,15 @@ { "name": "@discordjs/voice", - "version": "0.13.0", - "description": "Implementation of the Discord Voice API for node.js", + "version": "0.16.0", + "description": "Implementation of the Discord Voice API for Node.js", "scripts": { "build": "tsup && node scripts/postbuild.mjs", + "build:docs": "tsc -p tsconfig.docs.json", "test": "jest --coverage", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", "fmt": "yarn format", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn lint && yarn test && yarn build", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/voice/*'", "release": "cliff-jumper" @@ -17,9 +18,9 @@ "module": "./dist/index.mjs", "typings": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "directories": { "lib": "src", @@ -45,39 +46,41 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/voice" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" }, "homepage": "https://discord.js.org", "dependencies": { - "@types/ws": "^8.5.3", - "discord-api-types": "^0.37.15", - "prism-media": "^1.3.4", - "tslib": "^2.4.0", - "ws": "^8.9.0" + "@types/ws": "^8.5.4", + "discord-api-types": "^0.37.42", + "prism-media": "^1.3.5", + "tslib": "^2.5.2", + "ws": "^8.13.0" }, "devDependencies": { - "@babel/core": "^7.19.3", - "@babel/preset-env": "^7.19.4", - "@babel/preset-typescript": "^7.18.6", - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/jest": "^29.2.0", - "@types/node": "16.11.68", + "@babel/core": "^7.21.8", + "@babel/preset-env": "^7.21.5", + "@babel/preset-typescript": "^7.21.5", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/jest": "^29.5.1", + "@types/node": "16.18.32", "cross-env": "^7.0.3", - "esbuild-plugin-version-injector": "^1.0.0", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "jest": "^29.2.1", + "esbuild-plugin-version-injector": "^1.1.0", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "jest": "^29.5.0", "jest-websocket-mock": "^2.4.0", - "mock-socket": "^9.1.5", - "prettier": "^2.7.1", - "tsup": "^6.3.0", + "mock-socket": "^9.2.1", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", "tweetnacl": "^1.0.3", - "typescript": "^4.8.4" + "typescript": "^5.0.4" }, "engines": { "node": ">=16.9.0" diff --git a/packages/voice/src/DataStore.ts b/packages/voice/src/DataStore.ts index ca0e6b7f3fb7..7a525fe166ff 100644 --- a/packages/voice/src/DataStore.ts +++ b/packages/voice/src/DataStore.ts @@ -184,6 +184,6 @@ export function deleteAudioPlayer(player: AudioPlayer) { audioPlayers.splice(index, 1); if (audioPlayers.length === 0) { nextTime = -1; - if (typeof audioCycleInterval !== 'undefined') clearTimeout(audioCycleInterval); + if (audioCycleInterval !== undefined) clearTimeout(audioCycleInterval); } } diff --git a/packages/voice/src/VoiceConnection.ts b/packages/voice/src/VoiceConnection.ts index 85548f76d028..3ea068dde9f6 100644 --- a/packages/voice/src/VoiceConnection.ts +++ b/packages/voice/src/VoiceConnection.ts @@ -354,8 +354,8 @@ export class VoiceConnection extends EventEmitter { private addStatePacket(packet: GatewayVoiceStateUpdateDispatchData) { this.packets.state = packet; - if (typeof packet.self_deaf !== 'undefined') this.joinConfig.selfDeaf = packet.self_deaf; - if (typeof packet.self_mute !== 'undefined') this.joinConfig.selfMute = packet.self_mute; + if (packet.self_deaf !== undefined) this.joinConfig.selfDeaf = packet.self_deaf; + if (packet.self_mute !== undefined) this.joinConfig.selfMute = packet.self_mute; if (packet.channel_id) this.joinConfig.channelId = packet.channel_id; /* the channel_id being null doesn't necessarily mean it was intended for the client to leave the voice channel diff --git a/packages/voice/src/audio/AudioResource.ts b/packages/voice/src/audio/AudioResource.ts index 0deaccf32bc1..b807564bb6e6 100644 --- a/packages/voice/src/audio/AudioResource.ts +++ b/packages/voice/src/audio/AudioResource.ts @@ -258,7 +258,7 @@ export function createAudioResource( // string inputs can only be used with FFmpeg if (typeof input === 'string') { inputType = StreamType.Arbitrary; - } else if (typeof inputType === 'undefined') { + } else if (inputType === undefined) { const analysis = inferStreamType(input); inputType = analysis.streamType; needsInlineVolume = needsInlineVolume && !analysis.hasVolume; diff --git a/packages/voice/src/audio/TransformerGraph.ts b/packages/voice/src/audio/TransformerGraph.ts index fbb8d3252dcb..8c38465677e4 100644 --- a/packages/voice/src/audio/TransformerGraph.ts +++ b/packages/voice/src/audio/TransformerGraph.ts @@ -24,19 +24,27 @@ const FFMPEG_OPUS_ARGUMENTS = [ /** * The different types of stream that can exist within the pipeline. - * - * @remarks - * - `Arbitrary` - the type of the stream at this point is unknown. - * - `Raw` - the stream at this point is s16le PCM. - * - `OggOpus` - the stream at this point is Opus audio encoded in an Ogg wrapper. - * - `WebmOpus` - the stream at this point is Opus audio encoded in a WebM wrapper. - * - `Opus` - the stream at this point is Opus audio, and the stream is in object-mode. This is ready to play. */ export enum StreamType { + /** + * The type of the stream at this point is unknown. + */ Arbitrary = 'arbitrary', + /** + * The stream at this point is Opus audio encoded in an Ogg wrapper. + */ OggOpus = 'ogg/opus', + /** + * The stream at this point is Opus audio, and the stream is in object-mode. This is ready to play. + */ Opus = 'opus', + /** + * The stream at this point is s16le PCM. + */ Raw = 'raw', + /** + * The stream at this point is Opus audio encoded in a WebM wrapper. + */ WebmOpus = 'webm/opus', } diff --git a/packages/voice/src/index.ts b/packages/voice/src/index.ts index b9a36f30907c..b1d8bf570fbf 100644 --- a/packages/voice/src/index.ts +++ b/packages/voice/src/index.ts @@ -25,5 +25,4 @@ export { type JoinConfig, getVoiceConnection, getVoiceConnections, getGroups } f * that you are currently using. */ // This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild -// eslint-disable-next-line @typescript-eslint/no-inferrable-types -export const version: string = '[VI]{{inject}}[/VI]'; +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/voice/src/networking/Networking.ts b/packages/voice/src/networking/Networking.ts index 7ed779b1d815..50b0fe5c50ed 100644 --- a/packages/voice/src/networking/Networking.ts +++ b/packages/voice/src/networking/Networking.ts @@ -498,7 +498,7 @@ export class Networking extends EventEmitter { public dispatchAudio() { const state = this.state; if (state.code !== NetworkingStatusCode.Ready) return false; - if (typeof state.preparedPacket !== 'undefined') { + if (state.preparedPacket !== undefined) { this.playAudioPacket(state.preparedPacket); state.preparedPacket = undefined; return true; diff --git a/packages/voice/src/networking/VoiceUDPSocket.ts b/packages/voice/src/networking/VoiceUDPSocket.ts index 551723cf0b6e..84bc40f17217 100644 --- a/packages/voice/src/networking/VoiceUDPSocket.ts +++ b/packages/voice/src/networking/VoiceUDPSocket.ts @@ -12,11 +12,6 @@ export interface SocketConfig { port: number; } -interface KeepAlive { - timestamp: number; - value: number; -} - /** * Parses the response from Discord to aid with local IP discovery. * @@ -41,11 +36,6 @@ export function parseLocalPacket(message: Buffer): SocketConfig { */ const KEEP_ALIVE_INTERVAL = 5e3; -/** - * The maximum number of keep alive packets which can be missed. - */ -const KEEP_ALIVE_LIMIT = 12; - /** * The maximum value of the keep alive counter. */ @@ -72,11 +62,6 @@ export class VoiceUDPSocket extends EventEmitter { */ private readonly remote: SocketConfig; - /** - * A list of keep alives that are waiting to be acknowledged. - */ - private readonly keepAlives: KeepAlive[]; - /** * The counter used in the keep alive mechanism. */ @@ -94,32 +79,26 @@ export class VoiceUDPSocket extends EventEmitter { /** * The time taken to receive a response to keep alive messages. + * + * @deprecated This field is no longer updated as keep alive messages are no longer tracked. */ public ping?: number; - /** - * The debug logger function, if debugging is enabled. - */ - private readonly debug: ((message: string) => void) | null; - /** * Creates a new VoiceUDPSocket. * * @param remote - Details of the remote socket */ - public constructor(remote: SocketConfig, debug = false) { + public constructor(remote: SocketConfig) { super(); this.socket = createSocket('udp4'); this.socket.on('error', (error: Error) => this.emit('error', error)); this.socket.on('message', (buffer: Buffer) => this.onMessage(buffer)); this.socket.on('close', () => this.emit('close')); this.remote = remote; - this.keepAlives = []; this.keepAliveBuffer = Buffer.alloc(8); this.keepAliveInterval = setInterval(() => this.keepAlive(), KEEP_ALIVE_INTERVAL); setImmediate(() => this.keepAlive()); - - this.debug = debug ? (message: string) => this.emit('debug', message) : null; } /** @@ -128,16 +107,6 @@ export class VoiceUDPSocket extends EventEmitter { * @param buffer - The received buffer */ private onMessage(buffer: Buffer): void { - // Handle keep alive message - if (buffer.length === 8) { - const counter = buffer.readUInt32LE(0); - const index = this.keepAlives.findIndex(({ value }) => value === counter); - if (index === -1) return; - this.ping = Date.now() - this.keepAlives[index]!.timestamp; - // Delete all keep alives up to and including the received one - this.keepAlives.splice(0, index); - } - // Propagate the message this.emit('message', buffer); } @@ -146,18 +115,8 @@ export class VoiceUDPSocket extends EventEmitter { * Called at a regular interval to check whether we are still able to send datagrams to Discord. */ private keepAlive() { - if (this.keepAlives.length >= KEEP_ALIVE_LIMIT) { - this.debug?.('UDP socket has not received enough responses from Discord - closing socket'); - this.destroy(); - return; - } - this.keepAliveBuffer.writeUInt32LE(this.keepAliveCounter, 0); this.send(this.keepAliveBuffer); - this.keepAlives.push({ - value: this.keepAliveCounter, - timestamp: Date.now(), - }); this.keepAliveCounter++; if (this.keepAliveCounter > MAX_COUNTER_VALUE) { this.keepAliveCounter = 0; diff --git a/packages/voice/src/networking/VoiceWebSocket.ts b/packages/voice/src/networking/VoiceWebSocket.ts index 16ee47ff4adc..6696acab5d6c 100644 --- a/packages/voice/src/networking/VoiceWebSocket.ts +++ b/packages/voice/src/networking/VoiceWebSocket.ts @@ -161,7 +161,7 @@ export class VoiceWebSocket extends EventEmitter { * @param ms - The interval in milliseconds. If negative, the interval will be unset */ public setHeartbeatInterval(ms: number) { - if (typeof this.heartbeatInterval !== 'undefined') clearInterval(this.heartbeatInterval); + if (this.heartbeatInterval !== undefined) clearInterval(this.heartbeatInterval); if (ms > 0) { this.heartbeatInterval = setInterval(() => { if (this.lastHeartbeatSend !== 0 && this.missedHeartbeats >= 3) { diff --git a/packages/voice/src/receive/AudioReceiveStream.ts b/packages/voice/src/receive/AudioReceiveStream.ts index 105eaa8dbcb3..119903844f1b 100644 --- a/packages/voice/src/receive/AudioReceiveStream.ts +++ b/packages/voice/src/receive/AudioReceiveStream.ts @@ -69,7 +69,7 @@ export class AudioReceiveStream extends Readable { buffer && (this.end.behavior === EndBehaviorType.AfterInactivity || (this.end.behavior === EndBehaviorType.AfterSilence && - (buffer.compare(SILENCE_FRAME) !== 0 || typeof this.endTimeout === 'undefined'))) + (buffer.compare(SILENCE_FRAME) !== 0 || this.endTimeout === undefined))) ) { this.renewEndTimeout(this.end); } diff --git a/packages/voice/src/receive/VoiceReceiver.ts b/packages/voice/src/receive/VoiceReceiver.ts index fee3a1db955e..dd1fe8737673 100644 --- a/packages/voice/src/receive/VoiceReceiver.ts +++ b/packages/voice/src/receive/VoiceReceiver.ts @@ -1,4 +1,5 @@ /* eslint-disable jsdoc/check-param-names */ + import { Buffer } from 'node:buffer'; import { VoiceOpcodes } from 'discord-api-types/voice/v4'; import type { VoiceConnection } from '../VoiceConnection'; diff --git a/packages/voice/tsconfig.docs.json b/packages/voice/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/voice/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/rest/tsup.config.js b/packages/voice/tsup.config.ts similarity index 100% rename from packages/rest/tsup.config.js rename to packages/voice/tsup.config.ts diff --git a/packages/ws/.gitignore b/packages/ws/.gitignore index 86b93e929ae6..90500960f32b 100644 --- a/packages/ws/.gitignore +++ b/packages/ws/.gitignore @@ -1,8 +1,8 @@ # Packages -node_modules/ +node_modules # Log files -logs/ +logs *.log npm-debug.log* @@ -15,13 +15,14 @@ pids .env # Dist -dist/ -typings/ +dist +dist-docs + +# Docs docs/**/* -!docs/index.json !docs/README.md # Miscellaneous -.tmp/ -coverage/ -tsconfig.tsbuildinfo +.turbo +.tmp +coverage diff --git a/packages/ws/.prettierignore b/packages/ws/.prettierignore index 553e0ea6c783..fc03103c7b8c 100644 --- a/packages/ws/.prettierignore +++ b/packages/ws/.prettierignore @@ -1,8 +1,6 @@ -# Autogenerated -CHANGELOG.md .turbo -dist/ -docs/**/* -!docs/index.yml -!docs/README.md -coverage/ +coverage +dist +dist-docs +docs/docs.api.json +CHANGELOG.md diff --git a/packages/ws/CHANGELOG.md b/packages/ws/CHANGELOG.md index 70dc9d322dbf..44320098d1fe 100644 --- a/packages/ws/CHANGELOG.md +++ b/packages/ws/CHANGELOG.md @@ -2,6 +2,132 @@ All notable changes to this project will be documented in this file. +# [@discordjs/ws@0.8.3](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.2...@discordjs/ws@0.8.3) - (2023-05-06) + +## Bug Fixes + +- **WebSocketShard:** Wait a little before reconnecting (#9517) ([00da44a](https://github.com/discordjs/discord.js/commit/00da44a120fb0eeb2bdc3a03670836a544dc5418)) + +## Testing + +- **ws:** Fix tests (#9520) ([3e80f0b](https://github.com/discordjs/discord.js/commit/3e80f0b384ea2dc14c1b60b5897e90040cab9a24)) + +# [@discordjs/ws@0.8.2](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.1...@discordjs/ws@0.8.2) - (2023-05-01) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Refactor + +- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc)) +- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d)) + +# [@discordjs/ws@0.8.2](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.1...@discordjs/ws@0.8.2) - (2023-05-01) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Refactor + +- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc)) +- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d)) + +# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Refactor + +- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc)) +- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d)) + +# [@discordjs/ws@0.8.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.7.0...@discordjs/ws@0.8.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) +- **WebSocketShard:** Don't await #destroy in error bubbling logic (#9276) ([519825a](https://github.com/discordjs/discord.js/commit/519825a651fe22042a73046824d12f03f56ca9e2)) +- **WebSocketShard:** Don't close in #destroy when status is connecting (#9254) ([c76b17d](https://github.com/discordjs/discord.js/commit/c76b17d3b327fb55ef76770d4825e02ab8f26ad1)) +- **WebSocketShard:** Cancel initial heartbeat in destroy (#9244) ([9842082](https://github.com/discordjs/discord.js/commit/98420826bc2296fc392f17e8254cf4ad743ff5af)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +# [@discordjs/ws@0.7.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.6.0...@discordjs/ws@0.7.0) - (2023-03-12) + +## Bug Fixes + +- **WebSocketShard:** #send race condition due to ready state (#9226) ([a99fc64](https://github.com/discordjs/discord.js/commit/a99fc64e3f73c3976617a7ed825fa7d6e9fb3b53)) +- **WebSocketShard:** Wait for hello rather than ready in connect (#9178) ([27e0b32](https://github.com/discordjs/discord.js/commit/27e0b32c5f0fe605f152e6ba67ce3f596137ff01)) +- **WebSocketShard:** Proper error bubbling (#9119) ([9681f34](https://github.com/discordjs/discord.js/commit/9681f348770b0e2ff9b7c96b1c30575dd950e2ed)) +- Ws typo (#9056) ([05a1cbf](https://github.com/discordjs/discord.js/commit/05a1cbfe5479195b0bc9b6f0971fe39f6af6fd77)) + +## Documentation + +- Fix typos (#9127) ([1ba1f23](https://github.com/discordjs/discord.js/commit/1ba1f238f04221ec890fc921678909b5b7d92c26)) +- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28)) +- Updated @discordjs/ws README.md to include optional packages (#8973) ([4ee00b6](https://github.com/discordjs/discord.js/commit/4ee00b6534fad39da1fe54fb2c1766b264a020ca)) + +## Features + +- **WebSocketShard:** Heartbeat jitter (#9223) ([6ecff26](https://github.com/discordjs/discord.js/commit/6ecff26ec65ce1d559a3406b396b3190868b1961)) +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) +- **ws:** Custom workers (#9004) ([828a13b](https://github.com/discordjs/discord.js/commit/828a13b526dde1334e8879e76e664584bdb5db73)) +- **ws:** Metrics (#9005) ([0ff67d8](https://github.com/discordjs/discord.js/commit/0ff67d8e7adee43ff82bbf072dac9a4c7c9fe8c2)) + +## Refactor + +- **WebSocketManager:** Passing in strategy (#9122) ([5c5a583](https://github.com/discordjs/discord.js/commit/5c5a5832b94cd4d371cc99c4f9c3384523dabeeb)) + +## Styling + +- Run prettier (#9041) ([2798ba1](https://github.com/discordjs/discord.js/commit/2798ba1eb3d734f0cf2eeccd2e16cfba6804873b)) + +# [@discordjs/ws@0.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.5.0...@discordjs/ws@0.6.0) - (2022-12-16) + +## Bug Fixes + +- **WebSocketShard:** Send ratelimit handling (#8887) ([40b504a](https://github.com/discordjs/discord.js/commit/40b504a2088effc6a467f40ac3cf2a6d736ab209)) + +## Features + +- **core:** Add support for role connections (#8930) ([3d6fa24](https://github.com/discordjs/discord.js/commit/3d6fa248c07b2278504bbe8bafa17a3294971fd9)) + +## Refactor + +- **WebSocketShard:** Identify throttling (#8888) ([8f552a0](https://github.com/discordjs/discord.js/commit/8f552a0e17c0eca71063e7a4353b9b351bcdf9fd)) + +# [@discordjs/ws@0.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.4.1...@discordjs/ws@0.5.0) - (2022-11-28) + +## Bug Fixes + +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Documentation + +- Remove unused imports (#8744) ([179392d](https://github.com/discordjs/discord.js/commit/179392d6d7d634c6d10f6abb20c072516c1c1d43)) + +## Features + +- New select menus (#8793) ([5152abf](https://github.com/discordjs/discord.js/commit/5152abf7285581abf7689e9050fdc56c4abb1e2b)) + # [@discordjs/ws@0.4.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.4.0...@discordjs/ws@0.4.1) - (2022-10-10) ## Bug Fixes diff --git a/packages/ws/README.md b/packages/ws/README.md index 5ff23f4ba980..b51e75c0964d 100644 --- a/packages/ws/README.md +++ b/packages/ws/README.md @@ -13,6 +13,7 @@

Vercel + Cloudflare Workers

@@ -24,16 +25,22 @@ **Node.js 16.9.0 or newer is required.** -```sh-session +```sh npm install @discordjs/ws yarn add @discordjs/ws pnpm add @discordjs/ws ``` +### Optional packages + +- [zlib-sync](https://www.npmjs.com/package/zlib-sync) for WebSocket data compression and inflation (`npm install zlib-sync`) +- [bufferutil](https://www.npmjs.com/package/bufferutil) for a much faster WebSocket connection (`npm install bufferutil`) +- [utf-8-validate](https://www.npmjs.com/package/utf-8-validate) in combination with `bufferutil` for much faster WebSocket processing (`npm install utf-8-validate`) + ## Example usage ```ts -import { WebSocketManager } from '@discordjs/ws'; +import { WebSocketManager, WebSocketShardEvents, CompressionMethod } from '@discordjs/ws'; import { REST } from '@discordjs/rest'; const rest = new REST().setToken(process.env.DISCORD_TOKEN); @@ -42,6 +49,12 @@ const manager = new WebSocketManager({ token: process.env.DISCORD_TOKEN, intents: 0, // for no intents rest, + // uncomment if you have zlib-sync installed and want to use compression + // compression: CompressionMethod.ZlibStream, +}); + +manager.on(WebSocketShardEvents.Dispatch, (event) => { + // Process gateway events here. }); await manager.connect(); @@ -89,18 +102,62 @@ You can also have the shards spawn in worker threads: ```ts import { WebSocketManager, WorkerShardingStrategy } from '@discordjs/ws'; +import { REST } from '@discordjs/rest'; +const rest = new REST().setToken(process.env.DISCORD_TOKEN); const manager = new WebSocketManager({ token: process.env.DISCORD_TOKEN, intents: 0, rest, shardCount: 6, + // This will cause 3 workers to spawn, 2 shards per each + buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }), + // Or maybe you want all your shards under a single worker + buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 'all' }), +}); +``` + +**Note**: By default, this will cause the workers to effectively only be responsible for the WebSocket connection, they simply pass up all the events back to the main process for the manager to emit. If you want to have the workers handle events as well, you can pass in a `workerPath` option to the `WorkerShardingStrategy` constructor: + +```ts +import { WebSocketManager, WorkerShardingStrategy } from '@discordjs/ws'; +import { REST } from '@discordjs/rest'; + +const rest = new REST().setToken(process.env.DISCORD_TOKEN); +const manager = new WebSocketManager({ + token: process.env.DISCORD_TOKEN, + intents: 0, + rest, + buildStrategy: (manager) => + new WorkerShardingStrategy(manager, { + shardsPerWorker: 2, + workerPath: './worker.js', + }), }); +``` + +And your `worker.ts` file: -// This will cause 3 workers to spawn, 2 shards per each -manager.setStrategy(new WorkerShardingStrategy(manager, { shardsPerWorker: 2 })); -// Or maybe you want all your shards under a single worker -manager.setStrategy(new WorkerShardingStrategy(manager, { shardsPerWorker: 'all' })); +```ts +import { WorkerBootstrapper, WebSocketShardEvents } from '@discordjs/ws'; + +const bootstrapper = new WorkerBootstrapper(); +void bootstrapper.bootstrap({ + // Those will be sent to the main thread for the manager to emit + forwardEvents: [ + WebSocketShardEvents.Closed, + WebSocketShardEvents.Debug, + WebSocketShardEvents.Hello, + WebSocketShardEvents.Ready, + WebSocketShardEvents.Resumed, + ], + shardCallback: (shard) => { + shard.on(WebSocketShardEvents.Dispatch, (event) => { + // Process gateway events here however you want (e.g. send them through a message broker) + // You also have access to shard.id if you need it + }); + }, +}); ``` ## Links @@ -108,7 +165,7 @@ manager.setStrategy(new WorkerShardingStrategy(manager, { shardsPerWorker: 'all' - [Website][website] ([source][website-source]) - [Documentation][documentation] - [Guide][guide] ([source][guide-source]) - See also the [Update Guide][guide-update], including updated and removed items in the library. + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. - [discord.js Discord server][discord] - [Discord API Discord server][discord-api] - [GitHub][source] @@ -123,12 +180,11 @@ See [the contribution guide][contributing] if you'd like to submit a PR. ## Help -If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle -nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. -[website]: https://discord.js.org/ +[website]: https://discord.js.org [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website -[documentation]: https://discord.js.org/#/docs/ws +[documentation]: https://discord.js.org/docs/packages/ws/stable [guide]: https://discordjs.guide/ [guide-source]: https://github.com/discordjs/guide [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html diff --git a/packages/ws/__tests__/strategy/WorkerContextFetchingStrategy.test.ts b/packages/ws/__tests__/strategy/WorkerContextFetchingStrategy.test.ts index 7ce3de334ebc..4d8df18f032f 100644 --- a/packages/ws/__tests__/strategy/WorkerContextFetchingStrategy.test.ts +++ b/packages/ws/__tests__/strategy/WorkerContextFetchingStrategy.test.ts @@ -7,8 +7,8 @@ import { WorkerContextFetchingStrategy, WebSocketManager, WorkerSendPayloadOp, - WorkerRecievePayloadOp, - type WorkerRecievePayload, + WorkerReceivePayloadOp, + type WorkerReceivePayload, type WorkerSendPayload, } from '../../src/index.js'; @@ -31,8 +31,8 @@ const session = { vi.mock('node:worker_threads', async () => { const { EventEmitter }: typeof import('node:events') = await vi.importActual('node:events'); class MockParentPort extends EventEmitter { - public postMessage(message: WorkerRecievePayload) { - if (message.op === WorkerRecievePayloadOp.RetrieveSessionInfo) { + public postMessage(message: WorkerReceivePayload) { + if (message.op === WorkerReceivePayloadOp.RetrieveSessionInfo) { const response: WorkerSendPayload = { op: WorkerSendPayloadOp.SessionInfoResponse, nonce: message.nonce, @@ -46,6 +46,7 @@ vi.mock('node:worker_threads', async () => { return { parentPort: new MockParentPort(), isMainThread: false, + workerData: {}, }; }); diff --git a/packages/ws/__tests__/strategy/WorkerShardingStrategy.test.ts b/packages/ws/__tests__/strategy/WorkerShardingStrategy.test.ts index 79e402675437..3277dcb3d553 100644 --- a/packages/ws/__tests__/strategy/WorkerShardingStrategy.test.ts +++ b/packages/ws/__tests__/strategy/WorkerShardingStrategy.test.ts @@ -12,10 +12,10 @@ import { beforeEach, test, vi, expect, afterEach } from 'vitest'; import { WebSocketManager, WorkerSendPayloadOp, - WorkerRecievePayloadOp, + WorkerReceivePayloadOp, WorkerShardingStrategy, WebSocketShardEvents, - type WorkerRecievePayload, + type WorkerReceivePayload, type WorkerSendPayload, type SessionInfo, } from '../../src/index.js'; @@ -27,7 +27,7 @@ const mockConstructor = vi.fn(); const mockSend = vi.fn(); const mockTerminate = vi.fn(); -const memberChunkData: GatewayDispatchPayload = { +const memberChunkData = { op: GatewayOpcodes.Dispatch, s: 123, t: GatewayDispatchEvents.GuildMembersChunk, @@ -35,13 +35,14 @@ const memberChunkData: GatewayDispatchPayload = { guild_id: '123', members: [], }, -}; +} as unknown as GatewayDispatchPayload; const sessionInfo: SessionInfo = { shardId: 0, shardCount: 2, sequence: 123, sessionId: 'abc', + resumeURL: 'wss://ehehe.gg', }; vi.mock('node:worker_threads', async () => { @@ -52,14 +53,23 @@ vi.mock('node:worker_threads', async () => { super(); mockConstructor(...args); // need to delay this by an event loop cycle to allow the strategy to attach a listener - setImmediate(() => this.emit('online')); + setImmediate(() => { + this.emit('online'); + // same deal here + setImmediate(() => { + const message: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.WorkerReady, + }; + this.emit('message', message); + }); + }); } public postMessage(message: WorkerSendPayload) { switch (message.op) { case WorkerSendPayloadOp.Connect: { - const response: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.Connected, + const response: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.Connected, shardId: message.shardId, }; this.emit('message', response); @@ -67,8 +77,8 @@ vi.mock('node:worker_threads', async () => { } case WorkerSendPayloadOp.Destroy: { - const response: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.Destroyed, + const response: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.Destroyed, shardId: message.shardId, }; this.emit('message', response); @@ -77,8 +87,8 @@ vi.mock('node:worker_threads', async () => { case WorkerSendPayloadOp.Send: { if (message.payload.op === GatewayOpcodes.RequestGuildMembers) { - const response: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.Event, + const response: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.Event, shardId: message.shardId, event: WebSocketShardEvents.Dispatch, data: memberChunkData, @@ -86,8 +96,8 @@ vi.mock('node:worker_threads', async () => { this.emit('message', response); // Fetch session info - const sessionFetch: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.RetrieveSessionInfo, + const sessionFetch: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.RetrieveSessionInfo, shardId: message.shardId, nonce: Math.random(), }; @@ -101,14 +111,22 @@ vi.mock('node:worker_threads', async () => { case WorkerSendPayloadOp.SessionInfoResponse: { message.session ??= sessionInfo; - const session: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.UpdateSessionInfo, + const session: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.UpdateSessionInfo, shardId: message.session.shardId, session: { ...message.session, sequence: message.session.sequence + 1 }, }; this.emit('message', session); break; } + + case WorkerSendPayloadOp.ShardIdentifyResponse: { + break; + } + + case WorkerSendPayloadOp.FetchStatus: { + break; + } } } @@ -117,6 +135,7 @@ vi.mock('node:worker_threads', async () => { return { Worker: MockWorker, + workerData: {}, }; }); @@ -127,9 +146,9 @@ beforeEach(() => { }); afterEach(() => { - mockConstructor.mockRestore(); - mockSend.mockRestore(); - mockTerminate.mockRestore(); + mockConstructor.mockClear(); + mockSend.mockClear(); + mockTerminate.mockClear(); }); test('spawn, connect, send a message, session info, and destroy', async () => { @@ -144,6 +163,7 @@ test('spawn, connect, send a message, session info, and destroy', async () => { shardIds: [0, 1], retrieveSessionInfo: mockRetrieveSessionInfo, updateSessionInfo: mockUpdateSessionInfo, + buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 'all' }), }); const managerEmitSpy = vi.spyOn(manager, 'emit'); @@ -172,16 +192,16 @@ test('spawn, connect, send a message, session info, and destroy', async () => { }, })); - const strategy = new WorkerShardingStrategy(manager, { shardsPerWorker: 'all' }); - manager.setStrategy(strategy); - await manager.connect(); expect(mockConstructor).toHaveBeenCalledWith( - expect.stringContaining('worker.js'), + expect.stringContaining('defaultWorker.js'), expect.objectContaining({ workerData: expect.objectContaining({ shardIds: [0, 1] }) }), ); - const payload: GatewaySendPayload = { op: GatewayOpcodes.RequestGuildMembers, d: { guild_id: '123', limit: 0 } }; + const payload: GatewaySendPayload = { + op: GatewayOpcodes.RequestGuildMembers, + d: { guild_id: '123', limit: 0, query: '' }, + }; await manager.send(0, payload); expect(mockSend).toHaveBeenCalledWith(0, payload); expect(managerEmitSpy).toHaveBeenCalledWith(WebSocketShardEvents.Dispatch, { diff --git a/packages/ws/__tests__/util/IdentifyThrottler.test.ts b/packages/ws/__tests__/util/IdentifyThrottler.test.ts deleted file mode 100644 index 74417d5881eb..000000000000 --- a/packages/ws/__tests__/util/IdentifyThrottler.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { setTimeout as sleep } from 'node:timers/promises'; -import { expect, test, vi, type Mock } from 'vitest'; -import { IdentifyThrottler, type WebSocketManager } from '../../src/index.js'; - -vi.mock('node:timers/promises', () => ({ - setTimeout: vi.fn(), -})); - -const fetchGatewayInformation = vi.fn(); - -const manager = { - fetchGatewayInformation, -} as unknown as WebSocketManager; - -const throttler = new IdentifyThrottler(manager); - -vi.useFakeTimers(); - -const NOW = vi.fn().mockReturnValue(Date.now()); -global.Date.now = NOW; - -test('wait for identify', async () => { - fetchGatewayInformation.mockReturnValue({ - session_start_limit: { - max_concurrency: 2, - }, - }); - - // First call should never wait - await throttler.waitForIdentify(); - expect(sleep).not.toHaveBeenCalled(); - - // Second call still won't wait because max_concurrency is 2 - await throttler.waitForIdentify(); - expect(sleep).not.toHaveBeenCalled(); - - // Third call should wait - await throttler.waitForIdentify(); - expect(sleep).toHaveBeenCalled(); - - (sleep as Mock).mockRestore(); - - // Fourth call shouldn't wait, because our max_concurrency is 2 and we waited for a reset - await throttler.waitForIdentify(); - expect(sleep).not.toHaveBeenCalled(); -}); diff --git a/packages/ws/__tests__/util/SimpleIdentifyThrottler.test.ts b/packages/ws/__tests__/util/SimpleIdentifyThrottler.test.ts new file mode 100644 index 000000000000..0d004523b5a5 --- /dev/null +++ b/packages/ws/__tests__/util/SimpleIdentifyThrottler.test.ts @@ -0,0 +1,32 @@ +import { setTimeout as sleep } from 'node:timers/promises'; +import { expect, test, vi } from 'vitest'; +import { SimpleIdentifyThrottler } from '../../src/index.js'; + +vi.mock('node:timers/promises', () => ({ + setTimeout: vi.fn(), +})); + +const throttler = new SimpleIdentifyThrottler(2); + +vi.useFakeTimers(); + +const NOW = vi.fn().mockReturnValue(Date.now()); +global.Date.now = NOW; + +test('basic case', async () => { + // Those shouldn't wait since they're in different keys + + await throttler.waitForIdentify(0); + expect(sleep).not.toHaveBeenCalled(); + + await throttler.waitForIdentify(1); + expect(sleep).not.toHaveBeenCalled(); + + // Those should wait + + await throttler.waitForIdentify(2); + expect(sleep).toHaveBeenCalledTimes(1); + + await throttler.waitForIdentify(3); + expect(sleep).toHaveBeenCalledTimes(2); +}); diff --git a/packages/ws/__tests__/ws/WebSocketManager.test.ts b/packages/ws/__tests__/ws/WebSocketManager.test.ts index fad53ae1c39b..877e339ca635 100644 --- a/packages/ws/__tests__/ws/WebSocketManager.test.ts +++ b/packages/ws/__tests__/ws/WebSocketManager.test.ts @@ -54,13 +54,13 @@ test('fetch gateway information', async () => { expect(initial).toEqual(data); expect(fetch).toHaveBeenCalledOnce(); - fetch.mockRestore(); + fetch.mockClear(); const cached = await manager.fetchGatewayInformation(); expect(cached).toEqual(data); expect(fetch).not.toHaveBeenCalled(); - fetch.mockRestore(); + fetch.mockClear(); mockPool .intercept({ path: '/api/v10/gateway/bot', @@ -72,7 +72,7 @@ test('fetch gateway information', async () => { expect(forced).toEqual(data); expect(fetch).toHaveBeenCalledOnce(); - fetch.mockRestore(); + fetch.mockClear(); mockPool .intercept({ path: '/api/v10/gateway/bot', @@ -146,7 +146,7 @@ test('update shard count', async () => { expect(await manager.getShardCount()).toBe(2); expect(fetch).not.toHaveBeenCalled(); - fetch.mockRestore(); + fetch.mockClear(); mockPool .intercept({ path: '/api/v10/gateway/bot', @@ -177,14 +177,21 @@ test('strategies', async () => { public destroy = vi.fn(); public send = vi.fn(); + + public fetchStatus = vi.fn(); } + const strategy = new MockStrategy(); + const rest = new REST().setAgent(mockAgent).setToken('A-Very-Fake-Token'); const shardIds = [0, 1, 2]; - const manager = new WebSocketManager({ token: 'A-Very-Fake-Token', intents: 0, rest, shardIds }); - - const strategy = new MockStrategy(); - manager.setStrategy(strategy); + const manager = new WebSocketManager({ + token: 'A-Very-Fake-Token', + intents: 0, + rest, + shardIds, + buildStrategy: () => strategy, + }); const data: APIGatewayBotInfo = { shards: 1, @@ -222,8 +229,11 @@ test('strategies', async () => { await manager.destroy(destroyOptions); expect(strategy.destroy).toHaveBeenCalledWith(destroyOptions); - // eslint-disable-next-line id-length - const send: GatewaySendPayload = { op: GatewayOpcodes.RequestGuildMembers, d: { guild_id: '1234', limit: 0 } }; + const send: GatewaySendPayload = { + op: GatewayOpcodes.RequestGuildMembers, + // eslint-disable-next-line id-length + d: { guild_id: '1234', limit: 0, query: '' }, + }; await manager.send(0, send); expect(strategy.send).toHaveBeenCalledWith(0, send); }); diff --git a/packages/ws/api-extractor-docs.json b/packages/ws/api-extractor-docs.json new file mode 100644 index 000000000000..225607dd2eeb --- /dev/null +++ b/packages/ws/api-extractor-docs.json @@ -0,0 +1,4 @@ +{ + "extends": "./api-extractor.json", + "mainEntryPointFilePath": "/dist-docs/index.d.ts" +} diff --git a/packages/ws/api-extractor.json b/packages/ws/api-extractor.json index bc73f2cc022e..869c0df6e26c 100644 --- a/packages/ws/api-extractor.json +++ b/packages/ws/api-extractor.json @@ -1,3 +1,6 @@ { - "extends": "../../api-extractor.json" + "extends": "../../api-extractor.json", + "docModel": { + "projectFolderUrl": "https://github.com/discordjs/discord.js/tree/main/packages/ws" + } } diff --git a/packages/ws/cliff.toml b/packages/ws/cliff.toml index 89dec8b38ccd..b25e5a49d508 100644 --- a/packages/ws/cliff.toml +++ b/packages/ws/cliff.toml @@ -59,5 +59,5 @@ commit_parsers = [ filter_commits = true tag_pattern = "@discordjs/ws@[0-9]*" ignore_tags = "" -date_order = true +topo_order = true sort_commits = "newest" diff --git a/packages/ws/docs/README.md b/packages/ws/docs/README.md index d67329190bf0..f9308141dfe1 100644 --- a/packages/ws/docs/README.md +++ b/packages/ws/docs/README.md @@ -1 +1 @@ -## [View the documentation here.](https://discord.js.org/#/docs/ws) +## [View the documentation here.](https://discord.js.org/docs/packages/ws/main) diff --git a/packages/ws/docs/index.json b/packages/ws/docs/index.json deleted file mode 100644 index 557341ae9dff..000000000000 --- a/packages/ws/docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{ "name": "General", "files": [{ "name": "Welcome", "id": "welcome", "path": "../../README.md" }] }] diff --git a/packages/ws/package.json b/packages/ws/package.json index f768c6430f60..f106f780a0f3 100644 --- a/packages/ws/package.json +++ b/packages/ws/package.json @@ -1,13 +1,14 @@ { "name": "@discordjs/ws", - "version": "0.4.1", + "version": "0.8.3", "description": "Wrapper around Discord's gateway", "scripts": { "test": "vitest run", "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", - "docs": "api-extractor run --local", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", "prepack": "yarn build && yarn lint", "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/ws/*'", "release": "cliff-jumper" @@ -16,9 +17,16 @@ "module": "./dist/index.mjs", "typings": "./dist/index.d.ts", "exports": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./defaultWorker": { + "types": null, + "import": "./dist/defaultWorker.mjs", + "require": "./dist/defaultWorker.js" + } }, "directories": { "lib": "src", @@ -45,7 +53,8 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/discordjs/discord.js.git" + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/ws" }, "bugs": { "url": "https://github.com/discordjs/discord.js/issues" @@ -56,29 +65,30 @@ "@discordjs/rest": "workspace:^", "@discordjs/util": "workspace:^", "@sapphire/async-queue": "^1.5.0", - "@types/ws": "^8.5.3", - "@vladfrangu/async_event_emitter": "^2.1.2", - "discord-api-types": "^0.37.15", - "tslib": "^2.4.0", - "ws": "^8.9.0" + "@types/ws": "^8.5.4", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "^0.37.42", + "tslib": "^2.5.2", + "ws": "^8.13.0" }, "devDependencies": { - "@favware/cliff-jumper": "^1.8.8", - "@microsoft/api-extractor": "^7.33.4", - "@types/node": "16.11.68", - "@vitest/coverage-c8": "^0.24.3", + "@favware/cliff-jumper": "^2.0.0", + "@microsoft/api-extractor": "^7.35.0", + "@types/node": "18.16.14", + "@vitest/coverage-c8": "^0.31.1", "cross-env": "^7.0.3", - "esbuild-plugin-version-injector": "^1.0.0", - "eslint": "^8.25.0", - "eslint-config-neon": "^0.1.39", - "eslint-formatter-pretty": "^4.1.0", - "mock-socket": "^9.1.5", - "prettier": "^2.7.1", - "tsup": "^6.3.0", - "typescript": "^4.8.4", - "undici": "^5.11.0", - "vitest": "^0.24.3", - "zlib-sync": "^0.1.7" + "esbuild-plugin-version-injector": "^1.1.0", + "eslint": "^8.41.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "mock-socket": "^9.2.1", + "prettier": "^2.8.8", + "tsup": "^6.7.0", + "turbo": "^1.9.8", + "typescript": "^5.0.4", + "undici": "^5.22.1", + "vitest": "^0.31.1", + "zlib-sync": "^0.1.8" }, "engines": { "node": ">=16.9.0" diff --git a/packages/ws/src/index.ts b/packages/ws/src/index.ts index 948cd2a3e6a5..9283dd549a5f 100644 --- a/packages/ws/src/index.ts +++ b/packages/ws/src/index.ts @@ -6,8 +6,11 @@ export * from './strategies/sharding/IShardingStrategy.js'; export * from './strategies/sharding/SimpleShardingStrategy.js'; export * from './strategies/sharding/WorkerShardingStrategy.js'; +export * from './throttling/IIdentifyThrottler.js'; +export * from './throttling/SimpleIdentifyThrottler.js'; + export * from './utils/constants.js'; -export * from './utils/IdentifyThrottler.js'; +export * from './utils/WorkerBootstrapper.js'; export * from './ws/WebSocketManager.js'; export * from './ws/WebSocketShard.js'; @@ -17,5 +20,4 @@ export * from './ws/WebSocketShard.js'; * that you are currently using. */ // This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild -// eslint-disable-next-line @typescript-eslint/no-inferrable-types -export const version: string = '[VI]{{inject}}[/VI]'; +export const version = '[VI]{{inject}}[/VI]' as string; diff --git a/packages/ws/src/strategies/context/IContextFetchingStrategy.ts b/packages/ws/src/strategies/context/IContextFetchingStrategy.ts index 7a51303cf462..b57f0ff82dfb 100644 --- a/packages/ws/src/strategies/context/IContextFetchingStrategy.ts +++ b/packages/ws/src/strategies/context/IContextFetchingStrategy.ts @@ -1,11 +1,17 @@ import type { Awaitable } from '@discordjs/util'; import type { APIGatewayBotInfo } from 'discord-api-types/v10'; -import type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager'; +import type { SessionInfo, WebSocketManager, WebSocketManagerOptions } from '../../ws/WebSocketManager.js'; export interface FetchingStrategyOptions extends Omit< WebSocketManagerOptions, - 'rest' | 'retrieveSessionInfo' | 'shardCount' | 'shardIds' | 'updateSessionInfo' + | 'buildIdentifyThrottler' + | 'buildStrategy' + | 'rest' + | 'retrieveSessionInfo' + | 'shardCount' + | 'shardIds' + | 'updateSessionInfo' > { readonly gatewayInformation: APIGatewayBotInfo; readonly shardCount: number; @@ -18,11 +24,25 @@ export interface IContextFetchingStrategy { readonly options: FetchingStrategyOptions; retrieveSessionInfo(shardId: number): Awaitable; updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null): Awaitable; + /** + * Resolves once the given shard should be allowed to identify, or rejects if the operation was aborted + */ + waitForIdentify(shardId: number, signal: AbortSignal): Promise; } export async function managerToFetchingStrategyOptions(manager: WebSocketManager): Promise { - // eslint-disable-next-line @typescript-eslint/unbound-method - const { retrieveSessionInfo, updateSessionInfo, shardCount, shardIds, rest, ...managerOptions } = manager.options; + /* eslint-disable @typescript-eslint/unbound-method */ + const { + buildIdentifyThrottler, + buildStrategy, + retrieveSessionInfo, + updateSessionInfo, + shardCount, + shardIds, + rest, + ...managerOptions + } = manager.options; + /* eslint-enable @typescript-eslint/unbound-method */ return { ...managerOptions, diff --git a/packages/ws/src/strategies/context/SimpleContextFetchingStrategy.ts b/packages/ws/src/strategies/context/SimpleContextFetchingStrategy.ts index 9a942dd4b1d7..511179aa4991 100644 --- a/packages/ws/src/strategies/context/SimpleContextFetchingStrategy.ts +++ b/packages/ws/src/strategies/context/SimpleContextFetchingStrategy.ts @@ -1,7 +1,24 @@ +import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js'; import type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js'; import type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js'; export class SimpleContextFetchingStrategy implements IContextFetchingStrategy { + // This strategy assumes every shard is running under the same process - therefore we need a single + // IdentifyThrottler per manager. + private static throttlerCache = new WeakMap(); + + private static async ensureThrottler(manager: WebSocketManager): Promise { + const throttler = SimpleContextFetchingStrategy.throttlerCache.get(manager); + if (throttler) { + return throttler; + } + + const newThrottler = await manager.options.buildIdentifyThrottler(manager); + SimpleContextFetchingStrategy.throttlerCache.set(manager, newThrottler); + + return newThrottler; + } + public constructor(private readonly manager: WebSocketManager, public readonly options: FetchingStrategyOptions) {} public async retrieveSessionInfo(shardId: number): Promise { @@ -11,4 +28,9 @@ export class SimpleContextFetchingStrategy implements IContextFetchingStrategy { public updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) { return this.manager.options.updateSessionInfo(shardId, sessionInfo); } + + public async waitForIdentify(shardId: number, signal: AbortSignal): Promise { + const throttler = await SimpleContextFetchingStrategy.ensureThrottler(this.manager); + await throttler.waitForIdentify(shardId, signal); + } } diff --git a/packages/ws/src/strategies/context/WorkerContextFetchingStrategy.ts b/packages/ws/src/strategies/context/WorkerContextFetchingStrategy.ts index 8962c31405e0..5a79eb88f99f 100644 --- a/packages/ws/src/strategies/context/WorkerContextFetchingStrategy.ts +++ b/packages/ws/src/strategies/context/WorkerContextFetchingStrategy.ts @@ -2,16 +2,25 @@ import { isMainThread, parentPort } from 'node:worker_threads'; import { Collection } from '@discordjs/collection'; import type { SessionInfo } from '../../ws/WebSocketManager.js'; import { - WorkerRecievePayloadOp, + WorkerReceivePayloadOp, WorkerSendPayloadOp, - type WorkerRecievePayload, + type WorkerReceivePayload, type WorkerSendPayload, } from '../sharding/WorkerShardingStrategy.js'; import type { FetchingStrategyOptions, IContextFetchingStrategy } from './IContextFetchingStrategy.js'; +// Because the global types are incomplete for whatever reason +interface PolyFillAbortSignal { + readonly aborted: boolean; + addEventListener(type: 'abort', listener: () => void): void; + removeEventListener(type: 'abort', listener: () => void): void; +} + export class WorkerContextFetchingStrategy implements IContextFetchingStrategy { private readonly sessionPromises = new Collection void>(); + private readonly waitForIdentifyPromises = new Collection(); + public constructor(public readonly options: FetchingStrategyOptions) { if (isMainThread) { throw new Error('Cannot instantiate WorkerContextFetchingStrategy on the main thread'); @@ -19,17 +28,27 @@ export class WorkerContextFetchingStrategy implements IContextFetchingStrategy { parentPort!.on('message', (payload: WorkerSendPayload) => { if (payload.op === WorkerSendPayloadOp.SessionInfoResponse) { - const resolve = this.sessionPromises.get(payload.nonce); - resolve?.(payload.session); + this.sessionPromises.get(payload.nonce)?.(payload.session); this.sessionPromises.delete(payload.nonce); } + + if (payload.op === WorkerSendPayloadOp.ShardIdentifyResponse) { + const promise = this.waitForIdentifyPromises.get(payload.nonce); + if (payload.ok) { + promise?.resolve(); + } else { + promise?.reject(); + } + + this.waitForIdentifyPromises.delete(payload.nonce); + } }); } public async retrieveSessionInfo(shardId: number): Promise { const nonce = Math.random(); - const payload: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.RetrieveSessionInfo, + const payload: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.RetrieveSessionInfo, shardId, nonce, }; @@ -40,11 +59,44 @@ export class WorkerContextFetchingStrategy implements IContextFetchingStrategy { } public updateSessionInfo(shardId: number, sessionInfo: SessionInfo | null) { - const payload: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.UpdateSessionInfo, + const payload: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.UpdateSessionInfo, shardId, session: sessionInfo, }; parentPort!.postMessage(payload); } + + public async waitForIdentify(shardId: number, signal: AbortSignal): Promise { + const nonce = Math.random(); + + const payload: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.WaitForIdentify, + nonce, + shardId, + }; + const promise = new Promise((resolve, reject) => + // eslint-disable-next-line no-promise-executor-return + this.waitForIdentifyPromises.set(nonce, { resolve, reject }), + ); + + parentPort!.postMessage(payload); + + const listener = () => { + const payload: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.CancelIdentify, + nonce, + }; + + parentPort!.postMessage(payload); + }; + + (signal as unknown as PolyFillAbortSignal).addEventListener('abort', listener); + + try { + await promise; + } finally { + (signal as unknown as PolyFillAbortSignal).removeEventListener('abort', listener); + } + } } diff --git a/packages/ws/src/strategies/sharding/IShardingStrategy.ts b/packages/ws/src/strategies/sharding/IShardingStrategy.ts index 085981ef79e9..d56330814024 100644 --- a/packages/ws/src/strategies/sharding/IShardingStrategy.ts +++ b/packages/ws/src/strategies/sharding/IShardingStrategy.ts @@ -1,6 +1,7 @@ +import type { Collection } from '@discordjs/collection'; import type { Awaitable } from '@discordjs/util'; import type { GatewaySendPayload } from 'discord-api-types/v10'; -import type { WebSocketShardDestroyOptions } from '../../ws/WebSocketShard'; +import type { WebSocketShardDestroyOptions, WebSocketShardStatus } from '../../ws/WebSocketShard.js'; /** * Strategies responsible for spawning, initializing connections, destroying shards, and relaying events @@ -14,6 +15,10 @@ export interface IShardingStrategy { * Destroys all the shards */ destroy(options?: Omit): Awaitable; + /** + * Fetches the status of all the shards + */ + fetchStatus(): Awaitable>; /** * Sends a payload to a shard */ diff --git a/packages/ws/src/strategies/sharding/SimpleShardingStrategy.ts b/packages/ws/src/strategies/sharding/SimpleShardingStrategy.ts index 01276c17575b..f1b7e8f83937 100644 --- a/packages/ws/src/strategies/sharding/SimpleShardingStrategy.ts +++ b/packages/ws/src/strategies/sharding/SimpleShardingStrategy.ts @@ -1,7 +1,6 @@ import { Collection } from '@discordjs/collection'; import type { GatewaySendPayload } from 'discord-api-types/v10'; -import { IdentifyThrottler } from '../../utils/IdentifyThrottler.js'; -import type { WebSocketManager } from '../../ws/WebSocketManager'; +import type { WebSocketManager } from '../../ws/WebSocketManager.js'; import { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js'; import { managerToFetchingStrategyOptions } from '../context/IContextFetchingStrategy.js'; import { SimpleContextFetchingStrategy } from '../context/SimpleContextFetchingStrategy.js'; @@ -15,11 +14,8 @@ export class SimpleShardingStrategy implements IShardingStrategy { private readonly shards = new Collection(); - private readonly throttler: IdentifyThrottler; - public constructor(manager: WebSocketManager) { this.manager = manager; - this.throttler = new IdentifyThrottler(manager); } /** @@ -27,6 +23,7 @@ export class SimpleShardingStrategy implements IShardingStrategy { */ public async spawn(shardIds: number[]) { const strategyOptions = await managerToFetchingStrategyOptions(this.manager); + for (const shardId of shardIds) { const strategy = new SimpleContextFetchingStrategy(this.manager, strategyOptions); const shard = new WebSocketShard(strategy, shardId); @@ -46,7 +43,6 @@ export class SimpleShardingStrategy implements IShardingStrategy { const promises = []; for (const shard of this.shards.values()) { - await this.throttler.waitForIdentify(); promises.push(shard.connect()); } @@ -72,7 +68,17 @@ export class SimpleShardingStrategy implements IShardingStrategy { */ public async send(shardId: number, payload: GatewaySendPayload) { const shard = this.shards.get(shardId); - if (!shard) throw new Error(`Shard ${shardId} not found`); + if (!shard) { + throw new RangeError(`Shard ${shardId} not found`); + } + return shard.send(payload); } + + /** + * {@inheritDoc IShardingStrategy.fetchStatus} + */ + public async fetchStatus() { + return this.shards.mapValues((shard) => shard.status); + } } diff --git a/packages/ws/src/strategies/sharding/WorkerShardingStrategy.ts b/packages/ws/src/strategies/sharding/WorkerShardingStrategy.ts index 3ff4b380217f..fbca00c31be7 100644 --- a/packages/ws/src/strategies/sharding/WorkerShardingStrategy.ts +++ b/packages/ws/src/strategies/sharding/WorkerShardingStrategy.ts @@ -1,11 +1,15 @@ import { once } from 'node:events'; -import { join } from 'node:path'; +import { join, isAbsolute, resolve } from 'node:path'; import { Worker } from 'node:worker_threads'; import { Collection } from '@discordjs/collection'; import type { GatewaySendPayload } from 'discord-api-types/v10'; -import { IdentifyThrottler } from '../../utils/IdentifyThrottler.js'; -import type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager'; -import type { WebSocketShardDestroyOptions, WebSocketShardEvents } from '../../ws/WebSocketShard'; +import type { IIdentifyThrottler } from '../../throttling/IIdentifyThrottler.js'; +import type { SessionInfo, WebSocketManager } from '../../ws/WebSocketManager.js'; +import type { + WebSocketShardDestroyOptions, + WebSocketShardEvents, + WebSocketShardStatus, +} from '../../ws/WebSocketShard.js'; import { managerToFetchingStrategyOptions, type FetchingStrategyOptions } from '../context/IContextFetchingStrategy.js'; import type { IShardingStrategy } from './IShardingStrategy.js'; @@ -18,29 +22,41 @@ export enum WorkerSendPayloadOp { Destroy, Send, SessionInfoResponse, + ShardIdentifyResponse, + FetchStatus, } export type WorkerSendPayload = + | { nonce: number; ok: boolean; op: WorkerSendPayloadOp.ShardIdentifyResponse } + | { nonce: number; op: WorkerSendPayloadOp.FetchStatus; shardId: number } | { nonce: number; op: WorkerSendPayloadOp.SessionInfoResponse; session: SessionInfo | null } | { op: WorkerSendPayloadOp.Connect; shardId: number } | { op: WorkerSendPayloadOp.Destroy; options?: WebSocketShardDestroyOptions; shardId: number } | { op: WorkerSendPayloadOp.Send; payload: GatewaySendPayload; shardId: number }; -export enum WorkerRecievePayloadOp { +export enum WorkerReceivePayloadOp { Connected, Destroyed, Event, RetrieveSessionInfo, UpdateSessionInfo, + WaitForIdentify, + FetchStatusResponse, + WorkerReady, + CancelIdentify, } -export type WorkerRecievePayload = +export type WorkerReceivePayload = // Can't seem to get a type-safe union based off of the event, so I'm sadly leaving data as any for now - | { data: any; event: WebSocketShardEvents; op: WorkerRecievePayloadOp.Event; shardId: number } - | { nonce: number; op: WorkerRecievePayloadOp.RetrieveSessionInfo; shardId: number } - | { op: WorkerRecievePayloadOp.Connected; shardId: number } - | { op: WorkerRecievePayloadOp.Destroyed; shardId: number } - | { op: WorkerRecievePayloadOp.UpdateSessionInfo; session: SessionInfo | null; shardId: number }; + | { data: any; event: WebSocketShardEvents; op: WorkerReceivePayloadOp.Event; shardId: number } + | { nonce: number; op: WorkerReceivePayloadOp.CancelIdentify } + | { nonce: number; op: WorkerReceivePayloadOp.FetchStatusResponse; status: WebSocketShardStatus } + | { nonce: number; op: WorkerReceivePayloadOp.RetrieveSessionInfo; shardId: number } + | { nonce: number; op: WorkerReceivePayloadOp.WaitForIdentify; shardId: number } + | { op: WorkerReceivePayloadOp.Connected; shardId: number } + | { op: WorkerReceivePayloadOp.Destroyed; shardId: number } + | { op: WorkerReceivePayloadOp.UpdateSessionInfo; session: SessionInfo | null; shardId: number } + | { op: WorkerReceivePayloadOp.WorkerReady }; /** * Options for a {@link WorkerShardingStrategy} @@ -50,6 +66,10 @@ export interface WorkerShardingStrategyOptions { * Dictates how many shards should be spawned per worker thread. */ shardsPerWorker: number | 'all'; + /** + * Path to the worker file to use. The worker requires quite a bit of setup, it is recommended you leverage the {@link WorkerBootstrapper} class. + */ + workerPath?: string; } /** @@ -68,11 +88,14 @@ export class WorkerShardingStrategy implements IShardingStrategy { private readonly destroyPromises = new Collection void>(); - private readonly throttler: IdentifyThrottler; + private readonly fetchStatusPromises = new Collection void>(); + + private readonly waitForIdentifyControllers = new Collection(); + + private throttler?: IIdentifyThrottler; public constructor(manager: WebSocketManager, options: WorkerShardingStrategyOptions) { this.manager = manager; - this.throttler = new IdentifyThrottler(manager); this.options = options; } @@ -83,32 +106,20 @@ export class WorkerShardingStrategy implements IShardingStrategy { const shardsPerWorker = this.options.shardsPerWorker === 'all' ? shardIds.length : this.options.shardsPerWorker; const strategyOptions = await managerToFetchingStrategyOptions(this.manager); - let shards = 0; - while (shards !== shardIds.length) { - const slice = shardIds.slice(shards, shardsPerWorker + shards); + const loops = Math.ceil(shardIds.length / shardsPerWorker); + const promises: Promise[] = []; + + for (let idx = 0; idx < loops; idx++) { + const slice = shardIds.slice(idx * shardsPerWorker, (idx + 1) * shardsPerWorker); const workerData: WorkerData = { ...strategyOptions, shardIds: slice, }; - const worker = new Worker(join(__dirname, 'worker.js'), { workerData }); - await once(worker, 'online'); - worker - .on('error', (err) => { - throw err; - }) - .on('messageerror', (err) => { - throw err; - }) - .on('message', async (payload: WorkerRecievePayload) => this.onMessage(worker, payload)); - - this.#workers.push(worker); - for (const shardId of slice) { - this.#workerByShardId.set(shardId, worker); - } - - shards += slice.length; + promises.push(this.setupWorker(workerData)); } + + await Promise.all(promises); } /** @@ -118,8 +129,6 @@ export class WorkerShardingStrategy implements IShardingStrategy { const promises = []; for (const [shardId, worker] of this.#workerByShardId.entries()) { - await this.throttler.waitForIdentify(); - const payload: WorkerSendPayload = { op: WorkerSendPayloadOp.Connect, shardId, @@ -177,28 +186,108 @@ export class WorkerShardingStrategy implements IShardingStrategy { worker.postMessage(payload); } - private async onMessage(worker: Worker, payload: WorkerRecievePayload) { + /** + * {@inheritDoc IShardingStrategy.fetchStatus} + */ + public async fetchStatus() { + const statuses = new Collection(); + + for (const [shardId, worker] of this.#workerByShardId.entries()) { + const nonce = Math.random(); + const payload: WorkerSendPayload = { + op: WorkerSendPayloadOp.FetchStatus, + shardId, + nonce, + }; + + // eslint-disable-next-line no-promise-executor-return + const promise = new Promise((resolve) => this.fetchStatusPromises.set(nonce, resolve)); + worker.postMessage(payload); + + const status = await promise; + statuses.set(shardId, status); + } + + return statuses; + } + + private async setupWorker(workerData: WorkerData) { + const worker = new Worker(this.resolveWorkerPath(), { workerData }); + + await once(worker, 'online'); + // We do this in case the user has any potentially long running code in their worker + await this.waitForWorkerReady(worker); + + worker + .on('error', (err) => { + throw err; + }) + .on('messageerror', (err) => { + throw err; + }) + .on('message', async (payload: WorkerReceivePayload) => this.onMessage(worker, payload)); + + this.#workers.push(worker); + for (const shardId of workerData.shardIds) { + this.#workerByShardId.set(shardId, worker); + } + } + + private resolveWorkerPath(): string { + const path = this.options.workerPath; + + if (!path) { + return join(__dirname, 'defaultWorker.js'); + } + + if (isAbsolute(path)) { + return path; + } + + if (/^\.\.?[/\\]/.test(path)) { + return resolve(path); + } + + try { + return require.resolve(path); + } catch { + return resolve(path); + } + } + + private async waitForWorkerReady(worker: Worker): Promise { + return new Promise((resolve) => { + const handler = (payload: WorkerReceivePayload) => { + if (payload.op === WorkerReceivePayloadOp.WorkerReady) { + resolve(); + worker.off('message', handler); + } + }; + + worker.on('message', handler); + }); + } + + private async onMessage(worker: Worker, payload: WorkerReceivePayload) { switch (payload.op) { - case WorkerRecievePayloadOp.Connected: { - const resolve = this.connectPromises.get(payload.shardId)!; - resolve(); + case WorkerReceivePayloadOp.Connected: { + this.connectPromises.get(payload.shardId)?.(); this.connectPromises.delete(payload.shardId); break; } - case WorkerRecievePayloadOp.Destroyed: { - const resolve = this.destroyPromises.get(payload.shardId)!; - resolve(); + case WorkerReceivePayloadOp.Destroyed: { + this.destroyPromises.get(payload.shardId)?.(); this.destroyPromises.delete(payload.shardId); break; } - case WorkerRecievePayloadOp.Event: { + case WorkerReceivePayloadOp.Event: { this.manager.emit(payload.event, { ...payload.data, shardId: payload.shardId }); break; } - case WorkerRecievePayloadOp.RetrieveSessionInfo: { + case WorkerReceivePayloadOp.RetrieveSessionInfo: { const session = await this.manager.options.retrieveSessionInfo(payload.shardId); const response: WorkerSendPayload = { op: WorkerSendPayloadOp.SessionInfoResponse, @@ -209,10 +298,60 @@ export class WorkerShardingStrategy implements IShardingStrategy { break; } - case WorkerRecievePayloadOp.UpdateSessionInfo: { + case WorkerReceivePayloadOp.UpdateSessionInfo: { await this.manager.options.updateSessionInfo(payload.shardId, payload.session); break; } + + case WorkerReceivePayloadOp.WaitForIdentify: { + const throttler = await this.ensureThrottler(); + + // If this rejects it means we aborted, in which case we reply elsewhere. + try { + const controller = new AbortController(); + this.waitForIdentifyControllers.set(payload.nonce, controller); + await throttler.waitForIdentify(payload.shardId, controller.signal); + } catch { + return; + } + + const response: WorkerSendPayload = { + op: WorkerSendPayloadOp.ShardIdentifyResponse, + nonce: payload.nonce, + ok: true, + }; + worker.postMessage(response); + break; + } + + case WorkerReceivePayloadOp.FetchStatusResponse: { + this.fetchStatusPromises.get(payload.nonce)?.(payload.status); + this.fetchStatusPromises.delete(payload.nonce); + break; + } + + case WorkerReceivePayloadOp.WorkerReady: { + break; + } + + case WorkerReceivePayloadOp.CancelIdentify: { + this.waitForIdentifyControllers.get(payload.nonce)?.abort(); + this.waitForIdentifyControllers.delete(payload.nonce); + + const response: WorkerSendPayload = { + op: WorkerSendPayloadOp.ShardIdentifyResponse, + nonce: payload.nonce, + ok: false, + }; + worker.postMessage(response); + + break; + } } } + + private async ensureThrottler(): Promise { + this.throttler ??= await this.manager.options.buildIdentifyThrottler(this.manager); + return this.throttler; + } } diff --git a/packages/ws/src/strategies/sharding/defaultWorker.ts b/packages/ws/src/strategies/sharding/defaultWorker.ts new file mode 100644 index 000000000000..324bd20bc016 --- /dev/null +++ b/packages/ws/src/strategies/sharding/defaultWorker.ts @@ -0,0 +1,4 @@ +import { WorkerBootstrapper } from '../../utils/WorkerBootstrapper.js'; + +const bootstrapper = new WorkerBootstrapper(); +void bootstrapper.bootstrap(); diff --git a/packages/ws/src/strategies/sharding/worker.ts b/packages/ws/src/strategies/sharding/worker.ts deleted file mode 100644 index fc489aa705a4..000000000000 --- a/packages/ws/src/strategies/sharding/worker.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { isMainThread, workerData, parentPort } from 'node:worker_threads'; -import { Collection } from '@discordjs/collection'; -import { WebSocketShard, WebSocketShardEvents, type WebSocketShardDestroyOptions } from '../../ws/WebSocketShard.js'; -import { WorkerContextFetchingStrategy } from '../context/WorkerContextFetchingStrategy.js'; -import { - WorkerRecievePayloadOp, - WorkerSendPayloadOp, - type WorkerData, - type WorkerRecievePayload, - type WorkerSendPayload, -} from './WorkerShardingStrategy.js'; - -if (isMainThread) { - throw new Error('Expected worker script to not be ran within the main thread'); -} - -const data = workerData as WorkerData; -const shards = new Collection(); - -async function connect(shardId: number) { - const shard = shards.get(shardId); - if (!shard) { - throw new Error(`Shard ${shardId} does not exist`); - } - - await shard.connect(); -} - -async function destroy(shardId: number, options?: WebSocketShardDestroyOptions) { - const shard = shards.get(shardId); - if (!shard) { - throw new Error(`Shard ${shardId} does not exist`); - } - - await shard.destroy(options); -} - -for (const shardId of data.shardIds) { - const shard = new WebSocketShard(new WorkerContextFetchingStrategy(data), shardId); - for (const event of Object.values(WebSocketShardEvents)) { - // @ts-expect-error: Event types incompatible - shard.on(event, (data) => { - const payload: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.Event, - event, - data, - shardId, - }; - parentPort!.postMessage(payload); - }); - } - - shards.set(shardId, shard); -} - -parentPort! - .on('messageerror', (err) => { - throw err; - }) - .on('message', async (payload: WorkerSendPayload) => { - switch (payload.op) { - case WorkerSendPayloadOp.Connect: { - await connect(payload.shardId); - const response: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.Connected, - shardId: payload.shardId, - }; - parentPort!.postMessage(response); - break; - } - - case WorkerSendPayloadOp.Destroy: { - await destroy(payload.shardId, payload.options); - const response: WorkerRecievePayload = { - op: WorkerRecievePayloadOp.Destroyed, - shardId: payload.shardId, - }; - - parentPort!.postMessage(response); - break; - } - - case WorkerSendPayloadOp.Send: { - const shard = shards.get(payload.shardId); - if (!shard) { - throw new Error(`Shard ${payload.shardId} does not exist`); - } - - await shard.send(payload.payload); - break; - } - - case WorkerSendPayloadOp.SessionInfoResponse: { - break; - } - } - }); diff --git a/packages/ws/src/throttling/IIdentifyThrottler.ts b/packages/ws/src/throttling/IIdentifyThrottler.ts new file mode 100644 index 000000000000..f2faad5495b7 --- /dev/null +++ b/packages/ws/src/throttling/IIdentifyThrottler.ts @@ -0,0 +1,11 @@ +/** + * IdentifyThrottlers are responsible for dictating when a shard is allowed to identify. + * + * @see {@link https://discord.com/developers/docs/topics/gateway#sharding-max-concurrency} + */ +export interface IIdentifyThrottler { + /** + * Resolves once the given shard should be allowed to identify, or rejects if the operation was aborted. + */ + waitForIdentify(shardId: number, signal: AbortSignal): Promise; +} diff --git a/packages/ws/src/throttling/SimpleIdentifyThrottler.ts b/packages/ws/src/throttling/SimpleIdentifyThrottler.ts new file mode 100644 index 000000000000..bacf3fb079cf --- /dev/null +++ b/packages/ws/src/throttling/SimpleIdentifyThrottler.ts @@ -0,0 +1,50 @@ +import { setTimeout as sleep } from 'node:timers/promises'; +import { Collection } from '@discordjs/collection'; +import { AsyncQueue } from '@sapphire/async-queue'; +import type { IIdentifyThrottler } from './IIdentifyThrottler.js'; + +/** + * The state of a rate limit key's identify queue. + */ +export interface IdentifyState { + queue: AsyncQueue; + resetsAt: number; +} + +/** + * Local, in-memory identify throttler. + */ +export class SimpleIdentifyThrottler implements IIdentifyThrottler { + private readonly states = new Collection(); + + public constructor(private readonly maxConcurrency: number) {} + + /** + * {@inheritDoc IIdentifyThrottler.waitForIdentify} + */ + public async waitForIdentify(shardId: number, signal: AbortSignal): Promise { + const key = shardId % this.maxConcurrency; + + const state = this.states.ensure(key, () => { + return { + queue: new AsyncQueue(), + resetsAt: Number.POSITIVE_INFINITY, + }; + }); + + await state.queue.wait({ signal }); + + try { + const diff = state.resetsAt - Date.now(); + if (diff <= 5_000) { + // To account for the latency the IDENTIFY payload goes through, we add a bit more wait time + const time = diff + Math.random() * 1_500; + await sleep(time); + } + + state.resetsAt = Date.now() + 5_000; + } finally { + state.queue.shift(); + } + } +} diff --git a/packages/ws/src/utils/IdentifyThrottler.ts b/packages/ws/src/utils/IdentifyThrottler.ts deleted file mode 100644 index 90faa3fac3aa..000000000000 --- a/packages/ws/src/utils/IdentifyThrottler.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { setTimeout as sleep } from 'node:timers/promises'; -import type { WebSocketManager } from '../ws/WebSocketManager'; - -export class IdentifyThrottler { - private identifyState = { - remaining: 0, - resetsAt: Number.POSITIVE_INFINITY, - }; - - public constructor(private readonly manager: WebSocketManager) {} - - public async waitForIdentify(): Promise { - if (this.identifyState.remaining <= 0) { - const diff = this.identifyState.resetsAt - Date.now(); - if (diff <= 5_000) { - const time = diff + Math.random() * 1_500; - await sleep(time); - } - - const info = await this.manager.fetchGatewayInformation(); - this.identifyState = { - remaining: info.session_start_limit.max_concurrency, - resetsAt: Date.now() + 5_000, - }; - } - - this.identifyState.remaining--; - } -} diff --git a/packages/ws/src/utils/WorkerBootstrapper.ts b/packages/ws/src/utils/WorkerBootstrapper.ts new file mode 100644 index 000000000000..dd101293e969 --- /dev/null +++ b/packages/ws/src/utils/WorkerBootstrapper.ts @@ -0,0 +1,176 @@ +import { isMainThread, parentPort, workerData } from 'node:worker_threads'; +import { Collection } from '@discordjs/collection'; +import type { Awaitable } from '@discordjs/util'; +import { WorkerContextFetchingStrategy } from '../strategies/context/WorkerContextFetchingStrategy.js'; +import { + WorkerReceivePayloadOp, + WorkerSendPayloadOp, + type WorkerData, + type WorkerReceivePayload, + type WorkerSendPayload, +} from '../strategies/sharding/WorkerShardingStrategy.js'; +import type { WebSocketShardDestroyOptions } from '../ws/WebSocketShard.js'; +import { WebSocketShardEvents, WebSocketShard } from '../ws/WebSocketShard.js'; + +/** + * Options for bootstrapping the worker + */ +export interface BootstrapOptions { + /** + * Shard events to just arbitrarily forward to the parent thread for the manager to emit + * Note: By default, this will include ALL events + * you most likely want to handle dispatch within the worker itself + */ + forwardEvents?: WebSocketShardEvents[]; + /** + * Function to call when a shard is created for additional setup + */ + shardCallback?(shard: WebSocketShard): Awaitable; +} + +/** + * Utility class for bootstrapping a worker thread to be used for sharding + */ +export class WorkerBootstrapper { + /** + * The data passed to the worker thread + */ + protected readonly data = workerData as WorkerData; + + /** + * The shards that are managed by this worker + */ + protected readonly shards = new Collection(); + + public constructor() { + if (isMainThread) { + throw new Error('Expected WorkerBootstrap to not be used within the main thread'); + } + } + + /** + * Helper method to initiate a shard's connection process + */ + protected async connect(shardId: number): Promise { + const shard = this.shards.get(shardId); + if (!shard) { + throw new RangeError(`Shard ${shardId} does not exist`); + } + + await shard.connect(); + } + + /** + * Helper method to destroy a shard + */ + protected async destroy(shardId: number, options?: WebSocketShardDestroyOptions): Promise { + const shard = this.shards.get(shardId); + if (!shard) { + throw new RangeError(`Shard ${shardId} does not exist`); + } + + await shard.destroy(options); + } + + /** + * Helper method to attach event listeners to the parentPort + */ + protected setupThreadEvents(): void { + parentPort! + .on('messageerror', (err) => { + throw err; + }) + .on('message', async (payload: WorkerSendPayload) => { + switch (payload.op) { + case WorkerSendPayloadOp.Connect: { + await this.connect(payload.shardId); + const response: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.Connected, + shardId: payload.shardId, + }; + parentPort!.postMessage(response); + break; + } + + case WorkerSendPayloadOp.Destroy: { + await this.destroy(payload.shardId, payload.options); + const response: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.Destroyed, + shardId: payload.shardId, + }; + + parentPort!.postMessage(response); + break; + } + + case WorkerSendPayloadOp.Send: { + const shard = this.shards.get(payload.shardId); + if (!shard) { + throw new RangeError(`Shard ${payload.shardId} does not exist`); + } + + await shard.send(payload.payload); + break; + } + + case WorkerSendPayloadOp.SessionInfoResponse: { + break; + } + + case WorkerSendPayloadOp.ShardIdentifyResponse: { + break; + } + + case WorkerSendPayloadOp.FetchStatus: { + const shard = this.shards.get(payload.shardId); + if (!shard) { + throw new Error(`Shard ${payload.shardId} does not exist`); + } + + const response: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.FetchStatusResponse, + status: shard.status, + nonce: payload.nonce, + }; + + parentPort!.postMessage(response); + break; + } + } + }); + } + + /** + * Bootstraps the worker thread with the provided options + */ + public async bootstrap(options: Readonly = {}): Promise { + // Start by initializing the shards + for (const shardId of this.data.shardIds) { + const shard = new WebSocketShard(new WorkerContextFetchingStrategy(this.data), shardId); + for (const event of options.forwardEvents ?? Object.values(WebSocketShardEvents)) { + // @ts-expect-error: Event types incompatible + shard.on(event, (data) => { + const payload: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.Event, + event, + data, + shardId, + }; + parentPort!.postMessage(payload); + }); + } + + // Any additional setup the user might want to do + await options.shardCallback?.(shard); + this.shards.set(shardId, shard); + } + + // Lastly, start listening to messages from the parent thread + this.setupThreadEvents(); + + const message: WorkerReceivePayload = { + op: WorkerReceivePayloadOp.WorkerReady, + }; + parentPort!.postMessage(message); + } +} diff --git a/packages/ws/src/utils/constants.ts b/packages/ws/src/utils/constants.ts index 72d20ec65185..a99f817f9289 100644 --- a/packages/ws/src/utils/constants.ts +++ b/packages/ws/src/utils/constants.ts @@ -2,7 +2,10 @@ import process from 'node:process'; import { Collection } from '@discordjs/collection'; import { lazy } from '@discordjs/util'; import { APIVersion, GatewayOpcodes } from 'discord-api-types/v10'; -import type { OptionalWebSocketManagerOptions, SessionInfo } from '../ws/WebSocketManager.js'; +import { SimpleShardingStrategy } from '../strategies/sharding/SimpleShardingStrategy.js'; +import { SimpleIdentifyThrottler } from '../throttling/SimpleIdentifyThrottler.js'; +import type { SessionInfo, OptionalWebSocketManagerOptions, WebSocketManager } from '../ws/WebSocketManager.js'; +import type { SendRateLimitState } from '../ws/WebSocketShard.js'; /** * Valid encoding types @@ -18,14 +21,19 @@ export enum CompressionMethod { ZlibStream = 'zlib-stream', } -export const DefaultDeviceProperty = `@discordjs/ws [VI]{{inject}}[/VI]`; +export const DefaultDeviceProperty = `@discordjs/ws [VI]{{inject}}[/VI]` as `@discordjs/ws ${string}`; const getDefaultSessionStore = lazy(() => new Collection()); /** * Default options used by the manager */ -export const DefaultWebSocketManagerOptions: OptionalWebSocketManagerOptions = { +export const DefaultWebSocketManagerOptions = { + async buildIdentifyThrottler(manager: WebSocketManager) { + const info = await manager.fetchGatewayInformation(); + return new SimpleIdentifyThrottler(info.session_start_limit.max_concurrency); + }, + buildStrategy: (manager) => new SimpleShardingStrategy(manager), shardCount: null, shardIds: null, largeThreshold: null, @@ -53,10 +61,17 @@ export const DefaultWebSocketManagerOptions: OptionalWebSocketManagerOptions = { handshakeTimeout: 30_000, helloTimeout: 60_000, readyTimeout: 15_000, -}; +} as const satisfies OptionalWebSocketManagerOptions; export const ImportantGatewayOpcodes = new Set([ GatewayOpcodes.Heartbeat, GatewayOpcodes.Identify, GatewayOpcodes.Resume, ]); + +export function getInitialSendRateLimitState(): SendRateLimitState { + return { + remaining: 120, + resetAt: Date.now() + 60_000, + }; +} diff --git a/packages/ws/src/ws/WebSocketManager.ts b/packages/ws/src/ws/WebSocketManager.ts index d6e1864b0ea7..19996c39655b 100644 --- a/packages/ws/src/ws/WebSocketManager.ts +++ b/packages/ws/src/ws/WebSocketManager.ts @@ -10,8 +10,8 @@ import { type GatewayIntentBits, type GatewaySendPayload, } from 'discord-api-types/v10'; -import type { IShardingStrategy } from '../strategies/sharding/IShardingStrategy'; -import { SimpleShardingStrategy } from '../strategies/sharding/SimpleShardingStrategy.js'; +import type { IShardingStrategy } from '../strategies/sharding/IShardingStrategy.js'; +import type { IIdentifyThrottler } from '../throttling/IIdentifyThrottler.js'; import { DefaultWebSocketManagerOptions, type CompressionMethod, type Encoding } from '../utils/constants.js'; import type { WebSocketShardDestroyOptions, WebSocketShardEventsMap } from './WebSocketShard.js'; @@ -56,7 +56,7 @@ export interface RequiredWebSocketManagerOptions { /** * The intents to request */ - intents: GatewayIntentBits; + intents: GatewayIntentBits | 0; /** * The REST instance to use for fetching gateway information */ @@ -71,6 +71,24 @@ export interface RequiredWebSocketManagerOptions { * Optional additional configuration for the WebSocketManager */ export interface OptionalWebSocketManagerOptions { + /** + * Builds an identify throttler to use for this manager's shards + */ + buildIdentifyThrottler(manager: WebSocketManager): Awaitable; + /** + * Builds the strategy to use for sharding + * + * @example + * ```ts + * const manager = new WebSocketManager({ + * token: process.env.DISCORD_TOKEN, + * intents: 0, // for no intents + * rest, + * buildStrategy: (manager) => new WorkerShardingStrategy(manager, { shardsPerWorker: 2 }), + * }); + * ``` + */ + buildStrategy(manager: WebSocketManager): IShardingStrategy; /** * The compression method to use * @@ -190,18 +208,14 @@ export class WebSocketManager extends AsyncEventEmitter { /** * Strategy used to manage shards * - * @defaultValue `SimpleManagerToShardStrategy` + * @defaultValue `SimpleShardingStrategy` */ - private strategy: IShardingStrategy = new SimpleShardingStrategy(this); + private readonly strategy: IShardingStrategy; public constructor(options: Partial & RequiredWebSocketManagerOptions) { super(); this.options = { ...DefaultWebSocketManagerOptions, ...options }; - } - - public setStrategy(strategy: IShardingStrategy) { - this.strategy = strategy; - return this; + this.strategy = this.options.buildStrategy(this); } /** @@ -220,7 +234,8 @@ export class WebSocketManager extends AsyncEventEmitter { const data = (await this.options.rest.get(Routes.gatewayBot())) as RESTGetAPIGatewayBotResult; - this.gatewayInformation = { data, expiresAt: Date.now() + data.session_start_limit.reset_after }; + // For single sharded bots session_start_limit.reset_after will be 0, use 5 seconds as a minimum expiration time + this.gatewayInformation = { data, expiresAt: Date.now() + (data.session_start_limit.reset_after || 5_000) }; return this.gatewayInformation.data; } @@ -264,11 +279,12 @@ export class WebSocketManager extends AsyncEventEmitter { if (Array.isArray(this.options.shardIds)) { shardIds = this.options.shardIds; } else { - shardIds = range(this.options.shardIds.start, this.options.shardIds.end); + const { start, end } = this.options.shardIds; + shardIds = [...range({ start, end: end + 1 })]; } } else { const data = await this.fetchGatewayInformation(); - shardIds = range(0, (this.options.shardCount ?? data.shards) - 1); + shardIds = [...range(this.options.shardCount ?? data.shards)]; } this.shardIds = shardIds; @@ -299,4 +315,8 @@ export class WebSocketManager extends AsyncEventEmitter { public send(shardId: number, payload: GatewaySendPayload) { return this.strategy.send(shardId, payload); } + + public fetchStatus() { + return this.strategy.fetchStatus(); + } } diff --git a/packages/ws/src/ws/WebSocketShard.ts b/packages/ws/src/ws/WebSocketShard.ts index e78ec14e1e12..5671a69b28ff 100644 --- a/packages/ws/src/ws/WebSocketShard.ts +++ b/packages/ws/src/ws/WebSocketShard.ts @@ -1,7 +1,7 @@ /* eslint-disable id-length */ import { Buffer } from 'node:buffer'; import { once } from 'node:events'; -import { setTimeout, clearInterval, clearTimeout, setInterval } from 'node:timers'; +import { clearInterval, clearTimeout, setInterval, setTimeout } from 'node:timers'; import { setTimeout as sleep } from 'node:timers/promises'; import { URLSearchParams } from 'node:url'; import { TextDecoder } from 'node:util'; @@ -16,22 +16,25 @@ import { GatewayOpcodes, type GatewayDispatchPayload, type GatewayIdentifyData, + type GatewayReadyDispatchData, type GatewayReceivePayload, type GatewaySendPayload, - type GatewayReadyDispatchData, } from 'discord-api-types/v10'; import { WebSocket, type RawData } from 'ws'; import type { Inflate } from 'zlib-sync'; -import type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy'; -import { ImportantGatewayOpcodes } from '../utils/constants.js'; +import type { IContextFetchingStrategy } from '../strategies/context/IContextFetchingStrategy.js'; +import { ImportantGatewayOpcodes, getInitialSendRateLimitState } from '../utils/constants.js'; import type { SessionInfo } from './WebSocketManager.js'; // eslint-disable-next-line promise/prefer-await-to-then const getZlibSync = lazy(async () => import('zlib-sync').then((mod) => mod.default).catch(() => null)); export enum WebSocketShardEvents { + Closed = 'closed', Debug = 'debug', Dispatch = 'dispatch', + Error = 'error', + HeartbeatComplete = 'heartbeat', Hello = 'hello', Ready = 'ready', Resumed = 'resumed', @@ -51,11 +54,14 @@ export enum WebSocketShardDestroyRecovery { // eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type WebSocketShardEventsMap = { + [WebSocketShardEvents.Closed]: [{ code: number }]; [WebSocketShardEvents.Debug]: [payload: { message: string }]; + [WebSocketShardEvents.Dispatch]: [payload: { data: GatewayDispatchPayload }]; + [WebSocketShardEvents.Error]: [payload: { error: Error }]; [WebSocketShardEvents.Hello]: []; [WebSocketShardEvents.Ready]: [payload: { data: GatewayReadyDispatchData }]; [WebSocketShardEvents.Resumed]: []; - [WebSocketShardEvents.Dispatch]: [payload: { data: GatewayDispatchPayload }]; + [WebSocketShardEvents.HeartbeatComplete]: [payload: { ackAt: number; heartbeatAt: number; latency: number }]; }; export interface WebSocketShardDestroyOptions { @@ -69,39 +75,51 @@ export enum CloseCodes { Resuming = 4_200, } +export interface SendRateLimitState { + remaining: number; + resetAt: number; +} + export class WebSocketShard extends AsyncEventEmitter { private connection: WebSocket | null = null; - private readonly id: number; - private useIdentifyCompress = false; private inflate: Inflate | null = null; private readonly textDecoder = new TextDecoder(); - private status: WebSocketShardStatus = WebSocketShardStatus.Idle; - private replayedEvents = 0; private isAck = true; - private sendRateLimitState = { - remaining: 120, - resetAt: Date.now(), - }; + private sendRateLimitState: SendRateLimitState = getInitialSendRateLimitState(); + + private initialHeartbeatTimeoutController: AbortController | null = null; private heartbeatInterval: NodeJS.Timer | null = null; private lastHeartbeatAt = -1; - private session: SessionInfo | null = null; + // Indicates whether the shard has already resolved its original connect() call + private initialConnectResolved = false; + + // Indicates if we failed to connect to the ws url (ECONNREFUSED/ECONNRESET) + private failedToConnectDueToNetworkError = false; private readonly sendQueue = new AsyncQueue(); - private readonly timeouts = new Collection(); + private readonly timeoutAbortControllers = new Collection(); + + private readonly strategy: IContextFetchingStrategy; - public readonly strategy: IContextFetchingStrategy; + public readonly id: number; + + #status: WebSocketShardStatus = WebSocketShardStatus.Idle; + + public get status(): WebSocketShardStatus { + return this.#status; + } public constructor(strategy: IContextFetchingStrategy, id: number) { super(); @@ -110,7 +128,31 @@ export class WebSocketShard extends AsyncEventEmitter { } public async connect() { - if (this.status !== WebSocketShardStatus.Idle) { + const controller = new AbortController(); + let promise; + + if (!this.initialConnectResolved) { + // Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn + promise = Promise.race([ + once(this, WebSocketShardEvents.Ready, { signal: controller.signal }), + once(this, WebSocketShardEvents.Resumed, { signal: controller.signal }), + ]); + } + + void this.internalConnect(); + + try { + await promise; + } finally { + // cleanup hanging listeners + controller.abort(); + } + + this.initialConnectResolved = true; + } + + private async internalConnect() { + if (this.#status !== WebSocketShardStatus.Idle) { throw new Error("Tried to connect a shard that wasn't idle"); } @@ -132,7 +174,7 @@ export class WebSocketShard extends AsyncEventEmitter { } } - const session = this.session ?? (await this.strategy.retrieveSessionInfo(this.id)); + const session = await this.strategy.retrieveSessionInfo(this.id); const url = `${session?.resumeURL ?? this.strategy.options.gatewayInformation.url}?${params.toString()}`; this.debug([`Connecting to ${url}`]); @@ -144,12 +186,16 @@ export class WebSocketShard extends AsyncEventEmitter { connection.binaryType = 'arraybuffer'; this.connection = connection; - this.status = WebSocketShardStatus.Connecting; + this.#status = WebSocketShardStatus.Connecting; + + this.sendRateLimitState = getInitialSendRateLimitState(); - await this.waitForEvent(WebSocketShardEvents.Hello, this.strategy.options.helloTimeout); + const { ok } = await this.waitForEvent(WebSocketShardEvents.Hello, this.strategy.options.helloTimeout); + if (!ok) { + return; + } if (session?.shardCount === this.strategy.options.shardCount) { - this.session = session; await this.resume(session); } else { await this.identify(); @@ -157,7 +203,7 @@ export class WebSocketShard extends AsyncEventEmitter { } public async destroy(options: WebSocketShardDestroyOptions = {}) { - if (this.status === WebSocketShardStatus.Idle) { + if (this.#status === WebSocketShardStatus.Idle) { this.debug(['Tried to destroy a shard that was idle']); return; } @@ -179,74 +225,149 @@ export class WebSocketShard extends AsyncEventEmitter { clearInterval(this.heartbeatInterval); } + if (this.initialHeartbeatTimeoutController) { + this.initialHeartbeatTimeoutController.abort(); + this.initialHeartbeatTimeoutController = null; + } + this.lastHeartbeatAt = -1; + for (const controller of this.timeoutAbortControllers.values()) { + controller.abort(); + } + + this.timeoutAbortControllers.clear(); + + this.failedToConnectDueToNetworkError = false; + // Clear session state if applicable - if (options.recover !== WebSocketShardDestroyRecovery.Resume && this.session) { - this.session = null; + if (options.recover !== WebSocketShardDestroyRecovery.Resume) { await this.strategy.updateSessionInfo(this.id, null); } - if ( - this.connection && - (this.connection.readyState === WebSocket.OPEN || this.connection.readyState === WebSocket.CONNECTING) - ) { + if (this.connection) { // No longer need to listen to messages this.connection.removeAllListeners('message'); // Prevent a reconnection loop by unbinding the main close event this.connection.removeAllListeners('close'); - this.connection.close(options.code, options.reason); - // Actually wait for the connection to close - await once(this.connection, 'close'); + const shouldClose = this.connection.readyState === WebSocket.OPEN; + + this.debug([ + 'Connection status during destroy', + `Needs closing: ${shouldClose}`, + `Ready state: ${this.connection.readyState}`, + ]); + + if (shouldClose) { + this.connection.close(options.code, options.reason); + await once(this.connection, 'close'); + this.emit(WebSocketShardEvents.Closed, { code: options.code }); + } // Lastly, remove the error event. // Doing this earlier would cause a hard crash in case an error event fired on our `close` call this.connection.removeAllListeners('error'); + } else { + this.debug(['Destroying a shard that has no connection; please open an issue on GitHub']); } - this.status = WebSocketShardStatus.Idle; + this.#status = WebSocketShardStatus.Idle; if (options.recover !== undefined) { - return this.connect(); + // There's cases (like no internet connection) where we immediately fail to connect, + // causing a very fast and draining reconnection loop. + await sleep(500); + return this.internalConnect(); } } - private async waitForEvent(event: WebSocketShardEvents, timeoutDuration?: number | null) { - this.debug([`Waiting for event ${event} for ${timeoutDuration ? `${timeoutDuration}ms` : 'indefinitely'}`]); - const controller = new AbortController(); - const timeout = timeoutDuration ? setTimeout(() => controller.abort(), timeoutDuration).unref() : null; - if (timeout) { - this.timeouts.set(event, timeout); - } + private async waitForEvent(event: WebSocketShardEvents, timeoutDuration?: number | null): Promise<{ ok: boolean }> { + this.debug([`Waiting for event ${event} ${timeoutDuration ? `for ${timeoutDuration}ms` : 'indefinitely'}`]); + const timeoutController = new AbortController(); + const timeout = timeoutDuration ? setTimeout(() => timeoutController.abort(), timeoutDuration).unref() : null; + + this.timeoutAbortControllers.set(event, timeoutController); + + const closeController = new AbortController(); + + try { + // If the first promise resolves, all is well. If the 2nd promise resolves, + // the shard has meanwhile closed. In that case, a destroy is already ongoing, so we just need to + // return false. Meanwhile, if something rejects (error event) or the first controller is aborted, + // we enter the catch block and trigger a destroy there. + const closed = await Promise.race([ + once(this, event, { signal: timeoutController.signal }).then(() => false), + once(this, WebSocketShardEvents.Closed, { signal: closeController.signal }).then(() => true), + ]); + + return { ok: !closed }; + } catch { + // If we're here because of other reasons, we need to destroy the shard + void this.destroy({ + code: CloseCodes.Normal, + reason: 'Something timed out or went wrong while waiting for an event', + recover: WebSocketShardDestroyRecovery.Reconnect, + }); + + return { ok: false }; + } finally { + if (timeout) { + clearTimeout(timeout); + } - await once(this, event, { signal: controller.signal }); - if (timeout) { - clearTimeout(timeout); - this.timeouts.delete(event); + this.timeoutAbortControllers.delete(event); + + // Clean up the close listener to not leak memory + if (!closeController.signal.aborted) { + closeController.abort(); + } } } - public async send(payload: GatewaySendPayload) { + public async send(payload: GatewaySendPayload): Promise { if (!this.connection) { throw new Error("WebSocketShard wasn't connected"); } - if (this.status !== WebSocketShardStatus.Ready && !ImportantGatewayOpcodes.has(payload.op)) { - await once(this, WebSocketShardEvents.Ready); + if (this.#status !== WebSocketShardStatus.Ready && !ImportantGatewayOpcodes.has(payload.op)) { + this.debug(['Tried to send a non-crucial payload before the shard was ready, waiting']); + // This will throw if the shard throws an error event in the meantime, just requeue the payload + try { + await once(this, WebSocketShardEvents.Ready); + } catch { + return this.send(payload); + } } await this.sendQueue.wait(); if (--this.sendRateLimitState.remaining <= 0) { - if (this.sendRateLimitState.resetAt < Date.now()) { - await sleep(Date.now() - this.sendRateLimitState.resetAt); + const now = Date.now(); + + if (this.sendRateLimitState.resetAt > now) { + const sleepFor = this.sendRateLimitState.resetAt - now; + + this.debug([`Was about to hit the send rate limit, sleeping for ${sleepFor}ms`]); + const controller = new AbortController(); + + // Sleep for the remaining time, but if the connection closes in the meantime, we shouldn't wait the remainder to avoid blocking the new conn + const interrupted = await Promise.race([ + sleep(sleepFor).then(() => false), + once(this, WebSocketShardEvents.Closed, { signal: controller.signal }).then(() => true), + ]); + + if (interrupted) { + this.debug(['Connection closed while waiting for the send rate limit to reset, re-queueing payload']); + this.sendQueue.shift(); + return this.send(payload); + } + + // This is so the listener from the `once` call is removed + controller.abort(); } - this.sendRateLimitState = { - remaining: 119, - resetAt: Date.now() + 60_000, - }; + this.sendRateLimitState = getInitialSendRateLimitState(); } this.sendQueue.shift(); @@ -254,6 +375,24 @@ export class WebSocketShard extends AsyncEventEmitter { } private async identify() { + this.debug(['Waiting for identify throttle']); + + const controller = new AbortController(); + const closeHandler = () => { + controller.abort(); + }; + + this.on(WebSocketShardEvents.Closed, closeHandler); + + try { + await this.strategy.waitForIdentify(this.id, controller.signal); + } catch { + this.debug(['Was waiting for an identify, but the shard closed in the meantime']); + return; + } finally { + this.off(WebSocketShardEvents.Closed, closeHandler); + } + this.debug([ 'Identifying', `shard id: ${this.id.toString()}`, @@ -261,6 +400,7 @@ export class WebSocketShard extends AsyncEventEmitter { `intents: ${this.strategy.options.intents}`, `compression: ${this.inflate ? 'zlib-stream' : this.useIdentifyCompress ? 'identify' : 'none'}`, ]); + const d: GatewayIdentifyData = { token: this.strategy.options.token, properties: this.strategy.options.identifyProperties, @@ -283,12 +423,17 @@ export class WebSocketShard extends AsyncEventEmitter { }); await this.waitForEvent(WebSocketShardEvents.Ready, this.strategy.options.readyTimeout); - this.status = WebSocketShardStatus.Ready; } private async resume(session: SessionInfo) { - this.debug(['Resuming session']); - this.status = WebSocketShardStatus.Resuming; + this.debug([ + 'Resuming session', + `resume url: ${session.resumeURL}`, + `sequence: ${session.sequence}`, + `shard id: ${this.id.toString()}`, + ]); + + this.#status = WebSocketShardStatus.Resuming; this.replayedEvents = 0; return this.send({ op: GatewayOpcodes.Resume, @@ -305,9 +450,11 @@ export class WebSocketShard extends AsyncEventEmitter { return this.destroy({ reason: 'Zombie connection', recover: WebSocketShardDestroyRecovery.Resume }); } + const session = await this.strategy.retrieveSessionInfo(this.id); + await this.send({ op: GatewayOpcodes.Heartbeat, - d: this.session?.sequence ?? null, + d: session?.sequence ?? null, }); this.lastHeartbeatAt = Date.now(); @@ -350,7 +497,9 @@ export class WebSocketShard extends AsyncEventEmitter { this.inflate.push(Buffer.from(decompressable), flush ? zlib.Z_SYNC_FLUSH : zlib.Z_NO_FLUSH); if (this.inflate.err) { - this.emit('error', `${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ''}`); + this.emit(WebSocketShardEvents.Error, { + error: new Error(`${this.inflate.err}${this.inflate.msg ? `: ${this.inflate.msg}` : ''}`), + }); } if (!flush) { @@ -383,16 +532,16 @@ export class WebSocketShard extends AsyncEventEmitter { switch (payload.op) { case GatewayOpcodes.Dispatch: { - if (this.status === WebSocketShardStatus.Resuming) { + if (this.#status === WebSocketShardStatus.Resuming) { this.replayedEvents++; } // eslint-disable-next-line sonarjs/no-nested-switch switch (payload.t) { case GatewayDispatchEvents.Ready: { - this.emit(WebSocketShardEvents.Ready, { data: payload.d }); + this.#status = WebSocketShardStatus.Ready; - this.session ??= { + const session = { sequence: payload.s, sessionId: payload.d.session_id, shardId: this.id, @@ -400,12 +549,14 @@ export class WebSocketShard extends AsyncEventEmitter { resumeURL: payload.d.resume_gateway_url, }; - await this.strategy.updateSessionInfo(this.id, this.session); + await this.strategy.updateSessionInfo(this.id, session); + + this.emit(WebSocketShardEvents.Ready, { data: payload.d }); break; } case GatewayDispatchEvents.Resumed: { - this.status = WebSocketShardStatus.Ready; + this.#status = WebSocketShardStatus.Ready; this.debug([`Resumed and replayed ${this.replayedEvents} events`]); this.emit(WebSocketShardEvents.Resumed); break; @@ -416,9 +567,15 @@ export class WebSocketShard extends AsyncEventEmitter { } } - if (this.session && payload.s > this.session.sequence) { - this.session.sequence = payload.s; - await this.strategy.updateSessionInfo(this.id, this.session); + const session = await this.strategy.retrieveSessionInfo(this.id); + if (session) { + if (payload.s > session.sequence) { + await this.strategy.updateSessionInfo(this.id, { ...session, sequence: payload.s }); + } + } else { + this.debug([ + `Received a ${payload.t} event but no session is available. Session information cannot be re-constructed in this state without a full reconnect`, + ]); } this.emit(WebSocketShardEvents.Dispatch, { data: payload }); @@ -440,10 +597,8 @@ export class WebSocketShard extends AsyncEventEmitter { } case GatewayOpcodes.InvalidSession: { - const readyTimeout = this.timeouts.get(WebSocketShardEvents.Ready); - readyTimeout?.refresh(); this.debug([`Invalid session; will attempt to resume: ${payload.d.toString()}`]); - const session = this.session ?? (await this.strategy.retrieveSessionInfo(this.id)); + const session = await this.strategy.retrieveSessionInfo(this.id); if (payload.d && session) { await this.resume(session); } else { @@ -458,27 +613,58 @@ export class WebSocketShard extends AsyncEventEmitter { case GatewayOpcodes.Hello: { this.emit(WebSocketShardEvents.Hello); - this.debug([`Starting to heartbeat every ${payload.d.heartbeat_interval}ms`]); + const jitter = Math.random(); + const firstWait = Math.floor(payload.d.heartbeat_interval * jitter); + this.debug([`Preparing first heartbeat of the connection with a jitter of ${jitter}; waiting ${firstWait}ms`]); + + try { + const controller = new AbortController(); + this.initialHeartbeatTimeoutController = controller; + await sleep(firstWait, undefined, { signal: controller.signal }); + } catch { + this.debug(['Cancelled initial heartbeat due to #destroy being called']); + return; + } finally { + this.initialHeartbeatTimeoutController = null; + } + + await this.heartbeat(); + + this.debug([`First heartbeat sent, starting to beat every ${payload.d.heartbeat_interval}ms`]); this.heartbeatInterval = setInterval(() => void this.heartbeat(), payload.d.heartbeat_interval); break; } case GatewayOpcodes.HeartbeatAck: { this.isAck = true; - this.debug([`Got heartbeat ack after ${Date.now() - this.lastHeartbeatAt}ms`]); + + const ackAt = Date.now(); + this.emit(WebSocketShardEvents.HeartbeatComplete, { + ackAt, + heartbeatAt: this.lastHeartbeatAt, + latency: ackAt - this.lastHeartbeatAt, + }); + break; } } } - private onError(err: Error) { - this.emit('error', err); + private onError(error: Error) { + if ('code' in error && ['ECONNRESET', 'ECONNREFUSED'].includes(error.code as string)) { + this.debug(['Failed to connect to the gateway URL specified due to a network error']); + this.failedToConnectDueToNetworkError = true; + return; + } + + this.emit(WebSocketShardEvents.Error, { error }); } private async onClose(code: number) { + this.emit(WebSocketShardEvents.Closed, { code }); + switch (code) { case CloseCodes.Normal: { - this.debug([`Disconnected normally from code ${code}`]); return this.destroy({ code, reason: 'Got disconnected by Discord', @@ -487,12 +673,11 @@ export class WebSocketShard extends AsyncEventEmitter { } case CloseCodes.Resuming: { - this.debug([`Disconnected normally from code ${code}`]); break; } case GatewayCloseCodes.UnknownError: { - this.debug([`An unknown error occured: ${code}`]); + this.debug([`An unknown error occurred: ${code}`]); return this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume }); } @@ -556,8 +741,17 @@ export class WebSocketShard extends AsyncEventEmitter { } default: { - this.debug([`The gateway closed with an unexpected code ${code}, attempting to resume.`]); - return this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume }); + this.debug([ + `The gateway closed with an unexpected code ${code}, attempting to ${ + this.failedToConnectDueToNetworkError ? 'reconnect' : 'resume' + }.`, + ]); + return this.destroy({ + code, + recover: this.failedToConnectDueToNetworkError + ? WebSocketShardDestroyRecovery.Reconnect + : WebSocketShardDestroyRecovery.Resume, + }); } } } diff --git a/packages/ws/tsconfig.docs.json b/packages/ws/tsconfig.docs.json new file mode 100644 index 000000000000..80a7fe18bf5b --- /dev/null +++ b/packages/ws/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.docs.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "outDir": "dist-docs" + } +} diff --git a/packages/ws/tsup.config.js b/packages/ws/tsup.config.ts similarity index 82% rename from packages/ws/tsup.config.js rename to packages/ws/tsup.config.ts index 3245f14302b2..8020700fa1c9 100644 --- a/packages/ws/tsup.config.js +++ b/packages/ws/tsup.config.ts @@ -4,7 +4,7 @@ import { createTsupConfig } from '../../tsup.config.js'; export default createTsupConfig({ entry: { index: 'src/index.ts', - worker: 'src/strategies/sharding/worker.ts', + defaultWorker: 'src/strategies/sharding/defaultWorker.ts', }, external: ['zlib-sync'], esbuildPlugins: [esbuildPluginVersionInjector()], diff --git a/tsconfig.docs.json b/tsconfig.docs.json new file mode 100644 index 000000000000..9b4ca23c5ddb --- /dev/null +++ b/tsconfig.docs.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "emitDeclarationOnly": true, + "skipLibCheck": true + } +} diff --git a/tsconfig.json b/tsconfig.json index ab1af7f5a1de..2eef22df7063 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,26 +16,23 @@ // Modules "module": "ESNext", - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, // Emit "declaration": true, "declarationMap": true, "importHelpers": true, - "importsNotUsedAsValues": "error", "inlineSources": true, "newLine": "lf", "noEmitHelpers": true, "outDir": "dist", - "preserveConstEnums": true, "removeComments": false, "sourceMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, // Language and Environment - "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": ["ESNext"], "target": "ES2021", diff --git a/tsup.config.js b/tsup.config.ts similarity index 85% rename from tsup.config.js rename to tsup.config.ts index 39741bb0681a..714c6194a3aa 100644 --- a/tsup.config.js +++ b/tsup.config.ts @@ -1,3 +1,4 @@ +import type { Options } from 'tsup'; import { defineConfig } from 'tsup'; export function createTsupConfig({ @@ -15,8 +16,8 @@ export function createTsupConfig({ keepNames = true, dts = true, sourcemap = true, - esbuildPlugins = [] -} = {}) { + esbuildPlugins = [], +}: Options = {}) { return defineConfig({ entry, external, @@ -32,6 +33,6 @@ export function createTsupConfig({ keepNames, dts, sourcemap, - esbuildPlugins + esbuildPlugins, }); } diff --git a/turbo.json b/turbo.json index d50a29be2067..c1287cccde92 100644 --- a/turbo.json +++ b/turbo.json @@ -1,37 +1,172 @@ { - "$schema": "https://turborepo.org/schema.json", + "$schema": "https://turbo.build/schema.json", + "globalDependencies": ["yarn.lock", "**/tsconfig.json", "**/tsup.config.ts"], "pipeline": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**"] + "inputs": ["src/**/*.ts"], + "outputs": ["dist/**"], + "outputMode": "errors-only" + }, + "@discordjs/ui#build": { + "dependsOn": ["^build"], + "inputs": ["src/**/*.ts", "vite.config.ts"], + "outputs": ["dist/**"], + "outputMode": "hash-only" + }, + "@discordjs/guide#build:local": { + "dependsOn": ["^build"], + "inputs": [ + ".env.development", + ".env.development.local", + "public/**", + "src/**/*.tsx", + "src/**/*.ts", + "src/**/*.css", + "!src/styles/unocss.css", + "src/**/*.mdx", + "src/assets/**", + "next.config.js" + ], + "outputs": [".next/**", "!.next/cache/**"], + "outputMode": "full", + "cache": false }, "@discordjs/guide#build:prod": { "dependsOn": ["^build"], - "outputs": ["dist/**"] + "inputs": [ + "public/**", + "src/**/*.tsx", + "src/**/*.ts", + "src/**/*.css", + "!src/styles/unocss.css", + "src/**/*.mdx", + "src/assets/**/*", + "next.config.js" + ], + "outputs": [".next/**", "!.next/cache/**"], + "outputMode": "full" + }, + "@discordjs/website#build:local": { + "dependsOn": ["^build", "docs"], + "env": ["NEXT_PUBLIC_LOCAL_DEV", "DATABASE_URL", "EDGE_CONFIG"], + "inputs": [ + ".env.development", + ".env.development.local", + "src/**/*.tsx", + "src/**/*.ts", + "src/**/*.css", + "!src/styles/unocss.css", + "src/assets/**/*", + "!src/assets/readme/**", + "scripts/**", + "next.config.js" + ], + "outputs": [".next/**", "!.next/cache/**"], + "outputMode": "full", + "cache": false }, "@discordjs/website#build:prod": { - "dependsOn": ["^build"], - "outputs": [".next/**"] + "dependsOn": ["^build", "docs"], + "env": ["NEXT_PUBLIC_LOCAL_DEV", "DATABASE_URL", "EDGE_CONFIG"], + "inputs": [ + "src/**/*.tsx", + "src/**/*.ts", + "src/**/*.css", + "!src/styles/unocss.css", + "src/assets/**/*", + "!src/assets/readme/**", + "scripts/**", + "next.config.js" + ], + "outputs": [".next/**", "!.next/cache/**"], + "outputMode": "full" }, "test": { "dependsOn": ["^build"], - "outputs": [] + "inputs": ["**/codecov.yml", "**/vitest.config.ts", "__tests_/**/*.ts", "src/**/*.ts", "src/**/*.js"], + "outputs": ["coverage/**"], + "outputMode": "new-only" + }, + "@discordjs/voice#test": { + "dependsOn": ["^build"], + "inputs": [ + "__tests_/**/*.ts", + "__mocks__/**/*.ts", + "__mocks__/**/*.js", + "src/**/*.ts", + "src/**/*.js", + "babel.config.js", + "jest.config.js" + ], + "outputs": ["coverage/**"], + "outputMode": "new-only" }, "lint": { "dependsOn": ["^build"], - "outputs": [] + "inputs": [ + "**/.eslintignore", + "**/.eslintrc.json", + "**/.prettierignore", + "**/.prettierrc.json", + "**/tsconfig.eslint.json", + "src/**/*.tsx", + "src/**/*.ts", + "src/**/*.css", + "src/**/*.mdx", + "scripts/**.js", + "scripts/**.mjs", + ".prettierrc.js", + ".prettierrc.cjs", + "next.config.js", + "vite.config.ts" + ], + "outputMode": "errors-only" }, "format": { "dependsOn": ["^build"], - "outputs": [] + "inputs": [ + "**/.eslintignore", + "**/.eslintrc.json", + "**/.prettierignore", + "**/.prettierrc.json", + "**/tsconfig.eslint.json", + "src/**/*.tsx", + "src/**/*.ts", + "src/**/*.css", + "src/**/*.mdx", + "scripts/**.js", + "scripts/**.mjs", + ".prettierrc.js", + ".prettierrc.cjs", + "next.config.js", + "vite.config.ts" + ], + "outputMode": "errors-only" }, "docs": { - "dependsOn": ["^build"], - "outputs": ["docs/docs.json", "docs/docs.api.json"] + "inputs": ["**/api-extractor.json", "**/tsconfig.docs.json", "api-extractor-docs.json", "docs/**/*"], + "outputs": ["dist-docs/**", "docs/docs.json", "docs/docs.api.json"], + "outputMode": "errors-only" }, "changelog": { - "dependsOn": ["^build"], + "inputs": ["cliff.toml"], "outputs": ["CHANGELOG.md"] + }, + "dev": { + "dependsOn": ["^build"], + "cache": false, + "persistent": true + }, + "@discordjs/guide#dev": { + "dependsOn": ["^build"], + "cache": false, + "persistent": true + }, + "@discordjs/website#dev": { + "dependsOn": ["^build", "docs"], + "cache": false, + "persistent": true } } } diff --git a/unocss.config.ts b/unocss.config.ts index 55b601c4fde7..9288aa31f411 100644 --- a/unocss.config.ts +++ b/unocss.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, presetTypography, presetUno, presetWebFonts } from 'unocss'; +import { defineConfig, presetTypography, presetUno } from 'unocss'; export default defineConfig({ theme: { @@ -16,31 +16,13 @@ export default defineConfig({ 900: '#020208', }, }, + fontFamily: { + sans: 'var(--font-inter)', + mono: 'var(--font-mono)', + }, }, presets: [ presetUno({ dark: 'class' }), - presetWebFonts({ - provider: 'bunny', - fonts: { - mono: ['JetBrains Mono:400,600,700'], - 'source-sans-pro': [ - 'Source Sans Pro:300,400,500,600', - { name: 'ui-sans-serif', provider: 'none' }, - { name: 'system-ui', provider: 'none' }, - { name: '-apple-system', provider: 'none' }, - { name: 'BlinkMacSystemFont', provider: 'none' }, - { name: 'Segoe UI', provider: 'none' }, - { name: 'Roboto', provider: 'none' }, - { name: 'Helvetica Neue', provider: 'none' }, - { name: 'Arial', provider: 'none' }, - { name: 'sans-serif', provider: 'none' }, - { name: 'Apple Color Emoji', provider: 'none' }, - { name: 'Segoe UI Emoji', provider: 'none' }, - { name: 'Segoe UI Symbol', provider: 'none' }, - { name: 'Noto Color Emoji', provider: 'none' }, - ], - }, - }), presetTypography({ cssExtend: { pre: { @@ -65,33 +47,32 @@ export default defineConfig({ 'a > img': { display: 'inline-block', }, + 'a > img[height="44"]': { + height: '44px', + }, h1: { + display: 'flex', + 'place-items': 'center', 'scroll-margin-top': '6.5rem', }, - '.level-h1': { - margin: '1rem 0', - }, h2: { + display: 'flex', + 'place-items': 'center', 'margin-top': '1.25em', 'scroll-margin-top': '6.5rem', }, - '.level-h2': { - margin: '1.25em 0', - }, h3: { + display: 'flex', + 'place-items': 'center', 'margin-top': '1.25em', 'scroll-margin-top': '6.5rem', }, - '.level-h3': { - margin: '1.25em 0', - }, h4: { + display: 'flex', + 'place-items': 'center', 'margin-top': '1.25em', 'scroll-margin-top': '6.5rem', }, - '.level-h4': { - margin: '1.25em 0', - }, // eslint-disable-next-line id-length p: { margin: '.5em 0', @@ -99,18 +80,4 @@ export default defineConfig({ }, }), ], - include: [ - /.vue$/, - /.vue?vue/, - /.svelte$/, - /.[jt]sx$/, - /.mdx?$/, - /.astro$/, - /.elm$/, - /.html$/, - // eslint-disable-next-line prefer-named-capture-group, unicorn/no-unsafe-regex - /.*\/ui\.js(.*)?$/, - // eslint-disable-next-line prefer-named-capture-group, unicorn/no-unsafe-regex - /.*\/ui\.mjs(.*)?$/, - ], }); diff --git a/vitest.config.ts b/vitest.config.ts index 29ea679f9afa..aea40ebda80c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -13,8 +13,11 @@ export default defineConfig({ exclude: [ // All ts files that only contain types, due to ALL '**/*.{interface,type,d}.ts', + '**/{interfaces,types}/*.ts', // All index files that *should* only contain exports from other files '**/index.{js,ts}', + // All exports files that make subpackages available as submodules + '**/exports/*.{js,ts}', ], }, }, diff --git a/yarn.lock b/yarn.lock index 972837c67d03..7b330ac1c76d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,7 +5,7 @@ __metadata: version: 6 cacheKey: 8 -"@actions/core@npm:^1.10.0": +"@actions/core@npm:^1.10.0, @actions/core@npm:^1.9.1": version: 1.10.0 resolution: "@actions/core@npm:1.10.0" dependencies: @@ -15,95 +15,99 @@ __metadata: languageName: node linkType: hard -"@actions/http-client@npm:^2.0.1": - version: 2.0.1 - resolution: "@actions/http-client@npm:2.0.1" +"@actions/glob@npm:^0.4.0": + version: 0.4.0 + resolution: "@actions/glob@npm:0.4.0" dependencies: - tunnel: ^0.0.6 - checksum: 799ec3df91e28a9da91ce6592e94f8b8923ccf6cc21a2f72c7429be5af5273f1625335411adc2a1bb222d56c852d5767214dfa6fa32a6da7e81dba8290e08f17 + "@actions/core": ^1.9.1 + minimatch: ^3.0.4 + checksum: 8d922da488f149cb18175ab9005b2f7b45ddc60151600629c73debb94b378870f58dea89f32a1274b9ef629a8a97ba2d171d5743a52fd3e7e9163e7c4e5efe60 languageName: node linkType: hard -"@altano/tiny-async-pool@npm:^1.0.2": - version: 1.0.2 - resolution: "@altano/tiny-async-pool@npm:1.0.2" - checksum: 20cb16cd1a85576bfee4b923d5efef1f1957a048268e166026e9c15304902e500147baf3ac65c3d8cfaaf6d1e78f74efd6641c0cd7ce12b97d97145f15825788 +"@actions/http-client@npm:^2.0.1": + version: 2.1.0 + resolution: "@actions/http-client@npm:2.1.0" + dependencies: + tunnel: ^0.0.6 + checksum: 25a72a952cc95fb4b3ab086da73a5754dd0957c206637cace69be2e16f018cc1b3d3c40d3bcf89ffd8a5929d5e8445594b498b50db306a50ad7536023f8e3800 languageName: node linkType: hard -"@ampproject/remapping@npm:^2.1.0, @ampproject/remapping@npm:^2.2.0": - version: 2.2.0 - resolution: "@ampproject/remapping@npm:2.2.0" +"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.2.1": + version: 2.2.1 + resolution: "@ampproject/remapping@npm:2.2.1" dependencies: - "@jridgewell/gen-mapping": ^0.1.0 + "@jridgewell/gen-mapping": ^0.3.0 "@jridgewell/trace-mapping": ^0.3.9 - checksum: d74d170d06468913921d72430259424b7e4c826b5a7d39ff839a29d547efb97dc577caa8ba3fb5cf023624e9af9d09651afc3d4112a45e2050328abc9b3a2292 + checksum: 03c04fd526acc64a1f4df22651186f3e5ef0a9d6d6530ce4482ec9841269cf7a11dbb8af79237c282d721c5312024ff17529cd72cc4768c11e999b58e2302079 languageName: node linkType: hard -"@angular-eslint/bundled-angular-compiler@npm:14.1.2": - version: 14.1.2 - resolution: "@angular-eslint/bundled-angular-compiler@npm:14.1.2" - checksum: 92a893823ab282fa8e518ce7a2d13389eb37d6396aa3c1c05552f63d91f7af9490cafae2b5acaac529b6bc9219eb6e8f408aac7184f93a0cec91669ef88c3c89 +"@angular-eslint/bundled-angular-compiler@npm:16.0.2": + version: 16.0.2 + resolution: "@angular-eslint/bundled-angular-compiler@npm:16.0.2" + checksum: 2dc4c49548c769ab3955c3564fc80a8031177af70be26d45e544db2b207404589e8cc0b08d378d1288d46b636dabaf832f5f1981194903cdade4944d5f1e1511 languageName: node linkType: hard -"@angular-eslint/eslint-plugin-template@npm:^14.1.2": - version: 14.1.2 - resolution: "@angular-eslint/eslint-plugin-template@npm:14.1.2" +"@angular-eslint/eslint-plugin-template@npm:^16.0.1": + version: 16.0.2 + resolution: "@angular-eslint/eslint-plugin-template@npm:16.0.2" dependencies: - "@angular-eslint/bundled-angular-compiler": 14.1.2 - "@typescript-eslint/type-utils": 5.37.0 - "@typescript-eslint/utils": 5.37.0 - aria-query: 5.0.2 - axobject-query: 3.0.1 + "@angular-eslint/bundled-angular-compiler": 16.0.2 + "@angular-eslint/utils": 16.0.2 + "@typescript-eslint/type-utils": 5.59.2 + "@typescript-eslint/utils": 5.59.2 + aria-query: 5.1.3 + axobject-query: 3.1.1 peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^7.20.0 || ^8.0.0 typescript: "*" - checksum: e83046ac20d7ec95f79b0f4402f368223108907d5a0509908acb7da12e27a82f8337a25e4ceddc808204e601a848d74ea6c634bbf2bee70560e36cdc824a9e5c + checksum: ec390a4f84aca802296c0f7591c5fcb5545ff1d4b96428c5f95dbd31fdc766b8df569712423387e745f98ee06d36893c45b18849aa51547fe1fd6edc5c7499fa languageName: node linkType: hard -"@angular-eslint/eslint-plugin@npm:^14.1.2": - version: 14.1.2 - resolution: "@angular-eslint/eslint-plugin@npm:14.1.2" +"@angular-eslint/eslint-plugin@npm:^16.0.1": + version: 16.0.2 + resolution: "@angular-eslint/eslint-plugin@npm:16.0.2" dependencies: - "@angular-eslint/utils": 14.1.2 - "@typescript-eslint/utils": 5.37.0 + "@angular-eslint/utils": 16.0.2 + "@typescript-eslint/utils": 5.59.2 peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^7.20.0 || ^8.0.0 typescript: "*" - checksum: dc7cdef4a09cf25e64c7bea3647912ff5d62a1cd7772728338f94df94566345b0910a77a42f15165bd2cb49f1359e1ac5361c15603bad8f888903a9e8b5a858c + checksum: 3c862bd5f57da5ef86723f3c3bfb551e857d7ff91401d0903095c620683c214ed31e735f494c7b840c50db2fcf2d937e5f76fca821bb4dd330dea6956c904d40 languageName: node linkType: hard -"@angular-eslint/template-parser@npm:^14.1.2": - version: 14.1.2 - resolution: "@angular-eslint/template-parser@npm:14.1.2" +"@angular-eslint/template-parser@npm:^16.0.1": + version: 16.0.2 + resolution: "@angular-eslint/template-parser@npm:16.0.2" dependencies: - "@angular-eslint/bundled-angular-compiler": 14.1.2 - eslint-scope: ^5.1.0 + "@angular-eslint/bundled-angular-compiler": 16.0.2 + eslint-scope: ^7.0.0 peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^7.20.0 || ^8.0.0 typescript: "*" - checksum: 07a27fcb612212e023f8d65cc344088d4b803839d4a56aeba0e0099d994f0ecfcbde2f163fa6ec117fd099cc35533f6afae42b2daa8463ffeff06cf54431c662 + checksum: 35cfa20aeffe249e55c8015e1c7367fef26988d2689fef2d4656809cab40f15c127fac805821b739996840c159e59b277b51b120366408613f0db24dbd96f293 languageName: node linkType: hard -"@angular-eslint/utils@npm:14.1.2": - version: 14.1.2 - resolution: "@angular-eslint/utils@npm:14.1.2" +"@angular-eslint/utils@npm:16.0.2": + version: 16.0.2 + resolution: "@angular-eslint/utils@npm:16.0.2" dependencies: - "@angular-eslint/bundled-angular-compiler": 14.1.2 - "@typescript-eslint/utils": 5.37.0 + "@angular-eslint/bundled-angular-compiler": 16.0.2 + "@typescript-eslint/utils": 5.59.2 peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^7.20.0 || ^8.0.0 typescript: "*" - checksum: 7a0605ba885362ee47f7e32f42c0d38ac1886f8931f1f1b20a1524f1a04206f92651903f51cdcdaac47524cc0f088e69fa534eae623674852e6af23fd0192344 + checksum: 3fe1d4a4034ae6c582cb5663af14b3150b00aff50f5c523f0084be9c06a3c88641264e64b0342f6d9eb3bcae91bae9bd5a557936cdab672d3b75856fd528c428 languageName: node linkType: hard -"@antfu/install-pkg@npm:^0.1.0": +"@antfu/install-pkg@npm:^0.1.1": version: 0.1.1 resolution: "@antfu/install-pkg@npm:0.1.1" dependencies: @@ -113,255 +117,88 @@ __metadata: languageName: node linkType: hard -"@antfu/utils@npm:^0.5.2": - version: 0.5.2 - resolution: "@antfu/utils@npm:0.5.2" - checksum: 9b91446b2dbb823abeeba1cc33d6ebf701a462923408ad4751fbe162da46ae0669c774c2b5435fc77691dc207ce5de5945e693d5163e07d6ef42e376b04c7af4 - languageName: node - linkType: hard - -"@astrojs/compiler@npm:0.27.2, @astrojs/compiler@npm:^0.27.1": - version: 0.27.2 - resolution: "@astrojs/compiler@npm:0.27.2" - checksum: 10e823c4c89e63414c4479f966ed2026f5f0c005d741668d4293d09de49a671946481405e1917f6e1c9f574a846993ac18ae4e6367a72b39d0712b0743d91b43 - languageName: node - linkType: hard - -"@astrojs/compiler@npm:^0.23.4": - version: 0.23.5 - resolution: "@astrojs/compiler@npm:0.23.5" - checksum: 9779b8a7fab2b467ea8637fca8129110fe3b6dbee4fc2e9fe4ec162c3f91ffd77fd447abab01a926b7440749e03c269dda65c4ca1d8759d9662f9198e56eeb01 - languageName: node - linkType: hard - -"@astrojs/compiler@npm:^0.27.0": - version: 0.27.1 - resolution: "@astrojs/compiler@npm:0.27.1" - checksum: 66a15bd5a858c37b25b869fab99f27bcd7acf3b715f1de5b9943ae3d97494b65d5490e2cb798cad832569dbca4ed60100a7209bb2483123363e43cd395a3a6ea - languageName: node - linkType: hard - -"@astrojs/image@npm:^0.10.0": - version: 0.10.0 - resolution: "@astrojs/image@npm:0.10.0" - dependencies: - "@altano/tiny-async-pool": ^1.0.2 - http-cache-semantics: ^4.1.0 - image-size: ^1.0.2 - kleur: ^4.1.5 - magic-string: ^0.25.9 - mime: ^3.0.0 - slash: ^4.0.0 - peerDependencies: - sharp: ">=0.31.0" - peerDependenciesMeta: - sharp: - optional: true - checksum: 3c32b1662a1a0c54cce0a2e3d08da66639ba7c9a41980a397c058e5ca7856c08bcbfb5e8dc0940e6cb2e5b26621f2ea4b8bddd8f612693045e29a67c691547e5 - languageName: node - linkType: hard - -"@astrojs/language-server@npm:^0.26.2": - version: 0.26.2 - resolution: "@astrojs/language-server@npm:0.26.2" - dependencies: - "@vscode/emmet-helper": ^2.8.4 - events: ^3.3.0 - prettier: ^2.7.1 - prettier-plugin-astro: ^0.5.3 - source-map: ^0.7.3 - vscode-css-languageservice: ^6.0.1 - vscode-html-languageservice: ^5.0.0 - vscode-languageserver: ^8.0.1 - vscode-languageserver-protocol: ^3.17.1 - vscode-languageserver-textdocument: ^1.0.4 - vscode-languageserver-types: ^3.17.1 - vscode-uri: ^3.0.3 - bin: - astro-ls: bin/nodeServer.js - checksum: 1e130a011a9ac8c6e45808e8564c352bb75028e2696ba673e8db7ba4ff7aa8c0132e70ac7c9b3df0b59dc7eca94f57447b85bc7d9a392dd72c48d0dd0c055ab6 - languageName: node - linkType: hard - -"@astrojs/markdown-remark@npm:^1.1.3": - version: 1.1.3 - resolution: "@astrojs/markdown-remark@npm:1.1.3" - dependencies: - "@astrojs/micromark-extension-mdx-jsx": ^1.0.3 - "@astrojs/prism": ^1.0.0 - acorn: ^8.7.1 - acorn-jsx: ^5.3.2 - github-slugger: ^1.4.0 - hast-util-to-html: ^8.0.3 - import-meta-resolve: ^2.1.0 - mdast-util-from-markdown: ^1.2.0 - mdast-util-mdx-expression: ^1.2.1 - mdast-util-mdx-jsx: ^1.2.0 - micromark-extension-mdx-expression: ^1.0.3 - micromark-extension-mdx-md: ^1.0.0 - micromark-util-combine-extensions: ^1.0.0 - rehype-raw: ^6.1.1 - rehype-stringify: ^9.0.3 - remark-gfm: ^3.0.1 - remark-parse: ^10.0.1 - remark-rehype: ^10.1.0 - remark-smartypants: ^2.0.0 - shiki: ^0.11.1 - unified: ^10.1.2 - unist-util-map: ^3.1.1 - unist-util-visit: ^4.1.0 - vfile: ^5.3.2 - checksum: 1d8aa5226f2b746e004fb18db0b50086a674b7e31da502dea6182925f48d14972879d5be3771614ea06cc9c8872bcd0b217a69676c6bf18d5b18d534ee151553 - languageName: node - linkType: hard - -"@astrojs/mdx@npm:^0.11.4": - version: 0.11.4 - resolution: "@astrojs/mdx@npm:0.11.4" - dependencies: - "@astrojs/prism": ^1.0.1 - "@mdx-js/mdx": ^2.1.2 - "@mdx-js/rollup": ^2.1.1 - acorn: ^8.8.0 - es-module-lexer: ^0.10.5 - estree-util-visit: ^1.2.0 - github-slugger: ^1.4.0 - gray-matter: ^4.0.3 - kleur: ^4.1.4 - rehype-raw: ^6.1.1 - remark-frontmatter: ^4.0.1 - remark-gfm: ^3.0.1 - remark-smartypants: ^2.0.0 - shiki: ^0.11.1 - unist-util-visit: ^4.1.0 - vfile: ^5.3.2 - checksum: 7f4045dcab683e0a6ca7247b7a687175f5eba7ecaf710a120a0ff4058443ed4b56e802e621b2ebb9df552ef1abda7f1f0361c438bea4d21da441b2a15d5e529d - languageName: node - linkType: hard - -"@astrojs/micromark-extension-mdx-jsx@npm:^1.0.3": - version: 1.0.3 - resolution: "@astrojs/micromark-extension-mdx-jsx@npm:1.0.3" - dependencies: - "@types/acorn": ^4.0.0 - estree-util-is-identifier-name: ^2.0.0 - micromark-factory-mdx-expression: ^1.0.0 - micromark-factory-space: ^1.0.0 - micromark-util-character: ^1.0.0 - micromark-util-symbol: ^1.0.0 - micromark-util-types: ^1.0.0 - uvu: ^0.5.0 - vfile-message: ^3.0.0 - checksum: a020aa43e08f54b5aaf1ceee2609e2da6cecb088eed9abf7017f998cd84c6aecb9b1c0349bffd6bc11f245bfb6ba89fdbc2fe3e694f92e446fedde93e6d49fba - languageName: node - linkType: hard - -"@astrojs/prefetch@npm:^0.1.0": - version: 0.1.0 - resolution: "@astrojs/prefetch@npm:0.1.0" - dependencies: - throttles: ^1.0.1 - checksum: c91adb117c4e700f71655cd4b061fc69ab8731fa68e884bdfc5eaa8a1b1609276d476c420f779ab1f79f11bed9962fed35f70846a8ed310c97d01968ece59aef - languageName: node - linkType: hard - -"@astrojs/prism@npm:^1.0.0, @astrojs/prism@npm:^1.0.1": - version: 1.0.1 - resolution: "@astrojs/prism@npm:1.0.1" - dependencies: - prismjs: ^1.28.0 - checksum: 185504469f68b813b786b53e2254472b7acd092bb4181fd230064ffc35990dd6d17db6fcd3ff2ebd20f5083ce13d726412995f55be5cac3b770a68e2e70c733a +"@antfu/utils@npm:^0.7.2": + version: 0.7.2 + resolution: "@antfu/utils@npm:0.7.2" + checksum: ada98dde0a06bc10129ad7bc9d0007c1cf7e36eeb9e8ca93ea5173bc1e1d351afee8511c9e8e182b3105b787ce0ce813afc4ab283b511374f1e56a085f60a2c6 languageName: node linkType: hard -"@astrojs/react@npm:^1.2.1": - version: 1.2.1 - resolution: "@astrojs/react@npm:1.2.1" +"@arcanis/slice-ansi@npm:^1.0.2": + version: 1.1.1 + resolution: "@arcanis/slice-ansi@npm:1.1.1" dependencies: - "@babel/core": ">=7.0.0-0 <8.0.0" - "@babel/plugin-transform-react-jsx": ^7.17.12 - peerDependencies: - "@types/react": ^17.0.50 || ^18.0.21 - "@types/react-dom": ^17.0.17 || ^18.0.6 - react: ^17.0.2 || ^18.0.0 - react-dom: ^17.0.2 || ^18.0.0 - checksum: 6e5d37821c4128d26447605371c9fe466303154386303fda94b4e1011d5232db894d815cf5b9663c5a8fcb9d8ec42edf14a72610214849ac23a6c65883f1c780 + grapheme-splitter: ^1.0.4 + checksum: 14ed60cb45750d386c64229ac7bab20e10eedc193503fa4decff764162d329d6d3363ed2cd3debec833186ee54affe4f824f6e8eff531295117fd1ebda200270 languageName: node linkType: hard -"@astrojs/telemetry@npm:^1.0.1": - version: 1.0.1 - resolution: "@astrojs/telemetry@npm:1.0.1" - dependencies: - ci-info: ^3.3.1 - debug: ^4.3.4 - dlv: ^1.1.3 - dset: ^3.1.2 - is-docker: ^3.0.0 - is-wsl: ^2.2.0 - node-fetch: ^3.2.5 - which-pm-runs: ^1.1.0 - checksum: f98e21e84e2750cde5a0eb660c18e5c745dde2ee3a84e0c471e8aed64600e7f4b76a0b1858c05f4596920f6d19f715b57552b4186db9ca583b58207f9529cc41 +"@astrojs/compiler@npm:^1.0.0": + version: 1.4.2 + resolution: "@astrojs/compiler@npm:1.4.2" + checksum: 0eec726d6f91395543cce6cd8c09fde23b3b92498391ad7c03ec601806a20d25ff24f4b72502135fd4ab906b5b13bc44afc350037da76a00d76c60bfd45e5fd8 languageName: node linkType: hard -"@astrojs/webapi@npm:^1.1.0": - version: 1.1.0 - resolution: "@astrojs/webapi@npm:1.1.0" +"@aw-web-design/x-default-browser@npm:1.4.88": + version: 1.4.88 + resolution: "@aw-web-design/x-default-browser@npm:1.4.88" dependencies: - global-agent: ^3.0.0 - node-fetch: ^3.2.5 - checksum: 12f82c603622ac84513262de0408fff06652df7c0c9e6972cee3086e414e5079a8aa47525f2338d1862a22e5fddca8ef521021d350be4387fc462d6d12fb79f1 + default-browser-id: 3.0.0 + bin: + x-default-browser: bin/x-default-browser.js + checksum: c85e61dc9e5bb04906d8ac29cce35369705c3ea3abe36a5afdecc9caefd7ee0f14596ccc6eb617c86790a67b6ee7f7f070a3e2f9e9152a8ba92adf2ccee1433a languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/code-frame@npm:7.18.6" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.21.4": + version: 7.21.4 + resolution: "@babel/code-frame@npm:7.21.4" dependencies: "@babel/highlight": ^7.18.6 - checksum: 195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba + checksum: e5390e6ec1ac58dcef01d4f18eaf1fd2f1325528661ff6d4a5de8979588b9f5a8e852a54a91b923846f7a5c681b217f0a45c2524eb9560553160cd963b7d592c languageName: node linkType: hard -"@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.19.3, @babel/compat-data@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/compat-data@npm:7.19.4" - checksum: 757fdaeb6756c2d323ff56f60fb8e670292108cda6abf762a56c0d40910ecc4d2c7e283dbdfbcee6bc28c74ad659144352609e1cb49d31e101ab13ea5ce90072 +"@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.21.5": + version: 7.21.9 + resolution: "@babel/compat-data@npm:7.21.9" + checksum: df97be04955c0801f5a23846f79a100660aa98f9433cfd1fad8f53ecd9f3454538e78522e86275939aa8aa7d6f9e32f23f94bc04ae843f7246b7cd4bffe3a175 languageName: node linkType: hard -"@babel/core@npm:>=7.0.0-0 <8.0.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.18.13, @babel/core@npm:^7.18.2, @babel/core@npm:^7.19.3": - version: 7.19.3 - resolution: "@babel/core@npm:7.19.3" +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.20.12, @babel/core@npm:^7.20.2, @babel/core@npm:^7.20.7, @babel/core@npm:^7.21.4, @babel/core@npm:^7.21.8, @babel/core@npm:^7.7.5, @babel/core@npm:~7.21.0": + version: 7.21.8 + resolution: "@babel/core@npm:7.21.8" dependencies: - "@ampproject/remapping": ^2.1.0 - "@babel/code-frame": ^7.18.6 - "@babel/generator": ^7.19.3 - "@babel/helper-compilation-targets": ^7.19.3 - "@babel/helper-module-transforms": ^7.19.0 - "@babel/helpers": ^7.19.0 - "@babel/parser": ^7.19.3 - "@babel/template": ^7.18.10 - "@babel/traverse": ^7.19.3 - "@babel/types": ^7.19.3 + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.21.4 + "@babel/generator": ^7.21.5 + "@babel/helper-compilation-targets": ^7.21.5 + "@babel/helper-module-transforms": ^7.21.5 + "@babel/helpers": ^7.21.5 + "@babel/parser": ^7.21.8 + "@babel/template": ^7.20.7 + "@babel/traverse": ^7.21.5 + "@babel/types": ^7.21.5 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 - json5: ^2.2.1 + json5: ^2.2.2 semver: ^6.3.0 - checksum: dd883311209ad5a2c65b227daeb7247d90a382c50f4c6ad60c5ee40927eb39c34f0690d93b775c0427794261b72fa8f9296589a2dbda0782366a9f1c6de00c08 + checksum: f28118447355af2a90bd340e2e60699f94c8020517eba9b71bf8ebff62fa9e00d63f076e033f9dfb97548053ad62ada45fafb0d96584b1a90e8aef5a3b8241b1 languageName: node linkType: hard -"@babel/generator@npm:^7.18.13, @babel/generator@npm:^7.18.2, @babel/generator@npm:^7.19.3, @babel/generator@npm:^7.19.4, @babel/generator@npm:^7.7.2": - version: 7.19.5 - resolution: "@babel/generator@npm:7.19.5" +"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.21.5, @babel/generator@npm:^7.7.2, @babel/generator@npm:~7.21.1": + version: 7.21.9 + resolution: "@babel/generator@npm:7.21.9" dependencies: - "@babel/types": ^7.19.4 + "@babel/types": ^7.21.5 "@jridgewell/gen-mapping": ^0.3.2 + "@jridgewell/trace-mapping": ^0.3.17 jsesc: ^2.5.1 - checksum: a66eafc540f80fc36c1b009b28bde1d12aff85e7916e7f5adf49c5a8866fecee4906b3c3c6db315d2723ea54e4e5ddfb2913fe6ab424f51dbccf753000930eaf + checksum: 5bd10334ebdf7f2a30eb4a1fd99d369a57703aa2234527784449187512c254a1174fa739c9d4c31bcbb6018732012a0664bec7c314f12b5ec2458737ddbb01c7 languageName: node linkType: hard @@ -375,55 +212,58 @@ __metadata: linkType: hard "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.18.6": - version: 7.18.9 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.18.9" + version: 7.21.5 + resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.21.5" dependencies: - "@babel/helper-explode-assignable-expression": ^7.18.6 - "@babel/types": ^7.18.9 - checksum: b4bc214cb56329daff6cc18a7f7a26aeafb55a1242e5362f3d47fe3808421f8c7cd91fff95d6b9b7ccb67e14e5a67d944e49dbe026942bfcbfda19b1c72a8e72 + "@babel/types": ^7.21.5 + checksum: 9a033d3d7a6409256272ea6fc03731511af9f936ee0b161ace05d171d7bd5adf455dc85f80437d92277462f6bd2af9af1f2d1967edc21ca4d5966ac0a09cf61d languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.17.7, @babel/helper-compilation-targets@npm:^7.18.9, @babel/helper-compilation-targets@npm:^7.19.0, @babel/helper-compilation-targets@npm:^7.19.3": - version: 7.19.3 - resolution: "@babel/helper-compilation-targets@npm:7.19.3" +"@babel/helper-compilation-targets@npm:^7.17.7, @babel/helper-compilation-targets@npm:^7.18.9, @babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helper-compilation-targets@npm:7.21.5" dependencies: - "@babel/compat-data": ^7.19.3 - "@babel/helper-validator-option": ^7.18.6 + "@babel/compat-data": ^7.21.5 + "@babel/helper-validator-option": ^7.21.0 browserslist: ^4.21.3 + lru-cache: ^5.1.1 semver: ^6.3.0 peerDependencies: "@babel/core": ^7.0.0 - checksum: aafcb4490c98cddb3255fff98bfbdb881b4def85a1935fd9b1f9b1f0f8b502696839f6b387fb508ca991ea72ba82ce6913bab99f21df4ce80bda2b79e91a09f5 + checksum: 0edecb9c970ddc22ebda1163e77a7f314121bef9e483e0e0d9a5802540eed90d5855b6bf9bce03419b35b2e07c323e62d0353b153fa1ca34f17dbba897a83c25 languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/helper-create-class-features-plugin@npm:7.19.0" +"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0": + version: 7.21.8 + resolution: "@babel/helper-create-class-features-plugin@npm:7.21.8" dependencies: "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-function-name": ^7.19.0 - "@babel/helper-member-expression-to-functions": ^7.18.9 + "@babel/helper-environment-visitor": ^7.21.5 + "@babel/helper-function-name": ^7.21.0 + "@babel/helper-member-expression-to-functions": ^7.21.5 "@babel/helper-optimise-call-expression": ^7.18.6 - "@babel/helper-replace-supers": ^7.18.9 + "@babel/helper-replace-supers": ^7.21.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 "@babel/helper-split-export-declaration": ^7.18.6 + semver: ^6.3.0 peerDependencies: "@babel/core": ^7.0.0 - checksum: f0c6fb77b6f113d70f308e7093f60dd465b697818badf5df0519d8dd12b6bfb1f4ad300b923207ce9f9c1c940ef58bff12ac4270c0863eadf9e303b7dd6d01b6 + checksum: 26b978bd2e741259c0f4a1cc37521ad58728c50d28fe2fc8041d4381497e13a0b686a10e170246855eaf3af08886862e9d93fc27994ef914e13fca0d73efdcb8 languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.19.0" +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.20.5": + version: 7.21.8 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.21.8" dependencies: "@babel/helper-annotate-as-pure": ^7.18.6 - regexpu-core: ^5.1.0 + regexpu-core: ^5.3.1 + semver: ^6.3.0 peerDependencies: "@babel/core": ^7.0.0 - checksum: 811cc90afe9fc25a74ed37fc0c1361a4a91b0b940235dd3958e3f03b366d40a903b40fc93b51bcb93be774aba573219f8f215664bea1d1301f58797ca6854f3f + checksum: 04a686b5897c86339395894c0a9a1ffdce2facaba5173ce7b0a894f775f984ba70d2fa227d309f2be54f7f1286ebd1a0a7051a8b1829521595e4064ee062af65 languageName: node linkType: hard @@ -443,29 +283,20 @@ __metadata: languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-environment-visitor@npm:7.18.9" - checksum: b25101f6162ddca2d12da73942c08ad203d7668e06663df685634a8fde54a98bc015f6f62938e8554457a592a024108d45b8f3e651fd6dcdb877275b73cc4420 - languageName: node - linkType: hard - -"@babel/helper-explode-assignable-expression@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-explode-assignable-expression@npm:7.18.6" - dependencies: - "@babel/types": ^7.18.6 - checksum: 225cfcc3376a8799023d15dc95000609e9d4e7547b29528c7f7111a0e05493ffb12c15d70d379a0bb32d42752f340233c4115bded6d299bc0c3ab7a12be3d30f +"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helper-environment-visitor@npm:7.21.5" + checksum: e436af7b62956e919066448013a3f7e2cd0b51010c26c50f790124dcd350be81d5597b4e6ed0a4a42d098a27de1e38561cd7998a116a42e7899161192deac9a6 languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.18.9, @babel/helper-function-name@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/helper-function-name@npm:7.19.0" +"@babel/helper-function-name@npm:^7.18.9, @babel/helper-function-name@npm:^7.19.0, @babel/helper-function-name@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/helper-function-name@npm:7.21.0" dependencies: - "@babel/template": ^7.18.10 - "@babel/types": ^7.19.0 - checksum: eac1f5db428ba546270c2b8d750c24eb528b8fcfe50c81de2e0bdebf0e20f24bec688d4331533b782e4a907fad435244621ca2193cfcf80a86731299840e0f6e + "@babel/template": ^7.20.7 + "@babel/types": ^7.21.0 + checksum: d63e63c3e0e3e8b3138fa47b0cd321148a300ef12b8ee951196994dcd2a492cc708aeda94c2c53759a5c9177fffaac0fd8778791286746f72a000976968daf4e languageName: node linkType: hard @@ -478,37 +309,37 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-member-expression-to-functions@npm:7.18.9" +"@babel/helper-member-expression-to-functions@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helper-member-expression-to-functions@npm:7.21.5" dependencies: - "@babel/types": ^7.18.9 - checksum: fcf8184e3b55051c4286b2cbedf0eccc781d0f3c9b5cbaba582eca19bf0e8d87806cdb7efc8554fcb969ceaf2b187d5ea748d40022d06ec7739fbb18c1b19a7a + "@babel/types": ^7.21.5 + checksum: c404b4a0271c640b7dc8c34af7b683c70a43200259e02330cfc02e79e6b271e9227f35554cd6ad015eabcfa1fea75b9d0b87b69f3d1e6c2af6edd224060b1732 languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-module-imports@npm:7.18.6" +"@babel/helper-module-imports@npm:^7.18.6, @babel/helper-module-imports@npm:^7.21.4": + version: 7.21.4 + resolution: "@babel/helper-module-imports@npm:7.21.4" dependencies: - "@babel/types": ^7.18.6 - checksum: f393f8a3b3304b1b7a288a38c10989de754f01d29caf62ce7c4e5835daf0a27b81f3ac687d9d2780d39685aae7b55267324b512150e7b2be967b0c493b6a1def + "@babel/types": ^7.21.4 + checksum: bd330a2edaafeb281fbcd9357652f8d2666502567c0aad71db926e8499c773c9ea9c10dfaae30122452940326d90c8caff5c649ed8e1bf15b23f858758d3abc6 languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.18.6, @babel/helper-module-transforms@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/helper-module-transforms@npm:7.19.0" +"@babel/helper-module-transforms@npm:^7.18.6, @babel/helper-module-transforms@npm:^7.20.11, @babel/helper-module-transforms@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helper-module-transforms@npm:7.21.5" dependencies: - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-module-imports": ^7.18.6 - "@babel/helper-simple-access": ^7.18.6 + "@babel/helper-environment-visitor": ^7.21.5 + "@babel/helper-module-imports": ^7.21.4 + "@babel/helper-simple-access": ^7.21.5 "@babel/helper-split-export-declaration": ^7.18.6 - "@babel/helper-validator-identifier": ^7.18.6 - "@babel/template": ^7.18.10 - "@babel/traverse": ^7.19.0 - "@babel/types": ^7.19.0 - checksum: 4483276c66f56cf3b5b063634092ad9438c2593725de5c143ba277dda82f1501e6d73b311c1b28036f181dbe36eaeff29f24726cde37a599d4e735af294e5359 + "@babel/helper-validator-identifier": ^7.19.1 + "@babel/template": ^7.20.7 + "@babel/traverse": ^7.21.5 + "@babel/types": ^7.21.5 + checksum: 1ccfc88830675a5d485d198e918498f9683cdd46f973fdd4fe1c85b99648fb70f87fca07756c7a05dc201bd9b248c74ced06ea80c9991926ac889f53c3659675 languageName: node linkType: hard @@ -521,14 +352,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.19.0 - resolution: "@babel/helper-plugin-utils@npm:7.19.0" - checksum: eedc996c633c8c207921c26ec2989eae0976336ecd9b9f1ac526498f52b5d136f7cd03c32b6fdf8d46a426f907c142de28592f383c42e5fba1e904cbffa05345 +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.19.0, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.21.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.21.5 + resolution: "@babel/helper-plugin-utils@npm:7.21.5" + checksum: 6f086e9a84a50ea7df0d5639c8f9f68505af510ea3258b3c8ac8b175efdfb7f664436cb48996f71791a1350ba68f47ad3424131e8e718c5e2ad45564484cbb36 languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.18.6, @babel/helper-remap-async-to-generator@npm:^7.18.9": +"@babel/helper-remap-async-to-generator@npm:^7.18.9": version: 7.18.9 resolution: "@babel/helper-remap-async-to-generator@npm:7.18.9" dependencies: @@ -542,34 +373,35 @@ __metadata: languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.18.6, @babel/helper-replace-supers@npm:^7.18.9": - version: 7.19.1 - resolution: "@babel/helper-replace-supers@npm:7.19.1" +"@babel/helper-replace-supers@npm:^7.18.6, @babel/helper-replace-supers@npm:^7.20.7, @babel/helper-replace-supers@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helper-replace-supers@npm:7.21.5" dependencies: - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-member-expression-to-functions": ^7.18.9 + "@babel/helper-environment-visitor": ^7.21.5 + "@babel/helper-member-expression-to-functions": ^7.21.5 "@babel/helper-optimise-call-expression": ^7.18.6 - "@babel/traverse": ^7.19.1 - "@babel/types": ^7.19.0 - checksum: a0e4bf79ebe7d2bb5947169e47a0b4439c73fb0ec57d446cf3ea81b736721129ec373c3f94d2ebd2716b26dd65f8e6c083dac898170d42905e7ba815a2f52c25 + "@babel/template": ^7.20.7 + "@babel/traverse": ^7.21.5 + "@babel/types": ^7.21.5 + checksum: 4fd343e6f90533743d8e8a1f42e50377b3d6b27f524a27eb97ff28f075e4e55cca2383adb1b0973de358b08022aef0fec4c8d69711e1da43bf9b887b5a893677 languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.18.6": - version: 7.19.4 - resolution: "@babel/helper-simple-access@npm:7.19.4" +"@babel/helper-simple-access@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helper-simple-access@npm:7.21.5" dependencies: - "@babel/types": ^7.19.4 - checksum: 964cb1ec36b69aabbb02f8d5ee1d680ebbb628611a6740958d9b05107ab16c0492044e430618ae42b1f8ea73e4e1bafe3750e8ebc959d6f3277d9cfbe1a94880 + "@babel/types": ^7.21.5 + checksum: ad212beaa24be3864c8c95bee02f840222457ccf5419991e2d3e3e39b0f75b77e7e857e0bf4ed428b1cd97acefc87f3831bdb0b9696d5ad0557421f398334fc3 languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.18.9" +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0": + version: 7.20.0 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.20.0" dependencies: - "@babel/types": ^7.18.9 - checksum: 6e93ccd10248293082606a4b3e30eed32c6f796d378f6b662796c88f462f348aa368aadeb48eb410cfcc8250db93b2d6627c2e55662530f08fc25397e588d68a + "@babel/types": ^7.20.0 + checksum: 34da8c832d1c8a546e45d5c1d59755459ffe43629436707079989599b91e8c19e50e73af7a4bd09c95402d389266731b0d9c5f69e372d8ebd3a709c05c80d7dd languageName: node linkType: hard @@ -582,10 +414,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/helper-string-parser@npm:7.19.4" - checksum: b2f8a3920b30dfac81ec282ac4ad9598ea170648f8254b10f475abe6d944808fb006aab325d3eb5a8ad3bea8dfa888cfa6ef471050dae5748497c110ec060943 +"@babel/helper-string-parser@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helper-string-parser@npm:7.21.5" + checksum: 36c0ded452f3858e67634b81960d4bde1d1cd2a56b82f4ba2926e97864816021c885f111a7cf81de88a0ed025f49d84a393256700e9acbca2d99462d648705d8 languageName: node linkType: hard @@ -596,33 +428,33 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-validator-option@npm:7.18.6" - checksum: f9cc6eb7cc5d759c5abf006402180f8d5e4251e9198197428a97e05d65eb2f8ae5a0ce73b1dfd2d35af41d0eb780627a64edf98a4e71f064eeeacef8de58f2cf +"@babel/helper-validator-option@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/helper-validator-option@npm:7.21.0" + checksum: 8ece4c78ffa5461fd8ab6b6e57cc51afad59df08192ed5d84b475af4a7193fc1cb794b59e3e7be64f3cdc4df7ac78bf3dbb20c129d7757ae078e6279ff8c2f07 languageName: node linkType: hard "@babel/helper-wrap-function@npm:^7.18.9": - version: 7.19.0 - resolution: "@babel/helper-wrap-function@npm:7.19.0" + version: 7.20.5 + resolution: "@babel/helper-wrap-function@npm:7.20.5" dependencies: "@babel/helper-function-name": ^7.19.0 "@babel/template": ^7.18.10 - "@babel/traverse": ^7.19.0 - "@babel/types": ^7.19.0 - checksum: 2453a6b134f12cc779179188c4358a66252c29b634a8195c0cf626e17f9806c3c4c40e159cd8056c2ec82b69b9056a088014fa43d6ccc1aca67da8d9605da8fd + "@babel/traverse": ^7.20.5 + "@babel/types": ^7.20.5 + checksum: 11a6fc28334368a193a9cb3ad16f29cd7603bab958433efc82ebe59fa6556c227faa24f07ce43983f7a85df826f71d441638442c4315e90a554fe0a70ca5005b languageName: node linkType: hard -"@babel/helpers@npm:^7.19.0": - version: 7.19.4 - resolution: "@babel/helpers@npm:7.19.4" +"@babel/helpers@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/helpers@npm:7.21.5" dependencies: - "@babel/template": ^7.18.10 - "@babel/traverse": ^7.19.4 - "@babel/types": ^7.19.4 - checksum: e2684e9a79d45b95db05c7e14628e8dd1d91ad59433a3afd715bdf19d4683d9e9f84382bcc82316b678aa609ecfc41b07be0b9c49eed07c444f82a6b9e501186 + "@babel/template": ^7.20.7 + "@babel/traverse": ^7.21.5 + "@babel/types": ^7.21.5 + checksum: a6f74b8579713988e7f5adf1a986d8b5255757632ba65b2552f0f609ead5476edb784044c7e4b18f3681ee4818ca9d08c41feb9bd4e828648c25a00deaa1f9e4 languageName: node linkType: hard @@ -637,12 +469,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.10.3, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.18.13, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.19.3, @babel/parser@npm:^7.19.4, @babel/parser@npm:^7.9.4": - version: 7.19.4 - resolution: "@babel/parser@npm:7.19.4" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.10.3, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.15, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.4, @babel/parser@npm:^7.21.5, @babel/parser@npm:^7.21.8, @babel/parser@npm:^7.21.9, @babel/parser@npm:~7.21.2": + version: 7.21.9 + resolution: "@babel/parser@npm:7.21.9" bin: parser: ./bin/babel-parser.js - checksum: 5ef97da97915085ff3b9c562b04fb6316074ece52d20de95f44c47b46abf87fd754cbcae769a69570a84652b736afe5bb2cb7dc117aa7ad6d81ab40eed0c613b + checksum: 985ccc311eb286a320331fd21ff54d94935df76e081abdb304cd4591ea2051a6c799c6b0d8e26d09a9dd041797d9a91ebadeb0c50699d0101bd39fc565082d5c languageName: node linkType: hard @@ -657,34 +489,34 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.18.9" +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.20.7" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 - "@babel/helper-skip-transparent-expression-wrappers": ^7.18.9 - "@babel/plugin-proposal-optional-chaining": ^7.18.9 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 + "@babel/plugin-proposal-optional-chaining": ^7.20.7 peerDependencies: "@babel/core": ^7.13.0 - checksum: 93abb5cb179a13db171bfc2cdf79489598f43c50cc174f97a2b7bb1d44d24ade7109665a20cf4e317ad6c1c730f036f06478f7c7e789b4240be1abdb60d6452f + checksum: d610f532210bee5342f5b44a12395ccc6d904e675a297189bc1e401cc185beec09873da523466d7fec34ae1574f7a384235cba1ccc9fe7b89ba094167897c845 languageName: node linkType: hard -"@babel/plugin-proposal-async-generator-functions@npm:^7.19.1": - version: 7.19.1 - resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.19.1" +"@babel/plugin-proposal-async-generator-functions@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.20.7" dependencies: "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-plugin-utils": ^7.20.2 "@babel/helper-remap-async-to-generator": ^7.18.9 "@babel/plugin-syntax-async-generators": ^7.8.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: f101555b00aee6ee0107c9e40d872ad646bbd3094abdbeda56d17b107df69a0cb49e5d02dcf5f9d8753e25564e798d08429f12d811aaa1b307b6a725c0b8159c + checksum: 111109ee118c9e69982f08d5e119eab04190b36a0f40e22e873802d941956eee66d2aa5a15f5321e51e3f9aa70a91136451b987fe15185ef8cc547ac88937723 languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.18.6": +"@babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -696,16 +528,16 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-static-block@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-class-static-block@npm:7.18.6" +"@babel/plugin-proposal-class-static-block@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-proposal-class-static-block@npm:7.21.0" dependencies: - "@babel/helper-create-class-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-create-class-features-plugin": ^7.21.0 + "@babel/helper-plugin-utils": ^7.20.2 "@babel/plugin-syntax-class-static-block": ^7.14.5 peerDependencies: "@babel/core": ^7.12.0 - checksum: b8d7ae99ed5ad784f39e7820e3ac03841f91d6ed60ab4a98c61d6112253da36013e12807bae4ffed0ef3cb318e47debac112ed614e03b403fb8b075b09a828ee + checksum: 236c0ad089e7a7acab776cc1d355330193314bfcd62e94e78f2df35817c6144d7e0e0368976778afd6b7c13e70b5068fa84d7abbf967d4f182e60d03f9ef802b languageName: node linkType: hard @@ -745,19 +577,19 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-logical-assignment-operators@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-proposal-logical-assignment-operators@npm:7.18.9" +"@babel/plugin-proposal-logical-assignment-operators@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/plugin-proposal-logical-assignment-operators@npm:7.20.7" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.20.2 "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: dd87fa4a48c6408c5e85dbd6405a65cc8fe909e3090030df46df90df64cdf3e74007381a58ed87608778ee597eff7395d215274009bb3f5d8964b2db5557754f + checksum: cdd7b8136cc4db3f47714d5266f9e7b592a2ac5a94a5878787ce08890e97c8ab1ca8e94b27bfeba7b0f2b1549a026d9fc414ca2196de603df36fb32633bbdc19 languageName: node linkType: hard -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": version: 7.18.6 resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" dependencies: @@ -781,18 +613,18 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-object-rest-spread@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.19.4" +"@babel/plugin-proposal-object-rest-spread@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" dependencies: - "@babel/compat-data": ^7.19.4 - "@babel/helper-compilation-targets": ^7.19.3 - "@babel/helper-plugin-utils": ^7.19.0 + "@babel/compat-data": ^7.20.5 + "@babel/helper-compilation-targets": ^7.20.7 + "@babel/helper-plugin-utils": ^7.20.2 "@babel/plugin-syntax-object-rest-spread": ^7.8.3 - "@babel/plugin-transform-parameters": ^7.18.8 + "@babel/plugin-transform-parameters": ^7.20.7 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 90a2a59da305e6c8c83831e16079193df33d727a77a90972e286af2c8c0295fddb91b0978b88f16f63080d08a82b08ce3ee82a88b0488b3c51decc73c1d35786 + checksum: 1329db17009964bc644484c660eab717cb3ca63ac0ab0f67c651a028d1bc2ead51dc4064caea283e46994f1b7221670a35cbc0b4beb6273f55e915494b5aa0b2 languageName: node linkType: hard @@ -808,16 +640,16 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-optional-chaining@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-proposal-optional-chaining@npm:7.18.9" +"@babel/plugin-proposal-optional-chaining@npm:^7.13.12, @babel/plugin-proposal-optional-chaining@npm:^7.20.7, @babel/plugin-proposal-optional-chaining@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 - "@babel/helper-skip-transparent-expression-wrappers": ^7.18.9 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 "@babel/plugin-syntax-optional-chaining": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: f2db40e26172f07c50b635cb61e1f36165de3ba868fcf608d967642f0d044b7c6beb0e7ecf17cbd421144b99e1eae7ad6031ded92925343bb0ed1d08707b514f + checksum: 11c5449e01b18bb8881e8e005a577fa7be2fe5688e2382c8822d51f8f7005342a301a46af7b273b1f5645f9a7b894c428eee8526342038a275ef6ba4c8d8d746 languageName: node linkType: hard @@ -833,17 +665,17 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-private-property-in-object@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.18.6" +"@babel/plugin-proposal-private-property-in-object@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0" dependencies: "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-create-class-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-create-class-features-plugin": ^7.21.0 + "@babel/helper-plugin-utils": ^7.20.2 "@babel/plugin-syntax-private-property-in-object": ^7.14.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: c8e56a972930730345f39f2384916fd8e711b3f4b4eae2ca9740e99958980118120d5cc9b6ac150f0965a5a35f825910e2c3013d90be3e9993ab6111df444569 + checksum: add881a6a836635c41d2710551fdf777e2c07c0b691bf2baacc5d658dd64107479df1038680d6e67c468bfc6f36fb8920025d6bac2a1df0a81b867537d40ae78 languageName: node linkType: hard @@ -925,18 +757,29 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-assertions@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.18.6" +"@babel/plugin-syntax-flow@npm:^7.18.6": + version: 7.21.4 + resolution: "@babel/plugin-syntax-flow@npm:7.21.4" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: fe4ba7b285965c62ff820d55d260cb5b6e5282dbedddd1fb0a0f2667291dcf0fa1b3d92fa9bf90946b02b307926a0a5679fbdd31d80ceaed5971293aa1fc5744 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-assertions@npm:^7.20.0": + version: 7.20.0 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.20.0" + dependencies: + "@babel/helper-plugin-utils": ^7.19.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 54918a05375325ba0c60bc81abfb261e6f118bed2de94e4c17dca9a2006fc25e13b1a8b5504b9a881238ea394fd2f098f60b2eb3a392585d6348874565445e7b + checksum: 6a86220e0aae40164cd3ffaf80e7c076a1be02a8f3480455dddbae05fda8140f429290027604df7a11b3f3f124866e8a6d69dbfa1dda61ee7377b920ad144d5b languageName: node linkType: hard -"@babel/plugin-syntax-import-meta@npm:^7.8.3": +"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: @@ -958,14 +801,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.18.6, @babel/plugin-syntax-jsx@npm:^7.7.2": - version: 7.18.6 - resolution: "@babel/plugin-syntax-jsx@npm:7.18.6" +"@babel/plugin-syntax-jsx@npm:^7.21.4, @babel/plugin-syntax-jsx@npm:^7.7.2": + version: 7.21.4 + resolution: "@babel/plugin-syntax-jsx@npm:7.21.4" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 6d37ea972970195f1ffe1a54745ce2ae456e0ac6145fae9aa1480f297248b262ea6ebb93010eddb86ebfacb94f57c05a1fc5d232b9a67325b09060299d515c67 + checksum: bb7309402a1d4e155f32aa0cf216e1fa8324d6c4cfd248b03280028a015a10e46b6efd6565f515f8913918a3602b39255999c06046f7d4b8a5106be2165d724a languageName: node linkType: hard @@ -1057,38 +900,38 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.18.6, @babel/plugin-syntax-typescript@npm:^7.7.2": - version: 7.18.6 - resolution: "@babel/plugin-syntax-typescript@npm:7.18.6" +"@babel/plugin-syntax-typescript@npm:^7.20.0, @babel/plugin-syntax-typescript@npm:^7.21.4, @babel/plugin-syntax-typescript@npm:^7.7.2": + version: 7.21.4 + resolution: "@babel/plugin-syntax-typescript@npm:7.21.4" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 2cde73725ec51118ebf410bf02d78781c03fa4d3185993fcc9d253b97443381b621c44810084c5dd68b92eb8bdfae0e5b163e91b32bebbb33852383d1815c05d + checksum: a59ce2477b7ae8c8945dc37dda292fef9ce46a6507b3d76b03ce7f3a6c9451a6567438b20a78ebcb3955d04095fd1ccd767075a863f79fcc30aa34dcfa441fe0 languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.18.6" +"@babel/plugin-transform-arrow-functions@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/plugin-transform-arrow-functions@npm:7.21.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.21.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 900f5c695755062b91eec74da6f9092f40b8fada099058b92576f1e23c55e9813ec437051893a9b3c05cefe39e8ac06303d4a91b384e1c03dd8dc1581ea11602 + checksum: c7c281cdf37c33a584102d9fd1793e85c96d4d320cdfb7c43f1ce581323d057f13b53203994fcc7ee1f8dc1ff013498f258893aa855a06c6f830fcc4c33d6e44 languageName: node linkType: hard -"@babel/plugin-transform-async-to-generator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.18.6" +"@babel/plugin-transform-async-to-generator@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.20.7" dependencies: "@babel/helper-module-imports": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/helper-remap-async-to-generator": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-remap-async-to-generator": ^7.18.9 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: c2cca47468cf1aeefdc7ec35d670e195c86cee4de28a1970648c46a88ce6bd1806ef0bab27251b9e7fb791bb28a64dcd543770efd899f28ee5f7854e64e873d3 + checksum: fe9ee8a5471b4317c1b9ea92410ace8126b52a600d7cfbfe1920dcac6fb0fad647d2e08beb4fd03c630eb54430e6c72db11e283e3eddc49615c68abd39430904 languageName: node linkType: hard @@ -1103,55 +946,56 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/plugin-transform-block-scoping@npm:7.19.4" +"@babel/plugin-transform-block-scoping@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-transform-block-scoping@npm:7.21.0" dependencies: - "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 86353ccbb57b4a0513ac2b1209271858f9c3f2c56b15a6225ff5f1c97ffb1c48f8984046a718a9835ecdae100cbe80ed0b9ca15a5554e33386671b56a8cd887c + checksum: 15aacaadbecf96b53a750db1be4990b0d89c7f5bc3e1794b63b49fb219638c1fd25d452d15566d7e5ddf5b5f4e1a0a0055c35c1c7aee323c7b114bf49f66f4b0 languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/plugin-transform-classes@npm:7.19.0" +"@babel/plugin-transform-classes@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-transform-classes@npm:7.21.0" dependencies: "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-compilation-targets": ^7.19.0 + "@babel/helper-compilation-targets": ^7.20.7 "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-function-name": ^7.19.0 + "@babel/helper-function-name": ^7.21.0 "@babel/helper-optimise-call-expression": ^7.18.6 - "@babel/helper-plugin-utils": ^7.19.0 - "@babel/helper-replace-supers": ^7.18.9 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-replace-supers": ^7.20.7 "@babel/helper-split-export-declaration": ^7.18.6 globals: ^11.1.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 5500953031fc3eae73f717c7b59ef406158a4a710d566a0f78a4944240bcf98f817f07cf1d6af0e749e21f0dfee29c36412b75d57b0a753c3ad823b70c596b79 + checksum: 088ae152074bd0e90f64659169255bfe50393e637ec8765cb2a518848b11b0299e66b91003728fd0a41563a6fdc6b8d548ece698a314fd5447f5489c22e466b7 languageName: node linkType: hard -"@babel/plugin-transform-computed-properties@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-transform-computed-properties@npm:7.18.9" +"@babel/plugin-transform-computed-properties@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/plugin-transform-computed-properties@npm:7.21.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.21.5 + "@babel/template": ^7.20.7 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: a6bfbea207827d77592628973c0e8cc3319db636506bdc6e81e21582de2e767890e6975b382d0511e9ec3773b9f43691185df90832883bbf9251f688d27fbc1d + checksum: e819780ab30fc40d7802ffb75b397eff63ca4942a1873058f81c80f660189b78e158fa03fd3270775f0477c4c33cee3d8d40270e64404bbf24aa6cdccb197e7b languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/plugin-transform-destructuring@npm:7.19.4" +"@babel/plugin-transform-destructuring@npm:^7.21.3": + version: 7.21.3 + resolution: "@babel/plugin-transform-destructuring@npm:7.21.3" dependencies: - "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 0ca40f6abf7273dafefb7a1cc11fef2b9ab3edbd23188cdcff8cd5e30783b89d64e7813e44aae9efab417b90972ae80971bf6c4130eeeb112bcfb44100c72657 + checksum: 43ebbe0bfa20287e34427be7c2200ce096c20913775ea75268fb47fe0e55f9510800587e6052c42fe6dffa0daaad95dd465c3e312fd1ef9785648384c45417ac languageName: node linkType: hard @@ -1190,14 +1034,26 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-for-of@npm:^7.18.8": - version: 7.18.8 - resolution: "@babel/plugin-transform-for-of@npm:7.18.8" +"@babel/plugin-transform-flow-strip-types@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.21.0" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/plugin-syntax-flow": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a45951c57265c366f95db9a5e70a62cfc3eafafa3f3d23295357577b5fc139d053d45416cdbdf4a0a387e41cefc434ab94dd6c3048d03b094ff6d041dd10a0b0 + languageName: node + linkType: hard + +"@babel/plugin-transform-for-of@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/plugin-transform-for-of@npm:7.21.5" + dependencies: + "@babel/helper-plugin-utils": ^7.21.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: ca64c623cf0c7a80ab6f07ebd3e6e4ade95e2ae806696f70b43eafe6394fa8ce21f2b1ffdd15df2067f7363d2ecfe26472a97c6c774403d2163fa05f50c98f17 + checksum: b6666b24e8ca1ffbf7452a0042149724e295965aad55070dc9ee992451d69d855fc9db832c1c5fb4d3dc532f4a18a2974d5f8524f5c2250dda888d05f6f3cadb languageName: node linkType: hard @@ -1236,45 +1092,42 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-amd@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-modules-amd@npm:7.18.6" +"@babel/plugin-transform-modules-amd@npm:^7.20.11": + version: 7.20.11 + resolution: "@babel/plugin-transform-modules-amd@npm:7.20.11" dependencies: - "@babel/helper-module-transforms": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - babel-plugin-dynamic-import-node: ^2.3.3 + "@babel/helper-module-transforms": ^7.20.11 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: f60c4c4e0eaec41e42c003cbab44305da7a8e05b2c9bdfc2b3fe0f9e1d7441c959ff5248aa03e350abe530e354028cbf3aa20bf07067b11510997dad8dd39be0 + checksum: 23665c1c20c8f11c89382b588fb9651c0756d130737a7625baeaadbd3b973bc5bfba1303bedffa8fb99db1e6d848afb01016e1df2b69b18303e946890c790001 languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.18.6" +"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.21.5" dependencies: - "@babel/helper-module-transforms": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/helper-simple-access": ^7.18.6 - babel-plugin-dynamic-import-node: ^2.3.3 + "@babel/helper-module-transforms": ^7.21.5 + "@babel/helper-plugin-utils": ^7.21.5 + "@babel/helper-simple-access": ^7.21.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 7e356e3df8a6a8542cced7491ec5b1cc1093a88d216a59e63a5d2b9fe9d193cbea864f680a41429e41a4f9ecec930aa5b0b8f57e2b17b3b4d27923bb12ba5d14 + checksum: d9ff7a21baaa60c08a0c86c5e468bb4b2bd85caf51ba78712d8f45e9afa2498d50d6cdf349696e08aa820cafed65f19b70e5938613db9ebb095f7aba1127f282 languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.19.0" +"@babel/plugin-transform-modules-systemjs@npm:^7.20.11": + version: 7.20.11 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.20.11" dependencies: "@babel/helper-hoist-variables": ^7.18.6 - "@babel/helper-module-transforms": ^7.19.0 - "@babel/helper-plugin-utils": ^7.19.0 - "@babel/helper-validator-identifier": ^7.18.6 - babel-plugin-dynamic-import-node: ^2.3.3 + "@babel/helper-module-transforms": ^7.20.11 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-validator-identifier": ^7.19.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: a0742deee4a076d6fc303d036c1ea2bea9b7d91af390483fe91fc415f9cb43925bb5dd930fdcb8fcdc9d4c7a22774a3cec521c67f1422a9b473debcb85ee57f9 + checksum: 4546c47587f88156d66c7eb7808e903cf4bb3f6ba6ac9bc8e3af2e29e92eb9f0b3f44d52043bfd24eb25fa7827fd7b6c8bfeac0cac7584e019b87e1ecbd0e673 languageName: node linkType: hard @@ -1290,15 +1143,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.19.1": - version: 7.19.1 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.19.1" +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.20.5": + version: 7.20.5 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.20.5" dependencies: - "@babel/helper-create-regexp-features-plugin": ^7.19.0 - "@babel/helper-plugin-utils": ^7.19.0 + "@babel/helper-create-regexp-features-plugin": ^7.20.5 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0 - checksum: 8a40f5d04f2140c44fe890a5a3fd72abc2a88445443ac2bd92e1e85d9366d3eb8f1ebb7e2c89d2daeaf213d9b28cb65605502ac9b155936d48045eeda6053494 + checksum: 528c95fb1087e212f17e1c6456df041b28a83c772b9c93d2e407c9d03b72182b0d9d126770c1d6e0b23aab052599ceaf25ed6a2c0627f4249be34a83f6fae853 languageName: node linkType: hard @@ -1325,14 +1178,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.18.8": - version: 7.18.8 - resolution: "@babel/plugin-transform-parameters@npm:7.18.8" +"@babel/plugin-transform-parameters@npm:^7.20.7, @babel/plugin-transform-parameters@npm:^7.21.3": + version: 7.21.3 + resolution: "@babel/plugin-transform-parameters@npm:7.21.3" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 2b5863300da60face8a250d91da16294333bd5626e9721b13a3ba2078bd2a5a190e32c6e7a1323d5f547f579aeb2804ff49a62a55fcad2b1d099e55a55b788ea + checksum: c92128d7b1fcf54e2cab186c196bbbf55a9a6de11a83328dc2602649c9dc6d16ef73712beecd776cd49bfdc624b5f56740f4a53568d3deb9505ec666bc869da3 languageName: node linkType: hard @@ -1347,86 +1200,52 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-react-display-name@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-react-display-name@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 51c087ab9e41ef71a29335587da28417536c6f816c292e092ffc0e0985d2f032656801d4dd502213ce32481f4ba6c69402993ffa67f0818a07606ff811e4be49 - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx-development@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-react-jsx-development@npm:7.18.6" - dependencies: - "@babel/plugin-transform-react-jsx": ^7.18.6 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: ec9fa65db66f938b75c45e99584367779ac3e0af8afc589187262e1337c7c4205ea312877813ae4df9fb93d766627b8968d74ac2ba702e4883b1dbbe4953ecee - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx-self@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-react-jsx-self@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 7d24e29c63869bb23495c163a92678c1c3341ecf74db420a20c6d3db74cbf5000fe908943f6106494e7225c0168945c150e528162274fd8fc7721966ad26930a - languageName: node - linkType: hard - -"@babel/plugin-transform-react-jsx-source@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-react-jsx-source@npm:7.18.6" +"@babel/plugin-transform-react-jsx-self@npm:^7.18.6, @babel/plugin-transform-react-jsx-self@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-transform-react-jsx-self@npm:7.21.0" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.20.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 7e17e631820955f158c16e9b01a96cf82e3ee81bb3c7c03f2896ee0d41da3e8a7557546893bc81792afe46b817c4e9014fd6e4de8644fcf16fd0f7c4daf66e41 + checksum: 696f74c04a265409ccd46e333ff762e6011d394e6972128b5d97db4c1647289141bc7ebd45ab2bab99b60932f9793e8f89ee9432d3bde19962de2100456f6147 languageName: node linkType: hard -"@babel/plugin-transform-react-jsx@npm:^7.17.12, @babel/plugin-transform-react-jsx@npm:^7.18.10, @babel/plugin-transform-react-jsx@npm:^7.18.6": - version: 7.19.0 - resolution: "@babel/plugin-transform-react-jsx@npm:7.19.0" +"@babel/plugin-transform-react-jsx-source@npm:^7.19.6": + version: 7.19.6 + resolution: "@babel/plugin-transform-react-jsx-source@npm:7.19.6" dependencies: - "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-module-imports": ^7.18.6 "@babel/helper-plugin-utils": ^7.19.0 - "@babel/plugin-syntax-jsx": ^7.18.6 - "@babel/types": ^7.19.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: d7d6f0b8f24b1f6b7cf8062c4e91c59af82489a993e51859bd49c2d62a2d2b77fd40b02a9a1d0e6d874cf4ce56a05fa3564b964587d00c94ebc62593524052ec + checksum: 1e9e29a4efc5b79840bd4f68e404f5ab7765ce48c7bd22f12f2b185f9c782c66933bdf54a1b21879e4e56e6b50b4e88aca82789ecb1f61123af6dfa9ab16c555 languageName: node linkType: hard -"@babel/plugin-transform-react-pure-annotations@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.18.6" +"@babel/plugin-transform-react-jsx@npm:^7.19.0": + version: 7.21.5 + resolution: "@babel/plugin-transform-react-jsx@npm:7.21.5" dependencies: "@babel/helper-annotate-as-pure": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-module-imports": ^7.21.4 + "@babel/helper-plugin-utils": ^7.21.5 + "@babel/plugin-syntax-jsx": ^7.21.4 + "@babel/types": ^7.21.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 97c4873d409088f437f9084d084615948198dd87fc6723ada0e7e29c5a03623c2f3e03df3f52e7e7d4d23be32a08ea00818bff302812e48713c706713bd06219 + checksum: fe25e612d02a14ede13fa9c03a0c448ce06bc527fe9f71a82953ad4bb7f4c05c1978b2928cb1405c282dfc6d8ef85d9a658b7b970893921c1f99fd0d7e438c5f languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-transform-regenerator@npm:7.18.6" +"@babel/plugin-transform-regenerator@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/plugin-transform-regenerator@npm:7.21.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - regenerator-transform: ^0.15.0 + "@babel/helper-plugin-utils": ^7.21.5 + regenerator-transform: ^0.15.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 60bd482cb0343c714f85c3e19a13b3b5fa05ee336c079974091c0b35e263307f4e661f4555dff90707a87d5efe19b1d51835db44455405444ac1813e268ad750 + checksum: 5291f6871276f57a6004f16d50ae9ad57f22a6aa2a183b8c84de8126f1066c6c9f9bbeadb282b5207fa9e7b0f57e40a8421d46cb5c60caf7e2848e98224d5639 languageName: node linkType: hard @@ -1452,15 +1271,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-spread@npm:^7.19.0": - version: 7.19.0 - resolution: "@babel/plugin-transform-spread@npm:7.19.0" +"@babel/plugin-transform-spread@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/plugin-transform-spread@npm:7.20.7" dependencies: - "@babel/helper-plugin-utils": ^7.19.0 - "@babel/helper-skip-transparent-expression-wrappers": ^7.18.9 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: e73a4deb095999185e70b524d0ff4e35df50fcda58299e700a6149a15bbc1a9b369ef1cef384e15a54b3c3ce316cc0f054dbf249dcd0d1ca59f4281dd4df9718 + checksum: 8ea698a12da15718aac7489d4cde10beb8a3eea1f66167d11ab1e625033641e8b328157fd1a0b55dd6531933a160c01fc2e2e61132a385cece05f26429fd0cc2 languageName: node linkType: hard @@ -1497,27 +1316,28 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.18.6": - version: 7.19.3 - resolution: "@babel/plugin-transform-typescript@npm:7.19.3" +"@babel/plugin-transform-typescript@npm:^7.21.3": + version: 7.21.3 + resolution: "@babel/plugin-transform-typescript@npm:7.21.3" dependencies: - "@babel/helper-create-class-features-plugin": ^7.19.0 - "@babel/helper-plugin-utils": ^7.19.0 - "@babel/plugin-syntax-typescript": ^7.18.6 + "@babel/helper-annotate-as-pure": ^7.18.6 + "@babel/helper-create-class-features-plugin": ^7.21.0 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/plugin-syntax-typescript": ^7.20.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 094c8c4ad05fee7f1bda243923cadb2b05b58448ea7cf9560e734c7cffd72acfeab3e1e0d2b084eb47a5a950ac316f970b83904b3504c203fa6fe9d8d61526a8 + checksum: c16fd577bf43f633deb76fca2a8527d8ae25968c8efdf327c1955472c3e0257e62992473d1ad7f9ee95379ce2404699af405ea03346055adadd3478ad0ecd117 languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.18.10": - version: 7.18.10 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.18.10" +"@babel/plugin-transform-unicode-escapes@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/plugin-transform-unicode-escapes@npm:7.21.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.9 + "@babel/helper-plugin-utils": ^7.21.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: f5baca55cb3c11bc08ec589f5f522d85c1ab509b4d11492437e45027d64ae0b22f0907bd1381e8d7f2a436384bb1f9ad89d19277314242c5c2671a0f91d0f9cd + checksum: 6504d642d0449a275191b624bd94d3e434ae154e610bf2f0e3c109068b287d2474f68e1da64b47f21d193cd67b27ee4643877d530187670565cac46e29fd257d languageName: node linkType: hard @@ -1533,37 +1353,38 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.18.10, @babel/preset-env@npm:^7.19.4": - version: 7.19.4 - resolution: "@babel/preset-env@npm:7.19.4" +"@babel/preset-env@npm:^7.20.2, @babel/preset-env@npm:^7.21.5, @babel/preset-env@npm:~7.21.0": + version: 7.21.5 + resolution: "@babel/preset-env@npm:7.21.5" dependencies: - "@babel/compat-data": ^7.19.4 - "@babel/helper-compilation-targets": ^7.19.3 - "@babel/helper-plugin-utils": ^7.19.0 - "@babel/helper-validator-option": ^7.18.6 + "@babel/compat-data": ^7.21.5 + "@babel/helper-compilation-targets": ^7.21.5 + "@babel/helper-plugin-utils": ^7.21.5 + "@babel/helper-validator-option": ^7.21.0 "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.18.6 - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.18.9 - "@babel/plugin-proposal-async-generator-functions": ^7.19.1 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.20.7 + "@babel/plugin-proposal-async-generator-functions": ^7.20.7 "@babel/plugin-proposal-class-properties": ^7.18.6 - "@babel/plugin-proposal-class-static-block": ^7.18.6 + "@babel/plugin-proposal-class-static-block": ^7.21.0 "@babel/plugin-proposal-dynamic-import": ^7.18.6 "@babel/plugin-proposal-export-namespace-from": ^7.18.9 "@babel/plugin-proposal-json-strings": ^7.18.6 - "@babel/plugin-proposal-logical-assignment-operators": ^7.18.9 + "@babel/plugin-proposal-logical-assignment-operators": ^7.20.7 "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 "@babel/plugin-proposal-numeric-separator": ^7.18.6 - "@babel/plugin-proposal-object-rest-spread": ^7.19.4 + "@babel/plugin-proposal-object-rest-spread": ^7.20.7 "@babel/plugin-proposal-optional-catch-binding": ^7.18.6 - "@babel/plugin-proposal-optional-chaining": ^7.18.9 + "@babel/plugin-proposal-optional-chaining": ^7.21.0 "@babel/plugin-proposal-private-methods": ^7.18.6 - "@babel/plugin-proposal-private-property-in-object": ^7.18.6 + "@babel/plugin-proposal-private-property-in-object": ^7.21.0 "@babel/plugin-proposal-unicode-property-regex": ^7.18.6 "@babel/plugin-syntax-async-generators": ^7.8.4 "@babel/plugin-syntax-class-properties": ^7.12.13 "@babel/plugin-syntax-class-static-block": ^7.14.5 "@babel/plugin-syntax-dynamic-import": ^7.8.3 "@babel/plugin-syntax-export-namespace-from": ^7.8.3 - "@babel/plugin-syntax-import-assertions": ^7.18.6 + "@babel/plugin-syntax-import-assertions": ^7.20.0 + "@babel/plugin-syntax-import-meta": ^7.10.4 "@babel/plugin-syntax-json-strings": ^7.8.3 "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 @@ -1573,40 +1394,40 @@ __metadata: "@babel/plugin-syntax-optional-chaining": ^7.8.3 "@babel/plugin-syntax-private-property-in-object": ^7.14.5 "@babel/plugin-syntax-top-level-await": ^7.14.5 - "@babel/plugin-transform-arrow-functions": ^7.18.6 - "@babel/plugin-transform-async-to-generator": ^7.18.6 + "@babel/plugin-transform-arrow-functions": ^7.21.5 + "@babel/plugin-transform-async-to-generator": ^7.20.7 "@babel/plugin-transform-block-scoped-functions": ^7.18.6 - "@babel/plugin-transform-block-scoping": ^7.19.4 - "@babel/plugin-transform-classes": ^7.19.0 - "@babel/plugin-transform-computed-properties": ^7.18.9 - "@babel/plugin-transform-destructuring": ^7.19.4 + "@babel/plugin-transform-block-scoping": ^7.21.0 + "@babel/plugin-transform-classes": ^7.21.0 + "@babel/plugin-transform-computed-properties": ^7.21.5 + "@babel/plugin-transform-destructuring": ^7.21.3 "@babel/plugin-transform-dotall-regex": ^7.18.6 "@babel/plugin-transform-duplicate-keys": ^7.18.9 "@babel/plugin-transform-exponentiation-operator": ^7.18.6 - "@babel/plugin-transform-for-of": ^7.18.8 + "@babel/plugin-transform-for-of": ^7.21.5 "@babel/plugin-transform-function-name": ^7.18.9 "@babel/plugin-transform-literals": ^7.18.9 "@babel/plugin-transform-member-expression-literals": ^7.18.6 - "@babel/plugin-transform-modules-amd": ^7.18.6 - "@babel/plugin-transform-modules-commonjs": ^7.18.6 - "@babel/plugin-transform-modules-systemjs": ^7.19.0 + "@babel/plugin-transform-modules-amd": ^7.20.11 + "@babel/plugin-transform-modules-commonjs": ^7.21.5 + "@babel/plugin-transform-modules-systemjs": ^7.20.11 "@babel/plugin-transform-modules-umd": ^7.18.6 - "@babel/plugin-transform-named-capturing-groups-regex": ^7.19.1 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.20.5 "@babel/plugin-transform-new-target": ^7.18.6 "@babel/plugin-transform-object-super": ^7.18.6 - "@babel/plugin-transform-parameters": ^7.18.8 + "@babel/plugin-transform-parameters": ^7.21.3 "@babel/plugin-transform-property-literals": ^7.18.6 - "@babel/plugin-transform-regenerator": ^7.18.6 + "@babel/plugin-transform-regenerator": ^7.21.5 "@babel/plugin-transform-reserved-words": ^7.18.6 "@babel/plugin-transform-shorthand-properties": ^7.18.6 - "@babel/plugin-transform-spread": ^7.19.0 + "@babel/plugin-transform-spread": ^7.20.7 "@babel/plugin-transform-sticky-regex": ^7.18.6 "@babel/plugin-transform-template-literals": ^7.18.9 "@babel/plugin-transform-typeof-symbol": ^7.18.9 - "@babel/plugin-transform-unicode-escapes": ^7.18.10 + "@babel/plugin-transform-unicode-escapes": ^7.21.5 "@babel/plugin-transform-unicode-regex": ^7.18.6 "@babel/preset-modules": ^0.1.5 - "@babel/types": ^7.19.4 + "@babel/types": ^7.21.5 babel-plugin-polyfill-corejs2: ^0.3.3 babel-plugin-polyfill-corejs3: ^0.6.0 babel-plugin-polyfill-regenerator: ^0.4.1 @@ -1614,7 +1435,20 @@ __metadata: semver: ^6.3.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: f12af25281f3c5e7df60fa1e79ad481ddd7f6a111d4c0fabcffdabf0eaed3a01b4f8c647ae5445ed1f58df70f52083ffd283e8919ade7afa73801a49c733d22c + checksum: 86e167f3a351c89f8cd1409262481ece6ddc085b76147e801530ce29d60b1cfda8b264b1efd1ae27b8181b073a923c7161f21e2ebc0a41d652d717b10cf1c829 + languageName: node + linkType: hard + +"@babel/preset-flow@npm:^7.13.13": + version: 7.21.4 + resolution: "@babel/preset-flow@npm:7.21.4" + dependencies: + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-validator-option": ^7.21.0 + "@babel/plugin-transform-flow-strip-types": ^7.21.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a3a1ac91d0bc0ed033ae46556babe3dc571ea8788c531db550d6904bd303cf50ebb84fa417c1f059c3b69d62e0792d8eceda83d820a12c2e6b8008e5518ce7b8 languageName: node linkType: hard @@ -1633,91 +1467,105 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/preset-react@npm:7.18.6" +"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.21.5": + version: 7.21.5 + resolution: "@babel/preset-typescript@npm:7.21.5" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/helper-validator-option": ^7.18.6 - "@babel/plugin-transform-react-display-name": ^7.18.6 - "@babel/plugin-transform-react-jsx": ^7.18.6 - "@babel/plugin-transform-react-jsx-development": ^7.18.6 - "@babel/plugin-transform-react-pure-annotations": ^7.18.6 + "@babel/helper-plugin-utils": ^7.21.5 + "@babel/helper-validator-option": ^7.21.0 + "@babel/plugin-syntax-jsx": ^7.21.4 + "@babel/plugin-transform-modules-commonjs": ^7.21.5 + "@babel/plugin-transform-typescript": ^7.21.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 540d9cf0a0cc0bb07e6879994e6fb7152f87dafbac880b56b65e2f528134c7ba33e0cd140b58700c77b2ebf4c81fa6468fed0ba391462d75efc7f8c1699bb4c3 + checksum: e7b35c435139eec1d6bd9f57e8f3eb79bfc2da2c57a34ad9e9ea848ba4ecd72791cf4102df456604ab07c7f4518525b0764754b6dd5898036608b351e0792448 languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/preset-typescript@npm:7.18.6" +"@babel/register@npm:^7.13.16": + version: 7.21.0 + resolution: "@babel/register@npm:7.21.0" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/helper-validator-option": ^7.18.6 - "@babel/plugin-transform-typescript": ^7.18.6 + clone-deep: ^4.0.1 + find-cache-dir: ^2.0.0 + make-dir: ^2.1.0 + pirates: ^4.0.5 + source-map-support: ^0.5.16 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 7fe0da5103eb72d3cf39cf3e138a794c8cdd19c0b38e3e101507eef519c46a87a0d6d0e8bc9e28a13ea2364001ebe7430b9d75758aab4c3c3a8db9a487b9dc7c + checksum: 9745cc7520b4c5e64cc54f4851c3b78af82e1f8cffc9041f5cc0b9aef62d86a9a8617327fc975b5e0e39cb5cc0aba7ae02429884390ee93e0de29152fa849b4f + languageName: node + linkType: hard + +"@babel/regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "@babel/regjsgen@npm:0.8.0" + checksum: 89c338fee774770e5a487382170711014d49a68eb281e74f2b5eac88f38300a4ad545516a7786a8dd5702e9cf009c94c2f582d200f077ac5decd74c56b973730 languageName: node linkType: hard -"@babel/runtime-corejs3@npm:^7.10.2": - version: 7.19.4 - resolution: "@babel/runtime-corejs3@npm:7.19.4" +"@babel/runtime@npm:7.12.1": + version: 7.12.1 + resolution: "@babel/runtime@npm:7.12.1" dependencies: - core-js-pure: ^3.25.1 regenerator-runtime: ^0.13.4 - checksum: 3418534964d0d334da46b21bbe50510630101fd4a5afe632077d261656a715868e3f0f304ac7c9d608dc2aa72cbea49e31a5bc5cb9f7b5cb23ce01cb917acaef + checksum: fb4b4c8f704a338d3500ff75bfd28a35927444e0c48254d60ce87a9402d7e149e2189e5f55fa3bd2927d4c10fa25fe34c239ae0be68df77af040b01561c5bcc8 languageName: node linkType: hard -"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4": - version: 7.19.4 - resolution: "@babel/runtime@npm:7.19.4" +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.8.4": + version: 7.21.5 + resolution: "@babel/runtime@npm:7.21.5" dependencies: - regenerator-runtime: ^0.13.4 - checksum: 66b7e3c13e9ee1d2c9397ea89144f29a875edee266a0eb2d9971be51b32fdbafc85808c7a45e011e6681899bb804b4e2ee2aed6dc07108dbbd6b11b6cc2afba6 + regenerator-runtime: ^0.13.11 + checksum: 358f2779d3187f5c67ad302e8f8d435412925d0b991d133c7d4a7b1ddd5a3fda1b6f34537cb64628dfd96a27ae46df105bed3895b8d754b88cacdded8d1129dd languageName: node linkType: hard -"@babel/template@npm:^7.18.10, @babel/template@npm:^7.3.3": - version: 7.18.10 - resolution: "@babel/template@npm:7.18.10" +"@babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7, @babel/template@npm:^7.3.3": + version: 7.21.9 + resolution: "@babel/template@npm:7.21.9" dependencies: - "@babel/code-frame": ^7.18.6 - "@babel/parser": ^7.18.10 - "@babel/types": ^7.18.10 - checksum: 93a6aa094af5f355a72bd55f67fa1828a046c70e46f01b1606e6118fa1802b6df535ca06be83cc5a5e834022be95c7b714f0a268b5f20af984465a71e28f1473 + "@babel/code-frame": ^7.21.4 + "@babel/parser": ^7.21.9 + "@babel/types": ^7.21.5 + checksum: 6ec2c60d4d53b2a9230ab82c399ba6525df87e9a4e01e4b111e071cbad283b1362e7c99a1bc50027073f44f2de36a495a89c27112c4e7efe7ef9c8d9c84de2ec languageName: node linkType: hard -"@babel/traverse@npm:^7.10.3, @babel/traverse@npm:^7.18.13, @babel/traverse@npm:^7.18.2, @babel/traverse@npm:^7.19.0, @babel/traverse@npm:^7.19.1, @babel/traverse@npm:^7.19.3, @babel/traverse@npm:^7.19.4, @babel/traverse@npm:^7.7.2": - version: 7.19.4 - resolution: "@babel/traverse@npm:7.19.4" +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.10.3, @babel/traverse@npm:^7.20.5, @babel/traverse@npm:^7.21.5, @babel/traverse@npm:^7.7.2, @babel/traverse@npm:~7.21.2": + version: 7.21.5 + resolution: "@babel/traverse@npm:7.21.5" dependencies: - "@babel/code-frame": ^7.18.6 - "@babel/generator": ^7.19.4 - "@babel/helper-environment-visitor": ^7.18.9 - "@babel/helper-function-name": ^7.19.0 + "@babel/code-frame": ^7.21.4 + "@babel/generator": ^7.21.5 + "@babel/helper-environment-visitor": ^7.21.5 + "@babel/helper-function-name": ^7.21.0 "@babel/helper-hoist-variables": ^7.18.6 "@babel/helper-split-export-declaration": ^7.18.6 - "@babel/parser": ^7.19.4 - "@babel/types": ^7.19.4 + "@babel/parser": ^7.21.5 + "@babel/types": ^7.21.5 debug: ^4.1.0 globals: ^11.1.0 - checksum: 8ae1ac3dace181620cd0e3078aec99604a48302fb873193a171e37a7cc4f8909ed496f286bf08c6473f9692db36423e2601eb9c771493d19f6a5fd1a56745af5 + checksum: b403733fa7d858f0c8e224f0434a6ade641bc469a4f92975363391e796629d5bf53e544761dfe85039aab92d5389ebe7721edb309d7a5bb7df2bf74f37bf9f47 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.10.3, @babel/types@npm:^7.18.10, @babel/types@npm:^7.18.13, @babel/types@npm:^7.18.4, @babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9, @babel/types@npm:^7.19.0, @babel/types@npm:^7.19.3, @babel/types@npm:^7.19.4, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.19.4 - resolution: "@babel/types@npm:7.19.4" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.10.3, @babel/types@npm:^7.18.6, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.5, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.0, @babel/types@npm:^7.21.4, @babel/types@npm:^7.21.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3, @babel/types@npm:~7.21.2": + version: 7.21.5 + resolution: "@babel/types@npm:7.21.5" dependencies: - "@babel/helper-string-parser": ^7.19.4 + "@babel/helper-string-parser": ^7.21.5 "@babel/helper-validator-identifier": ^7.19.1 to-fast-properties: ^2.0.0 - checksum: 4032f6407093f80dd4f4764be676f7527d2a5c0381586967cd79683cf8af01cdc16745a381b9cef045f702f0c9b0dffd880d84ee55dad59ba01bd23d5d52a8e0 + checksum: 43242a99c612d13285ee4af46cc0f1066bcb6ffd38307daef7a76e8c70f36cfc3255eb9e75c8e768b40e761176c313aec4d5c0b9d97a21e494d49d5fd123a9f7 + languageName: node + linkType: hard + +"@base2/pretty-print-object@npm:1.0.1": + version: 1.0.1 + resolution: "@base2/pretty-print-object@npm:1.0.1" + checksum: 1e8a5af578037a9d47d72f815983f9e4efb038e5f03e7635fc893194c5daa723215d71af33267893a9b618656c8eaea7be931b1c063c9b066a40994be0d23545 languageName: node linkType: hard @@ -1728,219 +1576,355 @@ __metadata: languageName: node linkType: hard -"@code-hike/mdx@npm:^0.7.4": - version: 0.7.4 - resolution: "@code-hike/mdx@npm:0.7.4" - dependencies: - hast-util-to-estree: ^1.4.0 - is-plain-obj: ^3.0.0 +"@code-hike/lighter@npm:0.6.4": + version: 0.6.4 + resolution: "@code-hike/lighter@npm:0.6.4" + checksum: 8683f73c636c85083bbd714ee29a5e1474afeaccba3bfd8ad8eac8df69160faa1bf9a098d41406d44c912ff89bcb2d0d7c1cd2a9e9550f7d94fd2bcc86cc1570 + languageName: node + linkType: hard + +"@code-hike/lighter@npm:0.6.6": + version: 0.6.6 + resolution: "@code-hike/lighter@npm:0.6.6" + checksum: a55d0a2e7b2600820859e918537334f081b5c6c588afeb42d30ca07bde64a0f5af6eab61b6c3c66e5f2aaa2d3808b9c531003a8f2d51d4fd1cc3b618d0ce7c47 + languageName: node + linkType: hard + +"@code-hike/mdx@npm:^0.8.3": + version: 0.8.3 + resolution: "@code-hike/mdx@npm:0.8.3" + dependencies: + "@code-hike/lighter": 0.6.4 node-fetch: ^2.0.0 - remark-rehype: ^8.1.0 shiki: ^0.10.1 - unified: ^9.2.2 - unist-util-visit: ^2.0.0 - unist-util-visit-parents: ^3.0.0 peerDependencies: react: ^16.8.3 || ^17 || ^18 - checksum: 90805a07d56877d502d2034101206962d41d41ad7820e06c5e6e7daa5e7e7589778285471b42de2b6024d5cd207c530b4201922cd64153697ce9b9a7a91fe081 + checksum: 6941e0f1b2ffc2df0bda1bab3f619825d05ba20478b6bfc5188881644edc99b1b66ec388a314e7e77a5137f1b7285f75b6c91d5280985ca37a546e6614ac9e2f + languageName: node + linkType: hard + +"@colors/colors@npm:1.5.0": + version: 1.5.0 + resolution: "@colors/colors@npm:1.5.0" + checksum: d64d5260bed1d5012ae3fc617d38d1afc0329fec05342f4e6b838f46998855ba56e0a73833f4a80fa8378c84810da254f76a8a19c39d038260dc06dc4e007425 languageName: node linkType: hard -"@commitlint/cli@npm:^17.1.2": - version: 17.1.2 - resolution: "@commitlint/cli@npm:17.1.2" +"@commitlint/cli@npm:^17.6.3": + version: 17.6.3 + resolution: "@commitlint/cli@npm:17.6.3" dependencies: - "@commitlint/format": ^17.0.0 - "@commitlint/lint": ^17.1.0 - "@commitlint/load": ^17.1.2 - "@commitlint/read": ^17.1.0 - "@commitlint/types": ^17.0.0 + "@commitlint/format": ^17.4.4 + "@commitlint/lint": ^17.6.3 + "@commitlint/load": ^17.5.0 + "@commitlint/read": ^17.5.1 + "@commitlint/types": ^17.4.4 execa: ^5.0.0 - lodash: ^4.17.19 + lodash.isfunction: ^3.0.9 resolve-from: 5.0.0 resolve-global: 1.0.0 yargs: ^17.0.0 bin: commitlint: cli.js - checksum: 2f87c560ede9c731574ceb3a4be0d4a12fed60aedef57a567a98b978537105da0aa70d189803f7894ee7a079038f63ee45345ebd29e9d29789d9fdf4c64006d4 + checksum: e5a597ef453b74b243d1a479746a14938fc68f3fa5ac0210c9f1b5895b6507860b2761c27742e3c1a069ee64de69ef12bea76bcde6a7cb80d6d07bf1b4272c14 languageName: node linkType: hard -"@commitlint/config-angular-type-enum@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/config-angular-type-enum@npm:17.0.0" - checksum: f5ef60302a3fb6fd181406d19f307c02e92df70cfc2ead33ec54def1b07298417d51a16b44513403bab7bfd68a08f3c5bf82064b3074e43b9c1b8b25f973a656 +"@commitlint/config-angular-type-enum@npm:^17.4.0": + version: 17.4.0 + resolution: "@commitlint/config-angular-type-enum@npm:17.4.0" + checksum: 4694dead27ccf8ce1efdf7d574b81905f45ea3bede13fc338dff70c175856a284b46c41ddef45446f1b1686959313a88a3465f38b754013b515749905824cba3 languageName: node linkType: hard -"@commitlint/config-angular@npm:^17.1.0": - version: 17.1.0 - resolution: "@commitlint/config-angular@npm:17.1.0" +"@commitlint/config-angular@npm:^17.6.3": + version: 17.6.3 + resolution: "@commitlint/config-angular@npm:17.6.3" dependencies: - "@commitlint/config-angular-type-enum": ^17.0.0 - checksum: 6e5293db135ffa0869cf548c0364dcc64e019b61b0f1b576bf51565b523f3c727ce38c8a368c20cd6221e3100e5fd3cd8468c873fa1133fdd5ec4b58ceeba1f6 + "@commitlint/config-angular-type-enum": ^17.4.0 + checksum: 4ff1815f9bfba4b216a5c37476b3d2aa9e3cfd139066e4775386aa8730ab4b596e7ccb5656bfde22702a62107e7d63dd3464a1924acc777703d523972509f103 languageName: node linkType: hard -"@commitlint/config-validator@npm:^17.1.0": - version: 17.1.0 - resolution: "@commitlint/config-validator@npm:17.1.0" +"@commitlint/config-validator@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/config-validator@npm:17.4.4" dependencies: - "@commitlint/types": ^17.0.0 + "@commitlint/types": ^17.4.4 ajv: ^8.11.0 - checksum: 18b4779837979bf9e240de689c49b9d0dc1e053e677ec13826204594edc052510f37a30bcd8826a054cbcb42a7285fc23e160082b281e0089f18039958ec6a53 + checksum: 71ee818608ed5c74832cdd63531c0f61b21758fba9f8b876205485ece4f047c9582bc3f323a20a5de700e3451296614d15448437270a82194eff7d71317b47ff languageName: node linkType: hard -"@commitlint/ensure@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/ensure@npm:17.0.0" +"@commitlint/ensure@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/ensure@npm:17.4.4" dependencies: - "@commitlint/types": ^17.0.0 - lodash: ^4.17.19 - checksum: 5ce3c624417dc64ed0d406954b7684ed287142535b0f55df6984093d0f82eadf0da5ab3e472e3020139304cd007c682a4bdfb95cf53fb99e7c7ae6d4711ada6b + "@commitlint/types": ^17.4.4 + lodash.camelcase: ^4.3.0 + lodash.kebabcase: ^4.1.1 + lodash.snakecase: ^4.1.1 + lodash.startcase: ^4.4.0 + lodash.upperfirst: ^4.3.1 + checksum: c21c189f22d8d3265e93256d101b72ef7cbdf8660438081799b9a4a8bd47d33133f250bbed858ab9bcc0d249d1c95ac58eddd9e5b46314d64ff049d0479d0d71 languageName: node linkType: hard -"@commitlint/execute-rule@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/execute-rule@npm:17.0.0" - checksum: cb37e5c6e0e16bf04e8f344094146ed2de8155456191da88fb9a1b943a9b5a98e0f6ef49c55b239104eb68634df681fd3be05311bf2da0cb6b171fdd24371669 +"@commitlint/execute-rule@npm:^17.4.0": + version: 17.4.0 + resolution: "@commitlint/execute-rule@npm:17.4.0" + checksum: 17d8e56ab00bd45fdecb0ed33186d2020ce261250d6a516204b6509610b75af8c930e7226b1111af3de298db32a7e4d0ba2c9cc7ed67db5ba5159eeed634f067 languageName: node linkType: hard -"@commitlint/format@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/format@npm:17.0.0" +"@commitlint/format@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/format@npm:17.4.4" dependencies: - "@commitlint/types": ^17.0.0 + "@commitlint/types": ^17.4.4 chalk: ^4.1.0 - checksum: e54705bdc91741632bac6ae330ba5d08110ec7575900585f4947487e7189a3d586396a3da3f1622fd3b6a49be9af1f71519a1ffeaa562d4cc7349bde3846eb8a + checksum: 832d9641129f2da8d32389b4a47db59d41eb1adfab742723972cad64b833c4af9e253f96757b27664fedae61644dd4c01d21f775773b45b604bd7f93b23a27d2 languageName: node linkType: hard -"@commitlint/is-ignored@npm:^17.1.0": - version: 17.1.0 - resolution: "@commitlint/is-ignored@npm:17.1.0" +"@commitlint/is-ignored@npm:^17.6.3": + version: 17.6.3 + resolution: "@commitlint/is-ignored@npm:17.6.3" dependencies: - "@commitlint/types": ^17.0.0 - semver: 7.3.7 - checksum: d371e7dbf137dee40d06b54f7edd1ac079d6ff696d756fb8b6a9c1a69b12a92295ecd2cf6d7079db229783c510b57a5f88080f486d3810177aef85b098f2464d + "@commitlint/types": ^17.4.4 + semver: 7.5.0 + checksum: db664b7e6b7154a514ab235353b18ac4131586e019655ccefd557d78ed81e374eddcdb5af166668836bc854922e79c6261de01c41e5868eab2ba8b24c7d4a322 languageName: node linkType: hard -"@commitlint/lint@npm:^17.1.0": - version: 17.1.0 - resolution: "@commitlint/lint@npm:17.1.0" +"@commitlint/lint@npm:^17.6.3": + version: 17.6.3 + resolution: "@commitlint/lint@npm:17.6.3" dependencies: - "@commitlint/is-ignored": ^17.1.0 - "@commitlint/parse": ^17.0.0 - "@commitlint/rules": ^17.0.0 - "@commitlint/types": ^17.0.0 - checksum: a457461da400d9adc5fa52bdc78c0e97f9b0f3e021f4b74efae2e7aae1b3febea759ef4a952cde2330a247cd48203345b038197ed1fcc750433ac042a4a7217d + "@commitlint/is-ignored": ^17.6.3 + "@commitlint/parse": ^17.4.4 + "@commitlint/rules": ^17.6.1 + "@commitlint/types": ^17.4.4 + checksum: f033d25fd37f8bf4d95d3783648edbc1ec61eaa277f698765925f973bc3395558fc36eb308a57b1f9ed7ff64d53cfd2055c4c6573a16b2bf9b79a422aee7286d languageName: node linkType: hard -"@commitlint/load@npm:^17.1.2": - version: 17.1.2 - resolution: "@commitlint/load@npm:17.1.2" +"@commitlint/load@npm:^17.5.0": + version: 17.5.0 + resolution: "@commitlint/load@npm:17.5.0" dependencies: - "@commitlint/config-validator": ^17.1.0 - "@commitlint/execute-rule": ^17.0.0 - "@commitlint/resolve-extends": ^17.1.0 - "@commitlint/types": ^17.0.0 - "@types/node": ^14.0.0 + "@commitlint/config-validator": ^17.4.4 + "@commitlint/execute-rule": ^17.4.0 + "@commitlint/resolve-extends": ^17.4.4 + "@commitlint/types": ^17.4.4 + "@types/node": "*" chalk: ^4.1.0 - cosmiconfig: ^7.0.0 + cosmiconfig: ^8.0.0 cosmiconfig-typescript-loader: ^4.0.0 - lodash: ^4.17.19 + lodash.isplainobject: ^4.0.6 + lodash.merge: ^4.6.2 + lodash.uniq: ^4.5.0 resolve-from: ^5.0.0 ts-node: ^10.8.1 - typescript: ^4.6.4 - checksum: c01e2d8a5b9b20706d91d7930f960b901450aa1e306d597eb0fca56f60d692bd1f63495914614bd59b0a6bcc51e11036a2291c79beb96ab7e8463034c5c5ecbb + typescript: ^4.6.4 || ^5.0.0 + checksum: c039114b0ad67bb9d8b05ec635d847bd5ab760528f0fb203411f433585bdab5472f4f5c7856dfc417cf64c05576f54c1afc4997a813f529304e0156bfc1d6cc8 languageName: node linkType: hard -"@commitlint/message@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/message@npm:17.0.0" - checksum: ec80ea7f98082e48116fda1203277ac139bf2f442a8f58f87f8b823c6e526ec3771a9de7821b249254d580bff59a3fe205d044d1e9df29c34c3014a41e851c5d +"@commitlint/message@npm:^17.4.2": + version: 17.4.2 + resolution: "@commitlint/message@npm:17.4.2" + checksum: 55b6cfeb57f7c9f913e18821aa4d972a6b6faa78c62741390996151f99554396f6df68ccfee86c163d24d8c27a4dbbcb50ef03c2972ab0a7a21d89daa2f9a519 languageName: node linkType: hard -"@commitlint/parse@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/parse@npm:17.0.0" +"@commitlint/parse@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/parse@npm:17.4.4" dependencies: - "@commitlint/types": ^17.0.0 + "@commitlint/types": ^17.4.4 conventional-changelog-angular: ^5.0.11 conventional-commits-parser: ^3.2.2 - checksum: 86610df080665b8ba83037c598f4e6d0538a5ec40fdb0c2ad1925bfdf0f494934deafa020d2e21663f64dbc20fec4e889d21675573d3860c379c2d305db7a141 + checksum: 2a6e5b0a5cdea21c879a3919a0227c0d7f3fa1f343808bcb09e3e7f25b0dc494dcca8af32982e7a65640b53c3e6cf138ebf685b657dd55173160bc0fa4e58916 languageName: node linkType: hard -"@commitlint/read@npm:^17.1.0": - version: 17.1.0 - resolution: "@commitlint/read@npm:17.1.0" +"@commitlint/read@npm:^17.5.1": + version: 17.5.1 + resolution: "@commitlint/read@npm:17.5.1" dependencies: - "@commitlint/top-level": ^17.0.0 - "@commitlint/types": ^17.0.0 - fs-extra: ^10.0.0 - git-raw-commits: ^2.0.0 + "@commitlint/top-level": ^17.4.0 + "@commitlint/types": ^17.4.4 + fs-extra: ^11.0.0 + git-raw-commits: ^2.0.11 minimist: ^1.2.6 - checksum: b9f728860a17db3e6c2e7872eca788b83192e1b83fbed3c4acdc0a83674573576df40041ca136eec9e19c1d0964efe31cfa98ec3f0907ccdefa80f6b5e7eeca4 + checksum: 62ee4f7a47b22a8571ae313bca36b418805a248f4986557f38f06317c44b6d18072889f95e7bc22bbb33a2f2b08236f74596ff28e3dbd0894249477a9df367c3 languageName: node linkType: hard -"@commitlint/resolve-extends@npm:^17.1.0": - version: 17.1.0 - resolution: "@commitlint/resolve-extends@npm:17.1.0" +"@commitlint/resolve-extends@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/resolve-extends@npm:17.4.4" dependencies: - "@commitlint/config-validator": ^17.1.0 - "@commitlint/types": ^17.0.0 + "@commitlint/config-validator": ^17.4.4 + "@commitlint/types": ^17.4.4 import-fresh: ^3.0.0 - lodash: ^4.17.19 + lodash.mergewith: ^4.6.2 resolve-from: ^5.0.0 resolve-global: ^1.0.0 - checksum: cc50ed7ca987dc9e308d49b8620d014a84b26f2354b247dddd74e40406c3554946c4565d978e63538527fa46c6be2ca73c05b29e5c6d6f4c4c6f97bd1d0d29fb + checksum: d7bf1ff1ad3db8750421b252d79cf7b96cf07d72cad8cc3f73c1363a8e68c0afde611d38ae6f213bbb54e3248160c6b9425578f3d0f8f790e84aea811d748b3e languageName: node linkType: hard -"@commitlint/rules@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/rules@npm:17.0.0" +"@commitlint/rules@npm:^17.6.1": + version: 17.6.1 + resolution: "@commitlint/rules@npm:17.6.1" dependencies: - "@commitlint/ensure": ^17.0.0 - "@commitlint/message": ^17.0.0 - "@commitlint/to-lines": ^17.0.0 - "@commitlint/types": ^17.0.0 + "@commitlint/ensure": ^17.4.4 + "@commitlint/message": ^17.4.2 + "@commitlint/to-lines": ^17.4.0 + "@commitlint/types": ^17.4.4 execa: ^5.0.0 - checksum: cd0944069932bee738a0ed70cb972fa0d14c0e35642310ca856d5e368ddc48513d05ece00f2e309ebcf4ecb119f8b44b322ff086edaa5208edb3cec0968dac06 + checksum: e00b453e8a66eee6a335223a67cb328943133c54a9b416a7700857a917ea5ab3a6394c6c37e6123a8244bc2625e765c0f7182b7dfc2d4dee94577bb300d6d3a0 languageName: node linkType: hard -"@commitlint/to-lines@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/to-lines@npm:17.0.0" - checksum: ccad787a3baf567c6c589e96e110aa2582103b50eaa9b70493116c08a0e5c6c50669c05e67b0a77cd803d66c031b1dcb9805b752d604178dbc4c744fc7f9bb04 +"@commitlint/to-lines@npm:^17.4.0": + version: 17.4.0 + resolution: "@commitlint/to-lines@npm:17.4.0" + checksum: 841f90f606238e145ab4ba02940662d511fc04fe553619900152a8542170fe664031b95d820ffaeb8864d4851344278e662ef29637d763fc19fd828e0f8d139b languageName: node linkType: hard -"@commitlint/top-level@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/top-level@npm:17.0.0" +"@commitlint/top-level@npm:^17.4.0": + version: 17.4.0 + resolution: "@commitlint/top-level@npm:17.4.0" dependencies: find-up: ^5.0.0 - checksum: 2e43d021a63faee67aa0e63b86a3ab9347ccda1b81f1f0722841223bd6bf127de954933c2ca3172fac0a1ce07a8b3bed62ac8f4afa04d50281dc5f80b43b61fb + checksum: 14cd77e982d2dd7989718dafdbf7a2168a5fb387005e0686c2dfa9ffc36bb9a749e5d80a151884459e4d8c88564339688dca26e9c711abe043beeb3f30c3dfd6 languageName: node linkType: hard -"@commitlint/types@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/types@npm:17.0.0" +"@commitlint/types@npm:^17.4.4": + version: 17.4.4 + resolution: "@commitlint/types@npm:17.4.4" dependencies: chalk: ^4.1.0 - checksum: 210636d3923f93f7cfc409eac04376b0fe50356a0e08f25a37b43d5cd9ca4363f7b03ca2e7736cbf95b62d67733fe8e1028269d35b4fddd1b3f2a653c90ca85c + checksum: 03c52429052d161710896d198000196bd2e60be0fd71459b22133dd83dee43e8d05ea8ee703c8369823bc40f77a54881b80d8aa4368ac52aea7f30fb234b73d2 + languageName: node + linkType: hard + +"@contentlayer/cli@npm:0.3.2": + version: 0.3.2 + resolution: "@contentlayer/cli@npm:0.3.2" + dependencies: + "@contentlayer/core": 0.3.2 + "@contentlayer/utils": 0.3.2 + clipanion: ^3.2.0 + typanion: ^3.12.1 + checksum: 1c3326682152b7cf9b8ebb08d85fc0f2809c3d1557fc2347869fde1af22f8a9fef3c4a06ad62cad1bcc6cda559bc16cfd679b0ba78393a5fdcfafc4c0b952042 + languageName: node + linkType: hard + +"@contentlayer/client@npm:0.3.2": + version: 0.3.2 + resolution: "@contentlayer/client@npm:0.3.2" + dependencies: + "@contentlayer/core": 0.3.2 + checksum: 904bbad8b8dffb92daa89c35f8c948813ae100914c5ba8c2d1f4e72b8f6b37e3a17100e31e6b723f53827008b2ff434b8393c75b7b27e1e2db8c19245eec5c4c + languageName: node + linkType: hard + +"@contentlayer/core@npm:0.3.2": + version: 0.3.2 + resolution: "@contentlayer/core@npm:0.3.2" + dependencies: + "@contentlayer/utils": 0.3.2 + camel-case: ^4.1.2 + comment-json: ^4.2.3 + esbuild: 0.17.x + gray-matter: ^4.0.3 + mdx-bundler: ^9.2.1 + rehype-stringify: ^9.0.3 + remark-frontmatter: ^4.0.1 + remark-parse: ^10.0.1 + remark-rehype: ^10.1.0 + source-map-support: ^0.5.21 + type-fest: ^3.7.1 + unified: ^10.1.2 + peerDependencies: + esbuild: 0.17.x + markdown-wasm: 1.x + peerDependenciesMeta: + esbuild: + optional: true + markdown-wasm: + optional: true + checksum: 41b1b8ac643b3fcec576e799d2b0c7927dd010ea48bb46c7cdf0bb2421122a9d91a005974083984327a3c4a05cd46632630946fdd89f4d5f7e21f5b005559ca6 + languageName: node + linkType: hard + +"@contentlayer/source-files@npm:0.3.2": + version: 0.3.2 + resolution: "@contentlayer/source-files@npm:0.3.2" + dependencies: + "@contentlayer/core": 0.3.2 + "@contentlayer/utils": 0.3.2 + chokidar: ^3.5.3 + fast-glob: ^3.2.12 + gray-matter: ^4.0.3 + imagescript: ^1.2.16 + micromatch: ^4.0.5 + ts-pattern: ^4.2.2 + unified: ^10.1.2 + yaml: ^1.10.2 + zod: ^3.21.4 + checksum: 294e2f1250890d6c958dfe0e3f86118ff85250883b3fadb1fdb48e31ef548edcd4cf1fc4765058619a22b606b8dd344ba6caf987b2d9ec1fd76f3eb63862b504 + languageName: node + linkType: hard + +"@contentlayer/source-remote-files@npm:0.3.2": + version: 0.3.2 + resolution: "@contentlayer/source-remote-files@npm:0.3.2" + dependencies: + "@contentlayer/core": 0.3.2 + "@contentlayer/source-files": 0.3.2 + "@contentlayer/utils": 0.3.2 + checksum: 6fe7677e0575536d3efcc7d06dcb09083cceb9f3e9b08b491102c917d61afb44bbd33e22ee73ad1079c2ddf57424d9ec1e7c49909ef5897171df4e63bb763861 + languageName: node + linkType: hard + +"@contentlayer/utils@npm:0.3.2": + version: 0.3.2 + resolution: "@contentlayer/utils@npm:0.3.2" + dependencies: + "@effect-ts/core": ^0.60.2 + "@effect-ts/otel": ^0.14.0 + "@effect-ts/otel-exporter-trace-otlp-grpc": ^0.14.0 + "@effect-ts/otel-sdk-trace-node": ^0.14.0 + "@js-temporal/polyfill": ^0.4.3 + "@opentelemetry/api": ^1.1.0 + "@opentelemetry/core": ^1.5.0 + "@opentelemetry/exporter-trace-otlp-grpc": ^0.31.0 + "@opentelemetry/resources": ^1.5.0 + "@opentelemetry/sdk-trace-base": ^1.5.0 + "@opentelemetry/sdk-trace-node": ^1.5.0 + "@opentelemetry/semantic-conventions": ^1.5.0 + chokidar: ^3.5.3 + hash-wasm: ^4.9.0 + inflection: ^2.0.1 + memfs: ^3.5.1 + oo-ascii-tree: ^1.80.0 + ts-pattern: ^4.2.2 + type-fest: ^3.7.1 + peerDependenciesMeta: + "@effect-ts/core": + optional: true + "@effect-ts/otel": + optional: true + "@effect-ts/otel-node": + optional: true + checksum: f129a831d145b6bb9e987a1deb873927dbb8aceaa101e02917a35e8cdef0b03e4ed88270c1f46d944c966fa4170f635bc178ebf5baf3ab16b1e8f8cdd171ff26 languageName: node linkType: hard @@ -1953,36 +1937,29 @@ __metadata: languageName: node linkType: hard -"@cush/relative@npm:^1.0.0": - version: 1.0.0 - resolution: "@cush/relative@npm:1.0.0" - checksum: 708681b61986e5f74e44ca5824503c23adb02c088b998429e8ecbbb8e7a4133b9be491cdb6d2b24b39fd9b55fcef109d41ac4f69b74f1f9466268f3c49c020a5 - languageName: node - linkType: hard - "@definitelytyped/header-parser@npm:latest": - version: 0.0.133 - resolution: "@definitelytyped/header-parser@npm:0.0.133" + version: 0.0.162 + resolution: "@definitelytyped/header-parser@npm:0.0.162" dependencies: - "@definitelytyped/typescript-versions": ^0.0.133 + "@definitelytyped/typescript-versions": ^0.0.162 "@types/parsimmon": ^1.10.1 parsimmon: ^1.13.0 - checksum: c8a3de0dd903d2ebd6e366e8a7b4dae42e8781809c784890e1ec961122a5457976a003de1ff23f873b705064db7a7793ae1e1b0d54cbc9c93eedc01f119a2bf6 + checksum: c7259e2a4567a78bddd98b3b83a98c0fa670c75e9a77ba1c3d5318952dc30db2e6dff32323b987c946bbaeda0850099e00737d2e106d90120090bdfb9b171d20 languageName: node linkType: hard -"@definitelytyped/typescript-versions@npm:^0.0.133, @definitelytyped/typescript-versions@npm:latest": - version: 0.0.133 - resolution: "@definitelytyped/typescript-versions@npm:0.0.133" - checksum: fa850848b782717afea4610446221553e4370b1cc2c31ca67b7d910fd90f3e0f5d0794da9a46cbd4187a234798c64af1a9378140f62121a256bd66255f49e2aa +"@definitelytyped/typescript-versions@npm:^0.0.162, @definitelytyped/typescript-versions@npm:latest": + version: 0.0.162 + resolution: "@definitelytyped/typescript-versions@npm:0.0.162" + checksum: c46a35baa5d3c927e7fe8d1fd8bb8da8b945236ac1f35c87dee47317772edb275cb0c0adf5fa8ba32f6aafaf324bb406bb2167ac4b2912eef0e79892c42c469f languageName: node linkType: hard "@definitelytyped/utils@npm:latest": - version: 0.0.133 - resolution: "@definitelytyped/utils@npm:0.0.133" + version: 0.0.162 + resolution: "@definitelytyped/utils@npm:0.0.162" dependencies: - "@definitelytyped/typescript-versions": ^0.0.133 + "@definitelytyped/typescript-versions": ^0.0.162 "@qiwi/npm-registry-client": ^8.9.1 "@types/node": ^14.14.35 charm: ^1.0.2 @@ -1990,7 +1967,7 @@ __metadata: fstream: ^1.0.12 tar: ^6.1.11 tar-stream: ^2.1.4 - checksum: 41abb9c74a130b14b447bbba70eeb9a50953179337338bcc656bac5ec1ad7276fae0d143ef4429a1f7cee2cb801e7bde3f398bf524e92543e0befba6a6d0791d + checksum: ef921679eae2385e376b35ec4b8184d322c63a3ae564fd1d8af3a8bd24488befd1bcdf753d0af6a4e62c3366882e6c10adf7d66d06049bcd4ea6929efb5c4877 languageName: node linkType: hard @@ -1999,17 +1976,21 @@ __metadata: resolution: "@discordjs/actions@workspace:packages/actions" dependencies: "@actions/core": ^1.10.0 - "@types/node": 16.11.68 - "@vitest/coverage-c8": ^0.24.3 + "@actions/glob": ^0.4.0 + "@planetscale/database": ^1.7.0 + "@types/node": 16.18.32 + "@vitest/coverage-c8": ^0.31.1 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - prettier: ^2.7.1 - tslib: ^2.4.0 - tsup: ^6.3.0 - typescript: ^4.8.4 - vitest: ^0.24.3 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + undici: ^5.22.1 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2017,16 +1998,17 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/api-extractor-utils@workspace:packages/api-extractor-utils" dependencies: - "@microsoft/api-extractor-model": 7.24.0 - "@microsoft/tsdoc": 0.14.1 - "@types/node": 16.11.68 + "@microsoft/api-extractor-model": 7.27.0 + "@microsoft/tsdoc": 0.14.2 + "@types/node": 16.18.32 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - prettier: ^2.7.1 - tsup: ^6.3.0 - typescript: ^4.8.4 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 languageName: unknown linkType: soft @@ -2034,21 +2016,22 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/brokers@workspace:packages/brokers" dependencies: - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 - "@msgpack/msgpack": ^2.8.0 - "@types/node": ^16.11.68 - "@vitest/coverage-c8": ^0.24.3 - "@vladfrangu/async_event_emitter": ^2.1.2 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@msgpack/msgpack": ^3.0.0-beta2 + "@types/node": 16.18.32 + "@vitest/coverage-c8": ^0.31.1 + "@vladfrangu/async_event_emitter": ^2.2.2 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - ioredis: ^5.2.3 - prettier: ^2.7.1 - tsup: ^6.3.0 - typescript: ^4.8.4 - vitest: ^0.24.3 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + ioredis: ^5.3.2 + prettier: ^2.8.8 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2056,25 +2039,28 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/builders@workspace:packages/builders" dependencies: + "@discordjs/formatters": "workspace:^" "@discordjs/util": "workspace:^" - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 - "@sapphire/shapeshift": ^3.7.0 - "@types/node": 16.11.68 - "@vitest/coverage-c8": ^0.24.3 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@sapphire/shapeshift": ^3.9.0 + "@types/node": 16.18.32 + "@vitest/coverage-c8": ^0.31.1 cross-env: ^7.0.3 - discord-api-types: ^0.37.15 - esbuild-plugin-version-injector: ^1.0.0 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 + discord-api-types: ^0.37.42 + downlevel-dts: ^0.11.0 + esbuild-plugin-version-injector: ^1.1.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 fast-deep-equal: ^3.1.3 - prettier: ^2.7.1 - ts-mixer: ^6.0.1 - tslib: ^2.4.0 - tsup: ^6.3.0 - typescript: ^4.8.4 - vitest: ^0.24.3 + prettier: ^2.8.8 + ts-mixer: ^6.0.3 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2082,19 +2068,47 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/collection@workspace:packages/collection" dependencies: - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 - "@types/node": 16.11.68 - "@vitest/coverage-c8": ^0.24.3 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@types/node": 16.18.32 + "@vitest/coverage-c8": ^0.31.1 cross-env: ^7.0.3 - esbuild-plugin-version-injector: ^1.0.0 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - prettier: ^2.7.1 - tsup: ^6.3.0 - typescript: ^4.8.4 - vitest: ^0.24.3 + esbuild-plugin-version-injector: ^1.1.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + vitest: ^0.31.1 + languageName: unknown + linkType: soft + +"@discordjs/core@workspace:^, @discordjs/core@workspace:packages/core": + version: 0.0.0-use.local + resolution: "@discordjs/core@workspace:packages/core" + dependencies: + "@discordjs/rest": "workspace:^" + "@discordjs/util": "workspace:^" + "@discordjs/ws": "workspace:^" + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@sapphire/snowflake": ^3.5.1 + "@types/node": 18.16.14 + "@vitest/coverage-c8": ^0.31.1 + "@vladfrangu/async_event_emitter": ^2.2.2 + cross-env: ^7.0.3 + discord-api-types: ^0.37.42 + esbuild-plugin-version-injector: ^1.1.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2102,19 +2116,20 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/discord.js@workspace:." dependencies: - "@commitlint/cli": ^17.1.2 - "@commitlint/config-angular": ^17.1.0 - "@favware/cliff-jumper": ^1.8.8 - "@favware/npm-deprecate": ^1.0.5 + "@commitlint/cli": ^17.6.3 + "@commitlint/config-angular": ^17.6.3 + "@favware/cliff-jumper": ^2.0.0 + "@favware/npm-deprecate": ^1.0.7 conventional-changelog-cli: ^2.2.2 - husky: ^8.0.1 + husky: ^8.0.3 is-ci: ^3.0.1 - lint-staged: ^13.0.3 - tsup: ^6.3.0 - turbo: ^1.5.6 - typescript: ^4.8.4 - unocss: ^0.45.30 - vitest: ^0.24.3 + lint-staged: ^13.2.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + unocss: ^0.52.3 + vercel: ^29.4.0 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2122,75 +2137,127 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/docgen@workspace:packages/docgen" dependencies: - "@favware/cliff-jumper": ^1.8.8 + "@favware/cliff-jumper": ^2.0.0 "@types/jsdoc-to-markdown": ^7.0.3 - "@types/node": 16.11.68 - commander: ^9.4.1 + "@types/node": 16.18.32 + commander: ^10.0.1 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - jsdoc-to-markdown: ^7.1.1 - prettier: ^2.7.1 - tslib: ^2.4.0 - tsup: ^6.3.0 - typedoc: ^0.23.17 - typescript: ^4.8.4 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + jsdoc-to-markdown: ^8.0.0 + prettier: ^2.8.8 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typedoc: ^0.24.7 + typescript: ^5.0.4 bin: docgen: ./dist/cli.js languageName: unknown linkType: soft +"@discordjs/formatters@workspace:^, @discordjs/formatters@workspace:packages/formatters": + version: 0.0.0-use.local + resolution: "@discordjs/formatters@workspace:packages/formatters" + dependencies: + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@types/node": 16.18.32 + "@vitest/coverage-c8": ^0.31.1 + cross-env: ^7.0.3 + discord-api-types: ^0.37.42 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + vitest: ^0.31.1 + languageName: unknown + linkType: soft + "@discordjs/guide@workspace:apps/guide": version: 0.0.0-use.local resolution: "@discordjs/guide@workspace:apps/guide" dependencies: - "@astrojs/image": ^0.10.0 - "@astrojs/mdx": ^0.11.4 - "@astrojs/prefetch": ^0.1.0 - "@astrojs/react": ^1.2.1 - "@code-hike/mdx": ^0.7.4 + "@code-hike/mdx": ^0.8.3 "@discordjs/ui": "workspace:^" - "@testing-library/react": ^13.4.0 + "@next/bundle-analyzer": ^13.4.3 + "@react-icons/all-files": ^4.1.0 + "@testing-library/react": ^14.0.0 "@testing-library/user-event": ^14.4.3 - "@types/node": 16.11.68 - "@types/react": ^17.0.50 - "@types/react-dom": ^17.0.17 - "@types/react-syntax-highlighter": ^15.5.5 - "@unocss/cli": ^0.45.30 - "@unocss/reset": ^0.45.30 - "@vitejs/plugin-react": ^2.1.0 - "@vitest/coverage-c8": ^0.24.3 - ariakit: ^2.0.0-next.41 - astro: ^1.5.2 - astro-compress: ^1.0.12 - astro-critters: ^1.0.5 - cmdk: ^0.1.20 + "@types/html-escaper": ^3.0.0 + "@types/node": 18.16.14 + "@types/react": ^18.2.6 + "@types/react-dom": ^18.2.4 + "@unocss/cli": ^0.52.3 + "@unocss/eslint-config": ^0.52.3 + "@unocss/reset": ^0.52.3 + "@vercel/analytics": ^1.0.1 + "@vercel/edge-config": ^0.1.11 + "@vercel/og": ^0.5.4 + "@vitejs/plugin-react": ^4.0.0 + "@vitest/coverage-c8": ^0.31.1 + ariakit: ^2.0.0-next.44 + cmdk: ^0.2.0 + concurrently: ^8.0.1 + contentlayer: ^0.3.2 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - happy-dom: ^7.6.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + happy-dom: ^9.20.1 hast-util-to-string: ^2.0.0 - hastscript: ^7.1.0 + hastscript: ^7.2.0 html-escaper: ^3.0.3 - meilisearch: ^0.28.0 - prettier: ^2.7.1 - prettier-plugin-astro: ^0.6.0 - prettier-plugin-tailwindcss: ^0.1.13 - react: ^17.0.2 + lighthouse: ^10.2.0 + next: ^13.4.3 + next-contentlayer: ^0.3.2 + next-themes: ^0.2.1 + prettier: ^2.8.8 + react: ^18.2.0 react-custom-scrollbars-2: ^4.5.0 - react-dom: ^17.0.2 - react-icons: ^4.6.0 - react-use: ^17.4.0 + react-dom: ^18.2.0 rehype-autolink-headings: ^6.1.1 - rehype-slug: ^5.0.1 - sharp: ^0.31.1 - shiki: ^0.11.1 - typescript: ^4.8.4 - unocss: ^0.45.30 - vercel: ^28.4.12 - vitest: ^0.24.3 + rehype-slug: ^5.1.0 + remark-gfm: ^3.0.1 + sharp: ^0.32.1 + turbo: ^1.9.8 + typescript: ^5.0.4 + unocss: ^0.52.3 + vercel: ^29.4.0 + vitest: ^0.31.1 + languageName: unknown + linkType: soft + +"@discordjs/next@workspace:packages/next": + version: 0.0.0-use.local + resolution: "@discordjs/next@workspace:packages/next" + dependencies: + "@discordjs/builders": "workspace:^" + "@discordjs/collection": "workspace:^" + "@discordjs/core": "workspace:^" + "@discordjs/formatters": "workspace:^" + "@discordjs/rest": "workspace:^" + "@discordjs/util": "workspace:^" + "@discordjs/ws": "workspace:^" + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@types/node": 18.16.14 + "@vitest/coverage-c8": ^0.31.1 + cross-env: ^7.0.3 + discord-api-types: ^0.37.42 + esbuild-plugin-version-injector: ^1.1.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2198,70 +2265,73 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/proxy-container@workspace:packages/proxy-container" dependencies: - "@discordjs/proxy": ^1.2.0 - "@discordjs/rest": ^1.3.0 - "@types/node": 16.11.68 + "@discordjs/proxy": "workspace:^" + "@discordjs/rest": "workspace:^" + "@types/node": 18.16.14 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - prettier: ^2.7.1 - tslib: ^2.4.0 - tsup: ^6.3.0 - typescript: ^4.8.4 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 languageName: unknown linkType: soft -"@discordjs/proxy@^1.2.0, @discordjs/proxy@workspace:packages/proxy": +"@discordjs/proxy@workspace:^, @discordjs/proxy@workspace:packages/proxy": version: 0.0.0-use.local resolution: "@discordjs/proxy@workspace:packages/proxy" dependencies: - "@discordjs/rest": ^1.0.0 + "@discordjs/rest": "workspace:^" "@discordjs/util": "workspace:^" - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 - "@types/node": 16.11.68 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@types/node": 18.16.14 "@types/supertest": ^2.0.12 - "@vitest/coverage-c8": ^0.24.3 + "@vitest/coverage-c8": ^0.31.1 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - prettier: ^2.7.1 - supertest: ^6.3.0 - tslib: ^2.4.0 - tsup: ^6.3.0 - typescript: ^4.8.4 - undici: ^5.11.0 - vitest: ^0.24.3 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + supertest: ^6.3.3 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + undici: ^5.22.1 + vitest: ^0.31.1 languageName: unknown linkType: soft -"@discordjs/rest@^1.0.0, @discordjs/rest@^1.3.0, @discordjs/rest@workspace:^, @discordjs/rest@workspace:packages/rest": +"@discordjs/rest@workspace:^, @discordjs/rest@workspace:packages/rest": version: 0.0.0-use.local resolution: "@discordjs/rest@workspace:packages/rest" dependencies: "@discordjs/collection": "workspace:^" "@discordjs/util": "workspace:^" - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 "@sapphire/async-queue": ^1.5.0 - "@sapphire/snowflake": ^3.2.2 - "@types/node": 16.11.68 - "@vitest/coverage-c8": ^0.24.3 + "@sapphire/snowflake": ^3.5.1 + "@types/node": 18.16.14 + "@vitest/coverage-c8": ^0.31.1 cross-env: ^7.0.3 - discord-api-types: ^0.37.15 - esbuild-plugin-version-injector: ^1.0.0 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - file-type: ^18.0.0 - prettier: ^2.7.1 - tslib: ^2.4.0 - tsup: ^6.3.0 - typescript: ^4.8.4 - undici: ^5.11.0 - vitest: ^0.24.3 + discord-api-types: ^0.37.42 + esbuild-plugin-version-injector: ^1.1.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + file-type: ^18.4.0 + prettier: ^2.8.8 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + undici: ^5.22.1 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2270,25 +2340,26 @@ __metadata: resolution: "@discordjs/scripts@workspace:packages/scripts" dependencies: "@discordjs/api-extractor-utils": "workspace:^" - "@microsoft/api-extractor-model": 7.24.0 - "@microsoft/tsdoc": 0.14.1 - "@microsoft/tsdoc-config": 0.16.1 - "@types/fs-extra": ^9.0.13 - "@types/node": 16.11.68 - "@vitest/coverage-c8": ^0.24.3 - commander: ^9.4.1 + "@microsoft/api-extractor-model": 7.27.0 + "@microsoft/tsdoc": 0.14.2 + "@microsoft/tsdoc-config": 0.16.2 + "@types/fs-extra": ^11.0.1 + "@types/node": 16.18.32 + "@vitest/coverage-c8": ^0.31.1 + commander: ^10.0.1 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - fs-extra: ^10.1.0 - prettier: ^2.7.1 - tslib: ^2.4.0 - tsup: ^6.3.0 - typescript: ^4.8.4 - undici: ^5.11.0 - vitest: ^0.24.3 - yaml: ^2.1.3 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + fs-extra: ^11.1.1 + prettier: ^2.8.8 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + undici: ^5.22.1 + vitest: ^0.31.1 + yaml: 2.3.0 languageName: unknown linkType: soft @@ -2296,28 +2367,41 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/ui@workspace:packages/ui" dependencies: - "@favware/cliff-jumper": ^1.8.8 - "@ladle/react": ^2.4.5 - "@types/node": 16.11.68 - "@types/react": ^18.0.21 - "@types/react-dom": ^18.0.6 - "@unocss/reset": ^0.45.30 - "@vitejs/plugin-react": ^2.1.0 - "@vitest/coverage-c8": ^0.24.3 - ariakit: ^2.0.0-next.41 + "@favware/cliff-jumper": ^2.0.0 + "@react-icons/all-files": ^4.1.0 + "@storybook/addon-essentials": ^7.0.15 + "@storybook/addon-interactions": ^7.0.15 + "@storybook/addon-links": ^7.0.15 + "@storybook/addon-styling": ^1.0.8 + "@storybook/blocks": ^7.0.15 + "@storybook/react": ^7.0.15 + "@storybook/react-vite": ^7.0.15 + "@storybook/testing-library": ^0.1.0 + "@types/node": 16.18.32 + "@types/react": ^18.2.6 + "@types/react-dom": ^18.2.4 + "@unocss/eslint-config": ^0.52.3 + "@unocss/reset": ^0.52.3 + "@vitejs/plugin-react": ^4.0.0 + "@vitest/coverage-c8": ^0.31.1 + ariakit: ^2.0.0-next.44 + chromatic: ^6.17.4 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - prettier: ^2.7.1 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + eslint-plugin-storybook: ^0.6.12 + prettier: ^2.8.8 + prop-types: ^15.8.1 react: ^18.2.0 react-dom: ^18.2.0 - react-icons: ^4.6.0 - typescript: ^4.8.4 - unocss: ^0.45.30 - vite: ^3.1.8 - vite-plugin-dts: ^1.6.6 - vitest: ^0.24.3 + storybook: ^7.0.15 + turbo: ^1.9.8 + typescript: ^5.0.4 + unocss: ^0.52.3 + vite: ^4.3.9 + vite-plugin-dts: ^2.3.0 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2325,19 +2409,20 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/util@workspace:packages/util" dependencies: - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 - "@types/node": 16.11.68 - "@vitest/coverage-c8": ^0.24.3 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@types/node": 16.18.32 + "@vitest/coverage-c8": ^0.31.1 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - prettier: ^2.7.1 - tsd: ^0.24.1 - tsup: ^6.3.0 - typescript: ^4.8.4 - vitest: ^0.24.3 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tsd: ^0.28.1 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + vitest: ^0.31.1 languageName: unknown linkType: soft @@ -2345,30 +2430,31 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/voice@workspace:packages/voice" dependencies: - "@babel/core": ^7.19.3 - "@babel/preset-env": ^7.19.4 - "@babel/preset-typescript": ^7.18.6 - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 - "@types/jest": ^29.2.0 - "@types/node": 16.11.68 - "@types/ws": ^8.5.3 + "@babel/core": ^7.21.8 + "@babel/preset-env": ^7.21.5 + "@babel/preset-typescript": ^7.21.5 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@types/jest": ^29.5.1 + "@types/node": 16.18.32 + "@types/ws": ^8.5.4 cross-env: ^7.0.3 - discord-api-types: ^0.37.15 - esbuild-plugin-version-injector: ^1.0.0 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - jest: ^29.2.1 + discord-api-types: ^0.37.42 + esbuild-plugin-version-injector: ^1.1.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + jest: ^29.5.0 jest-websocket-mock: ^2.4.0 - mock-socket: ^9.1.5 - prettier: ^2.7.1 - prism-media: ^1.3.4 - tslib: ^2.4.0 - tsup: ^6.3.0 + mock-socket: ^9.2.1 + prettier: ^2.8.8 + prism-media: ^1.3.5 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 tweetnacl: ^1.0.3 - typescript: ^4.8.4 - ws: ^8.9.0 + typescript: ^5.0.4 + ws: ^8.13.0 languageName: unknown linkType: soft @@ -2379,1544 +2465,3568 @@ __metadata: "@discordjs/api-extractor-utils": "workspace:^" "@discordjs/scripts": "workspace:^" "@discordjs/ui": "workspace:^" - "@microsoft/api-extractor-model": 7.24.0 - "@microsoft/tsdoc": 0.14.1 - "@testing-library/react": ^13.4.0 + "@microsoft/api-extractor-model": 7.27.0 + "@microsoft/tsdoc": 0.14.2 + "@next/bundle-analyzer": ^13.4.3 + "@planetscale/database": 1.7.0 + "@react-icons/all-files": ^4.1.0 + "@testing-library/react": ^14.0.0 "@testing-library/user-event": ^14.4.3 - "@types/node": 16.11.68 - "@types/react": ^18.0.21 - "@types/react-dom": ^18.0.6 - "@types/react-syntax-highlighter": ^15.5.5 - "@unocss/cli": ^0.45.30 - "@unocss/reset": ^0.45.30 - "@vercel/og": ^0.0.19 - "@vitejs/plugin-react": ^2.1.0 - "@vitest/coverage-c8": ^0.24.3 - "@vscode/codicons": ^0.0.32 - ariakit: ^2.0.0-next.41 - cmdk: ^0.1.20 - concurrently: ^7.4.0 + "@types/node": 18.16.14 + "@types/react": ^18.2.6 + "@types/react-dom": ^18.2.4 + "@unocss/cli": ^0.52.3 + "@unocss/eslint-config": ^0.52.3 + "@unocss/reset": ^0.52.3 + "@vercel/analytics": ^1.0.1 + "@vercel/edge-config": ^0.1.11 + "@vercel/og": ^0.5.4 + "@vitejs/plugin-react": ^4.0.0 + "@vitest/coverage-c8": ^0.31.1 + ariakit: ^2.0.0-next.44 + bright: ^0.8.2 + class-variance-authority: ^0.6.0 + cmdk: ^0.2.0 + concurrently: ^8.0.1 + cpy-cli: ^4.2.0 cross-env: ^7.0.3 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - happy-dom: ^7.6.0 - meilisearch: ^0.28.0 - next: ^12.3.1 - next-mdx-remote: ^4.1.0 - next-progress: ^2.2.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + happy-dom: ^9.20.1 + lighthouse: ^10.2.0 + meilisearch: ^0.32.4 + next: ^13.4.3 + next-mdx-remote: ^4.4.1 next-themes: ^0.2.1 - prettier: ^2.7.1 - prettier-plugin-tailwindcss: ^0.1.13 + prettier: ^2.8.8 react: ^18.2.0 react-custom-scrollbars-2: ^4.5.0 react-dom: ^18.2.0 - react-icons: ^4.6.0 - react-syntax-highlighter: ^15.5.0 react-use: ^17.4.0 - rehype-ignore: ^1.0.1 - rehype-pretty-code: ^0.4.0 rehype-raw: ^6.1.1 - rehype-slug: ^5.0.1 + rehype-slug: ^5.1.0 remark-gfm: ^3.0.1 - sharp: ^0.31.1 - shiki: ^0.11.1 - swr: ^1.3.0 - typescript: ^4.8.4 - unocss: ^0.45.30 - vercel: ^28.4.12 - vitest: ^0.24.3 + sharp: ^0.32.1 + swr: ^2.1.5 + turbo: ^1.9.8 + typescript: ^5.0.4 + vercel: ^29.4.0 + vitest: ^0.31.1 languageName: unknown linkType: soft -"@discordjs/ws@workspace:packages/ws": +"@discordjs/ws@workspace:^, @discordjs/ws@workspace:packages/ws": version: 0.0.0-use.local resolution: "@discordjs/ws@workspace:packages/ws" dependencies: "@discordjs/collection": "workspace:^" "@discordjs/rest": "workspace:^" "@discordjs/util": "workspace:^" - "@favware/cliff-jumper": ^1.8.8 - "@microsoft/api-extractor": ^7.33.4 + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 "@sapphire/async-queue": ^1.5.0 - "@types/node": 16.11.68 - "@types/ws": ^8.5.3 - "@vitest/coverage-c8": ^0.24.3 - "@vladfrangu/async_event_emitter": ^2.1.2 + "@types/node": 18.16.14 + "@types/ws": ^8.5.4 + "@vitest/coverage-c8": ^0.31.1 + "@vladfrangu/async_event_emitter": ^2.2.2 cross-env: ^7.0.3 - discord-api-types: ^0.37.15 - esbuild-plugin-version-injector: ^1.0.0 - eslint: ^8.25.0 - eslint-config-neon: ^0.1.39 - eslint-formatter-pretty: ^4.1.0 - mock-socket: ^9.1.5 - prettier: ^2.7.1 - tslib: ^2.4.0 - tsup: ^6.3.0 - typescript: ^4.8.4 - undici: ^5.11.0 - vitest: ^0.24.3 - ws: ^8.9.0 - zlib-sync: ^0.1.7 + discord-api-types: ^0.37.42 + esbuild-plugin-version-injector: ^1.1.0 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + mock-socket: ^9.2.1 + prettier: ^2.8.8 + tslib: ^2.5.2 + tsup: ^6.7.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + undici: ^5.22.1 + vitest: ^0.31.1 + ws: ^8.13.0 + zlib-sync: ^0.1.8 languageName: unknown linkType: soft -"@edge-runtime/format@npm:1.1.0-beta.34": - version: 1.1.0-beta.34 - resolution: "@edge-runtime/format@npm:1.1.0-beta.34" - checksum: 009bbd53d2772505c680db734e6f1cfbbd3caaa1394f064c1c942c7348dbb56e7682472931f6f07912edc943e60e834ad56811fcf83f1e2c8751d5ebf9202c4a +"@discoveryjs/json-ext@npm:^0.5.3, @discoveryjs/json-ext@npm:^0.5.7": + version: 0.5.7 + resolution: "@discoveryjs/json-ext@npm:0.5.7" + checksum: 2176d301cc258ea5c2324402997cf8134ebb212469c0d397591636cea8d3c02f2b3cf9fd58dcb748c7a0dade77ebdc1b10284fa63e608c033a1db52fddc69918 + languageName: node + linkType: hard + +"@edge-runtime/format@npm:2.0.1": + version: 2.0.1 + resolution: "@edge-runtime/format@npm:2.0.1" + checksum: 785423504eb48e5dca8a7d679229decfa15b1db1b7ed29d4ed1c9b9cd8bbebbaccd5996987e3860cb74757d5179b8a76241efa8f713a8823e97285baea996034 + languageName: node + linkType: hard + +"@edge-runtime/primitives@npm:2.0.0": + version: 2.0.0 + resolution: "@edge-runtime/primitives@npm:2.0.0" + checksum: f383faab52bafb3fe3f8f24bd6b963f2fd173ae8e76724b9a0b66653f76f14d936efadbaf520c0983a8354a59e7b85241650a24ae230b8aa135ba8d1cd7f5c06 languageName: node linkType: hard -"@edge-runtime/primitives@npm:1.1.0-beta.37": - version: 1.1.0-beta.37 - resolution: "@edge-runtime/primitives@npm:1.1.0-beta.37" - checksum: 2d9766eb88de103f6ab7f75db318892cd20304f00b5f7c93ee12c016e2655b8aa6fb9e2eb4982b1dc7579096765d7d65ae09d7a10680e918c3a8f442ff8c28a9 +"@edge-runtime/primitives@npm:2.1.2": + version: 2.1.2 + resolution: "@edge-runtime/primitives@npm:2.1.2" + checksum: 23863c517ef9dd9a8ff8fbaa739833ab417b80f2e4e8b3cb1723fd6b52e038ad22209a9744e53d066c1ad7ebeea5a00c7c6cee03c6f248bc351d0e4bde4bc96f languageName: node linkType: hard -"@edge-runtime/vm@npm:1.1.0-beta.37": - version: 1.1.0-beta.37 - resolution: "@edge-runtime/vm@npm:1.1.0-beta.37" +"@edge-runtime/vm@npm:2.0.0": + version: 2.0.0 + resolution: "@edge-runtime/vm@npm:2.0.0" dependencies: - "@edge-runtime/primitives": 1.1.0-beta.37 - checksum: 05419ebd835c37ee7bf0d892106fc10e258c411ad9a62d2a6fe43da5bbf3b4957df2f1ce14cd6493249c89c186707aa7ed30329a34c1d28228a74cfc59efabaa + "@edge-runtime/primitives": 2.0.0 + checksum: fee554b8fbc6887a4a23a4c65b947fc7a5c7901c2b12d5b211d80cd210e3885168985513ea278488afd0e107c470a6e8f535e010e3fc7903bc5f306a3c8094f7 languageName: node linkType: hard -"@emmetio/abbreviation@npm:^2.2.3": - version: 2.2.3 - resolution: "@emmetio/abbreviation@npm:2.2.3" +"@edge-runtime/vm@npm:2.1.2": + version: 2.1.2 + resolution: "@edge-runtime/vm@npm:2.1.2" dependencies: - "@emmetio/scanner": ^1.0.0 - checksum: 8637ff0c2afeb7a4498bf628510a8332f3ec70474a445131125d8049dfa1b917c18210829c12e1c9044fec5d13cfb9bb498b0af670e8d4905e6dd88e215bd135 + "@edge-runtime/primitives": 2.1.2 + checksum: f0f8a7488db4ccf562d6d80500c6aa19f704314f811047b224afd9d37338e63744b17f2334d8aa5f302a5d15cd1c708a2fc9aee318b8320500aaaf4a0a39b1e7 languageName: node linkType: hard -"@emmetio/css-abbreviation@npm:^2.1.4": - version: 2.1.4 - resolution: "@emmetio/css-abbreviation@npm:2.1.4" +"@effect-ts/core@npm:^0.60.2": + version: 0.60.5 + resolution: "@effect-ts/core@npm:0.60.5" dependencies: - "@emmetio/scanner": ^1.0.0 - checksum: ede72dafc412180ced63046c648bee6e8b7a5511622ed3192f7f11d813e119fd5e71cd60b95ed6a07d2c9809d6567d8c6fb6c36a4e8dbbcca9bd19df92192eba + "@effect-ts/system": ^0.57.5 + checksum: c1236ce2f261a4547379061c80eb55ca476d3638289b2d2b54fb491aabe2ad9e325e1774c948f34572d9bceb07c0e74f1be2d69b060673c0b1df44f149dae164 languageName: node linkType: hard -"@emmetio/scanner@npm:^1.0.0": - version: 1.0.0 - resolution: "@emmetio/scanner@npm:1.0.0" - checksum: 4e4366bf0b56de0a53de361a125dd88b9f652ffea2961a4035fe6acc46670ef483ce86a5e5b66124562a27322099170c3cbfed524b2d07ad048a84e304ab70bd +"@effect-ts/otel-exporter-trace-otlp-grpc@npm:^0.14.0": + version: 0.14.1 + resolution: "@effect-ts/otel-exporter-trace-otlp-grpc@npm:0.14.1" + dependencies: + "@effect-ts/otel": ^0.14.1 + peerDependencies: + "@effect-ts/core": ^0.60.2 + "@opentelemetry/api": ^1.1.0 + "@opentelemetry/core": ^1.5.0 + "@opentelemetry/exporter-trace-otlp-grpc": ^0.31.0 + "@opentelemetry/sdk-trace-base": ^1.5.0 + checksum: 76257d24657ba771a1adeaec3d78b73eb5d09c875f50c805c72799aae437e3dec2c4b64ddddff5a851b0cb9a3d64643b977e64284bcd0a00dcf58400bdfe9ac7 languageName: node linkType: hard -"@es-joy/jsdoccomment@npm:~0.33.0": - version: 0.33.0 - resolution: "@es-joy/jsdoccomment@npm:0.33.0" +"@effect-ts/otel-sdk-trace-node@npm:^0.14.0": + version: 0.14.1 + resolution: "@effect-ts/otel-sdk-trace-node@npm:0.14.1" dependencies: - comment-parser: 1.3.1 - esquery: ^1.4.0 - jsdoc-type-pratt-parser: ~3.1.0 - checksum: fe91f9d236fbae44b752b65d95fc6174f89f9b90b9a4cc270247f1f64ed1fe50b438f01303738677ee8c18e5746266bd65e3cba68708bf8190d503039e417f45 + "@effect-ts/otel": ^0.14.1 + peerDependencies: + "@effect-ts/core": ^0.60.2 + "@opentelemetry/api": ^1.1.0 + "@opentelemetry/core": ^1.5.0 + "@opentelemetry/sdk-trace-base": ^1.5.0 + "@opentelemetry/sdk-trace-node": ^1.5.0 + checksum: 9ae114ae15d5503a8219314e8228fb4094aee9dc7933259308cefbd16f44d60b490ec99b247049ba2b1f960f772d94b996ee6c64eb79e9a03f538f8c0d64945b languageName: node linkType: hard -"@esbuild/android-arm@npm:0.15.10": - version: 0.15.10 - resolution: "@esbuild/android-arm@npm:0.15.10" - conditions: os=android & cpu=arm +"@effect-ts/otel@npm:^0.14.0, @effect-ts/otel@npm:^0.14.1": + version: 0.14.1 + resolution: "@effect-ts/otel@npm:0.14.1" + peerDependencies: + "@effect-ts/core": ^0.60.2 + "@opentelemetry/api": ^1.1.0 + "@opentelemetry/core": ^1.5.0 + "@opentelemetry/sdk-trace-base": ^1.5.0 + checksum: c39f352f6e4bb7bfe6edf9228d53e2e81e645843fd62c2e961620efab2cb92fead3d2efb228e1b93b6454e4739d74227bf8e3561731b9ee2f1640e09f824c818 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.14.54": - version: 0.14.54 - resolution: "@esbuild/linux-loong64@npm:0.14.54" - conditions: os=linux & cpu=loong64 +"@effect-ts/system@npm:^0.57.5": + version: 0.57.5 + resolution: "@effect-ts/system@npm:0.57.5" + checksum: f24c304e076d82bcbf375c977fb678353bb7b37b22ba36e77f47db31532377e1d670391b03fb2c29b518ed91f4c996f34d45fab501921d7b11c05e6de69fa2ec languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.15.10": - version: 0.15.10 - resolution: "@esbuild/linux-loong64@npm:0.15.10" - conditions: os=linux & cpu=loong64 +"@emotion/hash@npm:^0.9.0": + version: 0.9.1 + resolution: "@emotion/hash@npm:0.9.1" + checksum: 716e17e48bf9047bf9383982c071de49f2615310fb4e986738931776f5a823bc1f29c84501abe0d3df91a3803c80122d24e28b57351bca9e01356ebb33d89876 languageName: node linkType: hard -"@eslint/eslintrc@npm:^1.3.3": - version: 1.3.3 - resolution: "@eslint/eslintrc@npm:1.3.3" - dependencies: - ajv: ^6.12.4 - debug: ^4.3.2 - espree: ^9.4.0 - globals: ^13.15.0 - ignore: ^5.2.0 - import-fresh: ^3.2.1 - js-yaml: ^4.1.0 - minimatch: ^3.1.2 - strip-json-comments: ^3.1.1 - checksum: f03e9d6727efd3e0719da2051ea80c0c73d20e28c171121527dbb868cd34232ca9c1d0525a66e517a404afea26624b1e47895b6a92474678418c2f50c9566694 +"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.0": + version: 1.0.1 + resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" + peerDependencies: + react: ">=16.8.0" + checksum: 700b6e5bbb37a9231f203bb3af11295eed01d73b2293abece0bc2a2237015e944d7b5114d4887ad9a79776504aa51ed2a8b0ddbc117c54495dd01a6b22f93786 languageName: node linkType: hard -"@favware/cliff-jumper@npm:^1.8.8": - version: 1.8.8 - resolution: "@favware/cliff-jumper@npm:1.8.8" +"@es-joy/jsdoccomment@npm:~0.38.0": + version: 0.38.0 + resolution: "@es-joy/jsdoccomment@npm:0.38.0" dependencies: - "@sapphire/result": ^2.5.0 - "@sapphire/utilities": ^3.9.3 - colorette: ^2.0.19 - commander: ^9.4.1 - conventional-changelog-angular: ^5.0.13 - conventional-recommended-bump: ^6.1.0 - js-yaml: ^4.1.0 - semver: ^7.3.7 - typescript: ^4.8.4 - bin: - cj: ./dist/cli.js - cliff-jumper: ./dist/cli.js - checksum: 1e82daac8d975b7835b7326db794502d0aebd4f141dd18fdf5ccb80d4e2566050272bf2be5d82d918ea81a2a5a0245c71cb6738f366142e4da8d95403c08ab3e + comment-parser: 1.3.1 + esquery: ^1.5.0 + jsdoc-type-pratt-parser: ~4.0.0 + checksum: 5219603e7144ac4fa14422bd3e3f50d82ff40848344808bc1db30c8ff479265bbb9e10b995fcfb313c7dbbedc1031a35ce481b3cd233913bdc12ff6ac0251a96 languageName: node linkType: hard -"@favware/npm-deprecate@npm:^1.0.5": - version: 1.0.5 - resolution: "@favware/npm-deprecate@npm:1.0.5" +"@esbuild-plugins/node-resolve@npm:^0.1.4": + version: 0.1.4 + resolution: "@esbuild-plugins/node-resolve@npm:0.1.4" dependencies: - "@sapphire/fetch": ^2.4.1 - "@sapphire/utilities": ^3.8.0 - colorette: ^2.0.19 - commander: ^9.4.0 - js-yaml: ^4.1.0 - micromatch: ^4.0.5 - npm-package-arg: ^9.1.0 - npm-registry-fetch: ^13.3.0 - bin: - nd: dist/cli.js - npm-deprecate: dist/cli.js - checksum: 6ea6ab42cad38d9ab19bf33a71b0a0056c10edcce23f1cde98c91d1bb39723d996a6ce6203805dd828cc42dffd4d4cd1d9ef0dc1446795ae1df95e2be0a9c640 + "@types/resolve": ^1.17.1 + debug: ^4.3.1 + escape-string-regexp: ^4.0.0 + resolve: ^1.19.0 + peerDependencies: + esbuild: "*" + checksum: eba359dd17b4b98b89400c96560f53a6724e8a4cc6fc65facd51d4eb4d2513cdf4f89f352ca8976d9ac0f1aac4e2c3b2bd5d2bd6aa08ea5a298528b4f18496e7 languageName: node linkType: hard -"@floating-ui/core@npm:^1.0.1": - version: 1.0.1 - resolution: "@floating-ui/core@npm:1.0.1" - checksum: c8a5f1a491788e5bebfe747e9372df2c7cbee0d8790ddf95e25149ac91ccf1a2cca8f768029826cfd3d687617c1d0f3241b97f1648bdf2a28d421f39e79c2eee +"@esbuild/android-arm64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/android-arm64@npm:0.17.19" + conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@floating-ui/dom@npm:^1.0.0": - version: 1.0.2 - resolution: "@floating-ui/dom@npm:1.0.2" - dependencies: - "@floating-ui/core": ^1.0.1 - checksum: 4494db572d953f1f0544b91e6c16c63eae890c96befc5a60528e01b8e93182458ac4aec08873d6544c18353fb90d46b1ff4e19407bc48ea8f27a1bce372e48e5 +"@esbuild/android-arm64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/android-arm64@npm:0.17.6" + conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@gar/promisify@npm:^1.1.3": - version: 1.1.3 - resolution: "@gar/promisify@npm:1.1.3" - checksum: 4059f790e2d07bf3c3ff3e0fec0daa8144fe35c1f6e0111c9921bd32106adaa97a4ab096ad7dab1e28ee6a9060083c4d1a4ada42a7f5f3f7a96b8812e2b757c1 +"@esbuild/android-arm@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/android-arm@npm:0.17.19" + conditions: os=android & cpu=arm languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.10.5": - version: 0.10.7 - resolution: "@humanwhocodes/config-array@npm:0.10.7" - dependencies: - "@humanwhocodes/object-schema": ^1.2.1 - debug: ^4.1.1 - minimatch: ^3.0.4 - checksum: 009d64be8d5bd098ff04e10af79e34f5633245250581fca032fac12a8667b2df8e7d169e69c05bff4d83ea3dd3c7d2d0e05ea9b94d89a7d092e26530caf6f8a3 +"@esbuild/android-arm@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/android-arm@npm:0.17.6" + conditions: os=android & cpu=arm languageName: node linkType: hard -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 0fd22007db8034a2cdf2c764b140d37d9020bbfce8a49d3ec5c05290e77d4b0263b1b972b752df8c89e5eaa94073408f2b7d977aed131faf6cf396ebb5d7fb61 +"@esbuild/android-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/android-x64@npm:0.17.19" + conditions: os=android & cpu=x64 languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^1.2.1": - version: 1.2.1 - resolution: "@humanwhocodes/object-schema@npm:1.2.1" - checksum: a824a1ec31591231e4bad5787641f59e9633827d0a2eaae131a288d33c9ef0290bd16fda8da6f7c0fcb014147865d12118df10db57f27f41e20da92369fcb3f1 +"@esbuild/android-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/android-x64@npm:0.17.6" + conditions: os=android & cpu=x64 languageName: node linkType: hard -"@hutson/parse-repository-url@npm:^3.0.0": - version: 3.0.2 - resolution: "@hutson/parse-repository-url@npm:3.0.2" - checksum: 39992c5f183c5ca3d761d6ed9dfabcb79b5f3750bf1b7f3532e1dc439ca370138bbd426ee250fdaba460bc948e6761fbefd484b8f4f36885d71ded96138340d1 +"@esbuild/darwin-arm64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/darwin-arm64@npm:0.17.19" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@iconify/types@npm:^2.0.0": - version: 2.0.0 - resolution: "@iconify/types@npm:2.0.0" - checksum: 029f58542c160e9d4a746869cf2e475b603424d3adf3994c5cc8d0406c47e6e04a3b898b2707840c1c5b9bd5563a1660a34b110d89fce43923baca5222f4e597 +"@esbuild/darwin-arm64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/darwin-arm64@npm:0.17.6" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@iconify/utils@npm:^2.0.1": - version: 2.0.1 - resolution: "@iconify/utils@npm:2.0.1" - dependencies: - "@antfu/install-pkg": ^0.1.0 - "@antfu/utils": ^0.5.2 - "@iconify/types": ^2.0.0 - debug: ^4.3.4 - kolorist: ^1.5.1 - local-pkg: ^0.4.2 - checksum: eeff65b99a45b5ed5920c7a471ab3ab55a1d42e25ebc67635a1307439efd10daa6a76b5b4712446280fbfb8a12411ea846fea921e96f862a5b166479c496629b +"@esbuild/darwin-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/darwin-x64@npm:0.17.19" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@ioredis/commands@npm:^1.1.1": - version: 1.2.0 - resolution: "@ioredis/commands@npm:1.2.0" - checksum: 9b20225ba36ef3e5caf69b3c0720597c3016cc9b1e157f519ea388f621dd9037177f84cfe7e25c4c32dad7dd90c70ff9123cd411f747e053cf292193c9c461e2 +"@esbuild/darwin-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/darwin-x64@npm:0.17.6" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@istanbuljs/load-nyc-config@npm:^1.0.0": - version: 1.1.0 - resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" - dependencies: - camelcase: ^5.3.1 - find-up: ^4.1.0 - get-package-type: ^0.1.0 - js-yaml: ^3.13.1 - resolve-from: ^5.0.0 - checksum: d578da5e2e804d5c93228450a1380e1a3c691de4953acc162f387b717258512a3e07b83510a936d9fab03eac90817473917e24f5d16297af3867f59328d58568 +"@esbuild/freebsd-arm64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/freebsd-arm64@npm:0.17.19" + conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@istanbuljs/schema@npm:^0.1.2, @istanbuljs/schema@npm:^0.1.3": - version: 0.1.3 - resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 5282759d961d61350f33d9118d16bcaed914ebf8061a52f4fa474b2cb08720c9c81d165e13b82f2e5a8a212cc5af482f0c6fc1ac27b9e067e5394c9a6ed186c9 +"@esbuild/freebsd-arm64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/freebsd-arm64@npm:0.17.6" + conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@jest/console@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/console@npm:29.2.1" - dependencies: - "@jest/types": ^29.2.1 - "@types/node": "*" - chalk: ^4.0.0 - jest-message-util: ^29.2.1 - jest-util: ^29.2.1 - slash: ^3.0.0 - checksum: b5f08dc60c32a0212d27782cda86dfeba6d53f24cd023e6e52257224948a17eec77db55782ba1b18e37f10b7ba2481464e6c658bafaba6f8f8f129f1e95c3496 +"@esbuild/freebsd-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/freebsd-x64@npm:0.17.19" + conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@jest/core@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/core@npm:29.2.1" - dependencies: - "@jest/console": ^29.2.1 - "@jest/reporters": ^29.2.1 - "@jest/test-result": ^29.2.1 - "@jest/transform": ^29.2.1 - "@jest/types": ^29.2.1 - "@types/node": "*" - ansi-escapes: ^4.2.1 - chalk: ^4.0.0 - ci-info: ^3.2.0 - exit: ^0.1.2 - graceful-fs: ^4.2.9 - jest-changed-files: ^29.2.0 - jest-config: ^29.2.1 - jest-haste-map: ^29.2.1 - jest-message-util: ^29.2.1 - jest-regex-util: ^29.2.0 - jest-resolve: ^29.2.1 - jest-resolve-dependencies: ^29.2.1 - jest-runner: ^29.2.1 - jest-runtime: ^29.2.1 - jest-snapshot: ^29.2.1 - jest-util: ^29.2.1 - jest-validate: ^29.2.1 - jest-watcher: ^29.2.1 - micromatch: ^4.0.4 - pretty-format: ^29.2.1 - slash: ^3.0.0 - strip-ansi: ^6.0.0 - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 849f9287a0d32b92c052a59de47d4b483c47f45463a94cb3156ecb869a41cc829b8ecdb1de8638b629b16b6e4cb2bd0d03e1d18590c4bfbe73b8fbbd6072d045 +"@esbuild/freebsd-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/freebsd-x64@npm:0.17.6" + conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@jest/environment@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/environment@npm:29.2.1" - dependencies: - "@jest/fake-timers": ^29.2.1 - "@jest/types": ^29.2.1 - "@types/node": "*" - jest-mock: ^29.2.1 - checksum: 632d023c9e514a3d5647cbc7bc27a97113ef1647d9c7e205f90e0af359804dc7eaddfe43928b6180f2fc4914761878e671edcccacca4012e2e9f594979adbfac +"@esbuild/linux-arm64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-arm64@npm:0.17.19" + conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@jest/expect-utils@npm:^29.1.2": - version: 29.1.2 - resolution: "@jest/expect-utils@npm:29.1.2" - dependencies: - jest-get-type: ^29.0.0 - checksum: 31c2a690b5720cc52698d144a81aac152a7e5072d92c80e2a027c79fdbd845dd53f92b45170ba71aa7304eaf487f0a5064e96c67ff1825e175466feae156ea05 +"@esbuild/linux-arm64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-arm64@npm:0.17.6" + conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@jest/expect-utils@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/expect-utils@npm:29.2.1" - dependencies: - jest-get-type: ^29.2.0 - checksum: 7e6e156f452330b64983f8169f2cd1f378129090d02ad097ef89dadfc78269501991d6d6daf91058ef4334fd9f5fc1a6389d887bbebfe7e4ad1ec58ea78e9f93 +"@esbuild/linux-arm@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-arm@npm:0.17.19" + conditions: os=linux & cpu=arm languageName: node linkType: hard -"@jest/expect@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/expect@npm:29.2.1" - dependencies: - expect: ^29.2.1 - jest-snapshot: ^29.2.1 - checksum: c64b939200e88b947c4e1209fbfd3d54f0f24ad1cd1d5882e0238631a7839f96c3e513c802610b039ab2d2ed6024834c6de002b639d3afa8ad077364ef08ab75 +"@esbuild/linux-arm@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-arm@npm:0.17.6" + conditions: os=linux & cpu=arm languageName: node linkType: hard -"@jest/fake-timers@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/fake-timers@npm:29.2.1" - dependencies: - "@jest/types": ^29.2.1 - "@sinonjs/fake-timers": ^9.1.2 - "@types/node": "*" - jest-message-util: ^29.2.1 - jest-mock: ^29.2.1 - jest-util: ^29.2.1 - checksum: e4f42a2677b91fed6e59ca466de2247bca5767c4922b5edb67ce34d47477757599f2760c3abae3d76e65917ac60c876223ac2c9d3f06d4f2a49d4be7e076f9bb +"@esbuild/linux-ia32@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-ia32@npm:0.17.19" + conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@jest/globals@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/globals@npm:29.2.1" - dependencies: - "@jest/environment": ^29.2.1 - "@jest/expect": ^29.2.1 - "@jest/types": ^29.2.1 - jest-mock: ^29.2.1 - checksum: 42046693669009a4ac890578e18544433effeaa760e60e3fc7360ab197ebf7b66bf7fce11f1143e43e665d1801108ae9a3588f5ec95d518ca9664e7f8098a4a3 +"@esbuild/linux-ia32@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-ia32@npm:0.17.6" + conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@jest/reporters@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/reporters@npm:29.2.1" - dependencies: - "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^29.2.1 - "@jest/test-result": ^29.2.1 - "@jest/transform": ^29.2.1 - "@jest/types": ^29.2.1 - "@jridgewell/trace-mapping": ^0.3.15 - "@types/node": "*" - chalk: ^4.0.0 - collect-v8-coverage: ^1.0.0 - exit: ^0.1.2 - glob: ^7.1.3 - graceful-fs: ^4.2.9 - istanbul-lib-coverage: ^3.0.0 - istanbul-lib-instrument: ^5.1.0 - istanbul-lib-report: ^3.0.0 - istanbul-lib-source-maps: ^4.0.0 - istanbul-reports: ^3.1.3 - jest-message-util: ^29.2.1 - jest-util: ^29.2.1 - jest-worker: ^29.2.1 - slash: ^3.0.0 - string-length: ^4.0.1 - strip-ansi: ^6.0.0 - v8-to-istanbul: ^9.0.1 - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 8f6419d67ba9c4f33ff01d8fa506538f32f4edd32df806a496c705858712405e6930b6064ac54cfe7b1c01a447d2feb46e8be69eb2e655e8b5f497e77ee79777 +"@esbuild/linux-loong64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-loong64@npm:0.17.19" + conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@jest/schemas@npm:^28.1.3": - version: 28.1.3 - resolution: "@jest/schemas@npm:28.1.3" - dependencies: - "@sinclair/typebox": ^0.24.1 - checksum: 3cf1d4b66c9c4ffda58b246de1ddcba8e6ad085af63dccdf07922511f13b68c0cc480a7bc620cb4f3099a6f134801c747e1df7bfc7a4ef4dceefbdea3e31e1de +"@esbuild/linux-loong64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-loong64@npm:0.17.6" + conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@jest/schemas@npm:^29.0.0": - version: 29.0.0 - resolution: "@jest/schemas@npm:29.0.0" - dependencies: - "@sinclair/typebox": ^0.24.1 - checksum: 41355c78f09eb1097e57a3c5d0ca11c9099e235e01ea5fa4e3953562a79a6a9296c1d300f1ba50ca75236048829e056b00685cd2f1ff8285e56fd2ce01249acb +"@esbuild/linux-mips64el@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-mips64el@npm:0.17.19" + conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@jest/source-map@npm:^29.2.0": - version: 29.2.0 - resolution: "@jest/source-map@npm:29.2.0" - dependencies: - "@jridgewell/trace-mapping": ^0.3.15 - callsites: ^3.0.0 - graceful-fs: ^4.2.9 - checksum: 09f76ab63d15dcf44b3035a79412164f43be34ec189575930f1a00c87e36ea0211ebd6a4fbe2253c2516e19b49b131f348ddbb86223ca7b6bbac9a6bc76ec96e +"@esbuild/linux-mips64el@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-mips64el@npm:0.17.6" + conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@jest/test-result@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/test-result@npm:29.2.1" - dependencies: - "@jest/console": ^29.2.1 - "@jest/types": ^29.2.1 - "@types/istanbul-lib-coverage": ^2.0.0 - collect-v8-coverage: ^1.0.0 - checksum: 8f5f069dcfd54413559544f164950503d6cef587e3596a134a868c11e6b3fe6a99cc691732027500c962bdd22bc46685798b006a5b542359b30883e0d2489615 +"@esbuild/linux-ppc64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-ppc64@npm:0.17.19" + conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@jest/test-sequencer@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/test-sequencer@npm:29.2.1" - dependencies: - "@jest/test-result": ^29.2.1 - graceful-fs: ^4.2.9 - jest-haste-map: ^29.2.1 - slash: ^3.0.0 - checksum: ff73ce30d51e3304986097a5e02f24c60bc6f8246a7b3a1d35f898bd6b9515c576c2fce98dd6a605b885c8c0fea34e135420eb6e6a6d6656b74bed8ff280fe45 +"@esbuild/linux-ppc64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-ppc64@npm:0.17.6" + conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@jest/transform@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/transform@npm:29.2.1" - dependencies: - "@babel/core": ^7.11.6 - "@jest/types": ^29.2.1 - "@jridgewell/trace-mapping": ^0.3.15 - babel-plugin-istanbul: ^6.1.1 - chalk: ^4.0.0 - convert-source-map: ^1.4.0 - fast-json-stable-stringify: ^2.1.0 - graceful-fs: ^4.2.9 - jest-haste-map: ^29.2.1 - jest-regex-util: ^29.2.0 - jest-util: ^29.2.1 - micromatch: ^4.0.4 - pirates: ^4.0.4 - slash: ^3.0.0 - write-file-atomic: ^4.0.1 - checksum: bb50bfce34d8c648475a7d65e91787a0232cdcc0445331dba8d3d80180dff1b43d97872568be795c8f92d419b3f0e6114297349cc892fdf50e8471cb227f674a +"@esbuild/linux-riscv64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-riscv64@npm:0.17.19" + conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@jest/types@npm:^29.1.2": - version: 29.1.2 - resolution: "@jest/types@npm:29.1.2" - dependencies: - "@jest/schemas": ^29.0.0 - "@types/istanbul-lib-coverage": ^2.0.0 - "@types/istanbul-reports": ^3.0.0 - "@types/node": "*" - "@types/yargs": ^17.0.8 - chalk: ^4.0.0 - checksum: 697fc72c37814606715fd1dcbdcb84129d8b292dc6d6d5fa9b8f2b7e8ffd297757b508913be049a4acfbe9f80b982d96e4aa9aa60c40bbc643274ca1867194f8 +"@esbuild/linux-riscv64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-riscv64@npm:0.17.6" + conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@jest/types@npm:^29.2.1": - version: 29.2.1 - resolution: "@jest/types@npm:29.2.1" - dependencies: - "@jest/schemas": ^29.0.0 - "@types/istanbul-lib-coverage": ^2.0.0 - "@types/istanbul-reports": ^3.0.0 - "@types/node": "*" - "@types/yargs": ^17.0.8 - chalk: ^4.0.0 - checksum: a83f20727425179aa05974aa7553c307d207fbb6b7ae5ab1e37fbb6ba9b6655f26655301fc804f2545d33f4c4a6b59d41eed1737c005d2b83fce9e14841b4150 +"@esbuild/linux-s390x@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-s390x@npm:0.17.19" + conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.1.0": - version: 0.1.1 - resolution: "@jridgewell/gen-mapping@npm:0.1.1" - dependencies: - "@jridgewell/set-array": ^1.0.0 - "@jridgewell/sourcemap-codec": ^1.4.10 - checksum: 3bcc21fe786de6ffbf35c399a174faab05eb23ce6a03e8769569de28abbf4facc2db36a9ddb0150545ae23a8d35a7cf7237b2aa9e9356a7c626fb4698287d5cc +"@esbuild/linux-s390x@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-s390x@npm:0.17.6" + conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.2 - resolution: "@jridgewell/gen-mapping@npm:0.3.2" - dependencies: - "@jridgewell/set-array": ^1.0.1 - "@jridgewell/sourcemap-codec": ^1.4.10 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 1832707a1c476afebe4d0fbbd4b9434fdb51a4c3e009ab1e9938648e21b7a97049fa6009393bdf05cab7504108413441df26d8a3c12193996e65493a4efb6882 +"@esbuild/linux-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/linux-x64@npm:0.17.19" + conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@jridgewell/resolve-uri@npm:3.1.0, @jridgewell/resolve-uri@npm:^3.0.3": - version: 3.1.0 - resolution: "@jridgewell/resolve-uri@npm:3.1.0" - checksum: b5ceaaf9a110fcb2780d1d8f8d4a0bfd216702f31c988d8042e5f8fbe353c55d9b0f55a1733afdc64806f8e79c485d2464680ac48a0d9fcadb9548ee6b81d267 +"@esbuild/linux-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/linux-x64@npm:0.17.6" + conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.0.0, @jridgewell/set-array@npm:^1.0.1": - version: 1.1.2 - resolution: "@jridgewell/set-array@npm:1.1.2" - checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e +"@esbuild/netbsd-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/netbsd-x64@npm:0.17.19" + conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@jridgewell/source-map@npm:^0.3.2": - version: 0.3.2 - resolution: "@jridgewell/source-map@npm:0.3.2" - dependencies: - "@jridgewell/gen-mapping": ^0.3.0 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 1b83f0eb944e77b70559a394d5d3b3f98a81fcc186946aceb3ef42d036762b52ef71493c6c0a3b7c1d2f08785f53ba2df1277fe629a06e6109588ff4cdcf7482 +"@esbuild/netbsd-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/netbsd-x64@npm:0.17.6" + conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.10": - version: 1.4.14 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" - checksum: 61100637b6d173d3ba786a5dff019e1a74b1f394f323c1fee337ff390239f053b87266c7a948777f4b1ee68c01a8ad0ab61e5ff4abb5a012a0b091bec391ab97 +"@esbuild/openbsd-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/openbsd-x64@npm:0.17.19" + conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:0.3.9": - version: 0.3.9 - resolution: "@jridgewell/trace-mapping@npm:0.3.9" - dependencies: - "@jridgewell/resolve-uri": ^3.0.3 - "@jridgewell/sourcemap-codec": ^1.4.10 - checksum: d89597752fd88d3f3480845691a05a44bd21faac18e2185b6f436c3b0fd0c5a859fbbd9aaa92050c4052caf325ad3e10e2e1d1b64327517471b7d51babc0ddef +"@esbuild/openbsd-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/openbsd-x64@npm:0.17.6" + conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.15, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.16 - resolution: "@jridgewell/trace-mapping@npm:0.3.16" - dependencies: - "@jridgewell/resolve-uri": 3.1.0 - "@jridgewell/sourcemap-codec": 1.4.14 - checksum: 881fa21ce066ab5e9c23991ac435dfae2ac8ffa74510379a028b0d002437b48a50464369436c5d242b6e648eec17f77003c73c1f54325cfcd8824967c2356910 +"@esbuild/sunos-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/sunos-x64@npm:0.17.19" + conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@ladle/react-context@npm:^1.0.1": - version: 1.0.1 - resolution: "@ladle/react-context@npm:1.0.1" - peerDependencies: - react: ">=16.14.0" - react-dom: ">=16.14.0" - checksum: 9943b1648eedb77f162e820135f949189c4e86d376a167ea890558b3d3f99085091498a7575700f29012d9b4d01e9e86b48edb4465bf904235fb8424ac283388 +"@esbuild/sunos-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/sunos-x64@npm:0.17.6" + conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@ladle/react@npm:^2.4.5": - version: 2.4.5 - resolution: "@ladle/react@npm:2.4.5" - dependencies: - "@babel/code-frame": ^7.18.6 - "@babel/core": ^7.18.13 - "@babel/generator": ^7.18.13 - "@babel/parser": ^7.18.13 - "@babel/plugin-proposal-class-properties": ^7.18.6 - "@babel/preset-env": ^7.18.10 - "@babel/preset-react": ^7.18.6 - "@babel/preset-typescript": ^7.18.6 - "@babel/runtime": ^7.18.9 - "@babel/template": ^7.18.10 - "@babel/traverse": ^7.18.13 - "@babel/types": ^7.18.13 - "@ladle/react-context": ^1.0.1 - "@vitejs/plugin-react": ^2.0.1 - axe-core: ^4.4.3 - boxen: ^7.0.0 - chokidar: ^3.5.3 - classnames: ^2.3.1 - commander: ^9.4.0 - cross-spawn: ^7.0.3 - debug: ^4.3.4 - default-browser: ^3.1.0 - express: ^4.18.1 - get-port: ^6.1.2 - globby: ^13.1.2 - history: ^5.3.0 - lodash.merge: ^4.6.2 - open: ^8.4.0 - prism-react-renderer: ^1.3.5 - prop-types: ^15.8.1 - query-string: ^7.1.1 - react-frame-component: ^5.2.3 - react-inspector: ^6.0.1 - vite: ^3.0.9 - vite-tsconfig-paths: ^3.5.0 - peerDependencies: - react: ">=16.14.0" - react-dom: ">=16.14.0" - bin: - ladle: lib/cli/cli.js - checksum: 26c37787bc086fbacc95ec17302c78d3e75e47b5f75f846507de5452f1fced52c77437467e5bf63df671dec1b3a71760454700d37d6af050fb8925bc305adc38 +"@esbuild/win32-arm64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/win32-arm64@npm:0.17.19" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@ljharb/has-package-exports-patterns@npm:^0.0.2": - version: 0.0.2 - resolution: "@ljharb/has-package-exports-patterns@npm:0.0.2" - checksum: 348d421377c5c2e7e6ddf518800d30dbcdf3176d397fed2b214f49dd4ac3d1689701a463c7b89710ba32de63c87fc643565c9ff06aa066d49bc200b5e4b6655e +"@esbuild/win32-arm64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/win32-arm64@npm:0.17.6" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@mapbox/node-pre-gyp@npm:^1.0.5": - version: 1.0.10 - resolution: "@mapbox/node-pre-gyp@npm:1.0.10" - dependencies: - detect-libc: ^2.0.0 - https-proxy-agent: ^5.0.0 - make-dir: ^3.1.0 - node-fetch: ^2.6.7 - nopt: ^5.0.0 - npmlog: ^5.0.1 - rimraf: ^3.0.2 - semver: ^7.3.5 - tar: ^6.1.11 - bin: - node-pre-gyp: bin/node-pre-gyp - checksum: 1a98db05d955b74dad3814679593df293b9194853698f3f5f1ed00ecd93128cdd4b14fb8767fe44ac6981ef05c23effcfdc88710e7c1de99ccb6f647890597c8 +"@esbuild/win32-ia32@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/win32-ia32@npm:0.17.19" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@mdx-js/mdx@npm:^2.0.0, @mdx-js/mdx@npm:^2.1.2": - version: 2.1.4 - resolution: "@mdx-js/mdx@npm:2.1.4" - dependencies: - "@types/estree-jsx": ^1.0.0 - "@types/mdx": ^2.0.0 - estree-util-build-jsx: ^2.0.0 - estree-util-is-identifier-name: ^2.0.0 - estree-util-to-js: ^1.1.0 - estree-walker: ^3.0.0 - hast-util-to-estree: ^2.0.0 - markdown-extensions: ^1.0.0 - periscopic: ^3.0.0 - remark-mdx: ^2.0.0 - remark-parse: ^10.0.0 - remark-rehype: ^10.0.0 - unified: ^10.0.0 - unist-util-position-from-estree: ^1.0.0 - unist-util-stringify-position: ^3.0.0 - unist-util-visit: ^4.0.0 - vfile: ^5.0.0 - checksum: 041dcbb49e38387c813077fb14a90a7b342de659f31e7286faf69bd16f81190f933bb492a1daa427fa007d12e6069992d5414315e80fe26d2e8b37d8797531dc +"@esbuild/win32-ia32@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/win32-ia32@npm:0.17.6" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@mdx-js/react@npm:^2.0.0": - version: 2.1.4 - resolution: "@mdx-js/react@npm:2.1.4" - dependencies: - "@types/mdx": ^2.0.0 - "@types/react": ">=16" - peerDependencies: - react: ">=16" - checksum: 85e62e32fdb36983bdfd94193112e00456480f32ac1277e22fc3a811c65fda249a684e8cf110954d1ab26f4fe19e5c9121ff554b1ee25d5d5a670c972f2e94a8 +"@esbuild/win32-x64@npm:0.17.19": + version: 0.17.19 + resolution: "@esbuild/win32-x64@npm:0.17.19" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@mdx-js/rollup@npm:^2.1.1": - version: 2.1.4 - resolution: "@mdx-js/rollup@npm:2.1.4" - dependencies: - "@mdx-js/mdx": ^2.0.0 - "@rollup/pluginutils": ^4.0.0 - source-map: ^0.7.0 - vfile: ^5.0.0 - peerDependencies: - rollup: ">=2" - checksum: aad38e86704f3bdbfe160d815370bb26df3165e0317fe1223d35b559aec0caccbc46624b2643360cec483b381e1f489d9d5f9bcd1d261d4d03045b7a9f3ccb33 +"@esbuild/win32-x64@npm:0.17.6": + version: 0.17.6 + resolution: "@esbuild/win32-x64@npm:0.17.6" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@microsoft/api-extractor-model@npm:7.24.0": - version: 7.24.0 - resolution: "@microsoft/api-extractor-model@npm:7.24.0" +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.3.0, @eslint-community/eslint-utils@npm:^4.4.0": + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: - "@microsoft/tsdoc": 0.14.1 - "@microsoft/tsdoc-config": ~0.16.1 - "@rushstack/node-core-library": 3.51.1 - checksum: d683ca227ed79f0bd8725caba190bb281b1f2088602268cbecd5d8dd690c601034c447a35e22f63866f79544f9648bc46631e0d724c3e54bc7438591e1f4312f + eslint-visitor-keys: ^3.3.0 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: cdfe3ae42b4f572cbfb46d20edafe6f36fc5fb52bf2d90875c58aefe226892b9677fef60820e2832caf864a326fe4fc225714c46e8389ccca04d5f9288aabd22 languageName: node linkType: hard -"@microsoft/api-extractor-model@npm:7.25.1": - version: 7.25.1 - resolution: "@microsoft/api-extractor-model@npm:7.25.1" - dependencies: - "@microsoft/tsdoc": 0.14.1 - "@microsoft/tsdoc-config": ~0.16.1 - "@rushstack/node-core-library": 3.53.2 - checksum: fd63f794358b92de84dda95c545ad8147ebd0c71bb4aff63d2ef4f727243d5de7251aa3301f3f917dda1e84248683d9a569a5aa884124fc1f1f6e40444ba8633 +"@eslint-community/regexpp@npm:^4.4.0": + version: 4.5.1 + resolution: "@eslint-community/regexpp@npm:4.5.1" + checksum: 6d901166d64998d591fab4db1c2f872981ccd5f6fe066a1ad0a93d4e11855ecae6bfb76660869a469563e8882d4307228cebd41142adb409d182f2966771e57e languageName: node linkType: hard -"@microsoft/api-extractor@npm:^7.33.1, @microsoft/api-extractor@npm:^7.33.4": - version: 7.33.4 - resolution: "@microsoft/api-extractor@npm:7.33.4" +"@eslint/eslintrc@npm:^2.0.3": + version: 2.0.3 + resolution: "@eslint/eslintrc@npm:2.0.3" dependencies: - "@microsoft/api-extractor-model": 7.25.1 - "@microsoft/tsdoc": 0.14.1 - "@microsoft/tsdoc-config": ~0.16.1 - "@rushstack/node-core-library": 3.53.2 - "@rushstack/rig-package": 0.3.17 - "@rushstack/ts-command-line": 4.13.0 - colors: ~1.2.1 - lodash: ~4.17.15 - resolve: ~1.17.0 - semver: ~7.3.0 - source-map: ~0.6.1 - typescript: ~4.8.4 - bin: - api-extractor: bin/api-extractor - checksum: 9462c36c00b3b718ddc00a3cee98236c1ec322244a677485ccec00f7bc2d487ac0e08610870db3aa72eb18eabd7d918c9e7f9909383b4eb56eb055471895c72b + ajv: ^6.12.4 + debug: ^4.3.2 + espree: ^9.5.2 + globals: ^13.19.0 + ignore: ^5.2.0 + import-fresh: ^3.2.1 + js-yaml: ^4.1.0 + minimatch: ^3.1.2 + strip-json-comments: ^3.1.1 + checksum: ddc51f25f8524d8231db9c9bf03177e503d941a332e8d5ce3b10b09241be4d5584a378a529a27a527586bfbccf3031ae539eb891352033c340b012b4d0c81d92 languageName: node linkType: hard -"@microsoft/tsdoc-config@npm:0.16.1": - version: 0.16.1 - resolution: "@microsoft/tsdoc-config@npm:0.16.1" - dependencies: - "@microsoft/tsdoc": 0.14.1 - ajv: ~6.12.6 - jju: ~1.4.0 - resolve: ~1.19.0 - checksum: 2b2121803caf6584fe0264ad16f8fa10de68438c0b82bd25f918606052af5312050f38b6abd4bcf3d40f120713aab144762a7a280fa22dd12e5571cd08e348e1 +"@eslint/js@npm:8.41.0": + version: 8.41.0 + resolution: "@eslint/js@npm:8.41.0" + checksum: af013d70fe8d0429cdf5cd8b5dcc6fc384ed026c1eccb0cfe30f5849b968ab91645111373fd1b83282b38955b1bdfbe667c1a7dbda3b06cae753521223cad775 languageName: node linkType: hard -"@microsoft/tsdoc-config@patch:@microsoft/tsdoc-config@npm:0.16.1#.yarn/patches/@microsoft-tsdoc-config-npm-0.16.1-81031b1bbf.patch::locator=%40discordjs%2Fdiscord.js%40workspace%3A.": - version: 0.16.1 - resolution: "@microsoft/tsdoc-config@patch:@microsoft/tsdoc-config@npm%3A0.16.1#.yarn/patches/@microsoft-tsdoc-config-npm-0.16.1-81031b1bbf.patch::version=0.16.1&hash=7098b2&locator=%40discordjs%2Fdiscord.js%40workspace%3A." - dependencies: - "@microsoft/tsdoc": 0.14.1 - ajv: ~6.12.6 - jju: ~1.4.0 - resolve: ~1.19.0 - checksum: e3fb3753a44da5230ab12a899ae6c961adfe5b41200305a8e3c924a6682b5c089fd12ca79625f631ab8cd3a3bb0e7d0377ccca1de8dea78531755d6928399989 +"@fal-works/esbuild-plugin-global-externals@npm:^2.1.2": + version: 2.1.2 + resolution: "@fal-works/esbuild-plugin-global-externals@npm:2.1.2" + checksum: c59715902b9062aa7ff38973f298b509499fd146dbf564dc338b3f9e896da5bffb4ca676c27587fde79b3586003e24d65960acb62f009bca43dca34c76f8cbf7 languageName: node linkType: hard -"@microsoft/tsdoc@npm:0.14.1": - version: 0.14.1 - resolution: "@microsoft/tsdoc@npm:0.14.1" - checksum: e4ad038ccff2cd96e0d53ee42e2136f0f5a925b16cfda14261f1c2eb55ba0088a0e3b08ff819b476ddc69b2242a391925fab7f6ae2afabb19b96f87e19c114fc +"@favware/cliff-jumper@npm:^2.0.0": + version: 2.0.0 + resolution: "@favware/cliff-jumper@npm:2.0.0" + dependencies: + "@favware/conventional-changelog-angular": ^5.0.15 + "@sapphire/result": ^2.6.0 + "@sapphire/utilities": 3.11.0 + colorette: ^2.0.19 + commander: ^10.0.0 + conventional-recommended-bump: ^6.1.0 + git-cliff: ^1.1.2 + js-yaml: ^4.1.0 + semver: ^7.3.8 + typescript: ^4.9.5 + bin: + cj: ./dist/cli.js + cliff-jumper: ./dist/cli.js + checksum: 432257b5a0ba4dd1b8a784c309d9b48cecb0d8761fe7bc393742a9788c3107c2c5dabfe29ac28ac9ab7ce9bd429a2d5826c837e577813bb5576af3dee7ba04ea + languageName: node + linkType: hard + +"@favware/conventional-changelog-angular@npm:^5.0.15": + version: 5.0.15 + resolution: "@favware/conventional-changelog-angular@npm:5.0.15" + dependencies: + compare-func: ^2.0.0 + checksum: 9ea3869f748831348b51aa6afbd4533ee3dbf94a2bd673b1cd8b7c6397a46b90b32f595b324b9074bd9608061046b456f7a97d06fba7abb8143bd8648a938870 + languageName: node + linkType: hard + +"@favware/npm-deprecate@npm:^1.0.7": + version: 1.0.7 + resolution: "@favware/npm-deprecate@npm:1.0.7" + dependencies: + "@sapphire/fetch": ^2.4.1 + "@sapphire/utilities": ^3.11.0 + colorette: ^2.0.19 + commander: ^9.4.1 + js-yaml: ^4.1.0 + micromatch: ^4.0.5 + npm-package-arg: ^10.0.0 + npm-registry-fetch: ^14.0.2 + bin: + nd: ./dist/cli.js + npm-deprecate: ./dist/cli.js + checksum: 83b1c9259dfcab376dd8702b85c5875811c60a4c57fb562c4431b3d7523f7f2e80435da31c63e55246659d4da8d0fc3da20f7f5f40e0dd103e7d681ba6a55d32 + languageName: node + linkType: hard + +"@floating-ui/core@npm:^1.2.6": + version: 1.2.6 + resolution: "@floating-ui/core@npm:1.2.6" + checksum: e4aa96c435277f1720d4bc939e17a79b1e1eebd589c20b622d3c646a5273590ff889b8c6e126f7be61873cf8c4d7db7d418895986ea19b8b0d0530de32504c3a + languageName: node + linkType: hard + +"@floating-ui/dom@npm:^1.0.0": + version: 1.2.8 + resolution: "@floating-ui/dom@npm:1.2.8" + dependencies: + "@floating-ui/core": ^1.2.6 + checksum: 02894774475a17baa498c86cd25d2825598e7de0734b8c08f7b8797b19c0bec13c4c726e529feb8bf26c6dee219c153ac1f90d8530a93534f765b3c04cfa3b4a + languageName: node + linkType: hard + +"@gar/promisify@npm:^1.0.1, @gar/promisify@npm:^1.1.3": + version: 1.1.3 + resolution: "@gar/promisify@npm:1.1.3" + checksum: 4059f790e2d07bf3c3ff3e0fec0daa8144fe35c1f6e0111c9921bd32106adaa97a4ab096ad7dab1e28ee6a9060083c4d1a4ada42a7f5f3f7a96b8812e2b757c1 + languageName: node + linkType: hard + +"@grpc/grpc-js@npm:^1.5.9": + version: 1.8.14 + resolution: "@grpc/grpc-js@npm:1.8.14" + dependencies: + "@grpc/proto-loader": ^0.7.0 + "@types/node": ">=12.12.47" + checksum: 7b889ae67cde5eb9b4feb92d54e73945d881309b9b879a2dde478fa7850b99835efa7592a8154a0f923851d7a18a177c106f5f52b45061180bb04aef7783c1c9 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.6.9": + version: 0.6.13 + resolution: "@grpc/proto-loader@npm:0.6.13" + dependencies: + "@types/long": ^4.0.1 + lodash.camelcase: ^4.3.0 + long: ^4.0.0 + protobufjs: ^6.11.3 + yargs: ^16.2.0 + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 863417e961cfa3acb579124f5c2bbfbeaee4d507c33470dc0af3b6792892c68706c6c61e26629f5ff3d28cb631dc4f0a00233323135e322406e3cb19a0b92823 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.7.0": + version: 0.7.7 + resolution: "@grpc/proto-loader@npm:0.7.7" + dependencies: + "@types/long": ^4.0.1 + lodash.camelcase: ^4.3.0 + long: ^4.0.0 + protobufjs: ^7.0.0 + yargs: ^17.7.2 + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 6015d99d36d0451075a53e5c5842e8912235973a515677afca038269969ad84f22a4c9fbc9badf52f034736b3f1bf864739f7c4238ba8a7e6fd3bba75cfce0ee + languageName: node + linkType: hard + +"@humanwhocodes/config-array@npm:^0.11.8": + version: 0.11.8 + resolution: "@humanwhocodes/config-array@npm:0.11.8" + dependencies: + "@humanwhocodes/object-schema": ^1.2.1 + debug: ^4.1.1 + minimatch: ^3.0.5 + checksum: 0fd6b3c54f1674ce0a224df09b9c2f9846d20b9e54fabae1281ecfc04f2e6ad69bf19e1d6af6a28f88e8aa3990168b6cb9e1ef755868c3256a630605ec2cb1d3 + languageName: node + linkType: hard + +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 0fd22007db8034a2cdf2c764b140d37d9020bbfce8a49d3ec5c05290e77d4b0263b1b972b752df8c89e5eaa94073408f2b7d977aed131faf6cf396ebb5d7fb61 + languageName: node + linkType: hard + +"@humanwhocodes/object-schema@npm:^1.2.1": + version: 1.2.1 + resolution: "@humanwhocodes/object-schema@npm:1.2.1" + checksum: a824a1ec31591231e4bad5787641f59e9633827d0a2eaae131a288d33c9ef0290bd16fda8da6f7c0fcb014147865d12118df10db57f27f41e20da92369fcb3f1 + languageName: node + linkType: hard + +"@hutson/parse-repository-url@npm:^3.0.0": + version: 3.0.2 + resolution: "@hutson/parse-repository-url@npm:3.0.2" + checksum: 39992c5f183c5ca3d761d6ed9dfabcb79b5f3750bf1b7f3532e1dc439ca370138bbd426ee250fdaba460bc948e6761fbefd484b8f4f36885d71ded96138340d1 + languageName: node + linkType: hard + +"@iconify/types@npm:^2.0.0": + version: 2.0.0 + resolution: "@iconify/types@npm:2.0.0" + checksum: 029f58542c160e9d4a746869cf2e475b603424d3adf3994c5cc8d0406c47e6e04a3b898b2707840c1c5b9bd5563a1660a34b110d89fce43923baca5222f4e597 + languageName: node + linkType: hard + +"@iconify/utils@npm:^2.1.5": + version: 2.1.5 + resolution: "@iconify/utils@npm:2.1.5" + dependencies: + "@antfu/install-pkg": ^0.1.1 + "@antfu/utils": ^0.7.2 + "@iconify/types": ^2.0.0 + debug: ^4.3.4 + kolorist: ^1.7.0 + local-pkg: ^0.4.3 + checksum: 042ec9f026d2d23e63e2ee30cea9079ff392b654ec5aa981d6603743dff3f48dd59c41f882b162dbd8c574372c5933d0404b42e03ac7142280aba73c41da3b7c + languageName: node + linkType: hard + +"@ioredis/commands@npm:^1.1.1": + version: 1.2.0 + resolution: "@ioredis/commands@npm:1.2.0" + checksum: 9b20225ba36ef3e5caf69b3c0720597c3016cc9b1e157f519ea388f621dd9037177f84cfe7e25c4c32dad7dd90c70ff9123cd411f747e053cf292193c9c461e2 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + 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" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb + languageName: node + linkType: hard + +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: ^5.3.1 + find-up: ^4.1.0 + get-package-type: ^0.1.0 + js-yaml: ^3.13.1 + resolve-from: ^5.0.0 + checksum: d578da5e2e804d5c93228450a1380e1a3c691de4953acc162f387b717258512a3e07b83510a936d9fab03eac90817473917e24f5d16297af3867f59328d58568 + languageName: node + linkType: hard + +"@istanbuljs/schema@npm:^0.1.2, @istanbuljs/schema@npm:^0.1.3": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 5282759d961d61350f33d9118d16bcaed914ebf8061a52f4fa474b2cb08720c9c81d165e13b82f2e5a8a212cc5af482f0c6fc1ac27b9e067e5394c9a6ed186c9 + languageName: node + linkType: hard + +"@jest/console@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/console@npm:29.5.0" + dependencies: + "@jest/types": ^29.5.0 + "@types/node": "*" + chalk: ^4.0.0 + jest-message-util: ^29.5.0 + jest-util: ^29.5.0 + slash: ^3.0.0 + checksum: 9f4f4b8fabd1221361b7f2e92d4a90f5f8c2e2b29077249996ab3c8b7f765175ffee795368f8d6b5b2bb3adb32dc09319f7270c7c787b0d259e624e00e0f64a5 + languageName: node + linkType: hard + +"@jest/core@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/core@npm:29.5.0" + dependencies: + "@jest/console": ^29.5.0 + "@jest/reporters": ^29.5.0 + "@jest/test-result": ^29.5.0 + "@jest/transform": ^29.5.0 + "@jest/types": ^29.5.0 + "@types/node": "*" + ansi-escapes: ^4.2.1 + chalk: ^4.0.0 + ci-info: ^3.2.0 + exit: ^0.1.2 + graceful-fs: ^4.2.9 + jest-changed-files: ^29.5.0 + jest-config: ^29.5.0 + jest-haste-map: ^29.5.0 + jest-message-util: ^29.5.0 + jest-regex-util: ^29.4.3 + jest-resolve: ^29.5.0 + jest-resolve-dependencies: ^29.5.0 + jest-runner: ^29.5.0 + jest-runtime: ^29.5.0 + jest-snapshot: ^29.5.0 + jest-util: ^29.5.0 + jest-validate: ^29.5.0 + jest-watcher: ^29.5.0 + micromatch: ^4.0.4 + pretty-format: ^29.5.0 + slash: ^3.0.0 + strip-ansi: ^6.0.0 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: 9e8f5243fe82d5a57f3971e1b96f320058df7c315328a3a827263f3b17f64be10c80f4a9c1b1773628b64d2de6d607c70b5b2d5bf13e7f5ad04223e9ef6aac06 + languageName: node + linkType: hard + +"@jest/environment@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/environment@npm:29.5.0" + dependencies: + "@jest/fake-timers": ^29.5.0 + "@jest/types": ^29.5.0 + "@types/node": "*" + jest-mock: ^29.5.0 + checksum: 921de6325cd4817dec6685e5ff299b499b6379f3f9cf489b4b13588ee1f3820a0c77b49e6a087996b6de8f629f6f5251e636cba08d1bdb97d8071cc7d033c88a + languageName: node + linkType: hard + +"@jest/expect-utils@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/expect-utils@npm:29.5.0" + dependencies: + jest-get-type: ^29.4.3 + checksum: c46fb677c88535cf83cf29f0a5b1f376c6a1109ddda266ad7da1a9cbc53cb441fa402dd61fc7b111ffc99603c11a9b3357ee41a1c0e035a58830bcb360871476 + languageName: node + linkType: hard + +"@jest/expect@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/expect@npm:29.5.0" + dependencies: + expect: ^29.5.0 + jest-snapshot: ^29.5.0 + checksum: bd10e295111547e6339137107d83986ab48d46561525393834d7d2d8b2ae9d5626653f3f5e48e5c3fa742ac982e97bdf1f541b53b9e1d117a247b08e938527f6 + languageName: node + linkType: hard + +"@jest/fake-timers@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/fake-timers@npm:29.5.0" + dependencies: + "@jest/types": ^29.5.0 + "@sinonjs/fake-timers": ^10.0.2 + "@types/node": "*" + jest-message-util: ^29.5.0 + jest-mock: ^29.5.0 + jest-util: ^29.5.0 + checksum: 69930c6922341f244151ec0d27640852ec96237f730fc024da1f53143d31b43cde75d92f9d8e5937981cdce3b31416abc3a7090a0d22c2377512c4a6613244ee + languageName: node + linkType: hard + +"@jest/globals@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/globals@npm:29.5.0" + dependencies: + "@jest/environment": ^29.5.0 + "@jest/expect": ^29.5.0 + "@jest/types": ^29.5.0 + jest-mock: ^29.5.0 + checksum: b309ab8f21b571a7c672608682e84bbdd3d2b554ddf81e4e32617fec0a69094a290ab42e3c8b2c66ba891882bfb1b8b2736720ea1285b3ad646d55c2abefedd9 + languageName: node + linkType: hard + +"@jest/reporters@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/reporters@npm:29.5.0" + dependencies: + "@bcoe/v8-coverage": ^0.2.3 + "@jest/console": ^29.5.0 + "@jest/test-result": ^29.5.0 + "@jest/transform": ^29.5.0 + "@jest/types": ^29.5.0 + "@jridgewell/trace-mapping": ^0.3.15 + "@types/node": "*" + chalk: ^4.0.0 + collect-v8-coverage: ^1.0.0 + exit: ^0.1.2 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + istanbul-lib-coverage: ^3.0.0 + istanbul-lib-instrument: ^5.1.0 + istanbul-lib-report: ^3.0.0 + istanbul-lib-source-maps: ^4.0.0 + istanbul-reports: ^3.1.3 + jest-message-util: ^29.5.0 + jest-util: ^29.5.0 + jest-worker: ^29.5.0 + slash: ^3.0.0 + string-length: ^4.0.1 + strip-ansi: ^6.0.0 + v8-to-istanbul: ^9.0.1 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: 481268aac9a4a75cc49c4df1273d6b111808dec815e9d009dad717c32383ebb0cebac76e820ad1ab44e207540e1c2fe1e640d44c4f262de92ab1933e057fdeeb + languageName: node + linkType: hard + +"@jest/schemas@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/schemas@npm:28.1.3" + dependencies: + "@sinclair/typebox": ^0.24.1 + checksum: 3cf1d4b66c9c4ffda58b246de1ddcba8e6ad085af63dccdf07922511f13b68c0cc480a7bc620cb4f3099a6f134801c747e1df7bfc7a4ef4dceefbdea3e31e1de + languageName: node + linkType: hard + +"@jest/schemas@npm:^29.4.3": + version: 29.4.3 + resolution: "@jest/schemas@npm:29.4.3" + dependencies: + "@sinclair/typebox": ^0.25.16 + checksum: ac754e245c19dc39e10ebd41dce09040214c96a4cd8efa143b82148e383e45128f24599195ab4f01433adae4ccfbe2db6574c90db2862ccd8551a86704b5bebd + languageName: node + linkType: hard + +"@jest/source-map@npm:^29.4.3": + version: 29.4.3 + resolution: "@jest/source-map@npm:29.4.3" + dependencies: + "@jridgewell/trace-mapping": ^0.3.15 + callsites: ^3.0.0 + graceful-fs: ^4.2.9 + checksum: 2301d225145f8123540c0be073f35a80fd26a2f5e59550fd68525d8cea580fb896d12bf65106591ffb7366a8a19790076dbebc70e0f5e6ceb51f81827ed1f89c + languageName: node + linkType: hard + +"@jest/test-result@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/test-result@npm:29.5.0" + dependencies: + "@jest/console": ^29.5.0 + "@jest/types": ^29.5.0 + "@types/istanbul-lib-coverage": ^2.0.0 + collect-v8-coverage: ^1.0.0 + checksum: 2e8ff5242227ab960c520c3ea0f6544c595cc1c42fa3873c158e9f4f685f4ec9670ec08a4af94ae3885c0005a43550a9595191ffbc27a0965df27d9d98bbf901 + languageName: node + linkType: hard + +"@jest/test-sequencer@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/test-sequencer@npm:29.5.0" + dependencies: + "@jest/test-result": ^29.5.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.5.0 + slash: ^3.0.0 + checksum: eca34b4aeb2fda6dfb7f9f4b064c858a7adf64ec5c6091b6f4ed9d3c19549177cbadcf1c615c4c182688fa1cf085c8c55c3ca6eea40719a34554b0bf071d842e + languageName: node + linkType: hard + +"@jest/transform@npm:^29.3.1, @jest/transform@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/transform@npm:29.5.0" + dependencies: + "@babel/core": ^7.11.6 + "@jest/types": ^29.5.0 + "@jridgewell/trace-mapping": ^0.3.15 + babel-plugin-istanbul: ^6.1.1 + chalk: ^4.0.0 + convert-source-map: ^2.0.0 + fast-json-stable-stringify: ^2.1.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^29.5.0 + jest-regex-util: ^29.4.3 + jest-util: ^29.5.0 + micromatch: ^4.0.4 + pirates: ^4.0.4 + slash: ^3.0.0 + write-file-atomic: ^4.0.2 + checksum: d55d604085c157cf5112e165ff5ac1fa788873b3b31265fb4734ca59892ee24e44119964cc47eb6d178dd9512bbb6c576d1e20e51a201ff4e24d31e818a1c92d + languageName: node + linkType: hard + +"@jest/types@npm:^27.5.1": + version: 27.5.1 + resolution: "@jest/types@npm:27.5.1" + dependencies: + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^16.0.0 + chalk: ^4.0.0 + checksum: d1f43cc946d87543ddd79d49547aab2399481d34025d5c5f2025d3d99c573e1d9832fa83cef25e9d9b07a8583500229d15bbb07b8e233d127d911d133e2f14b1 + languageName: node + linkType: hard + +"@jest/types@npm:^29.5.0": + version: 29.5.0 + resolution: "@jest/types@npm:29.5.0" + dependencies: + "@jest/schemas": ^29.4.3 + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^17.0.8 + chalk: ^4.0.0 + checksum: 1811f94b19cf8a9460a289c4f056796cfc373480e0492692a6125a553cd1a63824bd846d7bb78820b7b6f758f6dd3c2d4558293bb676d541b2fa59c70fdf9d39 + languageName: node + linkType: hard + +"@joshwooding/vite-plugin-react-docgen-typescript@npm:0.2.1": + version: 0.2.1 + resolution: "@joshwooding/vite-plugin-react-docgen-typescript@npm:0.2.1" + dependencies: + glob: ^7.2.0 + glob-promise: ^4.2.0 + magic-string: ^0.27.0 + react-docgen-typescript: ^2.2.2 + peerDependencies: + typescript: ">= 4.3.x" + vite: ^3.0.0 || ^4.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 91401505b379396cb48c74e99ebafb8a3f85bb0c38783d4b17df42d5420782bf733f049f9a97659feb4423b4e4db9ba35fd8230add5fd32e615d5633d37cdcfd + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": + version: 0.3.3 + resolution: "@jridgewell/gen-mapping@npm:0.3.3" + dependencies: + "@jridgewell/set-array": ^1.0.1 + "@jridgewell/sourcemap-codec": ^1.4.10 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 4a74944bd31f22354fc01c3da32e83c19e519e3bbadafa114f6da4522ea77dd0c2842607e923a591d60a76699d819a2fbb6f3552e277efdb9b58b081390b60ab + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:3.1.0": + version: 3.1.0 + resolution: "@jridgewell/resolve-uri@npm:3.1.0" + checksum: b5ceaaf9a110fcb2780d1d8f8d4a0bfd216702f31c988d8042e5f8fbe353c55d9b0f55a1733afdc64806f8e79c485d2464680ac48a0d9fcadb9548ee6b81d267 + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.0.3": + version: 3.1.1 + resolution: "@jridgewell/resolve-uri@npm:3.1.1" + checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653 + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.0.1": + version: 1.1.2 + resolution: "@jridgewell/set-array@npm:1.1.2" + checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:1.4.14": + version: 1.4.14 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" + checksum: 61100637b6d173d3ba786a5dff019e1a74b1f394f323c1fee337ff390239f053b87266c7a948777f4b1ee68c01a8ad0ab61e5ff4abb5a012a0b091bec391ab97 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.13, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:0.3.9": + version: 0.3.9 + resolution: "@jridgewell/trace-mapping@npm:0.3.9" + dependencies: + "@jridgewell/resolve-uri": ^3.0.3 + "@jridgewell/sourcemap-codec": ^1.4.10 + checksum: d89597752fd88d3f3480845691a05a44bd21faac18e2185b6f436c3b0fd0c5a859fbbd9aaa92050c4052caf325ad3e10e2e1d1b64327517471b7d51babc0ddef + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.15, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.18 + resolution: "@jridgewell/trace-mapping@npm:0.3.18" + dependencies: + "@jridgewell/resolve-uri": 3.1.0 + "@jridgewell/sourcemap-codec": 1.4.14 + checksum: 0572669f855260808c16fe8f78f5f1b4356463b11d3f2c7c0b5580c8ba1cbf4ae53efe9f627595830856e57dbac2325ac17eb0c3dd0ec42102e6f227cc289c02 + languageName: node + linkType: hard + +"@js-temporal/polyfill@npm:^0.4.3": + version: 0.4.4 + resolution: "@js-temporal/polyfill@npm:0.4.4" + dependencies: + jsbi: ^4.3.0 + tslib: ^2.4.1 + checksum: 034c00fdc1aa1a1d96f786ebe568f9f85309bcdcdf1d3fc7f7f670b43a64cafb648739e2363af950685a6d7569fe46c88ee8e28054c7d9b47199015d94a3b8a6 + languageName: node + linkType: hard + +"@jsdoc/salty@npm:^0.2.1": + version: 0.2.5 + resolution: "@jsdoc/salty@npm:0.2.5" + dependencies: + lodash: ^4.17.21 + checksum: 16c65d48c340d8f1b892797bdd6ace4f90d916d16bed5023f2a5421240ead20e828031dfb1d07b8eb0e172a62f532c3c005287e723e30ee9a0c8a0d7d2e98953 + languageName: node + linkType: hard + +"@jspm/core@npm:^2.0.1": + version: 2.0.1 + resolution: "@jspm/core@npm:2.0.1" + checksum: 611f37cadd8a76662309e89afb68bf5936d0fed16aacc8886fef0f0af94a9f7e1241ce6c619b650fa1064631374f6fcadad99be04c9cf504a47f5361746b8d7f + languageName: node + linkType: hard + +"@juggle/resize-observer@npm:^3.3.1": + version: 3.4.0 + resolution: "@juggle/resize-observer@npm:3.4.0" + checksum: 2505028c05cc2e17639fcad06218b1c4b60f932a4ebb4b41ab546ef8c157031ae377e3f560903801f6d01706dbefd4943b6c4704bf19ed86dfa1c62f1473a570 + languageName: node + linkType: hard + +"@mapbox/node-pre-gyp@npm:^1.0.5": + version: 1.0.10 + resolution: "@mapbox/node-pre-gyp@npm:1.0.10" + dependencies: + detect-libc: ^2.0.0 + https-proxy-agent: ^5.0.0 + make-dir: ^3.1.0 + node-fetch: ^2.6.7 + nopt: ^5.0.0 + npmlog: ^5.0.1 + rimraf: ^3.0.2 + semver: ^7.3.5 + tar: ^6.1.11 + bin: + node-pre-gyp: bin/node-pre-gyp + checksum: 1a98db05d955b74dad3814679593df293b9194853698f3f5f1ed00ecd93128cdd4b14fb8767fe44ac6981ef05c23effcfdc88710e7c1de99ccb6f647890597c8 + languageName: node + linkType: hard + +"@mdx-js/esbuild@npm:^2.0.0": + version: 2.3.0 + resolution: "@mdx-js/esbuild@npm:2.3.0" + dependencies: + "@mdx-js/mdx": ^2.0.0 + node-fetch: ^3.0.0 + vfile: ^5.0.0 + peerDependencies: + esbuild: ">=0.11.0" + checksum: ace62593a229f46e5faa542e5c48e10383078a89cce61d6009cc59c51f1ccb35b21a492d4f770423089c1703de8484c14d8dc9f4226c30763b38a156f423b31f + languageName: node + linkType: hard + +"@mdx-js/mdx@npm:^2.0.0, @mdx-js/mdx@npm:^2.2.1": + version: 2.3.0 + resolution: "@mdx-js/mdx@npm:2.3.0" + dependencies: + "@types/estree-jsx": ^1.0.0 + "@types/mdx": ^2.0.0 + estree-util-build-jsx: ^2.0.0 + estree-util-is-identifier-name: ^2.0.0 + estree-util-to-js: ^1.1.0 + estree-walker: ^3.0.0 + hast-util-to-estree: ^2.0.0 + markdown-extensions: ^1.0.0 + periscopic: ^3.0.0 + remark-mdx: ^2.0.0 + remark-parse: ^10.0.0 + remark-rehype: ^10.0.0 + unified: ^10.0.0 + unist-util-position-from-estree: ^1.0.0 + unist-util-stringify-position: ^3.0.0 + unist-util-visit: ^4.0.0 + vfile: ^5.0.0 + checksum: d918766a326502ec0b54adee61dc2930daf5b748acb9107f9bfd1ab0dbc4d7b1a4d0dbb9e21da9dd2a9fc2f9950b2973a43c6ba62d3a72eb67a30f6c953e5be8 + languageName: node + linkType: hard + +"@mdx-js/react@npm:^2.1.5, @mdx-js/react@npm:^2.2.1": + version: 2.3.0 + resolution: "@mdx-js/react@npm:2.3.0" + dependencies: + "@types/mdx": ^2.0.0 + "@types/react": ">=16" + peerDependencies: + react: ">=16" + checksum: f45fe779556e6cd9a787f711274480e0638b63c460f192ebdcd77cc07ffa61e23c98cb46dd46e577093e1cb4997a232a848d1fb0ba850ae204422cf603add524 + languageName: node + linkType: hard + +"@microsoft/api-extractor-model@npm:7.27.0": + version: 7.27.0 + resolution: "@microsoft/api-extractor-model@npm:7.27.0" + dependencies: + "@microsoft/tsdoc": 0.14.2 + "@microsoft/tsdoc-config": ~0.16.1 + "@rushstack/node-core-library": 3.59.1 + checksum: df9818e507fc156acf60dc4bb8759f42506b166b0cf8963a585a38f8f5822169084725472c9196773f0fb77bf5071bfcfacc6d7c698b7ec4a3decdf093375df3 + languageName: node + linkType: hard + +"@microsoft/api-extractor@npm:^7.34.4, @microsoft/api-extractor@npm:^7.35.0": + version: 7.35.0 + resolution: "@microsoft/api-extractor@npm:7.35.0" + dependencies: + "@microsoft/api-extractor-model": 7.27.0 + "@microsoft/tsdoc": 0.14.2 + "@microsoft/tsdoc-config": ~0.16.1 + "@rushstack/node-core-library": 3.59.1 + "@rushstack/rig-package": 0.3.19 + "@rushstack/ts-command-line": 4.13.3 + colors: ~1.2.1 + lodash: ~4.17.15 + resolve: ~1.22.1 + semver: ~7.3.0 + source-map: ~0.6.1 + typescript: ~5.0.4 + bin: + api-extractor: bin/api-extractor + checksum: 4ba907a23404a45dfd9c4b78864f6b956748cb0bb03a29cc113b0355791358972f71912fdab35d7dadca7ec6e00f42623a2c9504aefc149ce3f2de66913d21af + languageName: node + linkType: hard + +"@microsoft/tsdoc-config@npm:0.16.2": + version: 0.16.2 + resolution: "@microsoft/tsdoc-config@npm:0.16.2" + dependencies: + "@microsoft/tsdoc": 0.14.2 + ajv: ~6.12.6 + jju: ~1.4.0 + resolve: ~1.19.0 + checksum: 12b0d703154076bcaac75ca42e804e4fc292672396441e54346d7eadd0d6b57f90980eda2b1bab89b224af86da34a2389f9054002e282011e795ca5919a4386f + languageName: node + linkType: hard + +"@microsoft/tsdoc-config@patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch::locator=%40discordjs%2Fdiscord.js%40workspace%3A.": + version: 0.16.2 + resolution: "@microsoft/tsdoc-config@patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch::version=0.16.2&hash=974f29&locator=%40discordjs%2Fdiscord.js%40workspace%3A." + dependencies: + "@microsoft/tsdoc": 0.14.2 + ajv: ~6.12.6 + jju: ~1.4.0 + resolve: ~1.19.0 + checksum: 5c21552c558779b0dfd0a584ff4bddfc62f5e13cbe9d14c0350a2a37d98dbeb848d4a4d9dfeb746182918f05add5a2a95530deb3f53d3750c5bbe86128df62c6 + languageName: node + linkType: hard + +"@microsoft/tsdoc@npm:0.14.2": + version: 0.14.2 + resolution: "@microsoft/tsdoc@npm:0.14.2" + checksum: b167c89e916ba73ee20b9c9d5dba6aa3a0de25ed3d50050e8a344dca7cd43cb2e1059bd515c820369b6e708901dd3fda476a42bc643ca74a35671ce77f724a3a + languageName: node + linkType: hard + +"@msgpack/msgpack@npm:^3.0.0-beta2": + version: 3.0.0-beta2 + resolution: "@msgpack/msgpack@npm:3.0.0-beta2" + checksum: d86e5d48146051952d6bea35a6cf733a401cf65ad5614d79689aa48c7076021737ca2c782978dd1b6c0c9c45888b246e379e45ae906179e3a0e8ef4ee6f221c1 + languageName: node + linkType: hard + +"@ndelangen/get-tarball@npm:^3.0.7": + version: 3.0.7 + resolution: "@ndelangen/get-tarball@npm:3.0.7" + dependencies: + gunzip-maybe: ^1.4.2 + pump: ^3.0.0 + tar-fs: ^2.1.1 + checksum: f0a44392b8a452cb76f0bf80b1392c968bbf1a8535ea502c99ff3615a454140c41c65003771d017d1de73aa7ca969e14c9fbec8b36027dae74d3b0b85888b482 + languageName: node + linkType: hard + +"@next/bundle-analyzer@npm:^13.4.3": + version: 13.4.3 + resolution: "@next/bundle-analyzer@npm:13.4.3" + dependencies: + webpack-bundle-analyzer: 4.7.0 + checksum: 221743db81ab67f84b240cdbb08975c70a46ac99c59bc01ad426294797c63b8c416f8013d58a5aa85a89fabb3fb3a8fb244ef9a5633181f2b127df23fa3307c3 + languageName: node + linkType: hard + +"@next/env@npm:13.4.3": + version: 13.4.3 + resolution: "@next/env@npm:13.4.3" + checksum: e45f7b7a469e59a8b9b5e8b9969643907b8f6bf54037eee42eb10cb21d6d9455d10f92721eb65cc102e281fdebcb5b93e6e534dc0bacb65b368f85e9d3de49a8 + languageName: node + linkType: hard + +"@next/eslint-plugin-next@npm:^13.4.1": + version: 13.4.3 + resolution: "@next/eslint-plugin-next@npm:13.4.3" + dependencies: + glob: 7.1.7 + checksum: 3d49270e79ab4d3fcd67bad3b56a1810816db7dc73edc3442e2f2d5b17b05bea59308f96c442a42be2e7a98c4d29bc4707a718659ba17bb5b1aca9516513c87f + languageName: node + linkType: hard + +"@next/swc-darwin-arm64@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-darwin-arm64@npm:13.4.3" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@next/swc-darwin-x64@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-darwin-x64@npm:13.4.3" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@next/swc-linux-arm64-gnu@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-linux-arm64-gnu@npm:13.4.3" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@next/swc-linux-arm64-musl@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-linux-arm64-musl@npm:13.4.3" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@next/swc-linux-x64-gnu@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-linux-x64-gnu@npm:13.4.3" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@next/swc-linux-x64-musl@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-linux-x64-musl@npm:13.4.3" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@next/swc-win32-arm64-msvc@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-win32-arm64-msvc@npm:13.4.3" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@next/swc-win32-ia32-msvc@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-win32-ia32-msvc@npm:13.4.3" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@next/swc-win32-x64-msvc@npm:13.4.3": + version: 13.4.3 + resolution: "@next/swc-win32-x64-msvc@npm:13.4.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": 2.0.5 + run-parallel: ^1.1.9 + checksum: a970d595bd23c66c880e0ef1817791432dbb7acbb8d44b7e7d0e7a22f4521260d4a83f7f9fd61d44fda4610105577f8f58a60718105fb38352baed612fd79e59 + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": 2.1.5 + fastq: ^1.6.0 + checksum: 190c643f156d8f8f277bf2a6078af1ffde1fd43f498f187c2db24d35b4b4b5785c02c7dc52e356497b9a1b65b13edc996de08de0b961c32844364da02986dc53 + languageName: node + linkType: hard + +"@npmcli/config@npm:^6.0.0": + version: 6.1.7 + resolution: "@npmcli/config@npm:6.1.7" + dependencies: + "@npmcli/map-workspaces": ^3.0.2 + ini: ^4.1.0 + nopt: ^7.0.0 + proc-log: ^3.0.0 + read-package-json-fast: ^3.0.2 + semver: ^7.3.5 + walk-up-path: ^3.0.1 + checksum: 1812ed321375f357e072d408ff44795dcf82e20c7f501bf0a5bd0d3232a4158b7e76366a27e5c75d2d2f4f0ee52a76bd0c870279189cfc7f170d6b29e3031063 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^1.0.0": + version: 1.1.1 + resolution: "@npmcli/fs@npm:1.1.1" + dependencies: + "@gar/promisify": ^1.0.1 + semver: ^7.3.5 + checksum: f5ad92f157ed222e4e31c352333d0901df02c7c04311e42a81d8eb555d4ec4276ea9c635011757de20cc476755af33e91622838de573b17e52e2e7703f0a9965 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^2.1.0": + version: 2.1.2 + resolution: "@npmcli/fs@npm:2.1.2" + dependencies: + "@gar/promisify": ^1.1.3 + semver: ^7.3.5 + checksum: 405074965e72d4c9d728931b64d2d38e6ea12066d4fad651ac253d175e413c06fe4350970c783db0d749181da8fe49c42d3880bd1cbc12cd68e3a7964d820225 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" + dependencies: + semver: ^7.3.5 + checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + languageName: node + linkType: hard + +"@npmcli/map-workspaces@npm:^3.0.2": + version: 3.0.4 + resolution: "@npmcli/map-workspaces@npm:3.0.4" + dependencies: + "@npmcli/name-from-folder": ^2.0.0 + glob: ^10.2.2 + minimatch: ^9.0.0 + read-package-json-fast: ^3.0.0 + checksum: 99607dbc502b16d0ce7a47a81ccc496b3f5ed10df4e61e61a505929de12c356092996044174ae0cfd6d8cc177ef3b597eef4987b674fc0c5a306d3a8cc1fe91a + languageName: node + linkType: hard + +"@npmcli/move-file@npm:^1.0.1": + version: 1.1.2 + resolution: "@npmcli/move-file@npm:1.1.2" + dependencies: + mkdirp: ^1.0.4 + rimraf: ^3.0.2 + checksum: c96381d4a37448ea280951e46233f7e541058cf57a57d4094dd4bdcaae43fa5872b5f2eb6bfb004591a68e29c5877abe3cdc210cb3588cbf20ab2877f31a7de7 + languageName: node + linkType: hard + +"@npmcli/move-file@npm:^2.0.0": + version: 2.0.1 + resolution: "@npmcli/move-file@npm:2.0.1" + dependencies: + mkdirp: ^1.0.4 + rimraf: ^3.0.2 + checksum: 52dc02259d98da517fae4cb3a0a3850227bdae4939dda1980b788a7670636ca2b4a01b58df03dd5f65c1e3cb70c50fa8ce5762b582b3f499ec30ee5ce1fd9380 + languageName: node + linkType: hard + +"@npmcli/name-from-folder@npm:^2.0.0": + version: 2.0.0 + resolution: "@npmcli/name-from-folder@npm:2.0.0" + checksum: fb3ef891aa57315fb6171866847f298577c8bda98a028e93e458048477133e142b4eb45ce9f3b80454f7c257612cb01754ee782d608507698dd712164436f5bd + languageName: node + linkType: hard + +"@npmcli/package-json@npm:^2.0.0": + version: 2.0.0 + resolution: "@npmcli/package-json@npm:2.0.0" + dependencies: + json-parse-even-better-errors: ^2.3.1 + checksum: 7a598e42d2778654ec87438ebfafbcbafbe5a5f5e89ed2ca1db6ca3f94ef14655e304aa41f77632a2a3f5c66b6bd5960bd9370e0ceb4902ea09346720364f9e4 + languageName: node + linkType: hard + +"@opentelemetry/api-metrics@npm:0.31.0": + version: 0.31.0 + resolution: "@opentelemetry/api-metrics@npm:0.31.0" + dependencies: + "@opentelemetry/api": ^1.0.0 + checksum: 696192c97afb382950064471b0ce90172bae73c6ee47ccd09b59fc0d0e9c84f4685284e633c4338584de91cab07c7848661640eee4ec1f43687ce9953d220f5f + languageName: node + linkType: hard + +"@opentelemetry/api@npm:^1.0.0, @opentelemetry/api@npm:^1.1.0": + version: 1.4.1 + resolution: "@opentelemetry/api@npm:1.4.1" + checksum: e783c40d1a518abf9c4c5d65223237c1392cd9a6c53ac6e2c3ef0c05ff7266e3dfc4fd9874316dae0dcb7a97950878deb513bcbadfaad653d48f0215f2a0911b + languageName: node + linkType: hard + +"@opentelemetry/context-async-hooks@npm:1.13.0": + version: 1.13.0 + resolution: "@opentelemetry/context-async-hooks@npm:1.13.0" + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.5.0" + checksum: 9627bf59805361b463b0e1d8aa64babc7dedbb746a989d41960789c0a1ff570327387c967c832117a224f78a161df1fca169412673d5474555a76e5d98d9c30a + languageName: node + linkType: hard + +"@opentelemetry/core@npm:1.13.0, @opentelemetry/core@npm:^1.5.0": + version: 1.13.0 + resolution: "@opentelemetry/core@npm:1.13.0" + dependencies: + "@opentelemetry/semantic-conventions": 1.13.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.5.0" + checksum: a69916bcb710f1241e98a58ac5f5dfbc3372fdcd6cb2a4b2d33cdeb941765ecbdeea029f60f650a5743a56f583b0f06b672566467b89db84a24f1304bf2e5205 + languageName: node + linkType: hard + +"@opentelemetry/core@npm:1.5.0": + version: 1.5.0 + resolution: "@opentelemetry/core@npm:1.5.0" + dependencies: + "@opentelemetry/semantic-conventions": 1.5.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.2.0" + checksum: a191583afaf731930e3332b4e584541c3486121e6855c5c1dc40a522aabe27c5a1eede13760b9669063d8196f4dc93dbd3c4c1b7fe19e0aeaa1a433a8bb7d1c8 + languageName: node + linkType: hard + +"@opentelemetry/exporter-trace-otlp-grpc@npm:^0.31.0": + version: 0.31.0 + resolution: "@opentelemetry/exporter-trace-otlp-grpc@npm:0.31.0" + dependencies: + "@grpc/grpc-js": ^1.5.9 + "@grpc/proto-loader": ^0.6.9 + "@opentelemetry/core": 1.5.0 + "@opentelemetry/otlp-grpc-exporter-base": 0.31.0 + "@opentelemetry/otlp-transformer": 0.31.0 + "@opentelemetry/resources": 1.5.0 + "@opentelemetry/sdk-trace-base": 1.5.0 + peerDependencies: + "@opentelemetry/api": ^1.0.0 + checksum: a8881dd7a244b2ed351d0bce947b139f7daad108483c02b11ffb3b63da85213c4704abcff152df2d5f09cb498cc7fb7857bb40db9621b199e1d9899eb34b3669 + languageName: node + linkType: hard + +"@opentelemetry/otlp-exporter-base@npm:0.31.0": + version: 0.31.0 + resolution: "@opentelemetry/otlp-exporter-base@npm:0.31.0" + dependencies: + "@opentelemetry/core": 1.5.0 + peerDependencies: + "@opentelemetry/api": ^1.0.0 + checksum: 463501c3eed563652518808553e08c218e65e7f3420733b4a328c2a18b056bb50193fa63950eeb3e2fc0cd16d15678ebb4d15ca9319a844c3cb7aefa7cce8a28 + languageName: node + linkType: hard + +"@opentelemetry/otlp-grpc-exporter-base@npm:0.31.0": + version: 0.31.0 + resolution: "@opentelemetry/otlp-grpc-exporter-base@npm:0.31.0" + dependencies: + "@grpc/grpc-js": ^1.5.9 + "@grpc/proto-loader": ^0.6.9 + "@opentelemetry/core": 1.5.0 + "@opentelemetry/otlp-exporter-base": 0.31.0 + peerDependencies: + "@opentelemetry/api": ^1.0.0 + checksum: 280631364a3736f064679122df910e9aca8d804e5581e12b2f284e9ea74bdee52606cb845877221d7188fcd86f74d42850dc145cfd948aa5ddebfcb842bc02f7 + languageName: node + linkType: hard + +"@opentelemetry/otlp-transformer@npm:0.31.0": + version: 0.31.0 + resolution: "@opentelemetry/otlp-transformer@npm:0.31.0" + dependencies: + "@opentelemetry/api-metrics": 0.31.0 + "@opentelemetry/core": 1.5.0 + "@opentelemetry/resources": 1.5.0 + "@opentelemetry/sdk-metrics-base": 0.31.0 + "@opentelemetry/sdk-trace-base": 1.5.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.2.0" + checksum: a07f9c6b3e472a9580d2391c1b125a57b834ce0a96dcd95e09caa225fbaf22c5871c2cf831a356152868fe0759ffb760374f433c98b2d91af388574564f98dcb + languageName: node + linkType: hard + +"@opentelemetry/propagator-b3@npm:1.13.0": + version: 1.13.0 + resolution: "@opentelemetry/propagator-b3@npm:1.13.0" + dependencies: + "@opentelemetry/core": 1.13.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.5.0" + checksum: 8ee0db7d47efe21c5c8128621a816221a8e94831b410d60b02d7859d373d55521b3574c288014ffbb9916aaad00b259fe4d92dfeab7c06398e96f94e2b2bea63 + languageName: node + linkType: hard + +"@opentelemetry/propagator-jaeger@npm:1.13.0": + version: 1.13.0 + resolution: "@opentelemetry/propagator-jaeger@npm:1.13.0" + dependencies: + "@opentelemetry/core": 1.13.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.5.0" + checksum: 8adf1b7256649c7da9eb3c5d343d8e7e00b45aa7ff64a0e7572453218de26b58b4944ba3952a34ccc008535783e18fb39636a7ca3dfb233d40327269f378cac7 + languageName: node + linkType: hard + +"@opentelemetry/resources@npm:1.13.0, @opentelemetry/resources@npm:^1.5.0": + version: 1.13.0 + resolution: "@opentelemetry/resources@npm:1.13.0" + dependencies: + "@opentelemetry/core": 1.13.0 + "@opentelemetry/semantic-conventions": 1.13.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.5.0" + checksum: ef0a11596f27b5e1c13b74357da06c5c2725a1056df0a583562dbcc739927ad85bb8bdec4e01f4b43f348b448c0146c033b135840a7d388b75cc751a33a6364e + languageName: node + linkType: hard + +"@opentelemetry/resources@npm:1.5.0": + version: 1.5.0 + resolution: "@opentelemetry/resources@npm:1.5.0" + dependencies: + "@opentelemetry/core": 1.5.0 + "@opentelemetry/semantic-conventions": 1.5.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.2.0" + checksum: 0fd743f121522da1b75310795eb12bc65ce092ccf6178bac6cfc8ad5122064701bfca25cad341701adaff0bfc153522631ea9be93f5b27d2730111f8cb807d61 + languageName: node + linkType: hard + +"@opentelemetry/sdk-metrics-base@npm:0.31.0": + version: 0.31.0 + resolution: "@opentelemetry/sdk-metrics-base@npm:0.31.0" + dependencies: + "@opentelemetry/api-metrics": 0.31.0 + "@opentelemetry/core": 1.5.0 + "@opentelemetry/resources": 1.5.0 + lodash.merge: 4.6.2 + peerDependencies: + "@opentelemetry/api": ^1.0.0 + checksum: 8eefbe77e233f88c5565a5b5d86fdeeafe276d65a7a69dd62784542af7ba3b444df8be8471699c03ebd292372d02feb83fedfe0047f2bafbd89fffd5a9633d4c + languageName: node + linkType: hard + +"@opentelemetry/sdk-trace-base@npm:1.13.0, @opentelemetry/sdk-trace-base@npm:^1.5.0": + version: 1.13.0 + resolution: "@opentelemetry/sdk-trace-base@npm:1.13.0" + dependencies: + "@opentelemetry/core": 1.13.0 + "@opentelemetry/resources": 1.13.0 + "@opentelemetry/semantic-conventions": 1.13.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.5.0" + checksum: bfe95d56de998cf4219fa9293c9d2ebbd90d93391bbb8360a1806465983b6665cef58bc2938a8e318ae0712e2482ebed7a9db5d9e8bb6fc010199f5fa8f1592e + languageName: node + linkType: hard + +"@opentelemetry/sdk-trace-base@npm:1.5.0": + version: 1.5.0 + resolution: "@opentelemetry/sdk-trace-base@npm:1.5.0" + dependencies: + "@opentelemetry/core": 1.5.0 + "@opentelemetry/resources": 1.5.0 + "@opentelemetry/semantic-conventions": 1.5.0 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.2.0" + checksum: ca340ea23ffe393a8eb488a398cc8124c82fbc3be76cd15b7a00b9f0e79c723da442f0e485bf4b5445581aa184c4f7e9e62321d9253bb59d679d95d6d177f3c2 + languageName: node + linkType: hard + +"@opentelemetry/sdk-trace-node@npm:^1.5.0": + version: 1.13.0 + resolution: "@opentelemetry/sdk-trace-node@npm:1.13.0" + dependencies: + "@opentelemetry/context-async-hooks": 1.13.0 + "@opentelemetry/core": 1.13.0 + "@opentelemetry/propagator-b3": 1.13.0 + "@opentelemetry/propagator-jaeger": 1.13.0 + "@opentelemetry/sdk-trace-base": 1.13.0 + semver: ^7.3.5 + peerDependencies: + "@opentelemetry/api": ">=1.0.0 <1.5.0" + checksum: d9a9ff07dc05c60a7106f4e0b026c5237c39a0fd3460c43a894d8ba35be1d2ba32a3a24e3cabb02370e0901116ddf3893f976b2592de9c1fc9a9c96593de5079 + languageName: node + linkType: hard + +"@opentelemetry/semantic-conventions@npm:1.13.0, @opentelemetry/semantic-conventions@npm:^1.5.0": + version: 1.13.0 + resolution: "@opentelemetry/semantic-conventions@npm:1.13.0" + checksum: 9cccf1d73315fed3920bb2201c0e82f66e58dddfa475314b6613780c2804570d6f657be3894eb8b84a2a543c9b8cd520587f5d6cd4b62bc6731d7299b4c5ee69 + languageName: node + linkType: hard + +"@opentelemetry/semantic-conventions@npm:1.5.0": + version: 1.5.0 + resolution: "@opentelemetry/semantic-conventions@npm:1.5.0" + checksum: 455298a5037bd34e7fa687a4485bb66b6fead60647570fa5fd9cc8981feba4d5ff083b3c79f6d87ef2cd64df8502b8b3c9dbd337beb2dbbb23ffc98cb081d57c + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + +"@pkgr/utils@npm:^2.3.1": + version: 2.4.0 + resolution: "@pkgr/utils@npm:2.4.0" + dependencies: + cross-spawn: ^7.0.3 + fast-glob: ^3.2.12 + is-glob: ^4.0.3 + open: ^9.1.0 + picocolors: ^1.0.0 + tslib: ^2.5.0 + checksum: 2ed93a92fd58d612c7a7d04f91ce50c967d2e2d5c4f63802f62a882fcb7d91208cf89640bb3baad10ef7d42bea1e196fba956e7e36a68e9f94d2738e8974a24a + languageName: node + linkType: hard + +"@planetscale/database@npm:1.7.0, @planetscale/database@npm:^1.7.0": + version: 1.7.0 + resolution: "@planetscale/database@npm:1.7.0" + checksum: 5fde3f9607930161a13d1d2d059dc0737ef98917604bc0b41a24be031b0aab66b4606ba01576ca7824337fea222d8607cad35aaf4dad199cc0ea26565fe35da1 + languageName: node + linkType: hard + +"@polka/url@npm:^1.0.0-next.20": + version: 1.0.0-next.21 + resolution: "@polka/url@npm:1.0.0-next.21" + checksum: c7654046d38984257dd639eab3dc770d1b0340916097b2fac03ce5d23506ada684e05574a69b255c32ea6a144a957c8cd84264159b545fca031c772289d88788 + languageName: node + linkType: hard + +"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 011fe7ef0826b0fd1a95935a033a3c0fd08483903e1aa8f8b4e0704e3233406abb9ee25350ec0c20bbecb2aad8da0dcea58b392bbd77d6690736f02c143865d2 + languageName: node + linkType: hard + +"@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 67173ac34de1e242c55da52c2f5bdc65505d82453893f9b51dc74af9fe4c065cf4a657a4538e91b0d4a1a1e0a0642215e31894c31650ff6e3831471061e1ee9e + languageName: node + linkType: hard + +"@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 59240c850b1d3d0b56d8f8098dd04787dcaec5c5bd8de186fa548de86b86076e1c50e80144b90335e705a044edf5bc8b0998548474c2a10a98c7e004a1547e4b + languageName: node + linkType: hard + +"@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 0369163a3d226851682f855f81413cbf166cd98f131edb94a0f67f79e75342d86e89df9d7a1df08ac28be2bc77e0a7f0200526bb6c2a407abbfee1f0262d5fd7 + languageName: node + linkType: hard + +"@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": ^1.1.1 + "@protobufjs/inquire": ^1.1.0 + checksum: 3fce7e09eb3f1171dd55a192066450f65324fd5f7cc01a431df01bb00d0a895e6bfb5b0c5561ce157ee1d886349c90703d10a4e11a1a256418ff591b969b3477 + languageName: node + linkType: hard + +"@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 5781e1241270b8bd1591d324ca9e3a3128d2f768077a446187a049e36505e91bc4156ed5ac3159c3ce3d2ba3743dbc757b051b2d723eea9cd367bfd54ab29b2f + languageName: node + linkType: hard + +"@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: ca06f02eaf65ca36fb7498fc3492b7fc087bfcc85c702bac5b86fad34b692bdce4990e0ef444c1e2aea8c034227bd1f0484be02810d5d7e931c55445555646f4 + languageName: node + linkType: hard + +"@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 856eeb532b16a7aac071cacde5c5620df800db4c80cee6dbc56380524736205aae21e5ae47739114bf669ab5e8ba0e767a282ad894f3b5e124197cb9224445ee + languageName: node + linkType: hard + +"@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: d6a34fbbd24f729e2a10ee915b74e1d77d52214de626b921b2d77288bd8f2386808da2315080f2905761527cceffe7ec34c7647bd21a5ae41a25e8212ff79451 + languageName: node + linkType: hard + +"@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: f9bf3163d13aaa3b6f5e6fbf37a116e094ea021c0e1f2a7ccd0e12a29e2ce08dafba4e8b36e13f8ed7397e1591610ce880ed1289af4d66cf4ace8a36a9557278 + languageName: node + linkType: hard + +"@puppeteer/browsers@npm:1.3.0": + version: 1.3.0 + resolution: "@puppeteer/browsers@npm:1.3.0" + dependencies: + debug: 4.3.4 + extract-zip: 2.0.1 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + progress: 2.0.3 + proxy-from-env: 1.1.0 + tar-fs: 2.1.1 + unbzip2-stream: 1.4.3 + yargs: 17.7.1 + peerDependencies: + typescript: ">= 4.7.4" + peerDependenciesMeta: + typescript: + optional: true + bin: + browsers: lib/cjs/main-cli.js + checksum: b966546abc56d23e1546a8139a5c10137e7b67c4a7403947518bab27a47a0d8f8a0b30c12108f04014a08e345f7e5d899b174dab3605d46774bd0245295c8789 + languageName: node + linkType: hard + +"@qiwi/npm-registry-client@npm:^8.9.1": + version: 8.9.1 + resolution: "@qiwi/npm-registry-client@npm:8.9.1" + dependencies: + concat-stream: ^2.0.0 + graceful-fs: ^4.2.4 + normalize-package-data: ~1.0.1 || ^2.0.0 || ^3.0.0 + npm-package-arg: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^8.0.0 + npmlog: 2 || ^3.1.0 || ^4.0.0 + once: ^1.4.0 + request: ^2.88.2 + retry: ^0.12.0 + safe-buffer: ^5.2.1 + semver: 2 >=2.2.1 || 3.x || 4 || 5 || 7 + slide: ^1.1.6 + ssri: ^8.0.0 + dependenciesMeta: + npmlog: + optional: true + checksum: 1f0e3a06baa2c62ecd3d3789a864aa23aef2e9de466a67f435c2f1e50499c33f2cb2d5d1fd038c229039a61f01a96a7248b450422960cdcafb8933d11c07669a + languageName: node + linkType: hard + +"@radix-ui/primitive@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/primitive@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + checksum: 72996afaf346ec4f4c73422f14f6cb2d0de994801ba7cbb9a4a67b0050e0cd74625182c349ef8017ccae1406579d4b74a34a225ef2efe61e8e5337decf235deb + languageName: node + linkType: hard + +"@radix-ui/react-compose-refs@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-compose-refs@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: fb98be2e275a1a758ccac647780ff5b04be8dcf25dcea1592db3b691fecf719c4c0700126da605b2f512dd89caa111352b9fad59528d736b4e0e9a0e134a74a1 + languageName: node + linkType: hard + +"@radix-ui/react-context@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-context@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: 43c6b6f2183398161fe6b109e83fff240a6b7babbb27092b815932342a89d5ca42aa9806bfae5927970eed5ff90feed04c67aa29c6721f84ae826f17fcf34ce0 + languageName: node + linkType: hard + +"@radix-ui/react-dialog@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-dialog@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/primitive": 1.0.0 + "@radix-ui/react-compose-refs": 1.0.0 + "@radix-ui/react-context": 1.0.0 + "@radix-ui/react-dismissable-layer": 1.0.0 + "@radix-ui/react-focus-guards": 1.0.0 + "@radix-ui/react-focus-scope": 1.0.0 + "@radix-ui/react-id": 1.0.0 + "@radix-ui/react-portal": 1.0.0 + "@radix-ui/react-presence": 1.0.0 + "@radix-ui/react-primitive": 1.0.0 + "@radix-ui/react-slot": 1.0.0 + "@radix-ui/react-use-controllable-state": 1.0.0 + aria-hidden: ^1.1.1 + react-remove-scroll: 2.5.4 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + checksum: 32a1ab36a483ceae40b804f116611577b976e1781f33c8d74093f4132fd230b325eadd0306efd77a628d604b61c3a592d4c720a5b7e69e74dbfb56ce85b2c6fd + languageName: node + linkType: hard + +"@radix-ui/react-dismissable-layer@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-dismissable-layer@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/primitive": 1.0.0 + "@radix-ui/react-compose-refs": 1.0.0 + "@radix-ui/react-primitive": 1.0.0 + "@radix-ui/react-use-callback-ref": 1.0.0 + "@radix-ui/react-use-escape-keydown": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + checksum: c5af6445ea3f584bad1fb3ed01703c2d4a889d9b99b23bc2c821a2c166fdbb75cfdd1e4870d3f958d9ac78f5e1b8006f762317cba765839592e5c5af1183a7a7 + languageName: node + linkType: hard + +"@radix-ui/react-focus-guards@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-focus-guards@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: 8c714e8caa6032f5402eecb0323addd7456d3496946dbad1b9ee8ebf5845943876945e7af9bca179e9f8ffe5100e61cb4ba54a185873949125c310c406be5aa4 + languageName: node + linkType: hard + +"@radix-ui/react-focus-scope@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-focus-scope@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-compose-refs": 1.0.0 + "@radix-ui/react-primitive": 1.0.0 + "@radix-ui/react-use-callback-ref": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + checksum: 2ee0b9a2d1905aba25d0225c203d20745fd798aa61d65f55c6041169701d47d6b801d4392a57d94968f0d8ef3410eb79fcab19c9c80f03e9b9f6b24f6f997f98 + languageName: node + linkType: hard + +"@radix-ui/react-id@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-id@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-use-layout-effect": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: ba323cedd6a6df6f6e51ed1f7f7747988ce432b47fd94d860f962b14b342dcf049eae33f8ad0b72fd7df6329a7375542921132271fba64ab0a271c93f09c48d1 + languageName: node + linkType: hard + +"@radix-ui/react-portal@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-portal@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-primitive": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + checksum: dfb194b2df32830db2daf01569176c6e4cf3af2c6e393ece60532543902acf13a6629f9a45003902c99df195c2249bc56d4f4425a5fed2897555df9bdf01efa0 + languageName: node + linkType: hard + +"@radix-ui/react-presence@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-presence@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-compose-refs": 1.0.0 + "@radix-ui/react-use-layout-effect": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + checksum: a607d67795aa265e88f1765dcc7c18bebf6d88d116cb7f529ebe5a3fbbe751a42763aff0c1c89cdd8ce7f7664355936c4070fd3d4685774aff1a80fa95f4665b + languageName: node + linkType: hard + +"@radix-ui/react-primitive@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-primitive@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-slot": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + checksum: fb3fe8c8c5a57995716cce4d7e9039e474c09ba5d714994419ad4940bc954da670f1188813cc931f189b23d9bd5a67adf7087bf44fe1d4272b4a334a3514d38b + languageName: node + linkType: hard + +"@radix-ui/react-slot@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-slot@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-compose-refs": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: 60c0190ebdca21785b4f8b58a0c52717600c98953fc49da9580870519c60f52d5cf873dffa05446f4bb539066326ccec0827f4ca252b02ec4ff1a4ae203f59d7 + languageName: node + linkType: hard + +"@radix-ui/react-use-callback-ref@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-use-callback-ref@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: a8dda76ba0a26e23dc6ab5003831ad7439f59ba9d696a517643b9ee6a7fb06b18ae7a8f5a3c00c530d5c8104745a466a077b7475b99b4c0f5c15f5fc29474471 + languageName: node + linkType: hard + +"@radix-ui/react-use-controllable-state@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-use-controllable-state@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-use-callback-ref": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: 35f1e714bbe3fc9f5362a133339dd890fb96edb79b63168a99403c65dd5f2b63910e0c690255838029086719e31360fa92544a55bc902cfed4442bb3b55822e2 + languageName: node + linkType: hard + +"@radix-ui/react-use-escape-keydown@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-use-escape-keydown@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-use-callback-ref": 1.0.0 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: a6728d40e059fdf2da0703cde9afb10defbcd951d6e1dc48522f33f9399f5aa0514751d9e25847bdcc57328b9d745a3baa36baf9f6af6453a5c894dfcbd40352 + languageName: node + linkType: hard + +"@radix-ui/react-use-layout-effect@npm:1.0.0": + version: 1.0.0 + resolution: "@radix-ui/react-use-layout-effect@npm:1.0.0" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + react: ^16.8 || ^17.0 || ^18.0 + checksum: fcdc8cfa79bd45766ebe3de11039c58abe3fed968cb39c12b2efce5d88013c76fe096ea4cee464d42576d02fe7697779b682b4268459bca3c4e48644f5b4ac5e + languageName: node + linkType: hard + +"@react-icons/all-files@npm:^4.1.0": + version: 4.1.0 + resolution: "@react-icons/all-files@npm:4.1.0" + peerDependencies: + react: "*" + checksum: c34c644650a144e4f2157c20b3106200ac1f76b3132dcda1a40f061e000a34c78df188266395afae571d5c85bf48365824db7b1bf8b7ae6229fdc148c941ab85 + languageName: node + linkType: hard + +"@remix-run/dev@npm:@vercel/remix-run-dev@1.16.1": + version: 1.16.1 + resolution: "@vercel/remix-run-dev@npm:1.16.1" + dependencies: + "@babel/core": ^7.21.8 + "@babel/generator": ^7.21.5 + "@babel/parser": ^7.21.8 + "@babel/plugin-syntax-jsx": ^7.21.4 + "@babel/plugin-syntax-typescript": ^7.21.4 + "@babel/preset-env": ^7.21.5 + "@babel/preset-typescript": ^7.21.5 + "@babel/traverse": ^7.21.5 + "@babel/types": ^7.21.5 + "@npmcli/package-json": ^2.0.0 + "@remix-run/server-runtime": 1.16.1 + "@vanilla-extract/integration": ^6.2.0 + arg: ^5.0.1 + cacache: ^15.0.5 + chalk: ^4.1.2 + chokidar: ^3.5.1 + dotenv: ^16.0.0 + esbuild: 0.17.6 + esbuild-plugin-polyfill-node: ^0.2.0 + execa: 5.1.1 + exit-hook: 2.2.1 + express: ^4.17.1 + fast-glob: 3.2.11 + fs-extra: ^10.0.0 + get-port: ^5.1.1 + gunzip-maybe: ^1.4.2 + inquirer: ^8.2.1 + jsesc: 3.0.2 + json5: ^2.2.2 + lodash: ^4.17.21 + lodash.debounce: ^4.0.8 + lru-cache: ^7.14.1 + minimatch: ^9.0.0 + node-fetch: ^2.6.9 + ora: ^5.4.1 + postcss: ^8.4.19 + postcss-discard-duplicates: ^5.1.0 + postcss-load-config: ^4.0.1 + postcss-modules: ^6.0.0 + prettier: 2.7.1 + pretty-ms: ^7.0.1 + proxy-agent: ^5.0.0 + react-refresh: ^0.14.0 + recast: ^0.21.5 + remark-frontmatter: 4.0.1 + remark-mdx-frontmatter: ^1.0.1 + semver: ^7.3.7 + sort-package-json: ^1.55.0 + tar-fs: ^2.1.1 + tsconfig-paths: ^4.0.0 + ws: ^7.4.5 + xdm: ^2.0.0 + peerDependencies: + "@remix-run/serve": ^1.16.1 + peerDependenciesMeta: + "@remix-run/serve": + optional: true + bin: + remix: dist/cli.js + checksum: b297d6862a57493e2217fe4602f628dfd456b69330cf2673eb326d23b7bc4e5837148b8b7ffb0eb170086279a3448d076b4d48ce6c4fcbefb5818ea4ac3720a2 + languageName: node + linkType: hard + +"@remix-run/router@npm:1.6.2": + version: 1.6.2 + resolution: "@remix-run/router@npm:1.6.2" + checksum: 5969d313bff6ba5c75917910090cebafda84b9d3b4b453fae6b3d60fea9f938078578ffca769c532ab7ce252cd4a207b78d1024d7c727ab80dd572e62fd3b3f2 + languageName: node + linkType: hard + +"@remix-run/server-runtime@npm:1.16.1": + version: 1.16.1 + resolution: "@remix-run/server-runtime@npm:1.16.1" + dependencies: + "@remix-run/router": 1.6.2 + "@web3-storage/multipart-parser": ^1.0.0 + cookie: ^0.4.1 + set-cookie-parser: ^2.4.8 + source-map: ^0.7.3 + checksum: 797b0d839e53d2d0de7259d744beff17b93d9a424253efdd69de7798cb5b0a7fb7334ce3764faa44d2c23f9d65fc59477773e5246e59c81470c6e9c597928314 + languageName: node + linkType: hard + +"@resvg/resvg-wasm@npm:2.4.1": + version: 2.4.1 + resolution: "@resvg/resvg-wasm@npm:2.4.1" + checksum: 855aa1e5f1b228b9d2fe87e5d12b628c64b43a513fb67cd78b2eb447684d6b0861543a77ff8b878b21bf89b048ffeff73267685967d9f20cb8ef2c350dac5c81 + languageName: node + linkType: hard + +"@rollup/pluginutils@npm:^4.0.0, @rollup/pluginutils@npm:^4.2.0": + version: 4.2.1 + resolution: "@rollup/pluginutils@npm:4.2.1" + dependencies: + estree-walker: ^2.0.1 + picomatch: ^2.2.2 + checksum: 6bc41f22b1a0f1efec3043899e4d3b6b1497b3dea4d94292d8f83b4cf07a1073ecbaedd562a22d11913ff7659f459677b01b09e9598a98936e746780ecc93a12 + languageName: node + linkType: hard + +"@rollup/pluginutils@npm:^5.0.2": + version: 5.0.2 + resolution: "@rollup/pluginutils@npm:5.0.2" + dependencies: + "@types/estree": ^1.0.0 + estree-walker: ^2.0.2 + picomatch: ^2.3.1 + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + checksum: edea15e543bebc7dcac3b0ac8bc7b8e8e6dbd46e2864dbe5dd28072de1fbd5b0e10d545a610c0edaa178e8a7ac432e2a2a52e547ece1308471412caba47db8ce + languageName: node + linkType: hard + +"@rushstack/eslint-patch@npm:^1.2.0": + version: 1.3.0 + resolution: "@rushstack/eslint-patch@npm:1.3.0" + checksum: 2860b4adeebbab9a13bff68a2737ecf660fe199a3d2eca45b0359132ff92052467622ac4b22837958bc3ad611714d5f2b662db98ffdc5db34df604b4d502d347 + languageName: node + linkType: hard + +"@rushstack/node-core-library@npm:3.59.1, @rushstack/node-core-library@npm:^3.55.2": + version: 3.59.1 + resolution: "@rushstack/node-core-library@npm:3.59.1" + dependencies: + colors: ~1.2.1 + fs-extra: ~7.0.1 + import-lazy: ~4.0.0 + jju: ~1.4.0 + resolve: ~1.22.1 + semver: ~7.3.0 + z-schema: ~5.0.2 + peerDependencies: + "@types/node": "*" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 2011c4ee736379f977d1b610e404f4a5771159c2b73e29d27b0b028c0141a100795d7263cae19621e5e311c516e9392d0e1aba0153c06e77929dba2776cce4c8 languageName: node linkType: hard -"@microsoft/tsdoc@npm:0.14.2": - version: 0.14.2 - resolution: "@microsoft/tsdoc@npm:0.14.2" - checksum: b167c89e916ba73ee20b9c9d5dba6aa3a0de25ed3d50050e8a344dca7cd43cb2e1059bd515c820369b6e708901dd3fda476a42bc643ca74a35671ce77f724a3a +"@rushstack/rig-package@npm:0.3.19": + version: 0.3.19 + resolution: "@rushstack/rig-package@npm:0.3.19" + dependencies: + resolve: ~1.22.1 + strip-json-comments: ~3.1.1 + checksum: f7af6a917325d09795b5e1207f5c5ebc92ce0a861252698064f16fa8815b6799cfb7df2b9adad08f07b9a8617211ce522f524edb55a638d30b6b4d4a2135e2d5 languageName: node linkType: hard -"@msgpack/msgpack@npm:^2.8.0": - version: 2.8.0 - resolution: "@msgpack/msgpack@npm:2.8.0" - checksum: bead9393f57239007a2fe455df5277cbc03b125f14f310162a652b81471dcf3ab6780eaa24b36e20aa742998910a6840147d08b7267063b8e2de5d40c624360e +"@rushstack/ts-command-line@npm:4.13.3": + version: 4.13.3 + resolution: "@rushstack/ts-command-line@npm:4.13.3" + dependencies: + "@types/argparse": 1.0.38 + argparse: ~1.0.9 + colors: ~1.2.1 + string-argv: ~0.3.1 + checksum: bef8088712361d1051ca21027cded5358cdf73440d9ea7a7e517d868524a3e483cdac72f0fe0aa5e2ffd7a1feeddb7cff224b06f91e66c0846fdf3d126ec9248 languageName: node linkType: hard -"@next/env@npm:12.3.1": - version: 12.3.1 - resolution: "@next/env@npm:12.3.1" - checksum: ea7f2ad9080bdec91dd9e7d84db063793717fb1e6c668ff99cdd9103b9a7f2dd0afd153f04882944d24124965f2f78cdf24dc71da3dcd5afad3a078816abc528 +"@sapphire/async-queue@npm:^1.5.0": + version: 1.5.0 + resolution: "@sapphire/async-queue@npm:1.5.0" + checksum: 983dbd1fd1b1798496e5edb6a0db7e4d90015160e1028f20475eab0a92625513f1e8d938bc0305811a9cec461c94e01b1e4191615ff03ba49356f568f3255250 languageName: node linkType: hard -"@next/eslint-plugin-next@npm:^12.3.1": - version: 12.3.1 - resolution: "@next/eslint-plugin-next@npm:12.3.1" +"@sapphire/fetch@npm:^2.4.1": + version: 2.4.1 + resolution: "@sapphire/fetch@npm:2.4.1" dependencies: - glob: 7.1.7 - checksum: 157b1126f016a0090b62f590d9c331c58221c4efaf3453c294a0d26e75497704617549480e9bba3ddaf278a355359133dd239c3960f684f2abe575553ec59a96 + cross-fetch: ^3.1.5 + checksum: f8ab0baa59dfcb931729a46957073e4e26377b6b5e3bdbbed921ae793c0848a240545ed157efd5db13342d68eed84dc73c6fe83038a5e62af9daa3715326c4a9 languageName: node linkType: hard -"@next/swc-android-arm-eabi@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-android-arm-eabi@npm:12.3.1" - conditions: os=android & cpu=arm +"@sapphire/result@npm:^2.6.0": + version: 2.6.4 + resolution: "@sapphire/result@npm:2.6.4" + checksum: 37d8af05544bf6fcb9b10cf4aa4d60ab0f0798c4e302f4e401f63b1347602b89b10cbbf6fe789681dc2060ad15c3093c96f86dfbee6ac463dba060cb731d7208 languageName: node linkType: hard -"@next/swc-android-arm64@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-android-arm64@npm:12.3.1" - conditions: os=android & cpu=arm64 +"@sapphire/shapeshift@npm:^3.9.0": + version: 3.9.0 + resolution: "@sapphire/shapeshift@npm:3.9.0" + dependencies: + fast-deep-equal: ^3.1.3 + lodash: ^4.17.21 + checksum: 300cb9ac33ce0d2ca4adea37afa4065f8ceb483fdc5110d08335fee2f0c43a48acb4b8e219c3f2c6ef1fc010b272e2dbfd754303cf303ea649ce8372c365a6c4 languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-darwin-arm64@npm:12.3.1" - conditions: os=darwin & cpu=arm64 +"@sapphire/snowflake@npm:^3.5.1": + version: 3.5.1 + resolution: "@sapphire/snowflake@npm:3.5.1" + checksum: 8fc025020adab1a7a1a5d2cf07704d598cc1977b50e5fcd3a5dd239f00934dc936d3a4d5ae336e71d8bf1d88ec27aa814b34de79e38ff097b7b9ba5a7977a683 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-darwin-x64@npm:12.3.1" - conditions: os=darwin & cpu=x64 +"@sapphire/utilities@npm:3.11.0": + version: 3.11.0 + resolution: "@sapphire/utilities@npm:3.11.0" + checksum: 3c8521038b8879524e8114f39eefc8b3b06cf825995f709684238b5cb14bd7df06d232a26a88f79160df290a66f9aa3133f5ce4ff8e2398033db9f301ad31e0d languageName: node linkType: hard -"@next/swc-freebsd-x64@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-freebsd-x64@npm:12.3.1" - conditions: os=freebsd & cpu=x64 +"@sapphire/utilities@npm:^3.11.0": + version: 3.11.2 + resolution: "@sapphire/utilities@npm:3.11.2" + checksum: af06b3f52156af397a3be564f992bedefd728ea2d44fee8ffdc00242de0454075e722091cc213d4ad2fb4ef5c3b78740bf5e7f75242851d31a56206f51a8f403 languageName: node linkType: hard -"@next/swc-linux-arm-gnueabihf@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-linux-arm-gnueabihf@npm:12.3.1" - conditions: os=linux & cpu=arm +"@sentry/core@npm:6.19.7": + version: 6.19.7 + resolution: "@sentry/core@npm:6.19.7" + dependencies: + "@sentry/hub": 6.19.7 + "@sentry/minimal": 6.19.7 + "@sentry/types": 6.19.7 + "@sentry/utils": 6.19.7 + tslib: ^1.9.3 + checksum: d212e8ef07114549de4a93b81f8bfa217ca1550ca7a5eeaa611e5629faef78ff72663ce561ffa2cff48f3dc556745ef65177044f9965cdd3cbccf617cf3bf675 languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-linux-arm64-gnu@npm:12.3.1" - conditions: os=linux & cpu=arm64 & libc=glibc +"@sentry/hub@npm:6.19.7": + version: 6.19.7 + resolution: "@sentry/hub@npm:6.19.7" + dependencies: + "@sentry/types": 6.19.7 + "@sentry/utils": 6.19.7 + tslib: ^1.9.3 + checksum: 10bb1c5cba1b0f1e27a3dd0a186c22f94aeaf11c4662890ab07b2774f46f46af78d61e3ba71d76edc750a7b45af86edd032f35efecdb4efa2eaf551080ccdcb1 languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-linux-arm64-musl@npm:12.3.1" - conditions: os=linux & cpu=arm64 & libc=musl +"@sentry/minimal@npm:6.19.7": + version: 6.19.7 + resolution: "@sentry/minimal@npm:6.19.7" + dependencies: + "@sentry/hub": 6.19.7 + "@sentry/types": 6.19.7 + tslib: ^1.9.3 + checksum: 9153ac426ee056fc34c5be898f83d74ec08f559d69f544c5944ec05e584b62ed356b92d1a9b08993a7022ad42b5661c3d72881221adc19bee5fc1af3ad3864a8 languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-linux-x64-gnu@npm:12.3.1" - conditions: os=linux & cpu=x64 & libc=glibc +"@sentry/node@npm:^6.17.4": + version: 6.19.7 + resolution: "@sentry/node@npm:6.19.7" + dependencies: + "@sentry/core": 6.19.7 + "@sentry/hub": 6.19.7 + "@sentry/types": 6.19.7 + "@sentry/utils": 6.19.7 + cookie: ^0.4.1 + https-proxy-agent: ^5.0.0 + lru_map: ^0.3.3 + tslib: ^1.9.3 + checksum: 2293b0d1d1f9fac3a451eb94f820bc27721c8edddd1f373064666ddd6272f0a4c70dbe58c6c4b3d3ccaf4578aab8f466d71ee69f6f6ff93521bbb02dfe829ce5 languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-linux-x64-musl@npm:12.3.1" - conditions: os=linux & cpu=x64 & libc=musl +"@sentry/types@npm:6.19.7": + version: 6.19.7 + resolution: "@sentry/types@npm:6.19.7" + checksum: f46ef74a33376ad6ea9b128115515c58eb9369d89293c60aa67abca26b5d5d519aa4d0a736db56ae0d75ffd816643d62187018298523cbc2e6c2fb3a6b2a9035 languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-win32-arm64-msvc@npm:12.3.1" - conditions: os=win32 & cpu=arm64 +"@sentry/utils@npm:6.19.7": + version: 6.19.7 + resolution: "@sentry/utils@npm:6.19.7" + dependencies: + "@sentry/types": 6.19.7 + tslib: ^1.9.3 + checksum: a000223b9c646c64e3565e79cace1eeb75114342b768367c4dddd646476c215eb1bddfb70c63f05e2352d3bce2d7d415344e4757a001605d0e01ac74da5dd306 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-win32-ia32-msvc@npm:12.3.1" - conditions: os=win32 & cpu=ia32 +"@shuding/opentype.js@npm:1.4.0-beta.0": + version: 1.4.0-beta.0 + resolution: "@shuding/opentype.js@npm:1.4.0-beta.0" + dependencies: + fflate: ^0.7.3 + string.prototype.codepointat: ^0.2.1 + bin: + ot: bin/ot + checksum: af3478c40c068c7f6b6050b274a10837fcd1417c072b6af2b9d4fa48b8efe0bc93ec4b5f80b186678672f7d293027151389c66a4c5a156b48b810b8e8f3f5cdf languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:12.3.1": - version: 12.3.1 - resolution: "@next/swc-win32-x64-msvc@npm:12.3.1" - conditions: os=win32 & cpu=x64 +"@sinclair/typebox@npm:0.25.24, @sinclair/typebox@npm:^0.25.16": + version: 0.25.24 + resolution: "@sinclair/typebox@npm:0.25.24" + checksum: 10219c58f40b8414c50b483b0550445e9710d4fe7b2c4dccb9b66533dd90ba8e024acc776026cebe81e87f06fa24b07fdd7bc30dd277eb9cc386ec50151a3026 languageName: node linkType: hard -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": 2.0.5 - run-parallel: ^1.1.9 - checksum: a970d595bd23c66c880e0ef1817791432dbb7acbb8d44b7e7d0e7a22f4521260d4a83f7f9fd61d44fda4610105577f8f58a60718105fb38352baed612fd79e59 +"@sinclair/typebox@npm:^0.24.1": + version: 0.24.51 + resolution: "@sinclair/typebox@npm:0.24.51" + checksum: fd0d855e748ef767eb19da1a60ed0ab928e91e0f358c1dd198d600762c0015440b15755e96d1176e2a0db7e09c6a64ed487828ee10dd0c3e22f61eb09c478cd0 languageName: node linkType: hard -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 012480b5ca9d97bff9261571dbbec7bbc6033f69cc92908bc1ecfad0792361a5a1994bc48674b9ef76419d056a03efadfce5a6cf6dbc0a36559571a7a483f6f0 +"@sindresorhus/is@npm:^4.0.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 83839f13da2c29d55c97abc3bc2c55b250d33a0447554997a85c539e058e57b8da092da396e252b11ec24a0279a0bed1f537fa26302209327060643e327f81d2 languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" +"@sinonjs/commons@npm:^3.0.0": + version: 3.0.0 + resolution: "@sinonjs/commons@npm:3.0.0" dependencies: - "@nodelib/fs.scandir": 2.1.5 - fastq: ^1.6.0 - checksum: 190c643f156d8f8f277bf2a6078af1ffde1fd43f498f187c2db24d35b4b4b5785c02c7dc52e356497b9a1b65b13edc996de08de0b961c32844364da02986dc53 + type-detect: 4.0.8 + checksum: b4b5b73d4df4560fb8c0c7b38c7ad4aeabedd362f3373859d804c988c725889cde33550e4bcc7cd316a30f5152a2d1d43db71b6d0c38f5feef71fd8d016763f8 languageName: node linkType: hard -"@npmcli/fs@npm:^2.1.0": - version: 2.1.2 - resolution: "@npmcli/fs@npm:2.1.2" +"@sinonjs/fake-timers@npm:^10.0.2": + version: 10.2.0 + resolution: "@sinonjs/fake-timers@npm:10.2.0" dependencies: - "@gar/promisify": ^1.1.3 - semver: ^7.3.5 - checksum: 405074965e72d4c9d728931b64d2d38e6ea12066d4fad651ac253d175e413c06fe4350970c783db0d749181da8fe49c42d3880bd1cbc12cd68e3a7964d820225 + "@sinonjs/commons": ^3.0.0 + checksum: 586c76e1dd90d03b0c4e754f2011325b38ac6055878c81c52434c900f36d9d245438c96ef69e08e28d9fbecf2335fb347b67850962d8b6e539dd7359d8c62802 languageName: node linkType: hard -"@npmcli/move-file@npm:^2.0.0": - version: 2.0.1 - resolution: "@npmcli/move-file@npm:2.0.1" - dependencies: - mkdirp: ^1.0.4 - rimraf: ^3.0.2 - checksum: 52dc02259d98da517fae4cb3a0a3850227bdae4939dda1980b788a7670636ca2b4a01b58df03dd5f65c1e3cb70c50fa8ce5762b582b3f499ec30ee5ce1fd9380 +"@snyk/dep-graph@npm:^2.3.0": + version: 2.6.1 + resolution: "@snyk/dep-graph@npm:2.6.1" + dependencies: + event-loop-spinner: ^2.1.0 + lodash.clone: ^4.5.0 + lodash.constant: ^3.0.0 + lodash.filter: ^4.6.0 + lodash.foreach: ^4.5.0 + lodash.isempty: ^4.4.0 + lodash.isequal: ^4.5.0 + lodash.isfunction: ^3.0.9 + lodash.isundefined: ^3.0.1 + lodash.map: ^4.6.0 + lodash.reduce: ^4.6.0 + lodash.size: ^4.2.0 + lodash.transform: ^4.6.0 + lodash.union: ^4.6.0 + lodash.values: ^4.3.0 + object-hash: ^3.0.0 + packageurl-js: ^1.0.0 + semver: ^7.0.0 + tslib: ^2 + checksum: a1e5ceacd0b557e0194aa1daafd0ad09af027309594ae21e66bfa7ae74437b6272b7a31a105163e4fcf2fbe986d9547c04b5956ecd06e519fb7fed5df700cd78 + languageName: node + linkType: hard + +"@snyk/graphlib@npm:2.1.9-patch.3": + version: 2.1.9-patch.3 + resolution: "@snyk/graphlib@npm:2.1.9-patch.3" + dependencies: + lodash.clone: ^4.5.0 + lodash.constant: ^3.0.0 + lodash.filter: ^4.6.0 + lodash.foreach: ^4.5.0 + lodash.has: ^4.5.2 + lodash.isempty: ^4.4.0 + lodash.isfunction: ^3.0.9 + lodash.isundefined: ^3.0.1 + lodash.keys: ^4.2.0 + lodash.map: ^4.6.0 + lodash.reduce: ^4.6.0 + lodash.size: ^4.2.0 + lodash.transform: ^4.6.0 + lodash.union: ^4.6.0 + lodash.values: ^4.3.0 + checksum: 5ea100e7403fb25735a46a76a6a3f6612e90755a3f4e7300ebae61aea47aef038cb0266186581987a71fbd01ac1caa1d93d799a80af08548a528ee45cd0e881b + languageName: node + linkType: hard + +"@storybook/addon-actions@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-actions@npm:7.0.15" + dependencies: + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + dequal: ^2.0.2 + lodash: ^4.17.21 + polished: ^4.2.2 + prop-types: ^15.7.2 + react-inspector: ^6.0.0 + telejson: ^7.0.3 + ts-dedent: ^2.0.0 + uuid: ^9.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 7c45055737154e46e6ea8c90f76fb6a0313b81039e7f9cc938dcb8aa884d7cd76a9bf0ffba4d3e5e48974d3b07ca9ff154a7409b81a0e21b6c554b052c856cba languageName: node linkType: hard -"@pkgr/utils@npm:^2.3.0, @pkgr/utils@npm:^2.3.1": - version: 2.3.1 - resolution: "@pkgr/utils@npm:2.3.1" +"@storybook/addon-backgrounds@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-backgrounds@npm:7.0.15" dependencies: - cross-spawn: ^7.0.3 - is-glob: ^4.0.3 - open: ^8.4.0 - picocolors: ^1.0.0 - tiny-glob: ^0.2.9 - tslib: ^2.4.0 - checksum: 118a1971120253740121a1db0a6658c21195b7da962acf9c124b507a3df707cfc97b0b84a16edcbd4352853b182e8337da9fc6e8e3d06c60d75ae4fb42321c75 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + memoizerific: ^1.11.3 + ts-dedent: ^2.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 652fc02b0e22a7380a316af123f5e7e2d6a21cb417fca2df185d52d474b291f2733d8468f977c28899befff8dbe990a7e89e204f875571bcb02ce5141b88cfd0 languageName: node linkType: hard -"@polka/url@npm:^1.0.0-next.20": - version: 1.0.0-next.21 - resolution: "@polka/url@npm:1.0.0-next.21" - checksum: c7654046d38984257dd639eab3dc770d1b0340916097b2fac03ce5d23506ada684e05574a69b255c32ea6a144a957c8cd84264159b545fca031c772289d88788 +"@storybook/addon-controls@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-controls@npm:7.0.15" + dependencies: + "@storybook/blocks": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-common": 7.0.15 + "@storybook/manager-api": 7.0.15 + "@storybook/node-logger": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + lodash: ^4.17.21 + ts-dedent: ^2.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 1a2cbb16a3b6f55b83e57fd8d450d6fe594dd1f350a8977072092eda8743e8d9604c62d9fef42e565fa7e062657d3c757ef1aee209d206a8175ead088f8ce5b4 + languageName: node + linkType: hard + +"@storybook/addon-docs@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-docs@npm:7.0.15" + dependencies: + "@babel/core": ^7.20.2 + "@babel/plugin-transform-react-jsx": ^7.19.0 + "@jest/transform": ^29.3.1 + "@mdx-js/react": ^2.1.5 + "@storybook/blocks": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/csf-plugin": 7.0.15 + "@storybook/csf-tools": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/mdx2-csf": ^1.0.0 + "@storybook/node-logger": 7.0.15 + "@storybook/postinstall": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/react-dom-shim": 7.0.15 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + fs-extra: ^11.1.0 + remark-external-links: ^8.0.0 + remark-slug: ^6.0.0 + ts-dedent: ^2.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 8435bd39d38ce34f4c73ba0ef34f6764c9d4fd16fd4b935a40171db348d82264071ef33241aa87303b83dbf57e64464ed71606e80b42f1107e65932a5854e6d3 + languageName: node + linkType: hard + +"@storybook/addon-essentials@npm:^7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-essentials@npm:7.0.15" + dependencies: + "@storybook/addon-actions": 7.0.15 + "@storybook/addon-backgrounds": 7.0.15 + "@storybook/addon-controls": 7.0.15 + "@storybook/addon-docs": 7.0.15 + "@storybook/addon-highlight": 7.0.15 + "@storybook/addon-measure": 7.0.15 + "@storybook/addon-outline": 7.0.15 + "@storybook/addon-toolbars": 7.0.15 + "@storybook/addon-viewport": 7.0.15 + "@storybook/core-common": 7.0.15 + "@storybook/manager-api": 7.0.15 + "@storybook/node-logger": 7.0.15 + "@storybook/preview-api": 7.0.15 + ts-dedent: ^2.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: e2e9073a429ad00c7d6faaf0729106c77b7185d5af6fe6746671cf674341737da0556edb4635bbb012405e24512829702a71b6b9eb65cd25b4f22c0deaf6f9d8 languageName: node linkType: hard -"@proload/core@npm:^0.3.3": - version: 0.3.3 - resolution: "@proload/core@npm:0.3.3" +"@storybook/addon-highlight@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-highlight@npm:7.0.15" dependencies: - deepmerge: ^4.2.2 - escalade: ^3.1.1 - checksum: bf1483f21928eabbf632b3d34bb53b0d86d0c44d22c2bf798151351c0179db4fdefa6801176bff6a6318e01caa3bc486d600d3b1afd963a57cf227168639bc7f + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/preview-api": 7.0.15 + checksum: 1c4b1597e5646bbe6631a76d38a0aacd70a78b526cab907e016194fac6f40e24148efcba72f6a236a9234425a8d8e498d722f33ea3797445c2539e19e15397ab languageName: node linkType: hard -"@proload/plugin-tsm@npm:^0.2.1": - version: 0.2.1 - resolution: "@proload/plugin-tsm@npm:0.2.1" +"@storybook/addon-interactions@npm:^7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-interactions@npm:7.0.15" dependencies: - tsm: ^2.1.4 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-common": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/instrumenter": 7.0.15 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + jest-mock: ^27.0.6 + polished: ^4.2.2 + ts-dedent: ^2.2.0 peerDependencies: - "@proload/core": ^0.3.2 - checksum: 23a0ab650f85003954257031585917be81fecef24119c2a71f097e7b397229f95a80f269822473eeffcd6d48991f202cef343a1ba3157d5d68998c5adddb4a59 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 58373cd77337d3ab12138df6a6bea4c5a5bfa916e916aa07516f1540efaef483caf45cdba7cf099d806c29339668418cc55541756c217fdd753e118a321c8f21 languageName: node linkType: hard -"@qiwi/npm-registry-client@npm:^8.9.1": - version: 8.9.1 - resolution: "@qiwi/npm-registry-client@npm:8.9.1" +"@storybook/addon-links@npm:^7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-links@npm:7.0.15" dependencies: - concat-stream: ^2.0.0 - graceful-fs: ^4.2.4 - normalize-package-data: ~1.0.1 || ^2.0.0 || ^3.0.0 - npm-package-arg: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^8.0.0 - npmlog: 2 || ^3.1.0 || ^4.0.0 - once: ^1.4.0 - request: ^2.88.2 - retry: ^0.12.0 - safe-buffer: ^5.2.1 - semver: 2 >=2.2.1 || 3.x || 4 || 5 || 7 - slide: ^1.1.6 - ssri: ^8.0.0 - dependenciesMeta: - npmlog: + "@storybook/client-logger": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/router": 7.0.15 + "@storybook/types": 7.0.15 + prop-types: ^15.7.2 + ts-dedent: ^2.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: optional: true - checksum: 1f0e3a06baa2c62ecd3d3789a864aa23aef2e9de466a67f435c2f1e50499c33f2cb2d5d1fd038c229039a61f01a96a7248b450422960cdcafb8933d11c07669a + react-dom: + optional: true + checksum: 9aaad721661cb9bb64500f5760b10b7d6425d459f5cdabf5d49cb3927542baa7bb48d293e83ddf49df71c803f9f8cc2f9ef6ba26de91d04999014b375e7d03b4 languageName: node linkType: hard -"@radix-ui/primitive@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/primitive@npm:1.0.0" +"@storybook/addon-measure@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-measure@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - checksum: 72996afaf346ec4f4c73422f14f6cb2d0de994801ba7cbb9a4a67b0050e0cd74625182c349ef8017ccae1406579d4b74a34a225ef2efe61e8e5337decf235deb + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/types": 7.0.15 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 43bab9633a78038b3657dc8c8a371b8adcbbf0ec7100141033171ad41e0ab7ddeb734710065061cf2fad576358b5efeb52318b0fbbc3e78aa23e084b3f948ef7 languageName: node linkType: hard -"@radix-ui/react-compose-refs@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-compose-refs@npm:1.0.0" +"@storybook/addon-outline@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-outline@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/types": 7.0.15 + ts-dedent: ^2.0.0 peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: fb98be2e275a1a758ccac647780ff5b04be8dcf25dcea1592db3b691fecf719c4c0700126da605b2f512dd89caa111352b9fad59528d736b4e0e9a0e134a74a1 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: fce0333d21f15d21bf01cc23cc8a3ac55f9b7067bce6c85bcd8df77003f38c026479a53a1dc57603a7510e6fe2057e20498e7b17ccacbe107a90da3eb7195584 languageName: node linkType: hard -"@radix-ui/react-context@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-context@npm:1.0.0" - dependencies: - "@babel/runtime": ^7.13.10 +"@storybook/addon-styling@npm:^1.0.8": + version: 1.0.8 + resolution: "@storybook/addon-styling@npm:1.0.8" + dependencies: + "@storybook/api": ^7.0.2 + "@storybook/components": ^7.0.2 + "@storybook/core-events": ^7.0.2 + "@storybook/manager-api": ^7.0.2 + "@storybook/node-logger": ^7.0.7 + "@storybook/preview-api": ^7.0.2 + "@storybook/theming": ^7.0.2 + "@storybook/types": ^7.0.2 + css-loader: ^6.7.3 + less-loader: ^11.1.0 + postcss-loader: ^7.2.4 + resolve-url-loader: ^5.0.0 + sass-loader: ^13.2.2 + style-loader: ^3.3.2 peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: 43c6b6f2183398161fe6b109e83fff240a6b7babbb27092b815932342a89d5ca42aa9806bfae5927970eed5ff90feed04c67aa29c6721f84ae826f17fcf34ce0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 8a5efc787b4a04463a44d9232a6c057e49e2ec8542affaf25a0a3a9d0ce299cd92fa540d4d0d193d168450db3d3c6e8e120a55f88f7ab49c656586f92699fba2 languageName: node linkType: hard -"@radix-ui/react-dialog@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-dialog@npm:1.0.0" +"@storybook/addon-toolbars@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-toolbars@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.0 - "@radix-ui/react-compose-refs": 1.0.0 - "@radix-ui/react-context": 1.0.0 - "@radix-ui/react-dismissable-layer": 1.0.0 - "@radix-ui/react-focus-guards": 1.0.0 - "@radix-ui/react-focus-scope": 1.0.0 - "@radix-ui/react-id": 1.0.0 - "@radix-ui/react-portal": 1.0.0 - "@radix-ui/react-presence": 1.0.0 - "@radix-ui/react-primitive": 1.0.0 - "@radix-ui/react-slot": 1.0.0 - "@radix-ui/react-use-controllable-state": 1.0.0 - aria-hidden: ^1.1.1 - react-remove-scroll: 2.5.4 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/theming": 7.0.15 peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - checksum: 32a1ab36a483ceae40b804f116611577b976e1781f33c8d74093f4132fd230b325eadd0306efd77a628d604b61c3a592d4c720a5b7e69e74dbfb56ce85b2c6fd + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 6e74ab2067aff35ef80abf2a0e00a93fe29956da02c94ad91079552d3dd915b5148bcfa54c3235083a823e1a450df4e8e63a5afeaff4184bb9a21ece629925c6 languageName: node linkType: hard -"@radix-ui/react-dismissable-layer@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-dismissable-layer@npm:1.0.0" +"@storybook/addon-viewport@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/addon-viewport@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.0 - "@radix-ui/react-compose-refs": 1.0.0 - "@radix-ui/react-primitive": 1.0.0 - "@radix-ui/react-use-callback-ref": 1.0.0 - "@radix-ui/react-use-escape-keydown": 1.0.0 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/theming": 7.0.15 + memoizerific: ^1.11.3 + prop-types: ^15.7.2 peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - checksum: c5af6445ea3f584bad1fb3ed01703c2d4a889d9b99b23bc2c821a2c166fdbb75cfdd1e4870d3f958d9ac78f5e1b8006f762317cba765839592e5c5af1183a7a7 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 12b4d450373432b14066d243616f0af042acf13f19145ad69767f72a38d603a07d6fb799aa59be922a3f9d6c9209ea1ec0034325a9f4e1842c75b0ec6cb0fe16 languageName: node linkType: hard -"@radix-ui/react-focus-guards@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-focus-guards@npm:1.0.0" +"@storybook/api@npm:^7.0.2": + version: 7.0.15 + resolution: "@storybook/api@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 + "@storybook/client-logger": 7.0.15 + "@storybook/manager-api": 7.0.15 peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: 8c714e8caa6032f5402eecb0323addd7456d3496946dbad1b9ee8ebf5845943876945e7af9bca179e9f8ffe5100e61cb4ba54a185873949125c310c406be5aa4 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 9c7b02e2a23c91c7f4c489d975ce50fe99f7fe7e3aa511a4138bef42c3d8f526a069ca14bec36e358935411f8bc6a7d903e9f8c83323d1f8fcbedced400ae00d + languageName: node + linkType: hard + +"@storybook/blocks@npm:7.0.15, @storybook/blocks@npm:^7.0.15": + version: 7.0.15 + resolution: "@storybook/blocks@npm:7.0.15" + dependencies: + "@storybook/channels": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/components": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/csf": ^0.1.0 + "@storybook/docs-tools": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/manager-api": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + "@types/lodash": ^4.14.167 + color-convert: ^2.0.1 + dequal: ^2.0.2 + lodash: ^4.17.21 + markdown-to-jsx: ^7.1.8 + memoizerific: ^1.11.3 + polished: ^4.2.2 + react-colorful: ^5.1.2 + telejson: ^7.0.3 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: d6296bad47acb4b9117c61fb8e7405e0cd73c47120df06970e61127332b41d02663391c88b8e1224e8064335202f633c07b1f5f4fabbe6e41e8f2a07f7227c5c + languageName: node + linkType: hard + +"@storybook/builder-manager@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/builder-manager@npm:7.0.15" + dependencies: + "@fal-works/esbuild-plugin-global-externals": ^2.1.2 + "@storybook/core-common": 7.0.15 + "@storybook/manager": 7.0.15 + "@storybook/node-logger": 7.0.15 + "@types/ejs": ^3.1.1 + "@types/find-cache-dir": ^3.2.1 + "@yarnpkg/esbuild-plugin-pnp": ^3.0.0-rc.10 + browser-assert: ^1.2.1 + ejs: ^3.1.8 + esbuild: ^0.17.0 + esbuild-plugin-alias: ^0.2.1 + express: ^4.17.3 + find-cache-dir: ^3.0.0 + fs-extra: ^11.1.0 + process: ^0.11.10 + util: ^0.12.4 + checksum: 86d454f66a92afaa0818a09daefb67753b5f2371c28c102545661748044d7ec132650c824a516a308aab5443b019ef8252e3f087d5475331b60913b78483cf6b + languageName: node + linkType: hard + +"@storybook/builder-vite@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/builder-vite@npm:7.0.15" + dependencies: + "@storybook/channel-postmessage": 7.0.15 + "@storybook/channel-websocket": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/core-common": 7.0.15 + "@storybook/csf-plugin": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/mdx2-csf": ^1.0.0 + "@storybook/node-logger": 7.0.15 + "@storybook/preview": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/types": 7.0.15 + browser-assert: ^1.2.1 + es-module-lexer: ^0.9.3 + express: ^4.17.3 + fs-extra: ^11.1.0 + glob: ^8.1.0 + glob-promise: ^6.0.2 + magic-string: ^0.27.0 + remark-external-links: ^8.0.0 + remark-slug: ^6.0.0 + rollup: ^2.25.0 || ^3.3.0 + peerDependencies: + "@preact/preset-vite": "*" + typescript: ">= 4.3.x" + vite: ^3.0.0 || ^4.0.0 + vite-plugin-glimmerx: "*" + peerDependenciesMeta: + "@preact/preset-vite": + optional: true + typescript: + optional: true + vite-plugin-glimmerx: + optional: true + checksum: 5f17d79cc1f348b4d0352537e90084c7e5e0a169b88809a2924a9c174dd95175b99ffb93ab5b4dda60bce985323a5423b8afeb181f604005e300eb5ee5868c5a languageName: node linkType: hard -"@radix-ui/react-focus-scope@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-focus-scope@npm:1.0.0" +"@storybook/channel-postmessage@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/channel-postmessage@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-compose-refs": 1.0.0 - "@radix-ui/react-primitive": 1.0.0 - "@radix-ui/react-use-callback-ref": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - checksum: 2ee0b9a2d1905aba25d0225c203d20745fd798aa61d65f55c6041169701d47d6b801d4392a57d94968f0d8ef3410eb79fcab19c9c80f03e9b9f6b24f6f997f98 + "@storybook/channels": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + qs: ^6.10.0 + telejson: ^7.0.3 + checksum: 7c4a4aafba52d59dc3854d66469e623737a93f05721b0b9afb580ecd5d012e7eb9d4276ccf9b27d4fe30235018d3d552e47d280ad6f9fdae240ca12acc490743 languageName: node linkType: hard -"@radix-ui/react-id@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-id@npm:1.0.0" +"@storybook/channel-websocket@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/channel-websocket@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-use-layout-effect": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: ba323cedd6a6df6f6e51ed1f7f7747988ce432b47fd94d860f962b14b342dcf049eae33f8ad0b72fd7df6329a7375542921132271fba64ab0a271c93f09c48d1 + "@storybook/channels": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/global": ^5.0.0 + telejson: ^7.0.3 + checksum: 74aa9ac8cda572b32e8748b727bbe63d6a84e4d9d0ded25e5fab91859842ba0b9901edc2af08999bc12252c21d7857c6eb40ff2e69fad9a1bfdb0d365824cb1a languageName: node linkType: hard -"@radix-ui/react-portal@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-portal@npm:1.0.0" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-primitive": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - checksum: dfb194b2df32830db2daf01569176c6e4cf3af2c6e393ece60532543902acf13a6629f9a45003902c99df195c2249bc56d4f4425a5fed2897555df9bdf01efa0 +"@storybook/channels@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/channels@npm:7.0.15" + checksum: 4fb16871381a056396a822a296bb1c14ca535b1235cfcd0355bfa1fc64f70b6e4aed2154d619c8d41f930ef106f90d3dd9a018afadcc852f56bbc9e9dcfb4397 languageName: node linkType: hard -"@radix-ui/react-presence@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-presence@npm:1.0.0" +"@storybook/cli@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/cli@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-compose-refs": 1.0.0 - "@radix-ui/react-use-layout-effect": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - checksum: a607d67795aa265e88f1765dcc7c18bebf6d88d116cb7f529ebe5a3fbbe751a42763aff0c1c89cdd8ce7f7664355936c4070fd3d4685774aff1a80fa95f4665b + "@babel/core": ^7.20.2 + "@babel/preset-env": ^7.20.2 + "@ndelangen/get-tarball": ^3.0.7 + "@storybook/codemod": 7.0.15 + "@storybook/core-common": 7.0.15 + "@storybook/core-server": 7.0.15 + "@storybook/csf-tools": 7.0.15 + "@storybook/node-logger": 7.0.15 + "@storybook/telemetry": 7.0.15 + "@storybook/types": 7.0.15 + "@types/semver": ^7.3.4 + boxen: ^5.1.2 + chalk: ^4.1.0 + commander: ^6.2.1 + cross-spawn: ^7.0.3 + detect-indent: ^6.1.0 + envinfo: ^7.7.3 + execa: ^5.0.0 + express: ^4.17.3 + find-up: ^5.0.0 + fs-extra: ^11.1.0 + get-npm-tarball-url: ^2.0.3 + get-port: ^5.1.1 + giget: ^1.0.0 + globby: ^11.0.2 + jscodeshift: ^0.14.0 + leven: ^3.1.0 + ora: ^5.4.1 + prettier: ^2.8.0 + prompts: ^2.4.0 + puppeteer-core: ^2.1.1 + read-pkg-up: ^7.0.1 + semver: ^7.3.7 + shelljs: ^0.8.5 + simple-update-notifier: ^1.0.0 + strip-json-comments: ^3.0.1 + tempy: ^1.0.1 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + bin: + getstorybook: bin/index.js + sb: bin/index.js + checksum: 4f0b8ed2e2c1fe68947d58d3ddaccbb8daa32dd05c8ab8114101990389fed696b017f297255573289bef12a2889c4de9d183b712f6f3cee8551a0c40abdaff3c languageName: node linkType: hard -"@radix-ui/react-primitive@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-primitive@npm:1.0.0" +"@storybook/client-logger@npm:7.0.15, @storybook/client-logger@npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0": + version: 7.0.15 + resolution: "@storybook/client-logger@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-slot": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - checksum: fb3fe8c8c5a57995716cce4d7e9039e474c09ba5d714994419ad4940bc954da670f1188813cc931f189b23d9bd5a67adf7087bf44fe1d4272b4a334a3514d38b + "@storybook/global": ^5.0.0 + checksum: a230e8aeaa4a8e8315f4511d650f44ea69678b5ef00ec383ea2f182755047a1f8edf702686f44366b439caf4477c7daa8412202cfc29b5a811b7bf158dd10fe3 languageName: node linkType: hard -"@radix-ui/react-slot@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-slot@npm:1.0.0" +"@storybook/codemod@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/codemod@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-compose-refs": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: 60c0190ebdca21785b4f8b58a0c52717600c98953fc49da9580870519c60f52d5cf873dffa05446f4bb539066326ccec0827f4ca252b02ec4ff1a4ae203f59d7 + "@babel/core": ~7.21.0 + "@babel/preset-env": ~7.21.0 + "@babel/types": ~7.21.2 + "@storybook/csf": ^0.1.0 + "@storybook/csf-tools": 7.0.15 + "@storybook/node-logger": 7.0.15 + "@storybook/types": 7.0.15 + cross-spawn: ^7.0.3 + globby: ^11.0.2 + jscodeshift: ^0.14.0 + lodash: ^4.17.21 + prettier: ^2.8.0 + recast: ^0.23.1 + checksum: 27e60e7ed7f246b5986e450b8b8b910fd5307a43aa1d2e47858e34ab366b48f72edc2d194b029d41765590c9c8e9a19dce5b2cd915e3143ba6046f64b47fba26 languageName: node linkType: hard -"@radix-ui/react-use-callback-ref@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-use-callback-ref@npm:1.0.0" +"@storybook/components@npm:7.0.15, @storybook/components@npm:^7.0.2": + version: 7.0.15 + resolution: "@storybook/components@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 + "@storybook/client-logger": 7.0.15 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + memoizerific: ^1.11.3 + use-resize-observer: ^9.1.0 + util-deprecate: ^1.0.2 peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: a8dda76ba0a26e23dc6ab5003831ad7439f59ba9d696a517643b9ee6a7fb06b18ae7a8f5a3c00c530d5c8104745a466a077b7475b99b4c0f5c15f5fc29474471 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 7a6863f478d52a38e8a944add24aaa5acb4bb70e1e47cfddab744c8c53c668787d7c9e334c7e538639d8eccd5c602b0d54928003d2484ff8152b806266bb4516 languageName: node linkType: hard -"@radix-ui/react-use-controllable-state@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-use-controllable-state@npm:1.0.0" +"@storybook/core-client@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/core-client@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-use-callback-ref": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: 35f1e714bbe3fc9f5362a133339dd890fb96edb79b63168a99403c65dd5f2b63910e0c690255838029086719e31360fa92544a55bc902cfed4442bb3b55822e2 + "@storybook/client-logger": 7.0.15 + "@storybook/preview-api": 7.0.15 + checksum: e690a8e7ec7500e2224b2cb71bdcec23b3db774b0b47dde05f9fad9769483fbe217da64941d74714e098e563004890cade938d7312e4072cc72b4b800ba2e8fb languageName: node linkType: hard -"@radix-ui/react-use-escape-keydown@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-use-escape-keydown@npm:1.0.0" +"@storybook/core-common@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/core-common@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-use-callback-ref": 1.0.0 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: a6728d40e059fdf2da0703cde9afb10defbcd951d6e1dc48522f33f9399f5aa0514751d9e25847bdcc57328b9d745a3baa36baf9f6af6453a5c894dfcbd40352 + "@storybook/node-logger": 7.0.15 + "@storybook/types": 7.0.15 + "@types/node": ^16.0.0 + "@types/pretty-hrtime": ^1.0.0 + chalk: ^4.1.0 + esbuild: ^0.17.0 + esbuild-register: ^3.4.0 + file-system-cache: ^2.0.0 + find-up: ^5.0.0 + fs-extra: ^11.1.0 + glob: ^8.1.0 + glob-promise: ^6.0.2 + handlebars: ^4.7.7 + lazy-universal-dotenv: ^4.0.0 + picomatch: ^2.3.0 + pkg-dir: ^5.0.0 + pretty-hrtime: ^1.0.3 + resolve-from: ^5.0.0 + ts-dedent: ^2.0.0 + checksum: bebc2abf764b1ee3972e5820bb5d25797ad46ba76c5e9a8b836703922347dc7c2d5ea63b0003251ee25bbd54e56096d9a3dc7bef940027a931ac6ebd1d540ceb + languageName: node + linkType: hard + +"@storybook/core-events@npm:7.0.15, @storybook/core-events@npm:^7.0.2": + version: 7.0.15 + resolution: "@storybook/core-events@npm:7.0.15" + checksum: 9c83b54186b19e40a8eaf96e96b700c4796887ed1b8004cbb659ff1e5bf170c50edc23c89bb0c5144072d45d0ad45d825502529173acfefbf5fed350e158a8f3 + languageName: node + linkType: hard + +"@storybook/core-server@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/core-server@npm:7.0.15" + dependencies: + "@aw-web-design/x-default-browser": 1.4.88 + "@discoveryjs/json-ext": ^0.5.3 + "@storybook/builder-manager": 7.0.15 + "@storybook/core-common": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/csf": ^0.1.0 + "@storybook/csf-tools": 7.0.15 + "@storybook/docs-mdx": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/manager": 7.0.15 + "@storybook/node-logger": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/telemetry": 7.0.15 + "@storybook/types": 7.0.15 + "@types/detect-port": ^1.3.0 + "@types/node": ^16.0.0 + "@types/node-fetch": ^2.5.7 + "@types/pretty-hrtime": ^1.0.0 + "@types/semver": ^7.3.4 + better-opn: ^2.1.1 + boxen: ^5.1.2 + chalk: ^4.1.0 + cli-table3: ^0.6.1 + compression: ^1.7.4 + detect-port: ^1.3.0 + express: ^4.17.3 + fs-extra: ^11.1.0 + globby: ^11.0.2 + ip: ^2.0.0 + lodash: ^4.17.21 + node-fetch: ^2.6.7 + open: ^8.4.0 + pretty-hrtime: ^1.0.3 + prompts: ^2.4.0 + read-pkg-up: ^7.0.1 + semver: ^7.3.7 + serve-favicon: ^2.5.0 + telejson: ^7.0.3 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + watchpack: ^2.2.0 + ws: ^8.2.3 + checksum: b5ee54d1ee9bd6af81fa1a3f9d4042c243f64d0457d53ce383524b4c578cf2733f29350b88baf68481c2f2a040acfc638d519fab45319c8cd0af303722bf5dc3 languageName: node linkType: hard -"@radix-ui/react-use-layout-effect@npm:1.0.0": - version: 1.0.0 - resolution: "@radix-ui/react-use-layout-effect@npm:1.0.0" +"@storybook/csf-plugin@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/csf-plugin@npm:7.0.15" dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - react: ^16.8 || ^17.0 || ^18.0 - checksum: fcdc8cfa79bd45766ebe3de11039c58abe3fed968cb39c12b2efce5d88013c76fe096ea4cee464d42576d02fe7697779b682b4268459bca3c4e48644f5b4ac5e + "@storybook/csf-tools": 7.0.15 + unplugin: ^0.10.2 + checksum: aeb6161fcb8efa0ea3db8c1af45073659f34c163b43a6b64a8e2b3804abec47c91266dbe9ba928308990970bb8cdbc03ce91c92c2eeed6e1c499af946237dda0 languageName: node linkType: hard -"@resvg/resvg-wasm@npm:2.0.0-alpha.4": - version: 2.0.0-alpha.4 - resolution: "@resvg/resvg-wasm@npm:2.0.0-alpha.4" - checksum: fa2d470d6f39c4a57e4500f4bff389683c4d0d97ad20d08c7721df7a66d5b179e243e4f990cdda70615191167d40dd6cc724e620b5f2aa7f46c8b46ff63c37eb +"@storybook/csf-tools@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/csf-tools@npm:7.0.15" + dependencies: + "@babel/generator": ~7.21.1 + "@babel/parser": ~7.21.2 + "@babel/traverse": ~7.21.2 + "@babel/types": ~7.21.2 + "@storybook/csf": ^0.1.0 + "@storybook/types": 7.0.15 + fs-extra: ^11.1.0 + recast: ^0.23.1 + ts-dedent: ^2.0.0 + checksum: d945b635c7363532ef2ea548d03593a12f5298823fd50af2d275e93b27aca5c19184d7a0b1b84f355a8ad3143b80c4b288c7cb9840d64d8b80045f04597a75dc languageName: node linkType: hard -"@rollup/pluginutils@npm:^4.0.0": - version: 4.2.1 - resolution: "@rollup/pluginutils@npm:4.2.1" +"@storybook/csf@npm:^0.0.1": + version: 0.0.1 + resolution: "@storybook/csf@npm:0.0.1" dependencies: - estree-walker: ^2.0.1 - picomatch: ^2.2.2 - checksum: 6bc41f22b1a0f1efec3043899e4d3b6b1497b3dea4d94292d8f83b4cf07a1073ecbaedd562a22d11913ff7659f459677b01b09e9598a98936e746780ecc93a12 + lodash: ^4.17.15 + checksum: fb57fa028b08a51edf44e1a2bf4be40a4607f5c6ccb58aae8924f476a42b9bbd61a0ad521cfc82196f23e6a912caae0a615e70a755e6800b284c91c509fd2de6 languageName: node linkType: hard -"@rollup/pluginutils@npm:^5.0.1": - version: 5.0.1 - resolution: "@rollup/pluginutils@npm:5.0.1" +"@storybook/csf@npm:^0.1.0": + version: 0.1.0 + resolution: "@storybook/csf@npm:0.1.0" dependencies: - "@types/estree": ^1.0.0 - estree-walker: ^2.0.2 - picomatch: ^2.3.1 - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - checksum: c96c8041436842d6a13dfb5ef066625185546b93da2b0a1b135c19b2722d073a5075a842240531a12befb0d05d1856a270f00a655014bd54cfe19c8279ed5322 + type-fest: ^2.19.0 + checksum: f1784f2aff27d5c27ab897878b08e3b04a64e7f62da1ea95fd11bfe9f558300e55f0d483d58282e8254a4b4e8935201178e70c264ccc96104c67403215d651f0 languageName: node linkType: hard -"@rushstack/eslint-patch@npm:^1.2.0": - version: 1.2.0 - resolution: "@rushstack/eslint-patch@npm:1.2.0" - checksum: faa749faae0e83c26ae9eb00ad36a897ac78f3cf27da8e8ff21c00bcf7973b598d823d8f2b3957ef66079288bcf577f94df831eae2d65f3f68d8ca32f18b6aff +"@storybook/docs-mdx@npm:^0.1.0": + version: 0.1.0 + resolution: "@storybook/docs-mdx@npm:0.1.0" + checksum: a7770842c3947a761bcbe776a9c4fd35163d30c3274fca034169f69ff614242eaa4cacaa2c95fd215827081ef9a43f4774d521a6f43a4d063ea5f4ea14b1d69a languageName: node linkType: hard -"@rushstack/node-core-library@npm:3.51.1": - version: 3.51.1 - resolution: "@rushstack/node-core-library@npm:3.51.1" +"@storybook/docs-tools@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/docs-tools@npm:7.0.15" dependencies: - "@types/node": 12.20.24 - colors: ~1.2.1 - fs-extra: ~7.0.1 - import-lazy: ~4.0.0 - jju: ~1.4.0 - resolve: ~1.17.0 - semver: ~7.3.0 - z-schema: ~5.0.2 - checksum: 92f7e39f03f4931a7007b4a79427d82bfe078146133a138219205abf873607898f7667fa368e3cb28c93bb1a2b9dc70ddaf2d316bc47a9a17b591d69d1025068 + "@babel/core": ^7.12.10 + "@storybook/core-common": 7.0.15 + "@storybook/preview-api": 7.0.15 + "@storybook/types": 7.0.15 + "@types/doctrine": ^0.0.3 + doctrine: ^3.0.0 + lodash: ^4.17.21 + checksum: 7a7abac0f2812752e0784203d99eeca5aaeef68c9b04a941682d4a741bd3d407c8b4076fa090b31e6272d3a1258f3acf8422155782081364bdf08c8c37508eaf languageName: node linkType: hard -"@rushstack/node-core-library@npm:3.53.2, @rushstack/node-core-library@npm:^3.53.2": - version: 3.53.2 - resolution: "@rushstack/node-core-library@npm:3.53.2" - dependencies: - "@types/node": 12.20.24 - colors: ~1.2.1 - fs-extra: ~7.0.1 - import-lazy: ~4.0.0 - jju: ~1.4.0 - resolve: ~1.17.0 - semver: ~7.3.0 - z-schema: ~5.0.2 - checksum: eca9ef5dd099649c7e54ac7c6f1019c831e9405ce66210f76d6a597d83341bcd8de197d69539042029ea8aa9862e0515b8102e16a4980c66812f599f7c63479d +"@storybook/global@npm:^5.0.0": + version: 5.0.0 + resolution: "@storybook/global@npm:5.0.0" + checksum: ede0ad35ec411fe31c61150dbd118fef344d1d0e72bf5d3502368e35cf68126f6b7ae4a0ab5e2ffe2f0baa3b4286f03ad069ba3e098e1725449ef08b7e154ba8 languageName: node linkType: hard -"@rushstack/rig-package@npm:0.3.17": - version: 0.3.17 - resolution: "@rushstack/rig-package@npm:0.3.17" +"@storybook/instrumenter@npm:7.0.15, @storybook/instrumenter@npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0": + version: 7.0.15 + resolution: "@storybook/instrumenter@npm:7.0.15" dependencies: - resolve: ~1.17.0 - strip-json-comments: ~3.1.1 - checksum: 54eeea471c85b547575d7efc84fad3c9588f10106e2bfd8cd022bccb02c2fb0bf8ff597fab9114450b3c262abab0f0a4e52dd074bfd120e850b95037cd7b3102 + "@storybook/channels": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/preview-api": 7.0.15 + checksum: a3fba6872afbeb5094368172498810907f5e3765177df309ef1d553123c2e44c7fa26100d723e260cefc483c0c5ec34bd5d85e4361f7fec716d9269baee1513d languageName: node linkType: hard -"@rushstack/ts-command-line@npm:4.13.0": - version: 4.13.0 - resolution: "@rushstack/ts-command-line@npm:4.13.0" +"@storybook/manager-api@npm:7.0.15, @storybook/manager-api@npm:^7.0.2": + version: 7.0.15 + resolution: "@storybook/manager-api@npm:7.0.15" dependencies: - "@types/argparse": 1.0.38 - argparse: ~1.0.9 - colors: ~1.2.1 - string-argv: ~0.3.1 - checksum: a5b488d51f5d06bdb1e4aa03d6826049187adc00ddb5aad4e7559f48981d036fb5811f03572831f8026e87c262422ef9afb7c90a0d05130bdb80b239db02f415 + "@storybook/channels": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/router": 7.0.15 + "@storybook/theming": 7.0.15 + "@storybook/types": 7.0.15 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + semver: ^7.3.7 + store2: ^2.14.2 + telejson: ^7.0.3 + ts-dedent: ^2.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: e98078d675d97369564264b349d641f147ffd8245275ef583a2d78ca9cc031e090cc22341d23b81371ada471e8090d5bedf4e8de2eac7cbc76b72a726a24689b languageName: node linkType: hard -"@sapphire/async-queue@npm:^1.5.0": - version: 1.5.0 - resolution: "@sapphire/async-queue@npm:1.5.0" - checksum: 983dbd1fd1b1798496e5edb6a0db7e4d90015160e1028f20475eab0a92625513f1e8d938bc0305811a9cec461c94e01b1e4191615ff03ba49356f568f3255250 +"@storybook/manager@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/manager@npm:7.0.15" + checksum: 327c7442f44e1819d1a1018148ef819e71bcf98d04cb94068efc00bf18d479d7ddfec346107bdef144372829ee4930c46fea7aba1cecdff76191f134bbe22e5c languageName: node linkType: hard -"@sapphire/fetch@npm:^2.4.1": - version: 2.4.1 - resolution: "@sapphire/fetch@npm:2.4.1" +"@storybook/mdx2-csf@npm:^1.0.0": + version: 1.1.0 + resolution: "@storybook/mdx2-csf@npm:1.1.0" + checksum: 5ccdb13f4e59b989499f76e54ffaffb96b5710a696346efe19989b3373f375703adf516780894b270fa64a7e765b55274dc18575fc4a84e7fa92b844a4467c5d + languageName: node + linkType: hard + +"@storybook/node-logger@npm:7.0.15, @storybook/node-logger@npm:^7.0.7": + version: 7.0.15 + resolution: "@storybook/node-logger@npm:7.0.15" dependencies: - cross-fetch: ^3.1.5 - checksum: f8ab0baa59dfcb931729a46957073e4e26377b6b5e3bdbbed921ae793c0848a240545ed157efd5db13342d68eed84dc73c6fe83038a5e62af9daa3715326c4a9 + "@types/npmlog": ^4.1.2 + chalk: ^4.1.0 + npmlog: ^5.0.1 + pretty-hrtime: ^1.0.3 + checksum: b8cd4121eb81ac5e973cd270b3a5e8e2b3a29e9052ed31f4b1e0f9f6474f2a8ccda81caa708082ed80ed8b0b9939a4435bd53b0ada205dd89fa0ee0cf66e8d80 languageName: node linkType: hard -"@sapphire/result@npm:^2.5.0": - version: 2.5.0 - resolution: "@sapphire/result@npm:2.5.0" - checksum: af1eeaae1c4b0acffb6e6f8ce49fa27326a002e469019f40216a574e244625fac967a9b6678124d36f9388efd74c964cdf52c90e5b75705008a48a8cd910087e +"@storybook/postinstall@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/postinstall@npm:7.0.15" + checksum: ac028e3cbe542079b151090485b025475e55808910e861583c6033666ad77ce2cbeed5a821c606641f3f83c68519ea29be7acf2df266574c0f1131e4e6b8810b languageName: node linkType: hard -"@sapphire/shapeshift@npm:^3.7.0": - version: 3.7.0 - resolution: "@sapphire/shapeshift@npm:3.7.0" +"@storybook/preview-api@npm:7.0.15, @storybook/preview-api@npm:^7.0.2": + version: 7.0.15 + resolution: "@storybook/preview-api@npm:7.0.15" dependencies: - fast-deep-equal: ^3.1.3 - lodash.uniqwith: ^4.5.0 - checksum: 4fed0865abcf3653406cfa1f4a2a7d1c51103cee1c13ec4fd8fbc84bd32d20b2949e2266531c2d81b9b1e3af32787cd1f5d66a3d6146d6afb553ca2c6377beb1 + "@storybook/channel-postmessage": 7.0.15 + "@storybook/channels": 7.0.15 + "@storybook/client-logger": 7.0.15 + "@storybook/core-events": 7.0.15 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/types": 7.0.15 + "@types/qs": ^6.9.5 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + qs: ^6.10.0 + synchronous-promise: ^2.0.15 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + checksum: 773a56620124062b4321f2a6bb9bce0d31bdefe4934e480ecbebda73d38c1bcc6a16f31ce0fe0decde7a145fd13a250e0fb911bb43c9342ac9c9d233d0827a61 languageName: node linkType: hard -"@sapphire/snowflake@npm:^3.2.2": - version: 3.2.2 - resolution: "@sapphire/snowflake@npm:3.2.2" - checksum: 315fecef4738092c2a2f3509b132b811fcbfa6c98d5d45d951adaf3ca21608be69043bcc137cc6933a7c3e55cbdc066daa5bb484603e6575422b335445b59315 +"@storybook/preview@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/preview@npm:7.0.15" + checksum: fe4bc6a6647fe12063181f9b292395cbbbefa1d1d78b9725ed7c6eef69643ec4d1c537e18ca2ce40e71b9b659609c115196b3897c8a76c5dcbcd63288aa70dc4 languageName: node linkType: hard -"@sapphire/utilities@npm:^3.8.0, @sapphire/utilities@npm:^3.9.3": - version: 3.11.0 - resolution: "@sapphire/utilities@npm:3.11.0" - checksum: 3c8521038b8879524e8114f39eefc8b3b06cf825995f709684238b5cb14bd7df06d232a26a88f79160df290a66f9aa3133f5ce4ff8e2398033db9f301ad31e0d +"@storybook/react-dom-shim@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/react-dom-shim@npm:7.0.15" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 5b319e3a3e6b7610c5e871099b109c6cf1933d3dadc7008d5673db6d07800cdedfeb9edfe336e9111906fb9e74bfec2f55c2dc093728dcea405a53d850ff5ff0 languageName: node linkType: hard -"@shuding/opentype.js@npm:1.4.0-beta.0": - version: 1.4.0-beta.0 - resolution: "@shuding/opentype.js@npm:1.4.0-beta.0" +"@storybook/react-vite@npm:7.0.15, @storybook/react-vite@npm:^7.0.15": + version: 7.0.15 + resolution: "@storybook/react-vite@npm:7.0.15" dependencies: - fflate: ^0.7.3 - string.prototype.codepointat: ^0.2.1 - bin: - ot: bin/ot - checksum: af3478c40c068c7f6b6050b274a10837fcd1417c072b6af2b9d4fa48b8efe0bc93ec4b5f80b186678672f7d293027151389c66a4c5a156b48b810b8e8f3f5cdf + "@joshwooding/vite-plugin-react-docgen-typescript": 0.2.1 + "@rollup/pluginutils": ^4.2.0 + "@storybook/builder-vite": 7.0.15 + "@storybook/react": 7.0.15 + "@vitejs/plugin-react": ^3.0.1 + ast-types: ^0.14.2 + magic-string: ^0.27.0 + react-docgen: 6.0.0-alpha.3 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + vite: ^3.0.0 || ^4.0.0 + checksum: ee12ea6f5bf0a7b278f0d4d3ec57a0ea4eb13fcf8893405e5d7e214c119964e62a2c1584fef37d3dc4c18eade27ee2f8b7568277b94a8f966d4de700634fdbe6 + languageName: node + linkType: hard + +"@storybook/react@npm:7.0.15, @storybook/react@npm:^7.0.15": + version: 7.0.15 + resolution: "@storybook/react@npm:7.0.15" + dependencies: + "@storybook/client-logger": 7.0.15 + "@storybook/core-client": 7.0.15 + "@storybook/docs-tools": 7.0.15 + "@storybook/global": ^5.0.0 + "@storybook/preview-api": 7.0.15 + "@storybook/react-dom-shim": 7.0.15 + "@storybook/types": 7.0.15 + "@types/escodegen": ^0.0.6 + "@types/estree": ^0.0.51 + "@types/node": ^16.0.0 + acorn: ^7.4.1 + acorn-jsx: ^5.3.1 + acorn-walk: ^7.2.0 + escodegen: ^2.0.0 + html-tags: ^3.1.0 + lodash: ^4.17.21 + prop-types: ^15.7.2 + react-element-to-jsx-string: ^15.0.0 + ts-dedent: ^2.0.0 + type-fest: ^2.19.0 + util-deprecate: ^1.0.2 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: f56462d4e7a92f11012c08a11d038eee3f45ddf50f84b554ad8b843f329a12eb18e1568ff2931552579de8369096011dc155baea57e3a82f215e1ba2402428d0 languageName: node linkType: hard -"@sinclair/typebox@npm:^0.24.1": - version: 0.24.44 - resolution: "@sinclair/typebox@npm:0.24.44" - checksum: 773d9efc85cea69129659239ebda902c1b09e3e82f19358e5cd0f60ba21203ea694afce71bca1062376550b2bd99de6eeea98e6c273eb233d25daca95357f0cf +"@storybook/router@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/router@npm:7.0.15" + dependencies: + "@storybook/client-logger": 7.0.15 + memoizerific: ^1.11.3 + qs: ^6.10.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 94709978616102b3dc7942d91f3be42710232236290a2d04cc6203abf864e1694dd4178fc8f5843059b485723976fcb2ccd4dd446ca781fb76f19ac962e8517b languageName: node linkType: hard -"@sindresorhus/is@npm:^0.14.0": - version: 0.14.0 - resolution: "@sindresorhus/is@npm:0.14.0" - checksum: 971e0441dd44ba3909b467219a5e242da0fc584048db5324cfb8048148fa8dcc9d44d71e3948972c4f6121d24e5da402ef191420d1266a95f713bb6d6e59c98a +"@storybook/telemetry@npm:7.0.15": + version: 7.0.15 + resolution: "@storybook/telemetry@npm:7.0.15" + dependencies: + "@storybook/client-logger": 7.0.15 + "@storybook/core-common": 7.0.15 + chalk: ^4.1.0 + detect-package-manager: ^2.0.1 + fetch-retry: ^5.0.2 + fs-extra: ^11.1.0 + isomorphic-unfetch: ^3.1.0 + nanoid: ^3.3.1 + read-pkg-up: ^7.0.1 + checksum: 67ed0408c8447f1c61cf03d26068e7600e4f95551b146984a4d5bac8374f1c7f7e05937d0b5d2aa129ce11cffa1114a3e125b1990cdb53b86ab08c8f2d768d85 languageName: node linkType: hard -"@sinonjs/commons@npm:^1.7.0": - version: 1.8.3 - resolution: "@sinonjs/commons@npm:1.8.3" +"@storybook/testing-library@npm:^0.1.0": + version: 0.1.0 + resolution: "@storybook/testing-library@npm:0.1.0" dependencies: - type-detect: 4.0.8 - checksum: 6159726db5ce6bf9f2297f8427f7ca5b3dff45b31e5cee23496f1fa6ef0bb4eab878b23fb2c5e6446381f6a66aba4968ef2fc255c1180d753d4b8c271636a2e5 + "@storybook/client-logger": ^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0 + "@storybook/instrumenter": ^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0 + "@testing-library/dom": ^8.3.0 + "@testing-library/user-event": ^13.2.1 + ts-dedent: ^2.2.0 + checksum: a413110dafe80f8fe64da912fddb653bc3c695c94bd023b8cb918e519e9f94119bae559909bfb8ad229041a4f17a12b33425c61572270702c116d0b727b4d4ba + languageName: node + linkType: hard + +"@storybook/theming@npm:7.0.15, @storybook/theming@npm:^7.0.2": + version: 7.0.15 + resolution: "@storybook/theming@npm:7.0.15" + dependencies: + "@emotion/use-insertion-effect-with-fallbacks": ^1.0.0 + "@storybook/client-logger": 7.0.15 + "@storybook/global": ^5.0.0 + memoizerific: ^1.11.3 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 3a80acbc0a40f824834ded32072b3c5c562e636369ea0fd94ca8bb0b051ff9617039a4ed66a0822ccea06bc0479c6ba90c3cdf29a862ddc7fbce4dbb70cc7850 languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^9.1.2": - version: 9.1.2 - resolution: "@sinonjs/fake-timers@npm:9.1.2" +"@storybook/types@npm:7.0.15, @storybook/types@npm:^7.0.2": + version: 7.0.15 + resolution: "@storybook/types@npm:7.0.15" dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: 7d3aef54e17c1073101cb64d953157c19d62a40e261a30923fa1ee337b049c5f29cc47b1f0c477880f42b5659848ba9ab897607ac8ea4acd5c30ddcfac57fca6 + "@storybook/channels": 7.0.15 + "@types/babel__core": ^7.0.0 + "@types/express": ^4.7.0 + file-system-cache: ^2.0.0 + checksum: 6d97a9f7fbbfaef687fec050e50ea23b0ad39cc177521064ee72a9f94bc27c4999f778845a1730be75f49a2271da58b52a3df7eccae24d49054f6284e83c0e50 languageName: node linkType: hard -"@swc/helpers@npm:0.4.11": - version: 0.4.11 - resolution: "@swc/helpers@npm:0.4.11" +"@swc/helpers@npm:0.5.1": + version: 0.5.1 + resolution: "@swc/helpers@npm:0.5.1" dependencies: tslib: ^2.4.0 - checksum: 736857d524b41a8a4db81094e9b027f554004e0fa3e86325d85bdb38f7e6459ce022db079edb6c61ba0f46fe8583b3e663e95f7acbd13e51b8da6c34e45bba2e + checksum: 71e0e27234590435e4c62b97ef5e796f88e786841a38c7116a5e27a3eafa7b9ead7cdec5249b32165902076de78446945311c973e59bddf77c1e24f33a8f272a languageName: node linkType: hard -"@szmarczak/http-timer@npm:^1.1.2": - version: 1.1.2 - resolution: "@szmarczak/http-timer@npm:1.1.2" +"@szmarczak/http-timer@npm:^4.0.5": + version: 4.0.6 + resolution: "@szmarczak/http-timer@npm:4.0.6" dependencies: - defer-to-connect: ^1.0.1 - checksum: 4d9158061c5f397c57b4988cde33a163244e4f02df16364f103971957a32886beb104d6180902cbe8b38cb940e234d9f98a4e486200deca621923f62f50a06fe + defer-to-connect: ^2.0.0 + checksum: c29df3bcec6fc3bdec2b17981d89d9c9fc9bd7d0c9bcfe92821dc533f4440bc890ccde79971838b4ceed1921d456973c4180d7175ee1d0023ad0562240a58d95 languageName: node linkType: hard -"@testing-library/dom@npm:^8.5.0": - version: 8.19.0 - resolution: "@testing-library/dom@npm:8.19.0" +"@testing-library/dom@npm:^8.3.0": + version: 8.20.0 + resolution: "@testing-library/dom@npm:8.20.0" dependencies: "@babel/code-frame": ^7.10.4 "@babel/runtime": ^7.12.5 - "@types/aria-query": ^4.2.0 + "@types/aria-query": ^5.0.1 aria-query: ^5.0.0 chalk: ^4.1.0 dom-accessibility-api: ^0.5.9 lz-string: ^1.4.4 pretty-format: ^27.0.2 - checksum: 6bb93fef96703b6c47cf1b7cc8f71d402a9576084a94ba4e9926f51bd7bb1287fbb4f6942d82bd03fc6f3d998ae97e60f6aea4618f3a1ce6139597d2a4ecb7b9 + checksum: 1e599129a2fe91959ce80900a0a4897232b89e2a8e22c1f5950c36d39c97629ea86b4986b60b173b5525a05de33fde1e35836ea597b03de78cc51b122835c6f0 + languageName: node + linkType: hard + +"@testing-library/dom@npm:^9.0.0": + version: 9.3.0 + resolution: "@testing-library/dom@npm:9.3.0" + dependencies: + "@babel/code-frame": ^7.10.4 + "@babel/runtime": ^7.12.5 + "@types/aria-query": ^5.0.1 + aria-query: ^5.0.0 + chalk: ^4.1.0 + dom-accessibility-api: ^0.5.9 + lz-string: ^1.5.0 + pretty-format: ^27.0.2 + checksum: 790f4da6a8cbe7da8b7769e81e68caea1aed5b5f1973b808895692a945fb854fe8acdc66ffc34b6a57ec49bad9d76ccdd69b632ea8a82ad61d1e97d76cfdf9ec languageName: node linkType: hard -"@testing-library/react@npm:^13.4.0": - version: 13.4.0 - resolution: "@testing-library/react@npm:13.4.0" +"@testing-library/react@npm:^14.0.0": + version: 14.0.0 + resolution: "@testing-library/react@npm:14.0.0" dependencies: "@babel/runtime": ^7.12.5 - "@testing-library/dom": ^8.5.0 + "@testing-library/dom": ^9.0.0 "@types/react-dom": ^18.0.0 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 51ec548c1fdb1271089a5c63e0908f0166f2c7fcd9cacd3108ebbe0ce64cb4351812d885892020dc37608418cfb15698514856502b3cab0e5cc58d6cc1bd4a3e + checksum: 4a54c8f56cc4a39b50803205f84f06280bb76521d6d5d4b3b36651d760c7c7752ef142d857d52aaf4fad4848ed7a8be49afc793a5dda105955d2f8bef24901ac + languageName: node + linkType: hard + +"@testing-library/user-event@npm:^13.2.1": + version: 13.5.0 + resolution: "@testing-library/user-event@npm:13.5.0" + dependencies: + "@babel/runtime": ^7.12.5 + peerDependencies: + "@testing-library/dom": ">=7.21.4" + checksum: 16319de685fbb7008f1ba667928f458b2d08196918002daca56996de80ef35e6d9de26e9e1ece7d00a004692b95a597cf9142fff0dc53f2f51606a776584f549 languageName: node linkType: hard @@ -3936,6 +6046,13 @@ __metadata: languageName: node linkType: hard +"@tootallnate/once@npm:1": + version: 1.1.2 + resolution: "@tootallnate/once@npm:1.1.2" + checksum: e1fb1bbbc12089a0cb9433dc290f97bddd062deadb6178ce9bcb93bb7c1aecde5e60184bc7065aec42fe1663622a213493c48bbd4972d931aae48315f18e1be9 + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -3943,13 +6060,6 @@ __metadata: languageName: node linkType: hard -"@trysound/sax@npm:0.2.0": - version: 0.2.0 - resolution: "@trysound/sax@npm:0.2.0" - checksum: 11226c39b52b391719a2a92e10183e4260d9651f86edced166da1d95f39a0a1eaa470e44d14ac685ccd6d3df7e2002433782872c0feeb260d61e80f21250e65c - languageName: node - linkType: hard - "@ts-morph/common@npm:~0.11.0": version: 0.11.1 resolution: "@ts-morph/common@npm:0.11.1" @@ -3962,15 +6072,15 @@ __metadata: languageName: node linkType: hard -"@ts-morph/common@npm:~0.17.0": - version: 0.17.0 - resolution: "@ts-morph/common@npm:0.17.0" +"@ts-morph/common@npm:~0.19.0": + version: 0.19.0 + resolution: "@ts-morph/common@npm:0.19.0" dependencies: - fast-glob: ^3.2.11 - minimatch: ^5.1.0 - mkdirp: ^1.0.4 + fast-glob: ^3.2.12 + minimatch: ^7.4.3 + mkdirp: ^2.1.6 path-browserify: ^1.0.1 - checksum: f588c0acabcc6ca9463ac09b343d67a73f6e7bf47f674aaff11542b95b58342556b05241610b9e6dffc2966db529e7261b6860577786f919a835c22488ec9260 + checksum: 6b02a63ded0ce77e2bf86e135c17a6d5126307bbb926a4085d3cc2acaf28cb732780cf8d16961e9600efcc599876f706a2c9e8d135f7668704bb04a1a6fd37ec languageName: node linkType: hard @@ -3996,16 +6106,16 @@ __metadata: linkType: hard "@tsconfig/node16@npm:^1.0.2": - version: 1.0.3 - resolution: "@tsconfig/node16@npm:1.0.3" - checksum: 3a8b657dd047495b7ad23437d6afd20297ce90380ff0bdee93fc7d39a900dbd8d9e26e53ff6b465e7967ce2adf0b218782590ce9013285121e6a5928fbd6819f + version: 1.0.4 + resolution: "@tsconfig/node16@npm:1.0.4" + checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff languageName: node linkType: hard -"@tsd/typescript@npm:~4.8.3": - version: 4.8.4 - resolution: "@tsd/typescript@npm:4.8.4" - checksum: f820d4e382bbfb59465ff4547366ec1dba10989a115ce8f23e7ecf9db20a26f8ce371bccee0da1eb28ebeac129553ab9b0f3429a31deb4b0126bd41f7a2cb9e3 +"@tsd/typescript@npm:~5.0.2": + version: 5.0.4 + resolution: "@tsd/typescript@npm:5.0.4" + checksum: 5e4fd1ed623f35681fb7b0ede97ec0102701412f18b8f045f30dce3e3f35731aca4975afa4551818461e69b4350f78052ddace5617b1d4cb339a5c66fbad624e languageName: node linkType: hard @@ -4025,23 +6135,23 @@ __metadata: languageName: node linkType: hard -"@types/aria-query@npm:^4.2.0": - version: 4.2.2 - resolution: "@types/aria-query@npm:4.2.2" - checksum: 6f2ce11d91e2d665f3873258db19da752d91d85d3679eb5efcdf9c711d14492287e1e4eb52613b28e60375841a9e428594e745b68436c963d8bad4bf72188df3 +"@types/aria-query@npm:^5.0.1": + version: 5.0.1 + resolution: "@types/aria-query@npm:5.0.1" + checksum: 69fd7cceb6113ed370591aef04b3fd0742e9a1b06dd045c43531448847b85de181495e4566f98e776b37c422a12fd71866e0a1dfd904c5ec3f84d271682901de languageName: node linkType: hard -"@types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.1.19": - version: 7.1.19 - resolution: "@types/babel__core@npm:7.1.19" +"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14": + version: 7.20.0 + resolution: "@types/babel__core@npm:7.20.0" dependencies: - "@babel/parser": ^7.1.0 - "@babel/types": ^7.0.0 + "@babel/parser": ^7.20.7 + "@babel/types": ^7.20.7 "@types/babel__generator": "*" "@types/babel__template": "*" "@types/babel__traverse": "*" - checksum: 8c9fa87a1c2224cbec251683a58bebb0d74c497118034166aaa0491a4e2627998a6621fc71f8a60ffd27d9c0c52097defedf7637adc6618d0331c15adb302338 + checksum: 49b601a0a7637f1f387442c8156bd086cfd10ff4b82b0e1994e73a6396643b5435366fb33d6b604eade8467cca594ef97adcbc412aede90bb112ebe88d0ad6df languageName: node linkType: hard @@ -4065,11 +6175,33 @@ __metadata: linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": - version: 7.18.2 - resolution: "@types/babel__traverse@npm:7.18.2" + version: 7.18.5 + resolution: "@types/babel__traverse@npm:7.18.5" dependencies: "@babel/types": ^7.3.0 - checksum: 05972775e21cf07753b3bec725bf76f5a9804f99f660d323040746e3c8a4fe1b4ef6df17d7a80c4e2e335382cc72c62fc5a7079af836871ff9cbf0c21804e6d9 + checksum: b9e7f39eb84626cc8f83ebf75a621d47f04b53cb085a3ea738a9633d57cf65208e503b1830db91aa5e297bc2ba761681ac0b0cbfb7a3d56afcfb2296212668ef + languageName: node + linkType: hard + +"@types/body-parser@npm:*": + version: 1.19.2 + resolution: "@types/body-parser@npm:1.19.2" + dependencies: + "@types/connect": "*" + "@types/node": "*" + checksum: e17840c7d747a549f00aebe72c89313d09fbc4b632b949b2470c5cb3b1cb73863901ae84d9335b567a79ec5efcfb8a28ff8e3f36bc8748a9686756b6d5681f40 + languageName: node + linkType: hard + +"@types/cacheable-request@npm:^6.0.1": + version: 6.0.3 + resolution: "@types/cacheable-request@npm:6.0.3" + dependencies: + "@types/http-cache-semantics": "*" + "@types/keyv": ^3.1.4 + "@types/node": "*" + "@types/responselike": ^1.0.0 + checksum: d9b26403fe65ce6b0cb3720b7030104c352bcb37e4fac2a7089a25a97de59c355fa08940658751f2f347a8512aa9d18fdb66ab3ade835975b2f454f2d5befbd9 languageName: node linkType: hard @@ -4082,19 +6214,28 @@ __metadata: languageName: node linkType: hard -"@types/chai@npm:*, @types/chai@npm:^4.3.3": - version: 4.3.3 - resolution: "@types/chai@npm:4.3.3" - checksum: 20cd094753e137cfc35939cae7f0ed78ecda7861e5c94704efab6979b9121a63807e9b631bdcf3a2792d6c6dba44050b13387262f9e63ebb040741c01c345f0a +"@types/chai@npm:*, @types/chai@npm:^4.3.5": + version: 4.3.5 + resolution: "@types/chai@npm:4.3.5" + checksum: c8f26a88c6b5b53a3275c7f5ff8f107028e3cbb9ff26795fff5f3d9dea07106a54ce9e2dce5e40347f7c4cc35657900aaf0c83934a25a1ae12e61e0f5516e431 languageName: node linkType: hard -"@types/concat-stream@npm:^1.6.0": - version: 1.6.1 - resolution: "@types/concat-stream@npm:1.6.1" +"@types/concat-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "@types/concat-stream@npm:2.0.0" + dependencies: + "@types/node": "*" + checksum: d82ace5cb92f9fc91660ae1a101fa0a6b6159da59b0351c28627b24c317670267bc527f24ef4fa2c08d00404b49882ca66bf5c75d47d2b5f48d2fd85f9c2ea4d + languageName: node + linkType: hard + +"@types/connect@npm:*": + version: 3.4.35 + resolution: "@types/connect@npm:3.4.35" dependencies: "@types/node": "*" - checksum: 7d211e74331affd3578b5469244f5cef84a93775f38332adb3ef12413559a23862bc682c6873d0a404b01c9d5d5f7d3ae091fe835b435b633eb420e3055b3e56 + checksum: fe81351470f2d3165e8b12ce33542eef89ea893e36dd62e8f7d72566dfb7e448376ae962f9f3ea888547ce8b55a40020ca0e01d637fab5d99567673084542641 languageName: node linkType: hard @@ -4106,11 +6247,46 @@ __metadata: linkType: hard "@types/debug@npm:^4.0.0": - version: 4.1.7 - resolution: "@types/debug@npm:4.1.7" + version: 4.1.8 + resolution: "@types/debug@npm:4.1.8" dependencies: "@types/ms": "*" - checksum: 0a7b89d8ed72526858f0b61c6fd81f477853e8c4415bb97f48b1b5545248d2ae389931680b94b393b993a7cfe893537a200647d93defe6d87159b96812305adc + checksum: a9a9bb40a199e9724aa944e139a7659173a9b274798ea7efbc277cb084bc37d32fc4c00877c3496fac4fed70a23243d284adb75c00b5fdabb38a22154d18e5df + languageName: node + linkType: hard + +"@types/detect-port@npm:^1.3.0": + version: 1.3.2 + resolution: "@types/detect-port@npm:1.3.2" + checksum: e4678244fbe8801014798b3efb967c886e6fc0fe94fb771a1be9558b35c68910b23bd30984df4a276b927820ce436b244506fb0972116d1b18506ac96bfd1a50 + languageName: node + linkType: hard + +"@types/doctrine@npm:^0.0.3": + version: 0.0.3 + resolution: "@types/doctrine@npm:0.0.3" + checksum: 7ca9c8ff4d2da437785151c9eef0dd80b8fa12e0ff0fcb988458a78de4b6f0fc92727ba5bbee446e1df615a91f03053c5783b30b7c21ab6ceab6a42557e93e50 + languageName: node + linkType: hard + +"@types/ejs@npm:^3.1.1": + version: 3.1.2 + resolution: "@types/ejs@npm:3.1.2" + checksum: e4f0745b6ed53a63c08bdfdeb019a7d0e0c400896722b44d6732b4ee6bf6061d2dc965206186b8b0ae2ecd71303c29f1af1feddbca2df0acbd7bd234a74ca518 + languageName: node + linkType: hard + +"@types/emscripten@npm:^1.39.6": + version: 1.39.6 + resolution: "@types/emscripten@npm:1.39.6" + checksum: 437f2f9cdfd9057255662508fa9a415fe704ba484c6198f3549c5b05feebcdcd612b1ec7b10026d2566935d05d3c36f9366087cb42bc90bd25772a88fcfc9343 + languageName: node + linkType: hard + +"@types/escodegen@npm:^0.0.6": + version: 0.0.6 + resolution: "@types/escodegen@npm:0.0.6" + checksum: 7b25aeedd48dbef68345224082c6bc774845cbfc1d9b2ce91a477130fe7ccabf33da126c1d6d55e5dfd838db429a7c80890628a167e5aa55b6a4620974da38d3 languageName: node linkType: hard @@ -4124,6 +6300,16 @@ __metadata: languageName: node linkType: hard +"@types/eslint@npm:^8.0.0": + version: 8.40.0 + resolution: "@types/eslint@npm:8.40.0" + dependencies: + "@types/estree": "*" + "@types/json-schema": "*" + checksum: bab41d7f590182e743853cdd5bf5359cbc4240df986223457c8a5f5674743a3fe2a8626704b65bf9121dfa0ce0a0efd760da8339cc329018f229d4d2d6ee1c43 + languageName: node + linkType: hard + "@types/estree-jsx@npm:^0.0.1": version: 0.0.1 resolution: "@types/estree-jsx@npm:0.0.1" @@ -4143,36 +6329,86 @@ __metadata: linkType: hard "@types/estree@npm:*, @types/estree@npm:^1.0.0": - version: 1.0.0 - resolution: "@types/estree@npm:1.0.0" - checksum: 910d97fb7092c6738d30a7430ae4786a38542023c6302b95d46f49420b797f21619cdde11fa92b338366268795884111c2eb10356e4bd2c8ad5b92941e9e6443 + version: 1.0.1 + resolution: "@types/estree@npm:1.0.1" + checksum: e9aa175eacb797216fafce4d41e8202c7a75555bc55232dee0f9903d7171f8f19f0ae7d5191bb1a88cb90e65468be508c0df850a9fb81b4433b293a5a749899d languageName: node linkType: hard -"@types/form-data@npm:0.0.33": - version: 0.0.33 - resolution: "@types/form-data@npm:0.0.33" +"@types/estree@npm:^0.0.51": + version: 0.0.51 + resolution: "@types/estree@npm:0.0.51" + checksum: e56a3bcf759fd9185e992e7fdb3c6a5f81e8ff120e871641607581fb3728d16c811702a7d40fa5f869b7f7b4437ab6a87eb8d98ffafeee51e85bbe955932a189 + languageName: node + linkType: hard + +"@types/express-serve-static-core@npm:^4.17.33": + version: 4.17.35 + resolution: "@types/express-serve-static-core@npm:4.17.35" + dependencies: + "@types/node": "*" + "@types/qs": "*" + "@types/range-parser": "*" + "@types/send": "*" + checksum: cc8995d10c6feda475ec1b3a0e69eb0f35f21ab6b49129ad5c6f279e0bc5de8175bc04ec51304cb79a43eec3ed2f5a1e01472eb6d5f827b8c35c6ca8ad24eb6e + languageName: node + linkType: hard + +"@types/express@npm:^4.7.0": + version: 4.17.17 + resolution: "@types/express@npm:4.17.17" + dependencies: + "@types/body-parser": "*" + "@types/express-serve-static-core": ^4.17.33 + "@types/qs": "*" + "@types/serve-static": "*" + checksum: 0196dacc275ac3ce89d7364885cb08e7fb61f53ca101f65886dbf1daf9b7eb05c0943e2e4bbd01b0cc5e50f37e0eea7e4cbe97d0304094411ac73e1b7998f4da + languageName: node + linkType: hard + +"@types/find-cache-dir@npm:^3.2.1": + version: 3.2.1 + resolution: "@types/find-cache-dir@npm:3.2.1" + checksum: bf5c4e96da40247cd9e6327f54dfccda961a0fb2d70e3c71bd05def94de4c2e6fb310fe8ecb0f04ecf5dbc52214e184b55a2337b0f87250d4ae1e2e7d58321e4 + languageName: node + linkType: hard + +"@types/fs-extra@npm:^11.0.1": + version: 11.0.1 + resolution: "@types/fs-extra@npm:11.0.1" + dependencies: + "@types/jsonfile": "*" + "@types/node": "*" + checksum: 3e930346e5d84f419deb8ced1c582beef8cb20d0bd8a0eb145a37d75bab0572a1895f0e48a0d681d386b3a58b9a992b2d2acecc464bcaec2548f53ea00718651 + languageName: node + linkType: hard + +"@types/glob@npm:^7.1.1, @types/glob@npm:^7.1.3": + version: 7.2.0 + resolution: "@types/glob@npm:7.2.0" dependencies: + "@types/minimatch": "*" "@types/node": "*" - checksum: f0c283fdef2dd7191168a37b9cb2625af3cfbd7f72b5a514f938bea0a135669f79d736186d434b9e81150b47ef1bf20d97b188014a00583556fad6ce59fb9bbf + checksum: 6ae717fedfdfdad25f3d5a568323926c64f52ef35897bcac8aca8e19bc50c0bd84630bbd063e5d52078b2137d8e7d3c26eabebd1a2f03ff350fff8a91e79fc19 languageName: node linkType: hard -"@types/fs-extra@npm:^9.0.13": - version: 9.0.13 - resolution: "@types/fs-extra@npm:9.0.13" +"@types/glob@npm:^8.0.0": + version: 8.1.0 + resolution: "@types/glob@npm:8.1.0" dependencies: + "@types/minimatch": ^5.1.2 "@types/node": "*" - checksum: add79e212acd5ac76b97b9045834e03a7996aef60a814185e0459088fd290519a3c1620865d588fa36c4498bf614210d2a703af5cf80aa1dbc125db78f6edac3 + checksum: 9101f3a9061e40137190f70626aa0e202369b5ec4012c3fabe6f5d229cce04772db9a94fa5a0eb39655e2e4ad105c38afbb4af56a56c0996a8c7d4fc72350e3d languageName: node linkType: hard "@types/graceful-fs@npm:^4.1.3": - version: 4.1.5 - resolution: "@types/graceful-fs@npm:4.1.5" + version: 4.1.6 + resolution: "@types/graceful-fs@npm:4.1.6" dependencies: "@types/node": "*" - checksum: d076bb61f45d0fc42dee496ef8b1c2f8742e15d5e47e90e20d0243386e426c04d4efd408a48875ab432f7960b4ce3414db20ed0fbbfc7bcc89d84e574f6e045a + checksum: c3070ccdc9ca0f40df747bced1c96c71a61992d6f7c767e8fd24bb6a3c2de26e8b84135ede000b7e79db530a23e7e88dcd9db60eee6395d0f4ce1dae91369dd4 languageName: node linkType: hard @@ -4192,6 +6428,20 @@ __metadata: languageName: node linkType: hard +"@types/http-cache-semantics@npm:*": + version: 4.0.1 + resolution: "@types/http-cache-semantics@npm:4.0.1" + checksum: 1048aacf627829f0d5f00184e16548205cd9f964bf0841c29b36bc504509230c40bc57c39778703a1c965a6f5b416ae2cbf4c1d4589c889d2838dd9dbfccf6e9 + languageName: node + linkType: hard + +"@types/is-empty@npm:^1.0.0": + version: 1.2.1 + resolution: "@types/is-empty@npm:1.2.1" + checksum: 7fe50427bfe8e4bef75e448a20bb542a57ab69ed0a4e191fd41f7f4417f6bd7cccd5f395fd88a579befbcb2c93ee9ba082749730e052493ea988351691069465 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.4 resolution: "@types/istanbul-lib-coverage@npm:2.0.4" @@ -4217,13 +6467,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^29.2.0": - version: 29.2.0 - resolution: "@types/jest@npm:29.2.0" +"@types/jest@npm:^29.5.1": + version: 29.5.1 + resolution: "@types/jest@npm:29.5.1" dependencies: expect: ^29.0.0 pretty-format: ^29.0.0 - checksum: 6779e63d8d7507b116a61b2935a200e48531849fc1ac74090212759fe17716777ca6d2c3a8d927a563e9cfa474ae91d40b1688376ae80e3a08974b3c9e9691e1 + checksum: 0a22491dec86333c0e92b897be2c809c922a7b2b0aa5604ac369810d6b2360908b4a3f2c6892e8a237a54fa1f10ecefe0e823ec5fcb7915195af4dfe88d2197e languageName: node linkType: hard @@ -4255,14 +6505,16 @@ __metadata: languageName: node linkType: hard -"@types/json5@npm:^0.0.30": - version: 0.0.30 - resolution: "@types/json5@npm:0.0.30" - checksum: 8802648fa736801264fde08da7c08b57be8845bd75ecf50c1eee980245f6d2c10a00f0768d0979c7ec2e4ff7e1417226e527bfb045e7e1a6e6afcaf11706a5f0 +"@types/jsonfile@npm:*": + version: 6.1.1 + resolution: "@types/jsonfile@npm:6.1.1" + dependencies: + "@types/node": "*" + checksum: 0f8fe0a9221a00e8413cffba723dfe16553868724b830237256fb0052ecd5cac96498189d1235a001cfa815f352008261c9ceb373f0aa58227f891e0c7a12c4d languageName: node linkType: hard -"@types/keyv@npm:^3.1.1": +"@types/keyv@npm:^3.1.4": version: 3.1.4 resolution: "@types/keyv@npm:3.1.4" dependencies: @@ -4278,6 +6530,20 @@ __metadata: languageName: node linkType: hard +"@types/lodash@npm:^4.14.167": + version: 4.14.194 + resolution: "@types/lodash@npm:4.14.194" + checksum: 113f34831c461469d91feca2dde737f88487732898b4d25e9eb23b087bb193985f864d1e1e0f3b777edc5022e460443588b6000a3b2348c966f72d17eedc35ea + languageName: node + linkType: hard + +"@types/long@npm:^4.0.1": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: d16cde7240d834cf44ba1eaec49e78ae3180e724cd667052b194a372f350d024cba8dd3f37b0864931683dab09ca935d52f0c4c1687178af5ada9fc85b0635f4 + languageName: node + linkType: hard + "@types/markdown-it@npm:^12.2.3": version: 12.2.3 resolution: "@types/markdown-it@npm:12.2.3" @@ -4289,15 +6555,15 @@ __metadata: linkType: hard "@types/mdast@npm:^3.0.0": - version: 3.0.10 - resolution: "@types/mdast@npm:3.0.10" + version: 3.0.11 + resolution: "@types/mdast@npm:3.0.11" dependencies: "@types/unist": "*" - checksum: 3f587bfc0a9a2403ecadc220e61031b01734fedaf82e27eb4d5ba039c0eb54db8c85681ccc070ab4df3f7ec711b736a82b990e69caa14c74bf7ac0ccf2ac7313 + checksum: 3b04cf465535553b47a1811c247668bd6cfeb54d99a2c9dbb82ccd0f5145d271d10c3169f929701d8cd55fd569f0d2e459a50845813ba3261f1fb0395a288cea languageName: node linkType: hard -"@types/mdurl@npm:*": +"@types/mdurl@npm:*, @types/mdurl@npm:^1.0.0": version: 1.0.2 resolution: "@types/mdurl@npm:1.0.2" checksum: 79c7e523b377f53cf1f5a240fe23d0c6cae856667692bd21bf1d064eafe5ccc40ae39a2aa0a9a51e8c94d1307228c8f6b121e847124591a9a828c3baf65e86e2 @@ -4305,13 +6571,41 @@ __metadata: linkType: hard "@types/mdx@npm:^2.0.0": - version: 2.0.2 - resolution: "@types/mdx@npm:2.0.2" - checksum: a10b78946019fe78f7dba749e90924c29a59b23171e7c6aa41f3220a491723c14729212b99eb4e9e1f847d5f4a574ddc4e03c49a2621470e9c822082874eeafc + version: 2.0.5 + resolution: "@types/mdx@npm:2.0.5" + checksum: 1069baff0b2d0fb0bc724748e2386af626cc30f8ef99e680afb4dee566ed0aeabd31cea774212a7033f491e594a0acc234116078b252cba94ac413f91eb585a3 + languageName: node + linkType: hard + +"@types/mime-types@npm:^2.1.0": + version: 2.1.1 + resolution: "@types/mime-types@npm:2.1.1" + checksum: 106b5d556add46446a579ad25ff15d6b421851790d887edcad558c90c1e64b1defc72bfbaf4b08f208916e21d9cc45cdb951d77be51268b18221544cfe054a3c + languageName: node + linkType: hard + +"@types/mime@npm:*": + version: 3.0.1 + resolution: "@types/mime@npm:3.0.1" + checksum: 4040fac73fd0cea2460e29b348c1a6173da747f3a87da0dbce80dd7a9355a3d0e51d6d9a401654f3e5550620e3718b5a899b2ec1debf18424e298a2c605346e7 + languageName: node + linkType: hard + +"@types/mime@npm:^1": + version: 1.3.2 + resolution: "@types/mime@npm:1.3.2" + checksum: 0493368244cced1a69cb791b485a260a422e6fcc857782e1178d1e6f219f1b161793e9f87f5fae1b219af0f50bee24fcbe733a18b4be8fdd07a38a8fb91146fd + languageName: node + linkType: hard + +"@types/minimatch@npm:*, @types/minimatch@npm:^5.1.2": + version: 5.1.2 + resolution: "@types/minimatch@npm:5.1.2" + checksum: 0391a282860c7cb6fe262c12b99564732401bdaa5e395bee9ca323c312c1a0f45efbf34dce974682036e857db59a5c9b1da522f3d6055aeead7097264c8705a8 languageName: node linkType: hard -"@types/minimist@npm:^1.2.0": +"@types/minimist@npm:^1.2.0, @types/minimist@npm:^1.2.2": version: 1.2.2 resolution: "@types/minimist@npm:1.2.2" checksum: b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d @@ -4325,54 +6619,65 @@ __metadata: languageName: node linkType: hard -"@types/nlcst@npm:^1.0.0": - version: 1.0.0 - resolution: "@types/nlcst@npm:1.0.0" +"@types/node-fetch@npm:2.6.3": + version: 2.6.3 + resolution: "@types/node-fetch@npm:2.6.3" dependencies: - "@types/unist": "*" - checksum: 1708c9a879d3c0b602a9f520bbb9039fd882e6072026af231a66af017d23cd97481de60cd9ad0e3b3c2c990b780b54c6a5ba7ba5d2f286ab4cf57967e1f98ee2 + "@types/node": "*" + form-data: ^3.0.0 + checksum: b68cda58e91535a42dd5337932443c37f8e198ca1e8deeb95bd92a64a9a84d92071867b91c5eb84ee8e13f33d45a70549fe2bc11dd070a894dd561909f4d39f5 + languageName: node + linkType: hard + +"@types/node-fetch@npm:^2.5.7": + version: 2.6.4 + resolution: "@types/node-fetch@npm:2.6.4" + dependencies: + "@types/node": "*" + form-data: ^3.0.0 + checksum: f3e1d881bb42269e676ecaf49f0e096ab345e22823a2b2d071d60619414817fe02df48a31a8d05adb23054028a2a65521bdb3906ceb763ab6d3339c8d8775058 languageName: node linkType: hard -"@types/node@npm:*": - version: 18.8.4 - resolution: "@types/node@npm:18.8.4" - checksum: c2b87f6b0b1f02b2ce61ca7cb93ea287119bda086a3f33e48da8f5e70c24ad7141cc3465946e0e36abb7eba70c7b320c7659842096e4aa573b3a8d557322c818 +"@types/node@npm:*, @types/node@npm:>=12.12.47, @types/node@npm:>=13.7.0": + version: 20.2.3 + resolution: "@types/node@npm:20.2.3" + checksum: 576065e8fc1fa45798c8f59a6bf809169582d04abc2e25fab1a048ffc734975b9992ae31be0d960cf705a21fb37112f7fcde11aa322beddf7491e73d5a5a988c languageName: node linkType: hard -"@types/node@npm:12.20.24": - version: 12.20.24 - resolution: "@types/node@npm:12.20.24" - checksum: e7a13460e2f5b0b5a32c0f3af7daf1a05201552a66d542d3cc3b1ea8b52d4730250f9eb1961d755e31cfe5d03c78340911a6242657a0a9a17d6f7e341fc9f366 +"@types/node@npm:14.18.33": + version: 14.18.33 + resolution: "@types/node@npm:14.18.33" + checksum: 4e23f95186d8ae1d38c999bc6b46fe94e790da88744b0a3bfeedcbd0d9ffe2cb0ff39e85f43014f6739e5270292c1a1f6f97a1fc606fd573a0c17fda9a1d42de languageName: node linkType: hard -"@types/node@npm:16.11.68, @types/node@npm:^16.11.68": - version: 16.11.68 - resolution: "@types/node@npm:16.11.68" - checksum: a35293b6b8867e10ab9e10b6cd5f0e4224a86256d5ef102581dcb9f79f35f255ad87443e8584ddf8dce1229ee28885c58187e41822cf8d1e82495e7897c47c3f +"@types/node@npm:16.18.32, @types/node@npm:^16.0.0": + version: 16.18.32 + resolution: "@types/node@npm:16.18.32" + checksum: c5966c8e671205b2971ae66ae548ce92235cef89ae1a0f2ecbf118e775923259dc85f57c58cfc56267089d56dfce967700c058276199c6ed9510d0a0b077af2d languageName: node linkType: hard -"@types/node@npm:^10.0.3": - version: 10.17.60 - resolution: "@types/node@npm:10.17.60" - checksum: 2cdb3a77d071ba8513e5e8306fa64bf50e3c3302390feeaeff1fd325dd25c8441369715dfc8e3701011a72fed5958c7dfa94eb9239a81b3c286caa4d97db6eef +"@types/node@npm:18.16.14, @types/node@npm:^18.0.0": + version: 18.16.14 + resolution: "@types/node@npm:18.16.14" + checksum: c11cb3c787236414efe58240ae71854971592554d82ff9d201876ce7cafd51c37aaa001c63602d002e8238614d7331bd6d48ac4c1c0caa826799980b6846fb08 languageName: node linkType: hard -"@types/node@npm:^14.0.0, @types/node@npm:^14.14.35": - version: 14.18.32 - resolution: "@types/node@npm:14.18.32" - checksum: 45463114bf85d06dc12925d876dd90b7fff43d9ee10a40e48fd16aece3d0201c76426c128e41230b2818d386422be06c5be33b3d94d90ee924b6fa4d54574035 +"@types/node@npm:^13.7.0": + version: 13.13.52 + resolution: "@types/node@npm:13.13.52" + checksum: 8f1afff497ebeba209e2dc340d823284e087a47632afe99a7daa30eaff80893e520f222ad400cd1f2d3b8288e93cf3eaded52a8e64eaefb8aacfe6c35de98f42 languageName: node linkType: hard -"@types/node@npm:^8.0.0": - version: 8.10.66 - resolution: "@types/node@npm:8.10.66" - checksum: c52039de862654a139abdc6a51de532a69dd80516ac35a959c3b3a2831ecbaaf065b0df5f9db943f5e28b544ebb9a891730d52b52f7a169b86a82bc060210000 +"@types/node@npm:^14.14.35": + version: 14.18.47 + resolution: "@types/node@npm:14.18.47" + checksum: 249467fa37e60bb7ce631616a5fea53f3b957a6792c6a09f7db7cdff85a7410c9e657dd9fa54bcc9d878e58f35407ce35169b84556f46b2154f90bc71063e1d0 languageName: node linkType: hard @@ -4383,10 +6688,10 @@ __metadata: languageName: node linkType: hard -"@types/parse-json@npm:^4.0.0": - version: 4.0.0 - resolution: "@types/parse-json@npm:4.0.0" - checksum: fd6bce2b674b6efc3db4c7c3d336bd70c90838e8439de639b909ce22f3720d21344f52427f1d9e57b265fcb7f6c018699b99e5e0c208a1a4823014269a6bf35b +"@types/npmlog@npm:^4.1.2": + version: 4.1.4 + resolution: "@types/npmlog@npm:4.1.4" + checksum: 740f7431ccfc0e127aa8d162fe05c6ce8aa71290be020d179b2824806d19bd2c706c7e0c9a3c9963cefcdf2ceacb1dec6988c394c3694451387759dafe0aa927 languageName: node linkType: hard @@ -4405,9 +6710,16 @@ __metadata: linkType: hard "@types/prettier@npm:^2.1.5": - version: 2.7.1 - resolution: "@types/prettier@npm:2.7.1" - checksum: 5e3f58e229d6c73b5f5cae2e8f96c1c4a5b5805f83459e17a045ba8e96152b1d38e86b63e3172fb159dac923388699660862b75b2d37e54220805f0e691e26f1 + version: 2.7.2 + resolution: "@types/prettier@npm:2.7.2" + checksum: b47d76a5252265f8d25dd2fe2a5a61dc43ba0e6a96ffdd00c594cb4fd74c1982c2e346497e3472805d97915407a09423804cc2110a0b8e1b22cffcab246479b7 + languageName: node + linkType: hard + +"@types/pretty-hrtime@npm:^1.0.0": + version: 1.0.1 + resolution: "@types/pretty-hrtime@npm:1.0.1" + checksum: a6cdee417eea6f7af914e4fcd13e05822864ce10b5d7646525632e86d69b79123eec55a5d3fff0155ba46b61902775e1644bcb80e1e4dffdac28e7febb089083 languageName: node linkType: hard @@ -4418,63 +6730,41 @@ __metadata: languageName: node linkType: hard -"@types/qs@npm:^6.2.31": +"@types/qs@npm:*, @types/qs@npm:^6.9.5": version: 6.9.7 resolution: "@types/qs@npm:6.9.7" checksum: 7fd6f9c25053e9b5bb6bc9f9f76c1d89e6c04f7707a7ba0e44cc01f17ef5284adb82f230f542c2d5557d69407c9a40f0f3515e8319afd14e1e16b5543ac6cdba languageName: node linkType: hard -"@types/react-dom@npm:^17.0.17": - version: 17.0.17 - resolution: "@types/react-dom@npm:17.0.17" - dependencies: - "@types/react": ^17 - checksum: 23caf98aa03e968811560f92a2c8f451694253ebe16b670929b24eaf0e7fa62ba549abe9db0ac028a9d8a9086acd6ab9c6c773f163fa21224845edbc00ba6232 - languageName: node - linkType: hard - -"@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.0.6": - version: 18.0.6 - resolution: "@types/react-dom@npm:18.0.6" - dependencies: - "@types/react": "*" - checksum: db571047af1a567631758700b9f7d143e566df939cfe5fbf7535347cc0c726a1cdbb5e3f8566d076e54cf708b6c1166689de194a9ba09ee35efc9e1d45911685 +"@types/range-parser@npm:*": + version: 1.2.4 + resolution: "@types/range-parser@npm:1.2.4" + checksum: b7c0dfd5080a989d6c8bb0b6750fc0933d9acabeb476da6fe71d8bdf1ab65e37c136169d84148034802f48378ab94e3c37bb4ef7656b2bec2cb9c0f8d4146a95 languageName: node linkType: hard -"@types/react-syntax-highlighter@npm:^15.5.5": - version: 15.5.5 - resolution: "@types/react-syntax-highlighter@npm:15.5.5" +"@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.2.4": + version: 18.2.4 + resolution: "@types/react-dom@npm:18.2.4" dependencies: "@types/react": "*" - checksum: c0b3a5b7aa39c8c1b823d4d64818ac53900c1a5bd65ed43fae56402b746f8d21e2b768ba7201d9d9b15447b377c271d09aebd75af05b02a1ff67459670c5d2f7 - languageName: node - linkType: hard - -"@types/react@npm:*, @types/react@npm:>=16, @types/react@npm:^18.0.21": - version: 18.0.21 - resolution: "@types/react@npm:18.0.21" - dependencies: - "@types/prop-types": "*" - "@types/scheduler": "*" - csstype: ^3.0.2 - checksum: 36c1a7c9d507e81e2e629c1ad3db51d7b84d8b010c2d5008da411874286c6a5ccc711ae1d4c470efc0bdc77153cc8804a40e927e929e5164c669ca41b84b846d + checksum: 8301f35cf1cbfec8c723e9477aecf87774e3c168bd457d353b23c45064737213d3e8008b067c6767b7b08e4f2b3823ee239242a6c225fc91e7f8725ef8734124 languageName: node linkType: hard -"@types/react@npm:^17, @types/react@npm:^17.0.50": - version: 17.0.50 - resolution: "@types/react@npm:17.0.50" +"@types/react@npm:*, @types/react@npm:>=16, @types/react@npm:^18.2.6": + version: 18.2.6 + resolution: "@types/react@npm:18.2.6" dependencies: "@types/prop-types": "*" "@types/scheduler": "*" csstype: ^3.0.2 - checksum: b5629dff7c2f3e9fcba95a19b2b3bfd78d7cacc33ba5fc26413dba653d34afcac3b93ddabe563e8062382688a1eac7db68e93739bb8e712d27637a03aaafbbb8 + checksum: dea9d232d8df7ac357367a69dcb557711ab3d5501807ffa77cebeee73d49ee94d095f298e36853c63ed47cce097eee4c7eae2aaa8c02fac3f0171ec1b523a819 languageName: node linkType: hard -"@types/resolve@npm:^1.17.0": +"@types/resolve@npm:^1.17.1": version: 1.20.2 resolution: "@types/resolve@npm:1.20.2" checksum: 61c2cad2499ffc8eab36e3b773945d337d848d3ac6b7b0a87c805ba814bc838ef2f262fc0f109bfd8d2e0898ff8bd80ad1025f9ff64f1f71d3d4294c9f14e5f6 @@ -4491,16 +6781,36 @@ __metadata: linkType: hard "@types/scheduler@npm:*": - version: 0.16.2 - resolution: "@types/scheduler@npm:0.16.2" - checksum: b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc + version: 0.16.3 + resolution: "@types/scheduler@npm:0.16.3" + checksum: 2b0aec39c24268e3ce938c5db2f2e77f5c3dd280e05c262d9c2fe7d890929e4632a6b8e94334017b66b45e4f92a5aa42ba3356640c2a1175fa37bef2f5200767 languageName: node linkType: hard -"@types/semver@npm:^7.3.12": - version: 7.3.12 - resolution: "@types/semver@npm:7.3.12" - checksum: 35536b2fc5602904f21cae681f6c9498e177dab3f54ae37c92f9a1b7e43c35f18bcd81e1c98c1cf0d33ee046bb06c771e9928c1c00a401d56a03f56549252a15 +"@types/semver@npm:^7.1.0, @types/semver@npm:^7.3.12, @types/semver@npm:^7.3.4": + version: 7.5.0 + resolution: "@types/semver@npm:7.5.0" + checksum: 0a64b9b9c7424d9a467658b18dd70d1d781c2d6f033096a6e05762d20ebbad23c1b69b0083b0484722aabf35640b78ccc3de26368bcae1129c87e9df028a22e2 + languageName: node + linkType: hard + +"@types/send@npm:*": + version: 0.17.1 + resolution: "@types/send@npm:0.17.1" + dependencies: + "@types/mime": ^1 + "@types/node": "*" + checksum: 10b620a5960058ef009afbc17686f680d6486277c62f640845381ec4baa0ea683fdd77c3afea4803daf5fcddd3fb2972c8aa32e078939f1d4e96f83195c89793 + languageName: node + linkType: hard + +"@types/serve-static@npm:*": + version: 1.15.1 + resolution: "@types/serve-static@npm:1.15.1" + dependencies: + "@types/mime": "*" + "@types/node": "*" + checksum: 2e078bdc1e458c7dfe69e9faa83cc69194b8896cce57cb745016580543c7ab5af07fdaa8ac1765eb79524208c81017546f66056f44d1204f812d72810613de36 languageName: node linkType: hard @@ -4512,12 +6822,12 @@ __metadata: linkType: hard "@types/superagent@npm:*": - version: 4.1.15 - resolution: "@types/superagent@npm:4.1.15" + version: 4.1.17 + resolution: "@types/superagent@npm:4.1.17" dependencies: "@types/cookiejar": "*" "@types/node": "*" - checksum: 347cd74ef0a29e6b9c6d32253c3fb0dd39a31618b50752f84d36b6a9246237bb6b68c9b436c1f94adabc2df89d9f1939e4782f4c850f98b9c2fe431ad4e565a4 + checksum: 076c3283d0fc71a26273e7fe88d4d6dad007c13631a09165714b4b1054362f51c57bb017d2cf62778fd35a1e2b4c8e1688f43bb1b3d6c4a9e4a3a7fbf85b70e6 languageName: node linkType: hard @@ -4530,6 +6840,20 @@ __metadata: languageName: node linkType: hard +"@types/supports-color@npm:^8.0.0": + version: 8.1.1 + resolution: "@types/supports-color@npm:8.1.1" + checksum: 6f35588fc423bf6b511167b4aaa0348638567f7a74de24d77dfb930d2053757585e1799d9c903f3db7a23a9ef2518878de9427b20d2f4476899aaf923e98de11 + languageName: node + linkType: hard + +"@types/treeify@npm:^1.0.0": + version: 1.0.0 + resolution: "@types/treeify@npm:1.0.0" + checksum: 1b2397030d13beee7f82b878ca80feeddb0d550a6b00d8be30082a370c0ac5985ecf7b9378cf93ea278ff00c3e900b416ae8d9379f2c7e8caecdece1dfc77380 + languageName: node + linkType: hard + "@types/unist@npm:*, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": version: 2.0.6 resolution: "@types/unist@npm:2.0.6" @@ -4537,48 +6861,75 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:^8.5.3": - version: 8.5.3 - resolution: "@types/ws@npm:8.5.3" +"@types/validate-npm-package-name@npm:^4.0.0": + version: 4.0.0 + resolution: "@types/validate-npm-package-name@npm:4.0.0" + checksum: 09efd659f4cce362931a57c7ee6d645855c7ecb346c6496ef31bab638e578472f779c77233adad8502e90a7d7a146a40a5029ff9c4739a38a4187ef1fe7187c3 + languageName: node + linkType: hard + +"@types/webpack-env@npm:^1.17.0": + version: 1.18.0 + resolution: "@types/webpack-env@npm:1.18.0" + checksum: ecf4daa31cb37d474ac0ce058d83a3cadeb9881ca8107ae93c2299eaa9954943aae09b43e143c62ccbe4288a14db00c918c9debd707afe17c3998f873eaabc59 + languageName: node + linkType: hard + +"@types/ws@npm:^8.5.4": + version: 8.5.4 + resolution: "@types/ws@npm:8.5.4" dependencies: "@types/node": "*" - checksum: 0ce46f850d41383fcdc2149bcacc86d7232fa7a233f903d2246dff86e31701a02f8566f40af5f8b56d1834779255c04ec6ec78660fe0f9b2a69cf3d71937e4ae + checksum: fefbad20d211929bb996285c4e6f699b12192548afedbe4930ab4384f8a94577c9cd421acaad163cacd36b88649509970a05a0b8f20615b30c501ed5269038d1 languageName: node linkType: hard -"@types/yargs-parser@npm:*, @types/yargs-parser@npm:^21.0.0": +"@types/yargs-parser@npm:*": version: 21.0.0 resolution: "@types/yargs-parser@npm:21.0.0" checksum: b2f4c8d12ac18a567440379909127cf2cec393daffb73f246d0a25df36ea983b93b7e9e824251f959e9f928cbc7c1aab6728d0a0ff15d6145f66cec2be67d9a2 languageName: node linkType: hard +"@types/yargs@npm:^16.0.0": + version: 16.0.5 + resolution: "@types/yargs@npm:16.0.5" + dependencies: + "@types/yargs-parser": "*" + checksum: 22697f7cc8aa32dcc10981a87f035e183303a58351c537c81fb450270d5c494b1d918186210e445b0eb2e4a8b34a8bda2a595f346bdb1c9ed2b63d193cb00430 + languageName: node + linkType: hard + "@types/yargs@npm:^17.0.0, @types/yargs@npm:^17.0.8": - version: 17.0.13 - resolution: "@types/yargs@npm:17.0.13" + version: 17.0.24 + resolution: "@types/yargs@npm:17.0.24" dependencies: "@types/yargs-parser": "*" - checksum: 0ab269abc2da2223cf0a8c16d578850fbe327d40fb85724b5c3f9f6cf38d03656ef699518c05d4df3bc337339ec6d0aad7df01682a9dca4783ad1ccc7336cf12 + checksum: 5f3ac4dc4f6e211c1627340160fbe2fd247ceba002190da6cf9155af1798450501d628c9165a183f30a224fc68fa5e700490d740ff4c73e2cdef95bc4e8ba7bf languageName: node linkType: hard -"@types/yoga-layout@npm:1.9.2": - version: 1.9.2 - resolution: "@types/yoga-layout@npm:1.9.2" - checksum: dbc3d6ab997d50fe1fcca5dd6822982c8fe586145ab648e0e97c3bc4ebc93d0b40c9edd75febaba374d61f60c1379b639f6be652965c776a901bf1068f2eac87 +"@types/yauzl@npm:^2.9.1": + version: 2.10.0 + resolution: "@types/yauzl@npm:2.10.0" + dependencies: + "@types/node": "*" + checksum: 55d27ae5d346ea260e40121675c24e112ef0247649073848e5d4e03182713ae4ec8142b98f61a1c6cbe7d3b72fa99bbadb65d8b01873e5e605cdc30f1ff70ef2 languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/eslint-plugin@npm:5.40.1" +"@typescript-eslint/eslint-plugin@npm:^5.59.2": + version: 5.59.7 + resolution: "@typescript-eslint/eslint-plugin@npm:5.59.7" dependencies: - "@typescript-eslint/scope-manager": 5.40.1 - "@typescript-eslint/type-utils": 5.40.1 - "@typescript-eslint/utils": 5.40.1 + "@eslint-community/regexpp": ^4.4.0 + "@typescript-eslint/scope-manager": 5.59.7 + "@typescript-eslint/type-utils": 5.59.7 + "@typescript-eslint/utils": 5.59.7 debug: ^4.3.4 + grapheme-splitter: ^1.0.4 ignore: ^5.2.0 - regexpp: ^3.2.0 + natural-compare-lite: ^1.4.0 semver: ^7.3.7 tsutils: ^3.21.0 peerDependencies: @@ -4587,74 +6938,64 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 61f19bde0f1206beb20aeb28d18c1ef26a98cf4d2ead9f1d2f204cb91af31582eb5ee9422fe5f92d6aa10cebf85cd50f1b41e8cf8ce65808e2208664c3b1d66a + checksum: 10d28bac7a5af9e41767be0bb9c270ee3dcdfeaa38d1b036c6822e7260b88821c460699ba943664eb1ef272d00de6a81b99d7d955332044ea87b624e7ead84a1 languageName: node linkType: hard "@typescript-eslint/experimental-utils@npm:^5.0.0": - version: 5.40.0 - resolution: "@typescript-eslint/experimental-utils@npm:5.40.0" + version: 5.59.7 + resolution: "@typescript-eslint/experimental-utils@npm:5.59.7" dependencies: - "@typescript-eslint/utils": 5.40.0 + "@typescript-eslint/utils": 5.59.7 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 3556f78dc8e965f836ac64cc6d8aaac9ca7ddaeebb72ee1b71eeebb2ccaec376d127c65145f0a44cacfe57d2f79f198d7d88433a878b4375b1ddacdcd356f631 + checksum: 4136bff76e966ff423877c82e50fc3d815ccd67eef9a4e137803a4c8acf89d028c9a6da2c27044045e61556e82838efdb5190146ae7709ce6a423aec8952cf4b languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/parser@npm:5.40.1" +"@typescript-eslint/parser@npm:^5.59.2": + version: 5.59.7 + resolution: "@typescript-eslint/parser@npm:5.59.7" dependencies: - "@typescript-eslint/scope-manager": 5.40.1 - "@typescript-eslint/types": 5.40.1 - "@typescript-eslint/typescript-estree": 5.40.1 + "@typescript-eslint/scope-manager": 5.59.7 + "@typescript-eslint/types": 5.59.7 + "@typescript-eslint/typescript-estree": 5.59.7 debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 9fe410c1b14934803bb7c26de9b8de5d46ef9b6fe5dcbee1d7e111f0259659c214549b60dacdc729a3e23da835e6a44f08a9aa6bcb73ffff3c4fd5b9142358ed - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:5.37.0": - version: 5.37.0 - resolution: "@typescript-eslint/scope-manager@npm:5.37.0" - dependencies: - "@typescript-eslint/types": 5.37.0 - "@typescript-eslint/visitor-keys": 5.37.0 - checksum: 1c439e21ffa63ebaadb8c8363e9d668132a835a28203e5b779366bfa56772f332e5dedb50d63dffb836839b9d9c4e66aa9e3ea47b8c59465b18a0cbd063ec7a3 + checksum: bc44f37a11a44f84ae5f0156213f3e2e49aef2ecac94d9e161a0c721acd29462e288f306ad4648095ac1c0e5a5f62b78280c1735883cf39f79ee3afcba312119 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.40.0": - version: 5.40.0 - resolution: "@typescript-eslint/scope-manager@npm:5.40.0" +"@typescript-eslint/scope-manager@npm:5.59.2": + version: 5.59.2 + resolution: "@typescript-eslint/scope-manager@npm:5.59.2" dependencies: - "@typescript-eslint/types": 5.40.0 - "@typescript-eslint/visitor-keys": 5.40.0 - checksum: 48dfb2f1a71bda5b782263e97608f1e1a2e8a89a603344af5072208be7936140af9d41483be439405c5ee379d0263555d6cc94405b187707f9ecfd7dd9821b5f + "@typescript-eslint/types": 5.59.2 + "@typescript-eslint/visitor-keys": 5.59.2 + checksum: e7adce27890ebaadd0fb36a35639c9a97d2965973643aef4b4b0dcfabb03181c82235d7171e718b002dd398e52fefd67816eb34912ddbc2bb738b47755bd502a languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/scope-manager@npm:5.40.1" +"@typescript-eslint/scope-manager@npm:5.59.7, @typescript-eslint/scope-manager@npm:^5.48.2": + version: 5.59.7 + resolution: "@typescript-eslint/scope-manager@npm:5.59.7" dependencies: - "@typescript-eslint/types": 5.40.1 - "@typescript-eslint/visitor-keys": 5.40.1 - checksum: 5f25b86bfd09fbf8cdfdf932eaf0b41a7594c9b4539d3c8321f882bf7b4bf486454256fdb9a5a8c4eae305419d377fa93d382f80004711d759ff77b3d565c1dc + "@typescript-eslint/types": 5.59.7 + "@typescript-eslint/visitor-keys": 5.59.7 + checksum: 43f7ea93fddbe2902122a41050677fe3eff2ea468f435b981592510cfc6136e8c28ac7d3a3e05fb332c0b3078a29bd0c91c35b2b1f4e788b4eb9aaeb70e21583 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.37.0": - version: 5.37.0 - resolution: "@typescript-eslint/type-utils@npm:5.37.0" +"@typescript-eslint/type-utils@npm:5.59.2": + version: 5.59.2 + resolution: "@typescript-eslint/type-utils@npm:5.59.2" dependencies: - "@typescript-eslint/typescript-estree": 5.37.0 - "@typescript-eslint/utils": 5.37.0 + "@typescript-eslint/typescript-estree": 5.59.2 + "@typescript-eslint/utils": 5.59.2 debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: @@ -4662,16 +7003,16 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 79dac78eefdbdb3c168da6b303381461af3523e2b45fdeb821eb05e6a5cac797a8850e1dd9e1b6cd1a7c22408acfa2a09854a0f85ff038518c312db8eae9aa4f + checksum: d9dc037509a97b11a3c7f758f0f6e985cf5b4909fab860018a75b1550711ce9ff07bf5b67d4197ba7a0a831fec7255851b1e6a773a69030fc8ea7ec649859f52 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/type-utils@npm:5.40.1" +"@typescript-eslint/type-utils@npm:5.59.7": + version: 5.59.7 + resolution: "@typescript-eslint/type-utils@npm:5.59.7" dependencies: - "@typescript-eslint/typescript-estree": 5.40.1 - "@typescript-eslint/utils": 5.40.1 + "@typescript-eslint/typescript-estree": 5.59.7 + "@typescript-eslint/utils": 5.59.7 debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: @@ -4679,37 +7020,30 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 6771196b8f16f4893bae70aa1371ff004b0058e8edef9b935143e2f1272e471049e9c34beb1d625fb6423db95dd377e01e938b70dd4506fbf071566e2bfb574d - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.37.0": - version: 5.37.0 - resolution: "@typescript-eslint/types@npm:5.37.0" - checksum: 899e59e7775fa95c2d9fcac5cc02cc49d83af5f1ffc706df495046c3b3733f79d5489568b01bfaf8c9ae4636e057056866adc783113036f774580086d0189f21 + checksum: 9cbeffad27b145b478e4cbbab2b44c5b246a9b922f01fd06d401ea4c41a4fa6dc8ba75d13a6409b3b4474ccaf2018770a4c6c599172e22ec2004110e00f4e721 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.40.0, @typescript-eslint/types@npm:^5.25.0": - version: 5.40.0 - resolution: "@typescript-eslint/types@npm:5.40.0" - checksum: 892ff162176a3e292b5b55090421c6d318187255f3f91be46bd5c0b38e3c25a49d9320ffb646d5709f3a2cdf350217a79e557886fdfdbdb322caec27f2b3d116 +"@typescript-eslint/types@npm:5.59.2": + version: 5.59.2 + resolution: "@typescript-eslint/types@npm:5.59.2" + checksum: 5a91cfbcaa8c7e92ad91f67abd0ce43ae562fdbdd8c32aa968731bf7c200d13a0415e87fc032bd48f7e5b7d3ed1447cb14449ef2592c269ca311974b15ce0af2 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/types@npm:5.40.1" - checksum: 2430c799667c820903df7ef39bc4c2762cb7654dbb8525d56f37e73f8cefb82186b80654dbbe0294c5b55affe929c641cdb90232e2749dcd7838f9e500a41549 +"@typescript-eslint/types@npm:5.59.7, @typescript-eslint/types@npm:^5.25.0": + version: 5.59.7 + resolution: "@typescript-eslint/types@npm:5.59.7" + checksum: 52eccec9e2d631eb2808e48b5dc33a837b5e242fa9eddace89fc707c9f2283b5364f1d38b33d418a08d64f45f6c22f051800898e1881a912f8aac0c3ae300d0a languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.37.0": - version: 5.37.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.37.0" +"@typescript-eslint/typescript-estree@npm:5.59.2": + version: 5.59.2 + resolution: "@typescript-eslint/typescript-estree@npm:5.59.2" dependencies: - "@typescript-eslint/types": 5.37.0 - "@typescript-eslint/visitor-keys": 5.37.0 + "@typescript-eslint/types": 5.59.2 + "@typescript-eslint/visitor-keys": 5.59.2 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -4718,16 +7052,16 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 80365a50fa11ed39bf54d9ef06e264fbbf3bdbcc55b7d7d555ef0be915edae40ec30e98d08b3f6ef048e1874450cbcb1e7d9f429d4f420dacbbde45d3376a7bc + checksum: e8bb8817fe53f826f54e4ca584e48a6700dae25e0cc20ab7db38e7e5308987c5759408b39a4e494d4d6dcd7b4bca9f9c507fae987213380dc1c98607cb0a60b1 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.40.0": - version: 5.40.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.40.0" +"@typescript-eslint/typescript-estree@npm:5.59.7": + version: 5.59.7 + resolution: "@typescript-eslint/typescript-estree@npm:5.59.7" dependencies: - "@typescript-eslint/types": 5.40.0 - "@typescript-eslint/visitor-keys": 5.40.0 + "@typescript-eslint/types": 5.59.7 + "@typescript-eslint/visitor-keys": 5.59.7 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -4736,350 +7070,479 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 8b67b8c4278f6bbd16ec521c847920c6f0ba57ec4bf148505c057aa160363852f50f9db73f42ee71ac3906940e8554e9c27686194a57f6554efcd82a8b0fa3e8 + checksum: eefe82eedf9ee2e14463c3f2b5b18df084c1328a859b245ee897a9a7075acce7cca0216a21fd7968b75aa64189daa008bfde1e2f9afbcc336f3dfe856e7f342e languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/typescript-estree@npm:5.40.1" +"@typescript-eslint/utils@npm:5.59.2": + version: 5.59.2 + resolution: "@typescript-eslint/utils@npm:5.59.2" dependencies: - "@typescript-eslint/types": 5.40.1 - "@typescript-eslint/visitor-keys": 5.40.1 - debug: ^4.3.4 - globby: ^11.1.0 - is-glob: ^4.0.3 + "@eslint-community/eslint-utils": ^4.2.0 + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.59.2 + "@typescript-eslint/types": 5.59.2 + "@typescript-eslint/typescript-estree": 5.59.2 + eslint-scope: ^5.1.1 semver: ^7.3.7 - tsutils: ^3.21.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: d0426a55d24b76a3f042816dd8baaaa7a8da0158870bb08fff5a5524821c13ca196117dc269f098b8887ef75e01da1a498637153ab3c29c370ca356bfe4a1716 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 483c35a592a36a5973204ce4cd11d52935c097b414d7edac2ecd15dba460b8c540b793ffc232c0f8580fef0624eb7704156ce33c66bd09a76769ed019bddd1d1 languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.37.0": - version: 5.37.0 - resolution: "@typescript-eslint/utils@npm:5.37.0" +"@typescript-eslint/utils@npm:5.59.7, @typescript-eslint/utils@npm:^5.10.0, @typescript-eslint/utils@npm:^5.45.0, @typescript-eslint/utils@npm:^5.59.7": + version: 5.59.7 + resolution: "@typescript-eslint/utils@npm:5.59.7" dependencies: + "@eslint-community/eslint-utils": ^4.2.0 "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.37.0 - "@typescript-eslint/types": 5.37.0 - "@typescript-eslint/typescript-estree": 5.37.0 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.59.7 + "@typescript-eslint/types": 5.59.7 + "@typescript-eslint/typescript-estree": 5.59.7 eslint-scope: ^5.1.1 - eslint-utils: ^3.0.0 + semver: ^7.3.7 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: dc6c19ab07b50113f6fa3722518b2f31ce04036ec018855587d4c467108cb4e3c2866e54ed2e18ce61d1e7d0eaab24f94ee39574031b7d8e1c05e4b83ff84ef2 + checksum: d8682700187ca94cc6441480cb6b87d0514a9748103c15dd93206c5b1c6fefa59063662f27a4103e16abbcfb654a61d479bc55af8f23d96f342431b87f31bb4e languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.40.0, @typescript-eslint/utils@npm:^5.10.0": - version: 5.40.0 - resolution: "@typescript-eslint/utils@npm:5.40.0" +"@typescript-eslint/visitor-keys@npm:5.59.2": + version: 5.59.2 + resolution: "@typescript-eslint/visitor-keys@npm:5.59.2" dependencies: - "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.40.0 - "@typescript-eslint/types": 5.40.0 - "@typescript-eslint/typescript-estree": 5.40.0 - eslint-scope: ^5.1.1 - eslint-utils: ^3.0.0 - semver: ^7.3.7 + "@typescript-eslint/types": 5.59.2 + eslint-visitor-keys: ^3.3.0 + checksum: 3057a017bca03b4ec3bee442044f2bc2f77a4af0d83ea9bf7c6cb2a12811126d93d9d300d89ef8078d981e478c6cc38693c51a2ae4b10a717796bba880eff924 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:5.59.7": + version: 5.59.7 + resolution: "@typescript-eslint/visitor-keys@npm:5.59.7" + dependencies: + "@typescript-eslint/types": 5.59.7 + eslint-visitor-keys: ^3.3.0 + checksum: 4367f2ea68dd96a0520485434ad11e1bd26239eeeb3a2150bee7478a0f1df3c2099a39f96486722932be0456bcb7a47a483b452876d1d30bdeb9b81d354eef3d + languageName: node + linkType: hard + +"@unocss/astro@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/astro@npm:0.52.3" + dependencies: + "@unocss/core": 0.52.3 + "@unocss/reset": 0.52.3 + "@unocss/vite": 0.52.3 + checksum: 8f21e6ec5cdf23d3a4a501966294f55bd5bf3cb61f83cc3dd37c769eb2b5e5fd1267951e927a0ab76157e2ecca10d86226d8d437618a6479891d09c84abb5c13 + languageName: node + linkType: hard + +"@unocss/cli@npm:0.52.3, @unocss/cli@npm:^0.52.3": + version: 0.52.3 + resolution: "@unocss/cli@npm:0.52.3" + dependencies: + "@ampproject/remapping": ^2.2.1 + "@rollup/pluginutils": ^5.0.2 + "@unocss/config": 0.52.3 + "@unocss/core": 0.52.3 + "@unocss/preset-uno": 0.52.3 + cac: ^6.7.14 + chokidar: ^3.5.3 + colorette: ^2.0.20 + consola: ^3.1.0 + fast-glob: ^3.2.12 + magic-string: ^0.30.0 + pathe: ^1.1.0 + perfect-debounce: ^1.0.0 + bin: + unocss: bin/unocss.mjs + checksum: 8d21e98da2eb1e7a4cf826f99ca1cd24af6cbccaf1ba016ff38c0e49bbc5b4b061981e51b9aacb301139c26d67e7ddf1e62f54faa6f879aa810a343f4f1c07c8 + languageName: node + linkType: hard + +"@unocss/config@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/config@npm:0.52.3" + dependencies: + "@unocss/core": 0.52.3 + unconfig: ^0.3.9 + checksum: 8ab02282422d5d7496f283ea334b2aab1da58eb9e47897b49ed6cd640207ce233638b615d144b7d5fe25c562d788098e92dfe622624a2ee48cb93b83b13b7572 + languageName: node + linkType: hard + +"@unocss/core@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/core@npm:0.52.3" + checksum: 116fbd59aa68b3faee252bd3b04a0a61799c2f99dae997a6b279990bf01fda9bec8983703893c02b03596b107964c954ef562855c74305a334d9d4d5ddd9937d + languageName: node + linkType: hard + +"@unocss/eslint-config@npm:^0.52.3": + version: 0.52.3 + resolution: "@unocss/eslint-config@npm:0.52.3" + dependencies: + "@unocss/eslint-plugin": 0.52.3 + checksum: b3168f9c9d13ea83172ebe0237ae87b0d07c1ea037d53524185329ec94018522eb313b3b998b5a758abfc92ea958455f3e83d7f3a4bebc96a9dfefbdf43cdb55 + languageName: node + linkType: hard + +"@unocss/eslint-plugin@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/eslint-plugin@npm:0.52.3" + dependencies: + "@typescript-eslint/utils": ^5.59.7 + "@unocss/config": 0.52.3 + "@unocss/core": 0.52.3 + magic-string: ^0.30.0 + synckit: ^0.8.5 + checksum: 364599422d790b6f39711f49805c60a17563718db3252ad1cde6a2e3937bf588d1943920d3f705d4ec4172b70c6bc8c0ac31f6b97e9f1132096c4386cc89edc8 + languageName: node + linkType: hard + +"@unocss/extractor-arbitrary-variants@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/extractor-arbitrary-variants@npm:0.52.3" + dependencies: + "@unocss/core": 0.52.3 + checksum: d3b8ba869c1af6779f608c737a806be2abe03658c10f9105c78dce9b0f9e0093e8ab71e0de7dc534d7d89bc556f0bf4f6660637c9e9ca393fc9012c52d6c1c77 + languageName: node + linkType: hard + +"@unocss/inspector@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/inspector@npm:0.52.3" + dependencies: + gzip-size: ^6.0.0 + sirv: ^2.0.3 + checksum: 652280afdda53972bc4a8d96636b61eab7e328d79446f82da73dd8499f96e13a8f4124a34daf66c4e785c555f70ae5f3d686859c2f50c883263b2805e9ba37d4 + languageName: node + linkType: hard + +"@unocss/postcss@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/postcss@npm:0.52.3" + dependencies: + "@unocss/config": 0.52.3 + "@unocss/core": 0.52.3 + css-tree: ^2.3.1 + fast-glob: ^3.2.12 + magic-string: ^0.30.0 + postcss: ^8.4.23 peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 608e16ad510c1543de37e168ab42e9d11fdd7d38faf19fe5d60255ea8e43b9a8cebeea11bd9776eed55fe0e453c5d222bb708b930b431c5b113269c6b44788c1 + postcss: ^8.4.21 + checksum: b70675133e1629bf8f41ade10f98834cbd18761eefb1c1c64fdc1d0f90c25c998f14272843908ee3be8b1663ac82d6a732a9a49d73e5821151384f3758f6f1d8 + languageName: node + linkType: hard + +"@unocss/preset-attributify@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-attributify@npm:0.52.3" + dependencies: + "@unocss/core": 0.52.3 + checksum: f9795d96f141e93d2eab6ff25867458f5cb626a56627dd5985c69682896ff7922da62b862b82a8392e70822f185643b79409024797c2173cd9e3bbb446cf73a5 + languageName: node + linkType: hard + +"@unocss/preset-icons@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-icons@npm:0.52.3" + dependencies: + "@iconify/utils": ^2.1.5 + "@unocss/core": 0.52.3 + ofetch: ^1.0.1 + checksum: 5adf12b17ad2a90d08611ad3f879526efd3c60dc71a1cdef7fd942676f6b9e9e78f64405868f57bb3280e7e12568c0fe95eab370d6661d84eaa9122deec9bfea languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/utils@npm:5.40.1" +"@unocss/preset-mini@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-mini@npm:0.52.3" dependencies: - "@types/json-schema": ^7.0.9 - "@types/semver": ^7.3.12 - "@typescript-eslint/scope-manager": 5.40.1 - "@typescript-eslint/types": 5.40.1 - "@typescript-eslint/typescript-estree": 5.40.1 - eslint-scope: ^5.1.1 - eslint-utils: ^3.0.0 - semver: ^7.3.7 - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: a971101bb2f4c742a1734a87e17997addb7ffa6639d472097fe098f6c5f09567b858949b97f05892aabb20f38479abecdfdd69cf740046aa601dd3fc39a44090 + "@unocss/core": 0.52.3 + "@unocss/extractor-arbitrary-variants": 0.52.3 + checksum: 86b56abd57d59fc65c07d0208e9fa902c8cd4d20ce603e66b95b2d6a171cc15f5946d273e9328afcf02da5ce9f21a3a055b0fac09b1b7fb2dd42f5734a290b6a languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.37.0": - version: 5.37.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.37.0" +"@unocss/preset-tagify@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-tagify@npm:0.52.3" dependencies: - "@typescript-eslint/types": 5.37.0 - eslint-visitor-keys: ^3.3.0 - checksum: d6193550f77413aead0cb267e058df80b80a488c8fb4e39beb5f0a70b971c41682a6391903fbc5f3dd859a872016288c434d631b8efc3ac5a04edbdb7b63b5f6 + "@unocss/core": 0.52.3 + checksum: 98bb17b266d8e1abd652c50c24f6ab5015b410625987a2efc127ee7849c1dc59fe5a2edd5d7cb6138c92f15d077964b8e572d5e0bf704432a522959a54779c90 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.40.0": - version: 5.40.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.40.0" +"@unocss/preset-typography@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-typography@npm:0.52.3" dependencies: - "@typescript-eslint/types": 5.40.0 - eslint-visitor-keys: ^3.3.0 - checksum: a11787f7e6ac7018b22848028c9116d028f89782b0ee120517f0384e9db260e3001ad897512d9c3cf15ce16073ae4c1dc7f81f29d6d40dec78b5e8c8e79f344f + "@unocss/core": 0.52.3 + "@unocss/preset-mini": 0.52.3 + checksum: 5c0792cb3d1a06a6261983d54620fce3574c6cf96b6d8f86dadd6699d5df86bae361f06b59ad5b7c837631ce8cdfbd5f86fcf7592b6dde9ea40a59e7a2c2e8c2 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.40.1": - version: 5.40.1 - resolution: "@typescript-eslint/visitor-keys@npm:5.40.1" +"@unocss/preset-uno@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-uno@npm:0.52.3" dependencies: - "@typescript-eslint/types": 5.40.1 - eslint-visitor-keys: ^3.3.0 - checksum: b5dbf1e484ba2832ca1883ee9cf7da5967f70aa5624f3fb67f13c3be90a3770b0bb96e64ccfb0c31b5d8f80794b5727e14b6c0d8c5184634a686f0ea6e798772 + "@unocss/core": 0.52.3 + "@unocss/preset-mini": 0.52.3 + "@unocss/preset-wind": 0.52.3 + checksum: 8b3b72941c19a714f9b17c0076c5bb515ae25f9267cada701223a4f0101830bd5e08c4874a34bd6796ccacaf0b8996c8979c25d386b1f50d8cb5341b093a3c14 languageName: node linkType: hard -"@unocss/astro@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/astro@npm:0.45.30" +"@unocss/preset-web-fonts@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-web-fonts@npm:0.52.3" dependencies: - "@unocss/core": 0.45.30 - "@unocss/reset": 0.45.30 - "@unocss/vite": 0.45.30 - checksum: 05a89f45494c71757308baad320717818733877cf67ef8ee73b45aa88b00de616d1539ba4cbb31f79a093012c7db201c9cb2f7dfa4abe92bcc5844257c1e8398 + "@unocss/core": 0.52.3 + ofetch: ^1.0.1 + checksum: 3fa86b1cd6124f81512535feb57a8708a349056e5c75d7b6a5054314b9a84e71a38ce75556cefd035e0f46260d2dd97ad3ea4866eb058136580574716d6c625e languageName: node linkType: hard -"@unocss/cli@npm:0.45.30, @unocss/cli@npm:^0.45.30": - version: 0.45.30 - resolution: "@unocss/cli@npm:0.45.30" +"@unocss/preset-wind@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/preset-wind@npm:0.52.3" dependencies: - "@ampproject/remapping": ^2.2.0 - "@rollup/pluginutils": ^5.0.1 - "@unocss/config": 0.45.30 - "@unocss/core": 0.45.30 - "@unocss/preset-uno": 0.45.30 - cac: ^6.7.14 - chokidar: ^3.5.3 - colorette: ^2.0.19 - consola: ^2.15.3 - fast-glob: ^3.2.12 - magic-string: ^0.26.7 - pathe: ^0.3.9 - perfect-debounce: ^0.1.3 - bin: - unocss: bin/unocss.mjs - checksum: 393e16b1ff81b0d3ddaa58da10ca1b3eb2a3c3c77ea72b0cdadaebae52a383ae2395ef1767b603bdc220110d3d4e41d63d1233c5ce04bb3dd9f780266aac49fa + "@unocss/core": 0.52.3 + "@unocss/preset-mini": 0.52.3 + checksum: 49d19db8d91e7d99314b02077b8d71092ed19b899011489736f84b4cf41fc1c0c9e4657c0f9434b2154a5bcce2d78d2718048ca8ad7a886ae8eccd17853ecc5f languageName: node linkType: hard -"@unocss/config@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/config@npm:0.45.30" - dependencies: - "@unocss/core": 0.45.30 - unconfig: ^0.3.7 - checksum: 6a206f9df9d2b51ad982757c8da170729e8f5e988f558078b7c630fd575bb417e286510ede1498aa159102e3985cea6dda133715d1638c564643fc9096c0bf13 +"@unocss/reset@npm:0.52.3, @unocss/reset@npm:^0.52.3": + version: 0.52.3 + resolution: "@unocss/reset@npm:0.52.3" + checksum: 696a89bcc97bbe6072c4e954a5a20c9614db41101ac12462dab9ce142526a647673d72720f6536706e9ddbcc33c7eeb73c0dcc67dd45c9c60d2f63fd92f6e0d6 languageName: node linkType: hard -"@unocss/core@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/core@npm:0.45.30" - checksum: 055062c5526e3841c3529bb3ac97cf36a8f458a7354c53919de9ff137303b72ec288fb55637edd4e40d6fac23550ec4359f284f750e08a0b8e648f2bc0bb00fd +"@unocss/scope@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/scope@npm:0.52.3" + checksum: 208ba4db51f3f7455025818bb847301d9cb4999cb83defe733ab49bf2a4054547a3c16fcf47e18b8285e5901754d5244b3ef2317c3ccfd5ad36e3977a5ad99b4 languageName: node linkType: hard -"@unocss/inspector@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/inspector@npm:0.45.30" +"@unocss/transformer-attributify-jsx-babel@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/transformer-attributify-jsx-babel@npm:0.52.3" dependencies: - gzip-size: ^6.0.0 - sirv: ^2.0.2 - checksum: b18e07d858dd98ffb14dad5a23c23cd972bb2be0d548a1ec53aeb3e9bdcb92b66ba4b5b87549840e74f8e4246afe78997fffe8479510bc7ac8f35c2501c29c22 + "@unocss/core": 0.52.3 + checksum: 24dc073fa7cd3f1522e094071ead6e915b938fb3bbcc8b7591ab272a27f491e61be9561668df503f1c23cd7881197b3cf57fb193139f8c6c2dfd8dbeb55e37a8 languageName: node linkType: hard -"@unocss/preset-attributify@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-attributify@npm:0.45.30" +"@unocss/transformer-attributify-jsx@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/transformer-attributify-jsx@npm:0.52.3" dependencies: - "@unocss/core": 0.45.30 - checksum: 6dc367819bc89b88df42a82918f42e35b20324ea07eefd27b421bc28508ca7c321c6d204d6de18643c8b1859685dcfc2beccc42e75d95b4650bcaa7742f09a6e + "@unocss/core": 0.52.3 + checksum: f3a9ba893a7e07b2b7e198bbceca6b1a73c54c4af1a766455c04850d4d17b539eb0209d7bbe8dffcbb74cdc83bfda02d1f17d462b7500405fe20cc76b47693be languageName: node linkType: hard -"@unocss/preset-icons@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-icons@npm:0.45.30" +"@unocss/transformer-compile-class@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/transformer-compile-class@npm:0.52.3" dependencies: - "@iconify/utils": ^2.0.1 - "@unocss/core": 0.45.30 - ohmyfetch: ^0.4.20 - checksum: 9631ecd7fd7de45543dd10801f6de64982944098c463877b23984b5d1b90dc186dbac35e8ac1596a50a8861c708d8b8d6631a81d79253a0ddba57a9b152a2105 + "@unocss/core": 0.52.3 + checksum: 3d3222523bc82a99329117b0495affed04cf067de8eda0dcc522a183adad16b7c64c7660635489b61409c8cc6b3a026e7cda35fe27e4909d90f462466823bca3 languageName: node linkType: hard -"@unocss/preset-mini@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-mini@npm:0.45.30" +"@unocss/transformer-directives@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/transformer-directives@npm:0.52.3" dependencies: - "@unocss/core": 0.45.30 - checksum: 518099e2c570ac42a95e9af21c576c55ba3811f172dfa4a83e419579d8ef431abd2fd59214122315377379f89662f893b8cd3c2246dd1aba5781057d400131b9 + "@unocss/core": 0.52.3 + css-tree: ^2.3.1 + checksum: 63b995bb417fd9930397c3629bf967cefcb574e78263a21fb5d91aa31e7fb5d66c9013912c7e1f12d254c9b205826c1e11a2e0a4905a62074993a84566035169 languageName: node linkType: hard -"@unocss/preset-tagify@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-tagify@npm:0.45.30" +"@unocss/transformer-variant-group@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/transformer-variant-group@npm:0.52.3" dependencies: - "@unocss/core": 0.45.30 - checksum: 8bd6cc3771f3c7d09c3ef881f9bd373ba7e00df95a4cfdd59ef0e9c5f5190903f2aa3842b5d50810f7376171e125e35bfe8d5da72bf58588c8e20fb5f53fac7a + "@unocss/core": 0.52.3 + checksum: 93f04bb62ea2084601613180e291810568aba2167ae164143a6c1464bb620ea70f0434fdd52147c72db5de68c93e260906abac8eeeea3e1af1bb23c65ea5336e languageName: node linkType: hard -"@unocss/preset-typography@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-typography@npm:0.45.30" +"@unocss/vite@npm:0.52.3": + version: 0.52.3 + resolution: "@unocss/vite@npm:0.52.3" dependencies: - "@unocss/core": 0.45.30 - checksum: c78ac33ad88fccdf252f6e13ce3d77c86521a7d84df066848ffda9bc3667a625a4d92987054ef3ad579ba389bb3e46c5a957f0a504dd230d64140a2e819265a8 + "@ampproject/remapping": ^2.2.1 + "@rollup/pluginutils": ^5.0.2 + "@unocss/config": 0.52.3 + "@unocss/core": 0.52.3 + "@unocss/inspector": 0.52.3 + "@unocss/scope": 0.52.3 + "@unocss/transformer-directives": 0.52.3 + chokidar: ^3.5.3 + fast-glob: ^3.2.12 + magic-string: ^0.30.0 + peerDependencies: + vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 + checksum: c202a6dc31444600a50c94899703155746deea3ed86823b88165cbaea92c76cf02b85965258184180f95473a8fb3fff06a75bd232605e61c7929139af30ad342 languageName: node linkType: hard -"@unocss/preset-uno@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-uno@npm:0.45.30" +"@vanilla-extract/babel-plugin-debug-ids@npm:^1.0.2": + version: 1.0.3 + resolution: "@vanilla-extract/babel-plugin-debug-ids@npm:1.0.3" dependencies: - "@unocss/core": 0.45.30 - "@unocss/preset-mini": 0.45.30 - "@unocss/preset-wind": 0.45.30 - checksum: 66d781aedacb2106fccfc6d1221991fa27d702794e05b5e01773676d63873c2c15a7193b460a650bcb536ef4c82623fdf3e5b85066082c194c30970567992dae + "@babel/core": ^7.20.7 + checksum: aff82b7f5c0e1df0e3018335287d194832930b1e7a586716dbcf5dd2b0d6d74d48cb5cd64ab84232d2b597ff04c8bb2a734f3965c931e07fd3385d4954592fb0 languageName: node linkType: hard -"@unocss/preset-web-fonts@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-web-fonts@npm:0.45.30" +"@vanilla-extract/css@npm:^1.10.0": + version: 1.11.0 + resolution: "@vanilla-extract/css@npm:1.11.0" dependencies: - "@unocss/core": 0.45.30 - ohmyfetch: ^0.4.20 - checksum: c2fca321c6e727edb928ff6d99683f2fff2a83fc8a96cfbc1fdbfc87f3626f0af234310206cc412ba09fa173f637142db0ffc53f0b513de74827bbb09598ec06 + "@emotion/hash": ^0.9.0 + "@vanilla-extract/private": ^1.0.3 + ahocorasick: 1.0.2 + chalk: ^4.1.1 + css-what: ^5.0.1 + cssesc: ^3.0.0 + csstype: ^3.0.7 + deep-object-diff: ^1.1.9 + deepmerge: ^4.2.2 + media-query-parser: ^2.0.2 + outdent: ^0.8.0 + checksum: da382c7b80e88890931dbf927d38769aed432cb4c5cd434f35ffd5dcec18584c95864c2ad8f5cd0456ae32f9b3ee6aa3af8eb2d95a7f7c709e41a52d731996b5 languageName: node linkType: hard -"@unocss/preset-wind@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/preset-wind@npm:0.45.30" - dependencies: - "@unocss/core": 0.45.30 - "@unocss/preset-mini": 0.45.30 - checksum: 93e73dfa503f3070f68ec14719311e1b5f8b23905b05c6ff7936c5e48e95ee32d90cad50922b82f9eb190d58499e1c29a8fa3fc1d7a2099393d59b9c636a5000 +"@vanilla-extract/integration@npm:^6.2.0": + version: 6.2.1 + resolution: "@vanilla-extract/integration@npm:6.2.1" + dependencies: + "@babel/core": ^7.20.7 + "@babel/plugin-syntax-typescript": ^7.20.0 + "@vanilla-extract/babel-plugin-debug-ids": ^1.0.2 + "@vanilla-extract/css": ^1.10.0 + esbuild: 0.17.6 + eval: 0.1.6 + find-up: ^5.0.0 + javascript-stringify: ^2.0.1 + lodash: ^4.17.21 + mlly: ^1.1.0 + outdent: ^0.8.0 + vite: ^4.1.4 + vite-node: ^0.28.5 + checksum: 28bda6804f09f6dd046fb3d3d2cc2f7b5a1143e476645d34a9e92eb9156f44d63200e1035932e8a76d4a77b5c20807907294476f6d7fc3b43e9f93670ff87953 languageName: node linkType: hard -"@unocss/reset@npm:0.45.30, @unocss/reset@npm:^0.45.30": - version: 0.45.30 - resolution: "@unocss/reset@npm:0.45.30" - checksum: c647a14088e689c6bc983118462cf17a4c44acf3f9ad614c140ae11ec11b38cdbbb2dd80ad5d12f5213bae2d7f5a0a609fc946af4717642a8ba1a8ac118a6acd +"@vanilla-extract/private@npm:^1.0.3": + version: 1.0.3 + resolution: "@vanilla-extract/private@npm:1.0.3" + checksum: 866a71ba6804edeb0735684e7723ba78f5cf0bb40d4fb538fe6bf7d73928099e341312337b2a510ac0ce96ff8a4b39eb7f7a5fad0c842532353dd20e7278f29b languageName: node linkType: hard -"@unocss/scope@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/scope@npm:0.45.30" - checksum: 3dd2df49ab40cd8f6b9684b0b157ddadbc5710e1d9510de9258746773212a5ad74fdf1e00e3fb12df3fae75a93adae9b041e1a06639f87ec1d2ed924654765cb +"@vercel/analytics@npm:^1.0.1": + version: 1.0.1 + resolution: "@vercel/analytics@npm:1.0.1" + checksum: 6876e1d0868e85198d43a17ffec7266cdee5a53d5fc797d3f7e0d64e9d76a2ade3cbdcbc0a665e2ee2389f65dfc80591f7d667e9fc981cdbaa848006cbaefe19 languageName: node linkType: hard -"@unocss/transformer-attributify-jsx@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/transformer-attributify-jsx@npm:0.45.30" - dependencies: - "@unocss/core": 0.45.30 - checksum: cb7901f2e221c99e6909de27d8925c5e548819495364212c7f600d8eeafa93283baa3fbbe6846c61450297eb4c4346cbd6e5174dd933fd0b36fa11519420c1a7 +"@vercel/build-utils@npm:6.7.3": + version: 6.7.3 + resolution: "@vercel/build-utils@npm:6.7.3" + checksum: 3dfc095fd4ff70b2e91f9687556f3bbc1b1e5ce42d0ad08e90b4d0321d76d30b721cbb2f22d060ffa6a9fbe250cf0a9dce8e099372fa87c14fae7cbd5b18faee languageName: node linkType: hard -"@unocss/transformer-compile-class@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/transformer-compile-class@npm:0.45.30" - dependencies: - "@unocss/core": 0.45.30 - checksum: 3b371b37f6f66363e270af78322f6465ef34021aa01e619151f021e151262afcb4293904fb365dbea25225121757d5d7b8774ca9396c62e3a6d96ca8a927e4ce +"@vercel/edge-config-fs@npm:0.1.0": + version: 0.1.0 + resolution: "@vercel/edge-config-fs@npm:0.1.0" + checksum: 4eb27927a1c6a9d77cee4457424e208c3ff7f01e1cd0249b133804d12fd7099bd1aed6a9d9574b122d3bd59289b294a913b4df05bb69aca6091c8a020cbc2121 languageName: node linkType: hard -"@unocss/transformer-directives@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/transformer-directives@npm:0.45.30" +"@vercel/edge-config@npm:^0.1.11": + version: 0.1.11 + resolution: "@vercel/edge-config@npm:0.1.11" dependencies: - "@unocss/core": 0.45.30 - css-tree: ^2.2.1 - checksum: 20f4018fa7bc7cb2d70e5a402221cd6a17c162fe4861e3a92c1d153fddf8720569cba1f5a29c81f8a86518d6bad215afdcdaae01f0b8ef3c7bf5065ce4756eb7 + "@vercel/edge-config-fs": 0.1.0 + checksum: 91e79061d4e8e7412569f4d9e5e98783152b5ef695088591cf4d712fa37119402e4271e8b9765aa7cc8d843c25a4a4552ec58a7353855d72d22b0a3d0b7aee4e languageName: node linkType: hard -"@unocss/transformer-variant-group@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/transformer-variant-group@npm:0.45.30" - dependencies: - "@unocss/core": 0.45.30 - checksum: 472346216f6d0941530a8ef68d9755bb84e256ecdb7df735e604664174b9f448b6c8f171e02d62bd5572841a0242112a41dfda8ad3dd203ff5bb79cff8a4e1a7 +"@vercel/error-utils@npm:1.0.8": + version: 1.0.8 + resolution: "@vercel/error-utils@npm:1.0.8" + checksum: b338e27b4fee0b5416475343cb0fbb20f0cf448561b2a1cd5a8df2bdb6a84b1fa01df15ae011257ba8028a4e6ed7355277a610ea1db6866209c42429a964ac94 languageName: node linkType: hard -"@unocss/vite@npm:0.45.30": - version: 0.45.30 - resolution: "@unocss/vite@npm:0.45.30" +"@vercel/gatsby-plugin-vercel-analytics@npm:1.0.10": + version: 1.0.10 + resolution: "@vercel/gatsby-plugin-vercel-analytics@npm:1.0.10" dependencies: - "@ampproject/remapping": ^2.2.0 - "@rollup/pluginutils": ^5.0.1 - "@unocss/config": 0.45.30 - "@unocss/core": 0.45.30 - "@unocss/inspector": 0.45.30 - "@unocss/scope": 0.45.30 - "@unocss/transformer-directives": 0.45.30 - magic-string: ^0.26.7 - peerDependencies: - vite: ^2.9.0 || ^3.0.0-0 - checksum: 9e7a71b1037828cbc43dc2c32aef03805204d717a374fdb6afccb8753dc80fdffe82b247a54a4ae4b2af4c9b72ccf857c58892815ae4f2bb848f18180e8dc5ff + "@babel/runtime": 7.12.1 + web-vitals: 0.2.4 + checksum: ff18c27b7512d8d6404d2fb526947c15ed9dbfd9e595d47c02cf82991dc4cb4f6b4fd2e3106d9492c095c1e270e3a57f1636209757a47269fa76c50e9cda4e75 languageName: node linkType: hard -"@vercel/build-utils@npm:5.5.5": - version: 5.5.5 - resolution: "@vercel/build-utils@npm:5.5.5" - checksum: fc4f65a3c5586e91f9df2a49ae40885b9b4d9c941f4077c0bb886260ec041cfe03143c8a1302ad8d9e2141f0ac113fdac2d69c766f5a578f2b32c31a1cfa59be +"@vercel/gatsby-plugin-vercel-builder@npm:1.3.5": + version: 1.3.5 + resolution: "@vercel/gatsby-plugin-vercel-builder@npm:1.3.5" + dependencies: + "@sinclair/typebox": 0.25.24 + "@vercel/build-utils": 6.7.3 + "@vercel/node": 2.14.3 + "@vercel/routing-utils": 2.2.1 + esbuild: 0.14.47 + etag: 1.8.1 + fs-extra: 11.1.0 + checksum: 5d171691a141ce11b9c152cd1cbee88544ac906cdebfb23ee3b98711ddaf585e66e1439ef4a8b3174f30cedae9f3606361aa9e4259af52edb9b94c5a6f8f7590 languageName: node linkType: hard -"@vercel/go@npm:2.2.13": - version: 2.2.13 - resolution: "@vercel/go@npm:2.2.13" - checksum: 8474e55bf26c386cad1465a8f74b66cdb01663bd617d6501bff3bee296bd25dd5999e4b3184e3c0eaed7ce8ce5283cea1e83da2e22191d051575883182ce3204 +"@vercel/go@npm:2.5.1": + version: 2.5.1 + resolution: "@vercel/go@npm:2.5.1" + checksum: f5871024939b9487b849f8cd8ca6bb2feb801d80f83bf594fafb83e8283ce8d896569d5c4d33f9eb549cae652863ec2e279a16f369385b2994c6ad50957e84de languageName: node linkType: hard -"@vercel/hydrogen@npm:0.0.26": - version: 0.0.26 - resolution: "@vercel/hydrogen@npm:0.0.26" - checksum: 8f869ee8c3bb8903130c22290d9082c03e32819dfd0d0f9adc670eaac13b0b3695fb8146aca736f99d6758e091b96b88758cdf0d84958b46be0a24722e446b5e +"@vercel/hydrogen@npm:0.0.64": + version: 0.0.64 + resolution: "@vercel/hydrogen@npm:0.0.64" + checksum: 160f0d50c3d50bfd6af1ed454a541ae40a94077bf4eabcc6d6c64e3d5599d6fc547e572c26ad7666c5bd266471e68820196605dd247a0e9ca0ccf1b29baa05e5 languageName: node linkType: hard -"@vercel/next@npm:3.2.6": - version: 3.2.6 - resolution: "@vercel/next@npm:3.2.6" - checksum: 187ce93a7091585778e0033b3f9bf8f6f91c5338d778b0525cd019b5d5994441464875f8612f745e626db9268c7f376c2c8c0864f93d7a6d33a17436a6612e19 +"@vercel/next@npm:3.8.5": + version: 3.8.5 + resolution: "@vercel/next@npm:3.8.5" + checksum: f05688673964466a87221b63fad0df10e873bca321f48e196c29f91bc6e684bc62ec204a8a3b1f6741290c67263bc4b10ab319f3be0c7770c9cc03d83372f8f9 languageName: node linkType: hard -"@vercel/nft@npm:0.22.1": - version: 0.22.1 - resolution: "@vercel/nft@npm:0.22.1" +"@vercel/nft@npm:0.22.5": + version: 0.22.5 + resolution: "@vercel/nft@npm:0.22.5" dependencies: "@mapbox/node-pre-gyp": ^1.0.5 + "@rollup/pluginutils": ^4.0.0 acorn: ^8.6.0 async-sema: ^3.1.1 bindings: ^1.4.0 @@ -5089,167 +7552,230 @@ __metadata: micromatch: ^4.0.2 node-gyp-build: ^4.2.2 resolve-from: ^5.0.0 - rollup-pluginutils: ^2.8.2 bin: nft: out/cli.js - checksum: 05850e25a8e3a4fd7b76d911e8d14f97403f58cf8f92fbae630adaeee99589a167f288b87b3edc5901bf87bf2adad689059f43755c448930d1d087cdb66cec93 - languageName: node - linkType: hard - -"@vercel/node-bridge@npm:3.0.0": - version: 3.0.0 - resolution: "@vercel/node-bridge@npm:3.0.0" - checksum: cead2c1a6eea411249d9e960d395319839824dba3053ab04ee5fa72e3580a509dd1865d9b5c3eaa2e8401ba772f8b834b42fc2f8cb412495e9c3d2a2efb5e1c6 + checksum: 9bc965a6b096c55ed14bfc761668fe3900db83cf379bf1e9741d31510579950dff12d8223867b3fd0c3af1bb96a1b4519c4b0f93d1c26949d2e216a4272f59b4 languageName: node linkType: hard -"@vercel/node@npm:2.5.26": - version: 2.5.26 - resolution: "@vercel/node@npm:2.5.26" +"@vercel/node@npm:2.14.3": + version: 2.14.3 + resolution: "@vercel/node@npm:2.14.3" dependencies: - "@edge-runtime/vm": 1.1.0-beta.37 - "@types/node": "*" - "@vercel/build-utils": 5.5.5 - "@vercel/node-bridge": 3.0.0 - "@vercel/static-config": 2.0.3 - edge-runtime: 1.1.0-beta.40 + "@edge-runtime/vm": 2.0.0 + "@types/node": 14.18.33 + "@types/node-fetch": 2.6.3 + "@vercel/build-utils": 6.7.3 + "@vercel/error-utils": 1.0.8 + "@vercel/static-config": 2.0.17 + async-listen: 3.0.0 + edge-runtime: 2.1.4 esbuild: 0.14.47 exit-hook: 2.2.1 - node-fetch: 2.6.7 - ts-node: 8.9.1 - typescript: 4.3.4 - checksum: 00fcf151db51936d32fa5a35ea59f56e9e3f4310c61f31db409b16210e9493bc32e52f85ff9326bab5035c7375a0974110e557bc283b04f672de772fedd3da78 + node-fetch: 2.6.9 + path-to-regexp: 6.2.1 + ts-morph: 12.0.0 + ts-node: 10.9.1 + typescript: 4.9.5 + ws: 8.13.0 + checksum: 51be90cea907979b188506bb6be654c07b3414c19a142a53c00e2a583e6bd87eaabc26a02c79927f19522bb73a783e073fc2f40aa53ad69f97697520230b87c5 languageName: node linkType: hard -"@vercel/og@npm:^0.0.19": - version: 0.0.19 - resolution: "@vercel/og@npm:0.0.19" +"@vercel/og@npm:^0.5.4": + version: 0.5.4 + resolution: "@vercel/og@npm:0.5.4" dependencies: - "@resvg/resvg-wasm": 2.0.0-alpha.4 - satori: 0.0.42 - yoga-wasm-web: 0.1.2 - checksum: ab71223d1e9c172d2f058c15763018a88a154557e31dbfe85b1c99a3978f93634855c7b12af1dfe90baf2a7f15a3e367ecfb4deaca38adc6735f72c44e1f2be9 + "@resvg/resvg-wasm": 2.4.1 + satori: 0.7.2 + yoga-wasm-web: 0.3.3 + checksum: e66b43da7c56cb3f0a7cc22fa2bf7e9fde53822b875aa4513bfc414c9f382ee6bedfaf26f922827618fdf2e7afcccf42e1d1487c4bfebb4bec94d8bf856559f8 languageName: node linkType: hard -"@vercel/python@npm:3.1.22": - version: 3.1.22 - resolution: "@vercel/python@npm:3.1.22" - checksum: 43adaad331cf308ba3aad3ef073f115bb8543a8b715f6761debe2c3b55ac3e9c4bb200b5ebea77ec6440a629be879d32e92fcf010288447e3fd1083405d83749 +"@vercel/python@npm:3.1.60": + version: 3.1.60 + resolution: "@vercel/python@npm:3.1.60" + checksum: d646873053e6bd8b782026f2bcc72be1ee964acdfe67597a61080e6cbf3ca010493b083b3cb497818711d82275c9fbd9328300f491f7996495647a2ec8a3dc19 languageName: node linkType: hard -"@vercel/redwood@npm:1.0.31": - version: 1.0.31 - resolution: "@vercel/redwood@npm:1.0.31" +"@vercel/redwood@npm:1.1.15": + version: 1.1.15 + resolution: "@vercel/redwood@npm:1.1.15" dependencies: - "@vercel/nft": 0.22.1 - "@vercel/routing-utils": 2.0.2 + "@vercel/nft": 0.22.5 + "@vercel/routing-utils": 2.2.1 semver: 6.1.1 - checksum: 476f7f987c214e027748537e2d3bd0ade934bdb7042d03b24c80f05bc3623751212bb408349f368e0a2928c98bd9903d4754e39ab3a27692785d1478b47a8463 + checksum: 7aa482841a3f24f57439a1113d726fd3cbe6aa78daf696fa212142f30884f1a7438ffab24480ee01fef4269168377af10f1ef638ace4670eb015721e63cf9243 languageName: node linkType: hard -"@vercel/remix@npm:1.0.32": - version: 1.0.32 - resolution: "@vercel/remix@npm:1.0.32" +"@vercel/remix-builder@npm:1.8.10": + version: 1.8.10 + resolution: "@vercel/remix-builder@npm:1.8.10" dependencies: - "@vercel/nft": 0.22.1 - checksum: 580519818ac3c832841a3fdc98f3ded98e1bf109e613bbff5ab2c6669071e261032e8f58df43d2c9e9fe74332633d3d03b5acf575589a95434f927dd4e20f573 + "@remix-run/dev": "npm:@vercel/remix-run-dev@1.16.1" + "@vercel/build-utils": 6.7.3 + "@vercel/nft": 0.22.5 + "@vercel/static-config": 2.0.17 + path-to-regexp: 6.2.1 + semver: 7.3.8 + ts-morph: 12.0.0 + checksum: 1f6c5d219c9b7ef046476a8ddd2fc8c5a08f97c2c360134a654813ad06f07d197b284bbd8a6b352b23190912e6b3481ee330fc8c9186511f514d322fdde72b35 languageName: node linkType: hard -"@vercel/routing-utils@npm:2.0.2": - version: 2.0.2 - resolution: "@vercel/routing-utils@npm:2.0.2" +"@vercel/routing-utils@npm:2.2.1": + version: 2.2.1 + resolution: "@vercel/routing-utils@npm:2.2.1" dependencies: ajv: ^6.0.0 path-to-regexp: 6.1.0 dependenciesMeta: ajv: optional: true - checksum: 27dc1ce4df3c60c42334284e4f7734f41bf64674d4c583ec62e405fd9dfad409c6ddf1f7782aef0dde4217edf4c8248cac90d3ff0b5b89a6e18ef8f85a9e4d01 + checksum: b56ef0fa3f3c6c931f5b716697ef1dd604b67f5a32c76dc3f2a90c73c8d9b5839daffebceb03f548147ec9a18d5036873c6f6d21d3ca8c9bc2f4dd573166a58c languageName: node linkType: hard -"@vercel/ruby@npm:1.3.39": - version: 1.3.39 - resolution: "@vercel/ruby@npm:1.3.39" - checksum: 7567560b7677b5639f1097b416b4fa2ce52890e142f40dcb583d3ee098fe29ac3fc862212408d3396b3430633f9a91928e00c6196196801f937bfc45f3866509 +"@vercel/ruby@npm:1.3.76": + version: 1.3.76 + resolution: "@vercel/ruby@npm:1.3.76" + checksum: 4868880600fa93ce2970839574ec14d1196d2b8966f5c4f381f356a7ece3652e6182a21b941dddb1986f1ce8602bd0c1a0dcf73231e87ae8ad985c42cd2cb857 languageName: node linkType: hard -"@vercel/static-build@npm:1.0.32": - version: 1.0.32 - resolution: "@vercel/static-build@npm:1.0.32" - checksum: 6a47f04044157c8a38259e0f53f771cef2091c1023d2c19c309034d9580b0362f16527dc051eac325942a5f9df452e1d4eb2cf2a33a634a2e088c1be1989858c +"@vercel/static-build@npm:1.3.32": + version: 1.3.32 + resolution: "@vercel/static-build@npm:1.3.32" + dependencies: + "@vercel/gatsby-plugin-vercel-analytics": 1.0.10 + "@vercel/gatsby-plugin-vercel-builder": 1.3.5 + checksum: 2b58115bb6f2c3548890fe275b6515cda60804a31777238a44ab2c3de48f8c095355dcdaf650a22aa03ef9b5f7bd1aa8db1903087c05f0a2ae0a8faf5d12230c languageName: node linkType: hard -"@vercel/static-config@npm:2.0.3": - version: 2.0.3 - resolution: "@vercel/static-config@npm:2.0.3" +"@vercel/static-config@npm:2.0.17": + version: 2.0.17 + resolution: "@vercel/static-config@npm:2.0.17" dependencies: ajv: 8.6.3 json-schema-to-ts: 1.6.4 ts-morph: 12.0.0 - checksum: 6380673d9f979c8d412b0ecabfd918256f3eb01671ecef747b22d891311a80342b73f7d96415a0519e272a300498f2952d60b6ececf628c1d49c14ca28afe83d + checksum: d0f78dbcb596d2f7da642fd72d47f110edf1c3919e1d51c9a89743567f00f263e92f45b0be8026d2c2057d044456c83031e1b7a57c83981edc1687febbeab7ea languageName: node linkType: hard -"@vitejs/plugin-react@npm:^2.0.1, @vitejs/plugin-react@npm:^2.1.0": - version: 2.1.0 - resolution: "@vitejs/plugin-react@npm:2.1.0" +"@vitejs/plugin-react@npm:^3.0.1": + version: 3.1.0 + resolution: "@vitejs/plugin-react@npm:3.1.0" dependencies: - "@babel/core": ^7.18.13 - "@babel/plugin-transform-react-jsx": ^7.18.10 - "@babel/plugin-transform-react-jsx-development": ^7.18.6 + "@babel/core": ^7.20.12 "@babel/plugin-transform-react-jsx-self": ^7.18.6 - "@babel/plugin-transform-react-jsx-source": ^7.18.6 - magic-string: ^0.26.2 + "@babel/plugin-transform-react-jsx-source": ^7.19.6 + magic-string: ^0.27.0 react-refresh: ^0.14.0 peerDependencies: - vite: ^3.0.0 - checksum: cd13ad549f33e579e0e1d14f5b8a4ad60d5fbbc8cd579e4381d52bb426700118e876644a619a19c5cec4efeb4f8a0ff50b6c9456d5c24836071190b46d781fef + vite: ^4.1.0-beta.0 + checksum: 450fac79e67cba9e1581c860f78e687b44108ab4117663ef20db279316e03cd8e87f94fef376e27cc5e200bd52813dcc09b70ea570c7c7cc291fcd47eb260fbc languageName: node linkType: hard -"@vitest/coverage-c8@npm:^0.24.3": - version: 0.24.3 - resolution: "@vitest/coverage-c8@npm:0.24.3" +"@vitejs/plugin-react@npm:^4.0.0": + version: 4.0.0 + resolution: "@vitejs/plugin-react@npm:4.0.0" dependencies: - c8: ^7.12.0 - vitest: 0.24.3 - checksum: 75f79fcf7cee7dbdfa4b8978aa80d791288e5975ed6ca723d8b4985ea744c3b022138075065058a9a679346910ae054e23f6ee922b779e8f6e7b88baf0a496fa + "@babel/core": ^7.21.4 + "@babel/plugin-transform-react-jsx-self": ^7.21.0 + "@babel/plugin-transform-react-jsx-source": ^7.19.6 + react-refresh: ^0.14.0 + peerDependencies: + vite: ^4.2.0 + checksum: 575298f66517c51348892d49b302490c48e15c9ddb0b2c5f710931804e559dceafca1be1e62cb72d0902cba5f3c98e4b1272970d328e3a62d59ecdf976e68d3d languageName: node linkType: hard -"@vladfrangu/async_event_emitter@npm:^2.1.2": - version: 2.1.2 - resolution: "@vladfrangu/async_event_emitter@npm:2.1.2" - checksum: 31ffabd6b20c11db7ae9856daccb52371a00fb94d7ea6829286ab0bdb5f54bea8f987cd84c7b651d003a0761593ad56133956c0764be6492c840a1dd618b1ed7 +"@vitest/coverage-c8@npm:^0.31.1": + version: 0.31.1 + resolution: "@vitest/coverage-c8@npm:0.31.1" + dependencies: + "@ampproject/remapping": ^2.2.1 + c8: ^7.13.0 + magic-string: ^0.30.0 + picocolors: ^1.0.0 + std-env: ^3.3.2 + peerDependencies: + vitest: ">=0.30.0 <1" + checksum: e9924c652c5891418af5965d483b753b5271be016b408a2577ab8b00329537496d4d5c96ebe7eb8b401b028c253da7e324165b61a895b639d1a4b3254cbbb8ce + languageName: node + linkType: hard + +"@vitest/expect@npm:0.31.1": + version: 0.31.1 + resolution: "@vitest/expect@npm:0.31.1" + dependencies: + "@vitest/spy": 0.31.1 + "@vitest/utils": 0.31.1 + chai: ^4.3.7 + checksum: 0d1e135ae753d913231eae830da00ee42afca53d354898fb43f97e82398dcf17298c02e9989dd6b19b9b2909989248ef76d203d63f6af6f9159dc96959ea654b + languageName: node + linkType: hard + +"@vitest/runner@npm:0.31.1": + version: 0.31.1 + resolution: "@vitest/runner@npm:0.31.1" + dependencies: + "@vitest/utils": 0.31.1 + concordance: ^5.0.4 + p-limit: ^4.0.0 + pathe: ^1.1.0 + checksum: cc8702e21b799d5e941409cb2afe6d0e576b4f3ac99df4a1393a8cd11b57f6b0b06e756cc24e2739812d095fbfd0824e22e861dbd6a71769ca387d485ade6fb5 + languageName: node + linkType: hard + +"@vitest/snapshot@npm:0.31.1": + version: 0.31.1 + resolution: "@vitest/snapshot@npm:0.31.1" + dependencies: + magic-string: ^0.30.0 + pathe: ^1.1.0 + pretty-format: ^27.5.1 + checksum: de05fa9136864f26f0804baf3ae8068f67de28015f29047329c84e67fb33be7305c9e52661b016e834d30f4081c136b3b6d8d4054c024a5d52b22a7f90fc4be0 languageName: node linkType: hard -"@vscode/codicons@npm:^0.0.32": - version: 0.0.32 - resolution: "@vscode/codicons@npm:0.0.32" - checksum: 712f423becae23591397ccc44ca9056eb413d1e00e6b2cad88895b3d97368ecee0a73da51dc40c0c65e7bc5fef2b3db5544a809c21806c6db85c9308c782814e +"@vitest/spy@npm:0.31.1": + version: 0.31.1 + resolution: "@vitest/spy@npm:0.31.1" + dependencies: + tinyspy: ^2.1.0 + checksum: 8b06cf25fcc028c16106ec82f4ceb84d6dfa04d06f651bca4738ce2b99796d1fc4e0c10319767240755eff8ede2bff9d31d5a901fe92828d319c65001581137b languageName: node linkType: hard -"@vscode/emmet-helper@npm:^2.8.4": - version: 2.8.4 - resolution: "@vscode/emmet-helper@npm:2.8.4" +"@vitest/utils@npm:0.31.1": + version: 0.31.1 + resolution: "@vitest/utils@npm:0.31.1" dependencies: - emmet: ^2.3.0 - jsonc-parser: ^2.3.0 - vscode-languageserver-textdocument: ^1.0.1 - vscode-languageserver-types: ^3.15.1 - vscode-nls: ^5.0.0 - vscode-uri: ^2.1.2 - checksum: 8a0c8fec803832bd7283c6c9d6f57d8cd8c88bcad598c104e3c0d6e1a7a02f785d9cc7bc39e8fe61823548410cd59b11ae11ee987c0c927fd657f52c73335cea + concordance: ^5.0.4 + loupe: ^2.3.6 + pretty-format: ^27.5.1 + checksum: 58016c185455e3814632cb77e37368c846bde5e342f8b4a66fa229bde64f455ca39abebc9c12e2483696ee38bc17b3c4300379f7a3b18d1087f24f474448a8d8 + languageName: node + linkType: hard + +"@vladfrangu/async_event_emitter@npm:^2.2.2": + version: 2.2.2 + resolution: "@vladfrangu/async_event_emitter@npm:2.2.2" + checksum: ed948294fea1a2dc8b8f307f4061bf65e2043a946132f288702f0572a806ebe3123b8c7e522e70d2abbd3616f5d67027c9e59df9ef80b0195f7502a848a426ba + languageName: node + linkType: hard + +"@web3-storage/multipart-parser@npm:^1.0.0": + version: 1.0.0 + resolution: "@web3-storage/multipart-parser@npm:1.0.0" + checksum: d8bbb5b9b0a5c07b4119c33c64ef4b7cc8d74ca4de2dd783f608f2653f81ef298bf04136b7cdb7ce97306d5fe2217572b5655236b70e1b625ed18d4a21a81913 languageName: node linkType: hard @@ -5260,6 +7786,132 @@ __metadata: languageName: node linkType: hard +"@yarnpkg/core@npm:^2.4.0": + version: 2.4.0 + resolution: "@yarnpkg/core@npm:2.4.0" + dependencies: + "@arcanis/slice-ansi": ^1.0.2 + "@types/semver": ^7.1.0 + "@types/treeify": ^1.0.0 + "@yarnpkg/fslib": ^2.4.0 + "@yarnpkg/json-proxy": ^2.1.0 + "@yarnpkg/libzip": ^2.2.1 + "@yarnpkg/parsers": ^2.3.0 + "@yarnpkg/pnp": ^2.3.2 + "@yarnpkg/shell": ^2.4.1 + binjumper: ^0.1.4 + camelcase: ^5.3.1 + chalk: ^3.0.0 + ci-info: ^2.0.0 + clipanion: ^2.6.2 + cross-spawn: 7.0.3 + diff: ^4.0.1 + globby: ^11.0.1 + got: ^11.7.0 + json-file-plus: ^3.3.1 + lodash: ^4.17.15 + micromatch: ^4.0.2 + mkdirp: ^0.5.1 + p-limit: ^2.2.0 + pluralize: ^7.0.0 + pretty-bytes: ^5.1.0 + semver: ^7.1.2 + stream-to-promise: ^2.2.0 + tar-stream: ^2.0.1 + treeify: ^1.1.0 + tslib: ^1.13.0 + tunnel: ^0.0.6 + checksum: daf5b01f0873c392a112fc9c358d456d80d0ffe34045ba7df360de96bea0788d6b96d6dceadaac5fe7ac1546211b783f79aa9a3678a889d7f0b0a4a8223bfc0c + languageName: node + linkType: hard + +"@yarnpkg/esbuild-plugin-pnp@npm:^3.0.0-rc.10": + version: 3.0.0-rc.15 + resolution: "@yarnpkg/esbuild-plugin-pnp@npm:3.0.0-rc.15" + dependencies: + tslib: ^2.4.0 + peerDependencies: + esbuild: ">=0.10.0" + checksum: 04da15355a99773b441742814ba4d0f3453a83df47aa07e215f167e156f109ab8e971489c8b1a4ddf3c79d568d35213f496ad52e97298228597e1aacc22680aa + languageName: node + linkType: hard + +"@yarnpkg/fslib@npm:^2.4.0, @yarnpkg/fslib@npm:^2.5.0": + version: 2.10.3 + resolution: "@yarnpkg/fslib@npm:2.10.3" + dependencies: + "@yarnpkg/libzip": ^2.3.0 + tslib: ^1.13.0 + checksum: 0ca693f61d47bcf165411a121ed9123f512b1b5bfa5e1c6c8f280b4ffdbea9bf2a6db418f99ecfc9624587fdc695b2b64eb0fe7b4028e44095914b25ca99655e + languageName: node + linkType: hard + +"@yarnpkg/json-proxy@npm:^2.1.0": + version: 2.1.1 + resolution: "@yarnpkg/json-proxy@npm:2.1.1" + dependencies: + "@yarnpkg/fslib": ^2.5.0 + tslib: ^1.13.0 + checksum: 2c306b6ee158d48b15f4b09e7fb431b1096d4687c77cc49a9b37dbda04c05f13ef19175c795feefe1068668d0519a1caff7b3b7f6441a1ac6a5702ef0d60c250 + languageName: node + linkType: hard + +"@yarnpkg/libzip@npm:^2.2.1, @yarnpkg/libzip@npm:^2.3.0": + version: 2.3.0 + resolution: "@yarnpkg/libzip@npm:2.3.0" + dependencies: + "@types/emscripten": ^1.39.6 + tslib: ^1.13.0 + checksum: 533a4883f69bb013f955d80dc19719881697e6849ea5f0cbe6d87ef1d582b05cbae8a453802f92ad0c852f976296cac3ff7834be79a7e415b65cdf213e448110 + languageName: node + linkType: hard + +"@yarnpkg/lockfile@npm:^1.1.0": + version: 1.1.0 + resolution: "@yarnpkg/lockfile@npm:1.1.0" + checksum: 05b881b4866a3546861fee756e6d3812776ea47fa6eb7098f983d6d0eefa02e12b66c3fff931574120f196286a7ad4879ce02743c8bb2be36c6a576c7852083a + languageName: node + linkType: hard + +"@yarnpkg/parsers@npm:^2.3.0": + version: 2.5.1 + resolution: "@yarnpkg/parsers@npm:2.5.1" + dependencies: + js-yaml: ^3.10.0 + tslib: ^1.13.0 + checksum: 42f98b8bd635add304ce392c6f600b46e40c2c4429d7b6c38b70f50b5fd6a854dd2369e0987b70546a3c8f690d280f040a885b35acfde891f5e173fc3f974277 + languageName: node + linkType: hard + +"@yarnpkg/pnp@npm:^2.3.2": + version: 2.3.2 + resolution: "@yarnpkg/pnp@npm:2.3.2" + dependencies: + "@types/node": ^13.7.0 + "@yarnpkg/fslib": ^2.4.0 + tslib: ^1.13.0 + checksum: 114b0cf90942e34d1a0ffee4648be2a29512f402a892da88dd48a9d45f346dba93bed6aa8c175cd720458826eec7e18d9116cb228bd0182fcc5010a6f2a67228 + languageName: node + linkType: hard + +"@yarnpkg/shell@npm:^2.4.1": + version: 2.4.1 + resolution: "@yarnpkg/shell@npm:2.4.1" + dependencies: + "@yarnpkg/fslib": ^2.4.0 + "@yarnpkg/parsers": ^2.3.0 + clipanion: ^2.6.2 + cross-spawn: 7.0.3 + fast-glob: ^3.2.2 + micromatch: ^4.0.2 + stream-buffers: ^3.0.2 + tslib: ^1.13.0 + bin: + shell: ./lib/cli.js + checksum: f09490ce973c7103e1c9ac973172ecb038e2975add0c02bb8b4bd1926290188bedf9ba353b253dead5b1f9b31b09e2bb68c769a1d397795737a2662b35574be3 + languageName: node + linkType: hard + "JSONStream@npm:^1.0.4": version: 1.3.5 resolution: "JSONStream@npm:1.3.5" @@ -5279,7 +7931,14 @@ __metadata: languageName: node linkType: hard -"accepts@npm:~1.3.8": +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 0e994ad2aa6575f94670d8a2149afe94465de9cedaaaac364e7fb43a40c3691c980ff74899f682f4ca58fa96b4cbd7421a015d3a6defe43a442117d7821a2f36 + languageName: node + linkType: hard + +"accepts@npm:~1.3.5, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" dependencies: @@ -5289,7 +7948,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.0.0, acorn-jsx@npm:^5.3.2": +"acorn-jsx@npm:^5.0.0, acorn-jsx@npm:^5.3.1, acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -5298,19 +7957,35 @@ __metadata: languageName: node linkType: hard -"acorn-walk@npm:^8.1.1": +"acorn-walk@npm:^7.2.0": + version: 7.2.0 + resolution: "acorn-walk@npm:7.2.0" + checksum: 9252158a79b9d92f1bc0dd6acc0fcfb87a67339e84bcc301bb33d6078936d27e35d606b4d35626d2962cd43c256d6f27717e70cbe15c04fff999ab0b2260b21f + languageName: node + linkType: hard + +"acorn-walk@npm:^8.0.0, acorn-walk@npm:^8.1.1, acorn-walk@npm:^8.2.0": version: 8.2.0 resolution: "acorn-walk@npm:8.2.0" checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1 languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.4.1, acorn@npm:^8.5.0, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.0": - version: 8.8.0 - resolution: "acorn@npm:8.8.0" +"acorn@npm:^7.4.1": + version: 7.4.1 + resolution: "acorn@npm:7.4.1" + bin: + acorn: bin/acorn + checksum: 1860f23c2107c910c6177b7b7be71be350db9e1080d814493fae143ae37605189504152d1ba8743ba3178d0b37269ce1ffc42b101547fdc1827078f82671e407 + languageName: node + linkType: hard + +"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.4.1, acorn@npm:^8.6.0, acorn@npm:^8.7.0, acorn@npm:^8.8.0, acorn@npm:^8.8.2": + version: 8.8.2 + resolution: "acorn@npm:8.8.2" bin: acorn: bin/acorn - checksum: 7270ca82b242eafe5687a11fea6e088c960af712683756abf0791b68855ea9cace3057bd5e998ffcef50c944810c1e0ca1da526d02b32110e13c722aa959afdc + checksum: f790b99a1bf63ef160c967e23c46feea7787e531292bb827126334612c234ed489a0dc2c7ba33156416f0ffa8d25bf2b0fdb7f35c2ba60eb3e960572bece4001 languageName: node linkType: hard @@ -5328,7 +8003,31 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:6, agent-base@npm:^6.0.2": +"address@npm:^1.0.1": + version: 1.2.2 + resolution: "address@npm:1.2.2" + checksum: ace439960c1e3564d8f523aff23a841904bf33a2a7c2e064f7f60a064194075758b9690e65bd9785692a4ef698a998c57eb74d145881a1cecab8ba658ddb1607 + languageName: node + linkType: hard + +"adjust-sourcemap-loader@npm:^4.0.0": + version: 4.0.0 + resolution: "adjust-sourcemap-loader@npm:4.0.0" + dependencies: + loader-utils: ^2.0.0 + regex-parser: ^2.2.11 + checksum: d524ae23582f41e2275af5d88faab7a9dc09770ed588244e0a76d3196d0d6a90bf02760c71bc6213dbfef3aef4a86232ac9521bfd629752c32b7af37bc74c660 + languageName: node + linkType: hard + +"agent-base@npm:5": + version: 5.1.1 + resolution: "agent-base@npm:5.1.1" + checksum: 61ae789f3019f1dc10e8cba6d3ae9826949299a4e54aaa1cfa2fa37c95a108e70e95423b963bb987d7891a703fd9a5c383a506f4901819f3ee56f3147c0aa8ab + languageName: node + linkType: hard + +"agent-base@npm:6, agent-base@npm:^6.0.0, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" dependencies: @@ -5338,13 +8037,13 @@ __metadata: linkType: hard "agentkeepalive@npm:^4.2.1": - version: 4.2.1 - resolution: "agentkeepalive@npm:4.2.1" + version: 4.3.0 + resolution: "agentkeepalive@npm:4.3.0" dependencies: debug: ^4.1.0 - depd: ^1.1.2 + depd: ^2.0.0 humanize-ms: ^1.2.1 - checksum: 39cb49ed8cf217fd6da058a92828a0a84e0b74c35550f82ee0a10e1ee403c4b78ade7948be2279b188b7a7303f5d396ea2738b134731e464bf28de00a4f72a18 + checksum: 982453aa44c11a06826c836025e5162c846e1200adb56f2d075400da7d32d87021b3b0a58768d949d824811f5654223d5a8a3dad120921a2439625eb847c6260 languageName: node linkType: hard @@ -5358,6 +8057,23 @@ __metadata: languageName: node linkType: hard +"aggregate-error@npm:^4.0.0": + version: 4.0.1 + resolution: "aggregate-error@npm:4.0.1" + dependencies: + clean-stack: ^4.0.0 + indent-string: ^5.0.0 + checksum: bb3ffdfd13447800fff237c2cba752c59868ee669104bb995dfbbe0b8320e967d679e683dabb640feb32e4882d60258165cde0baafc4cd467cc7d275a13ad6b5 + languageName: node + linkType: hard + +"ahocorasick@npm:1.0.2": + version: 1.0.2 + resolution: "ahocorasick@npm:1.0.2" + checksum: a13ce4403554ae782cf5e28d468a732acf1fd3d0bff251f5dcfddfa5497b6cc343948d69cd94dfdbe8d4dfdb81e2b34cb1c92079e6301f38b0143d314fb95bd6 + languageName: node + linkType: hard + "ajv@npm:8.6.3": version: 8.6.3 resolution: "ajv@npm:8.6.3" @@ -5383,18 +8099,18 @@ __metadata: linkType: hard "ajv@npm:^8.11.0": - version: 8.11.0 - resolution: "ajv@npm:8.11.0" + version: 8.12.0 + resolution: "ajv@npm:8.12.0" dependencies: fast-deep-equal: ^3.1.1 json-schema-traverse: ^1.0.0 require-from-string: ^2.0.2 uri-js: ^4.2.2 - checksum: 5e0ff226806763be73e93dd7805b634f6f5921e3e90ca04acdf8db81eed9d8d3f0d4c5f1213047f45ebbf8047ffe0c840fa1ef2ec42c3a644899f69aa72b5bef + checksum: 4dc13714e316e67537c8b31bc063f99a1d9d9a497eb4bbd55191ac0dcd5e4985bbb71570352ad6f1e76684fb6d790928f96ba3b2d4fd6e10024be9612fe3f001 languageName: node linkType: hard -"ansi-align@npm:^3.0.0, ansi-align@npm:^3.0.1": +"ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" dependencies: @@ -5403,6 +8119,13 @@ __metadata: languageName: node linkType: hard +"ansi-colors@npm:^4.1.1": + version: 4.1.3 + resolution: "ansi-colors@npm:4.1.3" + checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e + languageName: node + linkType: hard + "ansi-escape-sequences@npm:^4.0.0": version: 4.1.0 resolution: "ansi-escape-sequences@npm:4.1.0" @@ -5442,6 +8165,13 @@ __metadata: languageName: node linkType: hard +"ansi-sequence-parser@npm:^1.1.0": + version: 1.1.0 + resolution: "ansi-sequence-parser@npm:1.1.0" + checksum: 75f4d3a4c555655a698aec05b5763cbddcd16ccccdbfd178fb0aa471ab74fdf98e031b875ef26e64be6a95cf970c89238744b26de6e34af97f316d5186b1df53 + languageName: node + linkType: hard + "ansi-styles@npm:^2.2.1": version: 2.2.1 resolution: "ansi-styles@npm:2.2.1" @@ -5475,13 +8205,13 @@ __metadata: linkType: hard "ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0": - version: 6.2.0 - resolution: "ansi-styles@npm:6.2.0" - checksum: ce35204dc87f418440e8a95569c23e235715d7089e512f88254fb5fcedc18cdcfd6cd36852182388586eba21a9246b67a9ce4f1687864b06017407d8fda11a10 + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9 languageName: node linkType: hard -"any-promise@npm:^1.0.0": +"any-promise@npm:^1.0.0, any-promise@npm:^1.1.0, any-promise@npm:~1.3.0": version: 1.3.0 resolution: "any-promise@npm:1.3.0" checksum: 0ee8a9bdbe882c90464d75d1f55cf027f5458650c4bd1f0467e65aec38ccccda07ca5844969ee77ed46d04e7dded3eaceb027e8d32f385688523fe305fa7e1de @@ -5489,12 +8219,19 @@ __metadata: linkType: hard "anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": - version: 3.1.2 - resolution: "anymatch@npm:3.1.2" + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" dependencies: normalize-path: ^3.0.0 picomatch: ^2.0.4 - checksum: 985163db2292fac9e5a1e072bf99f1b5baccf196e4de25a0b0b81865ebddeb3b3eb4480734ef0a2ac8c002845396b91aa89121f5b84f93981a4658164a9ec6e9 + checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"app-root-dir@npm:^1.0.2": + version: 1.0.2 + resolution: "app-root-dir@npm:1.0.2" + checksum: d4b1653fc60b6465b982bf5a88b12051ed2d807d70609386a809306e1c636496f53522d61fa30f9f98c71aaae34f34e1651889cf17d81a44e3dafd2859d495ad languageName: node linkType: hard @@ -5512,6 +8249,13 @@ __metadata: languageName: node linkType: hard +"are-docs-informative@npm:^0.0.2": + version: 0.0.2 + resolution: "are-docs-informative@npm:0.0.2" + checksum: 7a48ca90d66e29afebc4387d7029d86cfe97bad7e796c8e7de01309e02dcfc027250231c02d4ca208d2984170d09026390b946df5d3d02ac638ab35f74501c74 + languageName: node + linkType: hard + "are-we-there-yet@npm:^2.0.0": version: 2.0.0 resolution: "are-we-there-yet@npm:2.0.0" @@ -5549,6 +8293,13 @@ __metadata: languageName: node linkType: hard +"arg@npm:^5.0.1": + version: 5.0.2 + resolution: "arg@npm:5.0.2" + checksum: 6c69ada1a9943d332d9e5382393e897c500908d91d5cb735a01120d5f71daf1b339b7b8980cbeaba8fd1afc68e658a739746179e4315a26e8a28951ff9930078 + languageName: node + linkType: hard + "argparse@npm:^1.0.7, argparse@npm:~1.0.9": version: 1.0.10 resolution: "argparse@npm:1.0.10" @@ -5566,56 +8317,53 @@ __metadata: linkType: hard "aria-hidden@npm:^1.1.1": - version: 1.2.1 - resolution: "aria-hidden@npm:1.2.1" + version: 1.2.3 + resolution: "aria-hidden@npm:1.2.3" dependencies: tslib: ^2.0.0 - peerDependencies: - "@types/react": ^16.9.0 || ^17.0.0 || ^18.0.0 - react: ^16.9.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: cd8047a0113d5ecc11bce1616ae2772abcb0a6e1da5a70cbfc3555e8da063b0416d62cced3e704b6d424cbf408c1fc21225d69723cd62c3f1f0cf3b41d674c2b + checksum: 7d7d211629eef315e94ed3b064c6823d13617e609d3f9afab1c2ed86399bb8e90405f9bdd358a85506802766f3ecb468af985c67c846045a34b973bcc0289db9 languageName: node linkType: hard -"aria-query@npm:5.0.2, aria-query@npm:^5.0.0": - version: 5.0.2 - resolution: "aria-query@npm:5.0.2" - checksum: 2ecb77a64b9bbb030f5267b8672042b9559bdc507348d7c5efc14a6c180b06704c63481b162913f0466391837569b6d84f93ab18d73629e7bfa34c4f927c1fbc +"aria-query@npm:5.1.3, aria-query@npm:^5.0.0, aria-query@npm:^5.1.3": + version: 5.1.3 + resolution: "aria-query@npm:5.1.3" + dependencies: + deep-equal: ^2.0.5 + checksum: 929ff95f02857b650fb4cbcd2f41072eee2f46159a6605ea03bf63aa572e35ffdff43d69e815ddc462e16e07de8faba3978afc2813650b4448ee18c9895d982b languageName: node linkType: hard -"aria-query@npm:^4.2.2": - version: 4.2.2 - resolution: "aria-query@npm:4.2.2" +"ariakit-react-utils@npm:0.17.0-next.27": + version: 0.17.0-next.27 + resolution: "ariakit-react-utils@npm:0.17.0-next.27" dependencies: - "@babel/runtime": ^7.10.2 - "@babel/runtime-corejs3": ^7.10.2 - checksum: 38401a9a400f26f3dcc24b84997461a16b32869a9893d323602bed8da40a8bcc0243b8d2880e942249a1496cea7a7de769e93d21c0baa439f01e1ee936fed665 + ariakit-utils: 0.17.0-next.27 + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + checksum: c387969eecd71cd4199fa9eef35b9b758a96be51ad71dd502aa7187f57589bd0c840d8b9ae83d08f20e7c9539598b24ccf5adc1164e9c0ad40954b019e04edde languageName: node linkType: hard -"ariakit-utils@npm:0.17.0-next.26": - version: 0.17.0-next.26 - resolution: "ariakit-utils@npm:0.17.0-next.26" - peerDependencies: - react: ^17.0.0 || ^18.0.0 - checksum: dc41a324c74561dfc6afa6037ac4227b06f73a16336d670285392d630bab42d259269ca1afe1c05cc3d5b2bdbc941a518053ba7427edec60080bd8bb3dffd226 +"ariakit-utils@npm:0.17.0-next.27": + version: 0.17.0-next.27 + resolution: "ariakit-utils@npm:0.17.0-next.27" + checksum: 65a859375144a997660b7f2d9c58c8d344aa5b81ae72feba3138e9a1c16b4ec01d607fd5955760042abfd6042695ba20c6395dc694a7a9d244ac9f0b4cbc6590 languageName: node linkType: hard -"ariakit@npm:^2.0.0-next.41": - version: 2.0.0-next.41 - resolution: "ariakit@npm:2.0.0-next.41" +"ariakit@npm:^2.0.0-next.44": + version: 2.0.0-next.44 + resolution: "ariakit@npm:2.0.0-next.44" dependencies: "@floating-ui/dom": ^1.0.0 - ariakit-utils: 0.17.0-next.26 + ariakit-react-utils: 0.17.0-next.27 + ariakit-utils: 0.17.0-next.27 peerDependencies: react: ^17.0.0 || ^18.0.0 react-dom: ^17.0.0 || ^18.0.0 - checksum: a0384dbc4e44211f31e7347a9613a02e98965d4f675bda0a0d9ce002adfe7921abe1b1f77a56569cec93750feb05fd28809adf959006df145b679b94e143786d + checksum: 152d47015cab6d30feb97978aee9cd0a3a2a41613575f00218c05fe3bfffb163cedd8027f26eb085c7059e72af2da9ed4a8411b635bad81f43d1c9245717aa21 languageName: node linkType: hard @@ -5665,6 +8413,16 @@ __metadata: languageName: node linkType: hard +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + is-array-buffer: ^3.0.1 + checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + languageName: node + linkType: hard + "array-flatten@npm:1.1.1": version: 1.1.1 resolution: "array-flatten@npm:1.1.1" @@ -5679,23 +8437,23 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.5": - version: 3.1.5 - resolution: "array-includes@npm:3.1.5" +"array-includes@npm:^3.1.5, array-includes@npm:^3.1.6": + version: 3.1.6 + resolution: "array-includes@npm:3.1.6" dependencies: call-bind: ^1.0.2 define-properties: ^1.1.4 - es-abstract: ^1.19.5 - get-intrinsic: ^1.1.1 + es-abstract: ^1.20.4 + get-intrinsic: ^1.1.3 is-string: ^1.0.7 - checksum: f6f24d834179604656b7bec3e047251d5cc87e9e87fab7c175c61af48e80e75acd296017abcde21fb52292ab6a2a449ab2ee37213ee48c8709f004d75983f9c5 + checksum: f22f8cd8ba8a6448d91eebdc69f04e4e55085d09232b5216ee2d476dab3ef59984e8d1889e662c6a0ed939dcb1b57fd05b2c0209c3370942fc41b752c82a2ca5 languageName: node linkType: hard -"array-iterate@npm:^1.0.0": - version: 1.1.4 - resolution: "array-iterate@npm:1.1.4" - checksum: 8adc65525dfa871577b7ab91b41efd61d29c4067a08ec927340d6975e45797b9f04254dda115e366fbef11fb49277ac1c166405389886c7a251e1eddca89bd08 +"array-timsort@npm:^1.0.3": + version: 1.0.3 + resolution: "array-timsort@npm:1.0.3" + checksum: fd4b5b0911214bdc8b5699ed10d309685551b518b3819c611c967cff59b87aee01cf591a10e36a3f14dbff696984bd6682b845f6fdbf1217195e910f241a4f78 languageName: node linkType: hard @@ -5706,40 +8464,40 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.0": - version: 1.3.0 - resolution: "array.prototype.flat@npm:1.3.0" +"array.prototype.flat@npm:^1.3.1": + version: 1.3.1 + resolution: "array.prototype.flat@npm:1.3.1" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.2 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 es-shim-unscopables: ^1.0.0 - checksum: 2a652b3e8dc0bebb6117e42a5ab5738af0203a14c27341d7bb2431467bdb4b348e2c5dc555dfcda8af0a5e4075c400b85311ded73861c87290a71a17c3e0a257 + checksum: 5a8415949df79bf6e01afd7e8839bbde5a3581300e8ad5d8449dea52639e9e59b26a467665622783697917b43bf39940a6e621877c7dd9b3d1c1f97484b9b88b languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.3.0": - version: 1.3.0 - resolution: "array.prototype.flatmap@npm:1.3.0" +"array.prototype.flatmap@npm:^1.3.1": + version: 1.3.1 + resolution: "array.prototype.flatmap@npm:1.3.1" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.2 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 es-shim-unscopables: ^1.0.0 - checksum: 818538f39409c4045d874be85df0dbd195e1446b14d22f95bdcfefea44ae77db44e42dcd89a559254ec5a7c8b338cfc986cc6d641e3472f9a5326b21eb2976a2 + checksum: 8c1c43a4995f12cf12523436da28515184c753807b3f0bc2ca6c075f71c470b099e2090cc67dba8e5280958fea401c1d0c59e1db0143272aef6cd1103921a987 languageName: node linkType: hard -"array.prototype.reduce@npm:^1.0.4": - version: 1.0.4 - resolution: "array.prototype.reduce@npm:1.0.4" +"array.prototype.tosorted@npm:^1.1.1": + version: 1.1.1 + resolution: "array.prototype.tosorted@npm:1.1.1" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.2 - es-array-method-boxes-properly: ^1.0.0 - is-string: ^1.0.7 - checksum: 6a57a1a2d3b77a9543db139cd52211f43a5af8e8271cb3c173be802076e3a6f71204ba8f090f5937ebc0842d5876db282f0f63dffd0e86b153e6e5a45681e4a5 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + es-shim-unscopables: ^1.0.0 + get-intrinsic: ^1.1.3 + checksum: 7923324a67e70a2fc0a6e40237405d92395e45ebd76f5cb89c2a5cf1e66b47aca6baacd0cd628ffd88830b90d47fff268071493d09c9ae123645613dac2c2ca3 languageName: node linkType: hard @@ -5750,7 +8508,14 @@ __metadata: languageName: node linkType: hard -"asap@npm:^2.0.0, asap@npm:~2.0.6": +"arrify@npm:^3.0.0": + version: 3.0.0 + resolution: "arrify@npm:3.0.0" + checksum: d6c6f3dad9571234f320e130d57fddb2cc283c87f2ac7df6c7005dffc5161b7bb9376f4be655ed257050330336e84afc4f3020d77696ad231ff580a94ae5aba6 + languageName: node + linkType: hard + +"asap@npm:^2.0.0, asap@npm:~2.0.3": version: 2.0.6 resolution: "asap@npm:2.0.6" checksum: b296c92c4b969e973260e47523207cd5769abd27c245a68c26dc7a0fe8053c55bb04360237cb51cab1df52be939da77150ace99ad331fb7fb13b3423ed73ff3d @@ -5773,6 +8538,18 @@ __metadata: languageName: node linkType: hard +"assert@npm:^2.0.0": + version: 2.0.0 + resolution: "assert@npm:2.0.0" + dependencies: + es6-object-assign: ^1.1.0 + is-nan: ^1.2.1 + object-is: ^1.0.1 + util: ^0.12.0 + checksum: bb91f181a86d10588ee16c5e09c280f9811373974c29974cbe401987ea34e966699d7989a812b0e19377b511ea0bc627f5905647ce569311824848ede382cae8 + languageName: node + linkType: hard + "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -5787,7 +8564,25 @@ __metadata: languageName: node linkType: hard -"ast-types@npm:0.14.2": +"ast-types@npm:0.15.2": + version: 0.15.2 + resolution: "ast-types@npm:0.15.2" + dependencies: + tslib: ^2.0.1 + checksum: 24f0d86bf9e4c8dae16fa24b13c1776f2c2677040bcfbd4eb4f27911db49020be4876885e45e6cfcc548ed4dfea3a0742d77e3346b84fae47379cb0b89e9daa0 + languageName: node + linkType: hard + +"ast-types@npm:^0.13.2": + version: 0.13.4 + resolution: "ast-types@npm:0.13.4" + dependencies: + tslib: ^2.0.1 + checksum: 5a51f7b70588ecced3601845a0e203279ca2f5fdc184416a0a1640c93ec0a267241d6090a328e78eebb8de81f8754754e0a4f1558ba2a3d638f8ccbd0b1f0eff + languageName: node + linkType: hard + +"ast-types@npm:^0.14.2": version: 0.14.2 resolution: "ast-types@npm:0.14.2" dependencies: @@ -5796,6 +8591,15 @@ __metadata: languageName: node linkType: hard +"ast-types@npm:^0.16.1": + version: 0.16.1 + resolution: "ast-types@npm:0.16.1" + dependencies: + tslib: ^2.0.1 + checksum: 21c186da9fdb1d8087b1b7dabbc4059f91aa5a1e593a9776b4393cc1eaa857e741b2dda678d20e34b16727b78fef3ab59cf8f0c75ed1ba649c78fe194e5c114b + languageName: node + linkType: hard + "astral-regex@npm:^2.0.0": version: 2.0.0 resolution: "astral-regex@npm:2.0.0" @@ -5803,134 +8607,60 @@ __metadata: languageName: node linkType: hard -"astring@npm:^1.8.0": - version: 1.8.3 - resolution: "astring@npm:1.8.3" +"astring@npm:^1.6.0, astring@npm:^1.8.0": + version: 1.8.5 + resolution: "astring@npm:1.8.5" bin: astring: bin/astring - checksum: 72fc85de7420ca6edeee15157fd65c5253a8cb1ced979ba66ecc439fa569f1c1cc242e4c0a9fc5a6380bf73fb5ec894dc65cf1dc0f3d1cab8c707b31df7daa1c - languageName: node - linkType: hard - -"astro-compress@npm:^1.0.12": - version: 1.0.12 - resolution: "astro-compress@npm:1.0.12" - dependencies: - csso: 5.0.5 - deepmerge-ts: 4.2.2 - fast-glob: 3.2.12 - html-minifier-terser: 7.0.0 - sharp: 0.31.1 - svgo: 2.8.0 - terser: 5.15.1 - checksum: bbcdc12b1ee21d7b19c60de8c60f6a2bbb3242f6f4864099eede8947ed584ef87a6ad97d7f48446b077b548f62911a87e1110b679cbf5becf8a81c8b07070e1b + checksum: 289d2bed94f31cfd91c6f57a67ff66a2bcf56acfcf8e76aebc806593046123522d02c1dc58cb0e64e1f2dc2bfd038eb9f0396ec78492cdca39b6c71d9e7f85e0 languageName: node linkType: hard -"astro-critters@npm:^1.0.5": - version: 1.0.5 - resolution: "astro-critters@npm:1.0.5" - dependencies: - critters: 0.0.16 - deepmerge-ts: 4.2.2 - fast-glob: 3.2.12 - checksum: 04eb9e1c7f8823fc1236df655175ad4a7f2662707c086a8dda3b4f2633f9ece88b32113e8be9175236699b5790facd1629777d07d034bdfc7668c64201426e88 - languageName: node - linkType: hard - -"astro-eslint-parser@npm:^0.7.0, astro-eslint-parser@npm:^0.7.2": - version: 0.7.2 - resolution: "astro-eslint-parser@npm:0.7.2" +"astro-eslint-parser@npm:^0.13.1, astro-eslint-parser@npm:^0.13.3": + version: 0.13.3 + resolution: "astro-eslint-parser@npm:0.13.3" dependencies: - "@astrojs/compiler": ^0.27.0 + "@astrojs/compiler": ^1.0.0 + "@typescript-eslint/scope-manager": ^5.48.2 "@typescript-eslint/types": ^5.25.0 astrojs-compiler-sync: ^0.3.0 debug: ^4.3.4 eslint-visitor-keys: ^3.0.0 espree: ^9.0.0 - checksum: 9d9ff321c6d9e0863335c833e0f15be098c000d16ca794ae9ce6b32b79c83b7be779be54a24b0be43bc427c419d0527dc5f466426643a74eb5d55476e9bc77ac - languageName: node - linkType: hard - -"astro@npm:^1.5.2": - version: 1.5.2 - resolution: "astro@npm:1.5.2" - dependencies: - "@astrojs/compiler": ^0.27.1 - "@astrojs/language-server": ^0.26.2 - "@astrojs/markdown-remark": ^1.1.3 - "@astrojs/telemetry": ^1.0.1 - "@astrojs/webapi": ^1.1.0 - "@babel/core": ^7.18.2 - "@babel/generator": ^7.18.2 - "@babel/parser": ^7.18.4 - "@babel/plugin-transform-react-jsx": ^7.17.12 - "@babel/traverse": ^7.18.2 - "@babel/types": ^7.18.4 - "@proload/core": ^0.3.3 - "@proload/plugin-tsm": ^0.2.1 - "@types/babel__core": ^7.1.19 - "@types/html-escaper": ^3.0.0 - "@types/yargs-parser": ^21.0.0 - boxen: ^6.2.1 - ci-info: ^3.3.1 - common-ancestor-path: ^1.0.1 - cookie: ^0.5.0 - debug: ^4.3.4 - deepmerge-ts: ^4.2.2 - diff: ^5.1.0 - eol: ^0.9.1 - es-module-lexer: ^0.10.5 - esbuild: ^0.14.43 - execa: ^6.1.0 - fast-glob: ^3.2.11 - github-slugger: ^1.4.0 - gray-matter: ^4.0.3 - html-entities: ^2.3.3 - html-escaper: ^3.0.3 - import-meta-resolve: ^2.1.0 - kleur: ^4.1.4 - magic-string: ^0.25.9 - mime: ^3.0.0 - ora: ^6.1.0 - path-browserify: ^1.0.1 - path-to-regexp: ^6.2.1 - postcss: ^8.4.14 - postcss-load-config: ^3.1.4 - preferred-pm: ^3.0.3 - prompts: ^2.4.2 - recast: ^0.20.5 - rehype: ^12.0.1 - resolve: ^1.22.0 - rollup: ~2.78.0 - semver: ^7.3.7 - shiki: ^0.11.1 - sirv: ^2.0.2 - slash: ^4.0.0 - string-width: ^5.1.2 - strip-ansi: ^7.0.1 - supports-esm: ^1.0.0 - tsconfig-resolver: ^3.0.1 - typescript: "*" - unist-util-visit: ^4.1.0 - vfile: ^5.3.2 - vite: ~3.1.3 - yargs-parser: ^21.0.1 - zod: ^3.17.3 - bin: - astro: astro.js - checksum: 0893ee9880203ce0ff577c3ee66647912c56487ecfceb01d16dab857a023d14ddf39c2d0dd32fddd9ed2b0d1afa09291033ec13a028cea7ee9cba3476b806f23 + semver: ^7.3.8 + checksum: 5400c86f1bda5ea942ad200bbb6ce084496115dcdceb2df77630c00166a5181f459bcd39ab78f8953825be6ad97d572dd4fe5cc79a69ddda6a74f224442e0e43 languageName: node linkType: hard "astrojs-compiler-sync@npm:^0.3.0": - version: 0.3.1 - resolution: "astrojs-compiler-sync@npm:0.3.1" + version: 0.3.2 + resolution: "astrojs-compiler-sync@npm:0.3.2" dependencies: synckit: ^0.8.0 peerDependencies: "@astrojs/compiler": ">=0.27.0" - checksum: 5a518030d389d03e64037475b129cbfffd2d99ee1408eae0ff74e6eb1b52efbe830079b604ab135a2f8db2a5cbb15e2bc4e9949f9954aa41ed44493c6d8c2243 + checksum: b769e56ac8f7ecd0b19476756fea938f30ef0f7a8af01dd4573be958ef4b4c6ed0b1ecb4db1fce13d4ade8ff8017cf4d3f9d343a6458a2c6c0339fde0546870c + languageName: node + linkType: hard + +"async-limiter@npm:~1.0.0": + version: 1.0.1 + resolution: "async-limiter@npm:1.0.1" + checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b + languageName: node + linkType: hard + +"async-listen@npm:2.0.3": + version: 2.0.3 + resolution: "async-listen@npm:2.0.3" + checksum: 6d40e4d19b8bb20a16296c43a80bc57cd969f485611cf727ffc4e89db17ba2d338074a29d8a60223fee6c96379d97cf3d7056bac9498058cc3699a223c91d4e4 + languageName: node + linkType: hard + +"async-listen@npm:3.0.0": + version: 3.0.0 + resolution: "async-listen@npm:3.0.0" + checksum: 3c238e213219ca71bd1239398a852d7c40b9fe212066616d5ab80861c2a014c100acebe48cd57b5ac2d8d66096ee0ea760b25d574f99a0236977921ff7149582 languageName: node linkType: hard @@ -5941,6 +8671,13 @@ __metadata: languageName: node linkType: hard +"async@npm:^3.2.0, async@npm:^3.2.3": + version: 3.2.4 + resolution: "async@npm:3.2.4" + checksum: 43d07459a4e1d09b84a20772414aa684ff4de085cbcaec6eea3c7a8f8150e8c62aa6cd4e699fe8ee93c3a5b324e777d34642531875a0817a35697522c1b02e89 + languageName: node + linkType: hard + "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -5948,6 +8685,13 @@ __metadata: languageName: node linkType: hard +"available-typed-arrays@npm:^1.0.5": + version: 1.0.5 + resolution: "available-typed-arrays@npm:1.0.5" + checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a + languageName: node + linkType: hard + "aws-sign2@npm:~0.7.0": version: 0.7.0 resolution: "aws-sign2@npm:0.7.0" @@ -5956,30 +8700,32 @@ __metadata: linkType: hard "aws4@npm:^1.8.0": - version: 1.11.0 - resolution: "aws4@npm:1.11.0" - checksum: 5a00d045fd0385926d20ebebcfba5ec79d4482fe706f63c27b324d489a04c68edb0db99ed991e19eda09cb8c97dc2452059a34d97545cebf591d7a2b5a10999f + version: 1.12.0 + resolution: "aws4@npm:1.12.0" + checksum: 68f79708ac7c335992730bf638286a3ee0a645cf12575d557860100767c500c08b30e24726b9f03265d74116417f628af78509e1333575e9f8d52a80edfe8cbc languageName: node linkType: hard -"axe-core@npm:^4.4.3": - version: 4.4.3 - resolution: "axe-core@npm:4.4.3" - checksum: c3ea000d9ace3ba0bc747c8feafc24b0de62a0f7d93021d0f77b19c73fca15341843510f6170da563d51535d6cfb7a46c5fc0ea36170549dbb44b170208450a2 +"axe-core@npm:4.7.0": + version: 4.7.0 + resolution: "axe-core@npm:4.7.0" + checksum: f086bcab42be1761ba2b0b127dec350087f4c3a853bba8dd58f69d898cefaac31a1561da23146f6f3c07954c76171d1f2ce460e555e052d2b02cd79af628fa4a languageName: node linkType: hard -"axobject-query@npm:3.0.1": - version: 3.0.1 - resolution: "axobject-query@npm:3.0.1" - checksum: c4eede240d332936c85b15725695f55797304366063ee025db5a0c5df98bb35ec826129191c3e91a0355a56854029c7bd6f63b505022737b6e3ab83cef6bf7df +"axe-core@npm:^4.6.2": + version: 4.7.1 + resolution: "axe-core@npm:4.7.1" + checksum: ff6fb92d6cadb749977af72b7d28009dec2b1842d4fdc4114a295ce973a39d0ac477e541be360eb9482a8d63f55840196813d7d892c0bd8437f52d9f7349c788 languageName: node linkType: hard -"axobject-query@npm:^2.2.0": - version: 2.2.0 - resolution: "axobject-query@npm:2.2.0" - checksum: 96b8c7d807ca525f41ad9b286186e2089b561ba63a6d36c3e7d73dc08150714660995c7ad19cda05784458446a0793b45246db45894631e13853f48c1aa3117f +"axobject-query@npm:3.1.1, axobject-query@npm:^3.1.1": + version: 3.1.1 + resolution: "axobject-query@npm:3.1.1" + dependencies: + deep-equal: ^2.0.5 + checksum: c12a5da10dc7bab75e1cda9b6a3b5fcf10eba426ddf1a17b71ef65a434ed707ede7d1c4f013ba1609e970bc8c0cddac01365080d376204314e9b294719acd8a5 languageName: node linkType: hard @@ -5994,29 +8740,29 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.2.1": - version: 29.2.1 - resolution: "babel-jest@npm:29.2.1" +"babel-core@npm:^7.0.0-bridge.0": + version: 7.0.0-bridge.0 + resolution: "babel-core@npm:7.0.0-bridge.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2a1cb879019dffb08d17bec36e13c3a6d74c94773f41c1fd8b14de13f149cc34b705b0a1e07b42fcf35917b49d78db6ff0c5c3b00b202a5235013d517b5c6bbb + languageName: node + linkType: hard + +"babel-jest@npm:^29.5.0": + version: 29.5.0 + resolution: "babel-jest@npm:29.5.0" dependencies: - "@jest/transform": ^29.2.1 + "@jest/transform": ^29.5.0 "@types/babel__core": ^7.1.14 babel-plugin-istanbul: ^6.1.1 - babel-preset-jest: ^29.2.0 + babel-preset-jest: ^29.5.0 chalk: ^4.0.0 graceful-fs: ^4.2.9 slash: ^3.0.0 peerDependencies: "@babel/core": ^7.8.0 - checksum: c340c10d8cee4b3ef5990443627b5f70dbe2649faa1fef671c8b4fd4a9f8d559b78e5644e18de8063974cd6606033caf1afcaa52744309f6e3176c0b37c2e8f9 - languageName: node - linkType: hard - -"babel-plugin-dynamic-import-node@npm:^2.3.3": - version: 2.3.3 - resolution: "babel-plugin-dynamic-import-node@npm:2.3.3" - dependencies: - object.assign: ^4.1.0 - checksum: c9d24415bcc608d0db7d4c8540d8002ac2f94e2573d2eadced137a29d9eab7e25d2cbb4bc6b9db65cf6ee7430f7dd011d19c911a9a778f0533b4a05ce8292c9b + checksum: eafb6d37deb71f0c80bf3c80215aa46732153e5e8bcd73f6ff47d92e5c0c98c8f7f75995d0efec6289c371edad3693cd8fa2367b0661c4deb71a3a7117267ede languageName: node linkType: hard @@ -6033,15 +8779,15 @@ __metadata: languageName: node linkType: hard -"babel-plugin-jest-hoist@npm:^29.2.0": - version: 29.2.0 - resolution: "babel-plugin-jest-hoist@npm:29.2.0" +"babel-plugin-jest-hoist@npm:^29.5.0": + version: 29.5.0 + resolution: "babel-plugin-jest-hoist@npm:29.5.0" dependencies: "@babel/template": ^7.3.3 "@babel/types": ^7.3.3 "@types/babel__core": ^7.1.14 "@types/babel__traverse": ^7.0.6 - checksum: 368d271ceae491ae6b96cd691434859ea589fbe5fd5aead7660df75d02394077273c6442f61f390e9347adffab57a32b564d0fabcf1c53c4b83cd426cb644072 + checksum: 099b5254073b6bc985b6d2d045ad26fb8ed30ff8ae6404c4fe8ee7cd0e98a820f69e3dfb871c7c65aae0f4b65af77046244c07bb92d49ef9005c90eedf681539 languageName: node linkType: hard @@ -6103,22 +8849,15 @@ __metadata: languageName: node linkType: hard -"babel-preset-jest@npm:^29.2.0": - version: 29.2.0 - resolution: "babel-preset-jest@npm:29.2.0" +"babel-preset-jest@npm:^29.5.0": + version: 29.5.0 + resolution: "babel-preset-jest@npm:29.5.0" dependencies: - babel-plugin-jest-hoist: ^29.2.0 + babel-plugin-jest-hoist: ^29.5.0 babel-preset-current-node-syntax: ^1.0.0 peerDependencies: "@babel/core": ^7.0.0 - checksum: 1b09a2db968c36e064daf98082cfffa39c849b63055112ddc56fc2551fd0d4783897265775b1d2f8a257960a3339745de92e74feb01bad86d41c4cecbfa854fc - languageName: node - linkType: hard - -"bail@npm:^1.0.0": - version: 1.0.5 - resolution: "bail@npm:1.0.5" - checksum: 6c334940d7eaa4e656a12fb12407b6555649b6deb6df04270fa806e0da82684ebe4a4e47815b271c794b40f8d6fa286e0c248b14ddbabb324a917fab09b7301a + checksum: 5566ca2762766c9319b4973d018d2fa08c0fcf6415c72cc54f4c8e7199e851ea8f5e6c6730f03ed7ed44fc8beefa959dd15911f2647dee47c615ff4faeddb1ad languageName: node linkType: hard @@ -6136,6 +8875,13 @@ __metadata: languageName: node linkType: hard +"base64-js@npm:0.0.8": + version: 0.0.8 + resolution: "base64-js@npm:0.0.8" + checksum: e95d2fa4b9000789fedd1e1ebac7830a70f5b1c06c72b2cf7862a48335af5d42229c0deda5085b2c8e403e479b612a55cd682bd4438838980d07cfc21c91e750 + languageName: node + linkType: hard + "base64-js@npm:^1.3.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" @@ -6143,13 +8889,6 @@ __metadata: languageName: node linkType: hard -"bcp-47-match@npm:^2.0.0": - version: 2.0.2 - resolution: "bcp-47-match@npm:2.0.2" - checksum: 4938d5446c1b00f8a18fc0258aaf8a5814f536c5e8ce7565dc7d579e7edf35def72415a4cbc1086400c7447113f09b00fb9c232e4dae0613e5f026b2c0b1f28d - languageName: node - linkType: hard - "bcrypt-pbkdf@npm:^1.0.0": version: 1.0.2 resolution: "bcrypt-pbkdf@npm:1.0.2" @@ -6170,6 +8909,15 @@ __metadata: languageName: node linkType: hard +"better-opn@npm:^2.1.1": + version: 2.1.1 + resolution: "better-opn@npm:2.1.1" + dependencies: + open: ^7.0.3 + checksum: 3d1a945d125cbbc6e6a841bef7540435d77d5aa61fc4d345896f5f0b3780fcf9c7145373deaedf62d674a427b187ae973f4410884f9fea0c15f7f01f9dc339c7 + languageName: node + linkType: hard + "big-integer@npm:^1.6.44": version: 1.6.51 resolution: "big-integer@npm:1.6.51" @@ -6177,6 +8925,13 @@ __metadata: languageName: node linkType: hard +"big.js@npm:^5.2.2": + version: 5.2.2 + resolution: "big.js@npm:5.2.2" + checksum: b89b6e8419b097a8fb4ed2399a1931a68c612bce3cfd5ca8c214b2d017531191070f990598de2fc6f3f993d91c0f08aa82697717f6b3b8732c9731866d233c9e + languageName: node + linkType: hard + "binary-extensions@npm:^2.0.0": version: 2.2.0 resolution: "binary-extensions@npm:2.2.0" @@ -6184,7 +8939,7 @@ __metadata: languageName: node linkType: hard -"bindings@npm:^1.4.0": +"bindings@npm:^1.4.0, bindings@npm:^1.5.0": version: 1.5.0 resolution: "bindings@npm:1.5.0" dependencies: @@ -6193,7 +8948,14 @@ __metadata: languageName: node linkType: hard -"bl@npm:^4.0.3": +"binjumper@npm:^0.1.4": + version: 0.1.4 + resolution: "binjumper@npm:0.1.4" + checksum: d956dd2a013d1475cd6f6a12c50a62ddbd5051ef441b001b42ec721a6b0323b0a132a6f9b98912078f54c97c35882684c7cee072d3d53372bfc8d93f02b66a71 + languageName: node + linkType: hard + +"bl@npm:^4.0.3, bl@npm:^4.1.0": version: 4.1.0 resolution: "bl@npm:4.1.0" dependencies: @@ -6204,17 +8966,6 @@ __metadata: languageName: node linkType: hard -"bl@npm:^5.0.0": - version: 5.0.0 - resolution: "bl@npm:5.0.0" - dependencies: - buffer: ^6.0.3 - inherits: ^2.0.4 - readable-stream: ^3.4.0 - checksum: 5dbbcf9cbcf55221dc21f48968bc8cd6d78faea3c653d496ff8e0c382b95e8b6c4b9e818fe67de2f97ed0cd0c219c350ccce42aca91be33e0ad12e698c615061 - languageName: node - linkType: hard - "bluebird@npm:^3.7.2": version: 3.7.2 resolution: "bluebird@npm:3.7.2" @@ -6222,6 +8973,13 @@ __metadata: languageName: node linkType: hard +"blueimp-md5@npm:^2.10.0": + version: 2.19.0 + resolution: "blueimp-md5@npm:2.19.0" + checksum: 28095dcbd2c67152a2938006e8d7c74c3406ba6556071298f872505432feb2c13241b0476644160ee0a5220383ba94cb8ccdac0053b51f68d168728f9c382530 + languageName: node + linkType: hard + "body-parser@npm:1.20.1": version: 1.20.1 resolution: "body-parser@npm:1.20.1" @@ -6249,14 +9007,7 @@ __metadata: languageName: node linkType: hard -"boolean@npm:^3.0.1": - version: 3.2.0 - resolution: "boolean@npm:3.2.0" - checksum: fb29535b8bf710ef45279677a86d14f5185d604557204abd2ca5fa3fb2a5c80e04d695c8dbf13ab269991977a79bb6c04b048220a6b2a3849853faa94f4a7d77 - languageName: node - linkType: hard - -"boxen@npm:^5.0.0": +"boxen@npm:^5.1.2": version: 5.1.2 resolution: "boxen@npm:5.1.2" dependencies: @@ -6272,38 +9023,6 @@ __metadata: languageName: node linkType: hard -"boxen@npm:^6.2.1": - version: 6.2.1 - resolution: "boxen@npm:6.2.1" - dependencies: - ansi-align: ^3.0.1 - camelcase: ^6.2.0 - chalk: ^4.1.2 - cli-boxes: ^3.0.0 - string-width: ^5.0.1 - type-fest: ^2.5.0 - widest-line: ^4.0.1 - wrap-ansi: ^8.0.1 - checksum: 2b3226092f1ff8e149c02979098c976552afa15f9e0231c9ed2dfcaaf84604494d16a6f13b647f718439f64d3140a088e822d47c7db00d2266e9ffc8d7321774 - languageName: node - linkType: hard - -"boxen@npm:^7.0.0": - version: 7.0.0 - resolution: "boxen@npm:7.0.0" - dependencies: - ansi-align: ^3.0.1 - camelcase: ^7.0.0 - chalk: ^5.0.1 - cli-boxes: ^3.0.0 - string-width: ^5.1.2 - type-fest: ^2.13.0 - widest-line: ^4.0.1 - wrap-ansi: ^8.0.1 - checksum: b917cf7a168ef3149635a8c02d5c9717d66182348bd27038d85328ad12655151e3324db0f2815253846c33e5f0ddf28b6cd52d56a12b9f88617b7f8f722b946a - languageName: node - linkType: hard - "bplist-parser@npm:^0.2.0": version: 0.2.0 resolution: "bplist-parser@npm:0.2.0" @@ -6341,17 +9060,45 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.21.3, browserslist@npm:^4.21.4": - version: 4.21.4 - resolution: "browserslist@npm:4.21.4" +"bright@npm:^0.8.2": + version: 0.8.2 + resolution: "bright@npm:0.8.2" + dependencies: + "@code-hike/lighter": 0.6.6 + server-only: ^0.0.1 + peerDependencies: + react: ^18 + checksum: bd392472b2b8180722b17f7966d621face84d3b877f7bfe372e2de1353ac026267b9b75d53015515fb6f38ca2f00b7d06126d69dfc2d436cc6798377b4910831 + languageName: node + linkType: hard + +"browser-assert@npm:^1.2.1": + version: 1.2.1 + resolution: "browser-assert@npm:1.2.1" + checksum: 8b2407cd04c1ed592cf892dec35942b7d72635829221e0788c9a16c4d2afa8b7156bc9705b1c4b32c30d88136c576fda3cbcb8f494d6f865264c706ea8798d92 + languageName: node + linkType: hard + +"browserify-zlib@npm:^0.1.4": + version: 0.1.4 + resolution: "browserify-zlib@npm:0.1.4" + dependencies: + pako: ~0.2.0 + checksum: abee4cb4349e8a21391fd874564f41b113fe691372913980e6fa06a777e4ea2aad4e942af14ab99bce190d5ac8f5328201432f4ef0eae48c6d02208bc212976f + languageName: node + linkType: hard + +"browserslist@npm:^4.21.3, browserslist@npm:^4.21.5": + version: 4.21.5 + resolution: "browserslist@npm:4.21.5" dependencies: - caniuse-lite: ^1.0.30001400 - electron-to-chromium: ^1.4.251 - node-releases: ^2.0.6 - update-browserslist-db: ^1.0.9 + caniuse-lite: ^1.0.30001449 + electron-to-chromium: ^1.4.284 + node-releases: ^2.0.8 + update-browserslist-db: ^1.0.10 bin: browserslist: cli.js - checksum: 4af3793704dbb4615bcd29059ab472344dc7961c8680aa6c4bb84f05340e14038d06a5aead58724eae69455b8fade8b8c69f1638016e87e5578969d74c078b79 + checksum: 9755986b22e73a6a1497fd8797aedd88e04270be33ce66ed5d85a1c8a798292a65e222b0f251bafa1c2522261e237d73b08b58689d4920a607e5a53d56dc4706 languageName: node linkType: hard @@ -6364,6 +9111,13 @@ __metadata: languageName: node linkType: hard +"buffer-crc32@npm:~0.2.3": + version: 0.2.13 + resolution: "buffer-crc32@npm:0.2.13" + checksum: 06252347ae6daca3453b94e4b2f1d3754a3b146a111d81c68924c22d91889a40623264e95e67955b1cb4a68cbedf317abeabb5140a9766ed248973096db5ce1c + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -6371,7 +9125,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.5.0": +"buffer@npm:^5.2.1, buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -6381,16 +9135,6 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" - dependencies: - base64-js: ^1.3.1 - ieee754: ^1.2.1 - checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 - languageName: node - linkType: hard - "builtin-modules@npm:^1.1.1": version: 1.1.1 resolution: "builtin-modules@npm:1.1.1" @@ -6430,18 +9174,18 @@ __metadata: languageName: node linkType: hard -"bundle-require@npm:^3.1.0": - version: 3.1.0 - resolution: "bundle-require@npm:3.1.0" +"bundle-require@npm:^4.0.0": + version: 4.0.1 + resolution: "bundle-require@npm:4.0.1" dependencies: - load-tsconfig: ^0.2.0 + load-tsconfig: ^0.2.3 peerDependencies: - esbuild: ">=0.13" - checksum: e433dd18ad2ccaf9d210040c5ce300a8c60f4caf0472856fd5162ec407f7b5b3e0559e540aa92b7381a18a6ff2b45bbe9270dc2fd7ace17e445e72a9cbc7fa95 + esbuild: ">=0.17" + checksum: 737217e37b72d7bee431b5d839b86ba604430f3ec346f073071de2ce65f0915189d4394ddd4685e0366b2930f38c95742b58c7101b8c53d9a8381d453f0b3b8a languageName: node linkType: hard -"busboy@npm:^1.6.0": +"busboy@npm:1.6.0, busboy@npm:^1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" dependencies: @@ -6450,6 +9194,13 @@ __metadata: languageName: node linkType: hard +"bytes@npm:3.0.0": + version: 3.0.0 + resolution: "bytes@npm:3.0.0" + checksum: a2b386dd8188849a5325f58eef69c3b73c51801c08ffc6963eddc9be244089ba32d19347caf6d145c86f315ae1b1fc7061a32b0c1aa6379e6a719090287ed101 + languageName: node + linkType: hard + "bytes@npm:3.1.2": version: 3.1.2 resolution: "bytes@npm:3.1.2" @@ -6464,9 +9215,9 @@ __metadata: languageName: node linkType: hard -"c8@npm:^7.12.0": - version: 7.12.0 - resolution: "c8@npm:7.12.0" +"c8@npm:^7.13.0, c8@npm:^7.6.0": + version: 7.13.0 + resolution: "c8@npm:7.13.0" dependencies: "@bcoe/v8-coverage": ^0.2.3 "@istanbuljs/schema": ^0.1.3 @@ -6482,7 +9233,7 @@ __metadata: yargs-parser: ^20.2.9 bin: c8: bin/c8.js - checksum: 3b7fa9ad7cff2cb0bb579467e6b544498fbd46e9353a809ad3b8cf749df4beadd074cde277356b0552f3c8055b1b3ec3ebaf2209e9ad4bdefed92dbf64d283ab + checksum: 491abf4cf3097cdcfd24dbac49162f1383861c22c77fdd9280bcd38240e1e07d2c6a59da5d4df59a61a8204e2fc297d31fd526e495faf8d2f20dcc12a37b144c languageName: node linkType: hard @@ -6493,6 +9244,32 @@ __metadata: languageName: node linkType: hard +"cacache@npm:^15.0.5": + version: 15.3.0 + resolution: "cacache@npm:15.3.0" + dependencies: + "@npmcli/fs": ^1.0.0 + "@npmcli/move-file": ^1.0.1 + chownr: ^2.0.0 + fs-minipass: ^2.0.0 + glob: ^7.1.4 + infer-owner: ^1.0.4 + lru-cache: ^6.0.0 + minipass: ^3.1.1 + minipass-collect: ^1.0.2 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.2 + mkdirp: ^1.0.3 + p-map: ^4.0.0 + promise-inflight: ^1.0.1 + rimraf: ^3.0.2 + ssri: ^8.0.1 + tar: ^6.0.2 + unique-filename: ^1.1.1 + checksum: a07327c27a4152c04eb0a831c63c00390d90f94d51bb80624a66f4e14a6b6360bbf02a84421267bd4d00ca73ac9773287d8d7169e8d2eafe378d2ce140579db8 + languageName: node + linkType: hard + "cacache@npm:^16.1.0": version: 16.1.3 resolution: "cacache@npm:16.1.3" @@ -6519,6 +9296,26 @@ __metadata: languageName: node linkType: hard +"cacache@npm:^17.0.0": + version: 17.1.3 + resolution: "cacache@npm:17.1.3" + dependencies: + "@npmcli/fs": ^3.1.0 + fs-minipass: ^3.0.0 + glob: ^10.2.2 + lru-cache: ^7.7.1 + minipass: ^5.0.0 + minipass-collect: ^1.0.2 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + p-map: ^4.0.0 + ssri: ^10.0.0 + tar: ^6.1.11 + unique-filename: ^3.0.0 + checksum: 385756781e1e21af089160d89d7462b7ed9883c978e848c7075b90b73cb823680e66092d61513050164588387d2ca87dd6d910e28d64bc13a9ac82cd8580c796 + languageName: node + linkType: hard + "cache-point@npm:^2.0.0": version: 2.0.0 resolution: "cache-point@npm:2.0.0" @@ -6530,18 +9327,25 @@ __metadata: languageName: node linkType: hard -"cacheable-request@npm:^6.0.0": - version: 6.1.0 - resolution: "cacheable-request@npm:6.1.0" +"cacheable-lookup@npm:^5.0.3": + version: 5.0.4 + resolution: "cacheable-lookup@npm:5.0.4" + checksum: 763e02cf9196bc9afccacd8c418d942fc2677f22261969a4c2c2e760fa44a2351a81557bd908291c3921fe9beb10b976ba8fa50c5ca837c5a0dd945f16468f2d + languageName: node + linkType: hard + +"cacheable-request@npm:^7.0.2": + version: 7.0.2 + resolution: "cacheable-request@npm:7.0.2" dependencies: clone-response: ^1.0.2 get-stream: ^5.1.0 http-cache-semantics: ^4.0.0 - keyv: ^3.0.0 + keyv: ^4.0.0 lowercase-keys: ^2.0.0 - normalize-url: ^4.1.0 - responselike: ^1.0.2 - checksum: b510b237b18d17e89942e9ee2d2a077cb38db03f12167fd100932dfa8fc963424bfae0bfa1598df4ae16c944a5484e43e03df8f32105b04395ee9495e9e4e9f1 + normalize-url: ^6.0.1 + responselike: ^2.0.0 + checksum: 6152813982945a5c9989cb457a6c499f12edcc7ade323d2fbfd759abc860bdbd1306e08096916bb413c3c47e812f8e4c0a0cc1e112c8ce94381a960f115bc77f languageName: node linkType: hard @@ -6583,6 +9387,18 @@ __metadata: languageName: node linkType: hard +"camelcase-keys@npm:^7.0.0": + version: 7.0.2 + resolution: "camelcase-keys@npm:7.0.2" + dependencies: + camelcase: ^6.3.0 + map-obj: ^4.1.0 + quick-lru: ^5.1.1 + type-fest: ^1.2.1 + checksum: b5821cc48dd00e8398a30c5d6547f06837ab44de123f1b3a603d0a03399722b2fc67a485a7e47106eb02ef543c3b50c5ebaabc1242cde4b63a267c3258d2365b + languageName: node + linkType: hard + "camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" @@ -6590,35 +9406,28 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.2.0": +"camelcase@npm:^6.2.0, camelcase@npm:^6.3.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d languageName: node linkType: hard -"camelcase@npm:^7.0.0": - version: 7.0.0 - resolution: "camelcase@npm:7.0.0" - checksum: 162d59607b3b46e910af151348d5e40af579048a5d07f3c06370b096ca0d42ba4a88bd92cf4e3482645ba1ffdd6f744d8273c1b9594e493fc10883d54adf7cbe - languageName: node - linkType: hard - "camelize@npm:^1.0.0": - version: 1.0.0 - resolution: "camelize@npm:1.0.0" - checksum: 769f8d10071f57b974d9a51dc02f589dd7fb07ea6a7ecde1a57b52ae68657ba61fe85c60d50661b76c7dbb76b6474fbfd3356aee33cf5f025cd7fd6fb2811b73 + version: 1.0.1 + resolution: "camelize@npm:1.0.1" + checksum: 91d8611d09af725e422a23993890d22b2b72b4cabf7239651856950c76b4bf53fe0d0da7c5e4db05180e898e4e647220e78c9fbc976113bd96d603d1fcbfcb99 languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001400, caniuse-lite@npm:^1.0.30001406": - version: 1.0.30001418 - resolution: "caniuse-lite@npm:1.0.30001418" - checksum: 03380a9ba50b1abd0081e76bfdf331bfb2c28f2277ce5eead5b83960c4db9f1fbbd84a536efa6f8f1fe2c038bc01129d6c42d17f8323fe99a016a5da3829c4bc +"caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001449": + version: 1.0.30001489 + resolution: "caniuse-lite@npm:1.0.30001489" + checksum: 94585a351fd7661b855c83eace474db0ee5a617159b46f2eff1f6fe4b85d7a205418471fdec8cf5cd647a7f79958706d5e664c0bbf3c7c09118b35db9bb95a1b languageName: node linkType: hard -"caseless@npm:^0.12.0, caseless@npm:~0.12.0": +"caseless@npm:~0.12.0": version: 0.12.0 resolution: "caseless@npm:0.12.0" checksum: b43bd4c440aa1e8ee6baefee8063b4850fd0d7b378f6aabc796c9ec8cb26d27fb30b46885350777d9bd079c5256c0e1329ad0dc7c2817e0bb466810ebb353751 @@ -6641,18 +9450,25 @@ __metadata: languageName: node linkType: hard -"chai@npm:^4.3.6": - version: 4.3.6 - resolution: "chai@npm:4.3.6" +"chai@npm:^4.3.7": + version: 4.3.7 + resolution: "chai@npm:4.3.7" dependencies: assertion-error: ^1.1.0 check-error: ^1.0.2 - deep-eql: ^3.0.1 + deep-eql: ^4.1.2 get-func-name: ^2.0.0 loupe: ^2.3.1 pathval: ^1.1.1 type-detect: ^4.0.5 - checksum: acff93fd537f96d4a4d62dd83810285dffcfccb5089e1bf2a1205b28ec82d93dff551368722893cf85004282df10ee68802737c33c90c5493957ed449ed7ce71 + checksum: 0bba7d267848015246a66995f044ce3f0ebc35e530da3cbdf171db744e14cbe301ab913a8d07caf7952b430257ccbb1a4a983c570a7c5748dc537897e5131f7c + languageName: node + linkType: hard + +"chalk@npm:5.2.0, chalk@npm:^5.2.0": + version: 5.2.0 + resolution: "chalk@npm:5.2.0" + checksum: 03d8060277de6cf2fd567dc25fcf770593eb5bb85f460ce443e49255a30ff1242edd0c90a06a03803b0466ff0687a939b41db1757bec987113e83de89a003caa languageName: node linkType: hard @@ -6680,20 +9496,23 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2, chalk@npm:~4.1.0": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" +"chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" dependencies: ansi-styles: ^4.1.0 supports-color: ^7.1.0 - checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 languageName: node linkType: hard -"chalk@npm:^5.0.0, chalk@npm:^5.0.1": - version: 5.1.0 - resolution: "chalk@npm:5.1.0" - checksum: c1aa0bf0064a5a59bc06e3e385685fdcc5bb122159152bb57755fc48f9ef93c30cb3a36c9a2c39ead23e5261d787c87c4c097e1a889e1370478102a0112fe0e0 +"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2, chalk@npm:~4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc languageName: node linkType: hard @@ -6753,6 +9572,13 @@ __metadata: languageName: node linkType: hard +"chardet@npm:^0.7.0": + version: 0.7.0 + resolution: "chardet@npm:0.7.0" + checksum: 6fd5da1f5d18ff5712c1e0aed41da200d7c51c28f11b36ee3c7b483f3696dabc08927fc6b227735eb8f0e1215c9a8abd8154637f3eff8cada5959df7f58b024d + languageName: node + linkType: hard + "charm@npm:^1.0.2": version: 1.0.2 resolution: "charm@npm:1.0.2" @@ -6802,6 +9628,46 @@ __metadata: languageName: node linkType: hard +"chromatic@npm:^6.17.4": + version: 6.17.4 + resolution: "chromatic@npm:6.17.4" + dependencies: + "@discoveryjs/json-ext": ^0.5.7 + "@types/webpack-env": ^1.17.0 + snyk-nodejs-lockfile-parser: ^1.49.0 + bin: + chroma: bin/main.cjs + chromatic: bin/main.cjs + chromatic-cli: bin/main.cjs + checksum: d49ebcc17f2f3010e95d06b5084b7802d293a4ad3cd571dc5b744f5e90763a19b643729fc3dcfe86beb44b6f542800378c7a4c1478b963d3adbdc58a1bfa9988 + languageName: node + linkType: hard + +"chrome-launcher@npm:^0.15.2": + version: 0.15.2 + resolution: "chrome-launcher@npm:0.15.2" + dependencies: + "@types/node": "*" + escape-string-regexp: ^4.0.0 + is-wsl: ^2.2.0 + lighthouse-logger: ^1.0.0 + bin: + print-chrome-path: bin/print-chrome-path.js + checksum: e1f8131b9f7bd931248ea85f413c6cdb93a0d41440ff5bf0987f36afb081d2b2c7b60ba6062ee7ae2dd9b052143f6b275b38c9eb115d11b49c3ea8829bad7db0 + languageName: node + linkType: hard + +"chromium-bidi@npm:0.4.9": + version: 0.4.9 + resolution: "chromium-bidi@npm:0.4.9" + dependencies: + mitt: 3.0.0 + peerDependencies: + devtools-protocol: "*" + checksum: cb2eea787282634718d1877bc63f00e8be33ce49369852b6e95dfe97a097f051445c8e374617d6433f8c9b578ec2d2d86a9889c152c7a850596cdae9342f81ad + languageName: node + linkType: hard + "ci-info@npm:^2.0.0": version: 2.0.0 resolution: "ci-info@npm:2.0.0" @@ -6809,10 +9675,10 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^3.2.0, ci-info@npm:^3.3.1, ci-info@npm:^3.4.0": - version: 3.5.0 - resolution: "ci-info@npm:3.5.0" - checksum: 7def3789706ec18db3dc371dc699bd0df12057d54b796201f50ba87200e0849d3d83c68da00ab2ab8cdd738d91b25ab9e31620588f8d7e64ffaa1f760fd121cf +"ci-info@npm:^3.2.0, ci-info@npm:^3.8.0": + version: 3.8.0 + resolution: "ci-info@npm:3.8.0" + checksum: d0a4d3160497cae54294974a7246202244fff031b0a6ea20dd57b10ec510aa17399c41a1b0982142c105f3255aff2173e5c0dd7302ee1b2f28ba3debda375098 languageName: node linkType: hard @@ -6823,19 +9689,17 @@ __metadata: languageName: node linkType: hard -"classnames@npm:^2.3.1": - version: 2.3.2 - resolution: "classnames@npm:2.3.2" - checksum: 2c62199789618d95545c872787137262e741f9db13328e216b093eea91c85ef2bfb152c1f9e63027204e2559a006a92eb74147d46c800a9f96297ae1d9f96f4e - languageName: node - linkType: hard - -"clean-css@npm:5.2.0": - version: 5.2.0 - resolution: "clean-css@npm:5.2.0" +"class-variance-authority@npm:^0.6.0": + version: 0.6.0 + resolution: "class-variance-authority@npm:0.6.0" dependencies: - source-map: ~0.6.0 - checksum: ccb63b244b200abf53a005429b50132845a49b994fb6a2889a7eb775d53fbde7cb0d0b13655e435b0c3a6788d5d0fbcd2f56ccf32da852ef21ae933198dcad24 + clsx: 1.2.1 + peerDependencies: + typescript: ">= 4.5.5 < 6" + peerDependenciesMeta: + typescript: + optional: true + checksum: c86fe9d208b33afbd82e3349739f8be9bfceb17e78f2ee689039029de016c5547883b41ac8ab69630f433cf4d4c9159a3c82072e9d8b7225f63cd31c01d6c9b8 languageName: node linkType: hard @@ -6855,6 +9719,15 @@ __metadata: languageName: node linkType: hard +"clean-stack@npm:^4.0.0": + version: 4.2.0 + resolution: "clean-stack@npm:4.2.0" + dependencies: + escape-string-regexp: 5.0.0 + checksum: 373f656a31face5c615c0839213b9b542a0a48057abfb1df66900eab4dc2a5c6097628e4a0b5aa559cdfc4e66f8a14ea47be9681773165a44470ef5fb8ccc172 + languageName: node + linkType: hard + "cli-boxes@npm:^2.2.1": version: 2.2.1 resolution: "cli-boxes@npm:2.2.1" @@ -6862,13 +9735,6 @@ __metadata: languageName: node linkType: hard -"cli-boxes@npm:^3.0.0": - version: 3.0.0 - resolution: "cli-boxes@npm:3.0.0" - checksum: 637d84419d293a9eac40a1c8c96a2859e7d98b24a1a317788e13c8f441be052fc899480c6acab3acc82eaf1bccda6b7542d7cdcf5c9c3cc39227175dc098d5b2 - languageName: node - linkType: hard - "cli-cursor@npm:^3.1.0": version: 3.1.0 resolution: "cli-cursor@npm:3.1.0" @@ -6878,19 +9744,23 @@ __metadata: languageName: node linkType: hard -"cli-cursor@npm:^4.0.0": - version: 4.0.0 - resolution: "cli-cursor@npm:4.0.0" - dependencies: - restore-cursor: ^4.0.0 - checksum: ab3f3ea2076e2176a1da29f9d64f72ec3efad51c0960898b56c8a17671365c26e67b735920530eaf7328d61f8bd41c27f46b9cf6e4e10fe2fa44b5e8c0e392cc +"cli-spinners@npm:^2.5.0": + version: 2.9.0 + resolution: "cli-spinners@npm:2.9.0" + checksum: a9c56e1f44457d4a9f4f535364e729cb8726198efa9e98990cfd9eda9e220dfa4ba12f92808d1be5e29029cdfead781db82dc8549b97b31c907d55f96aa9b0e2 languageName: node linkType: hard -"cli-spinners@npm:^2.6.1": - version: 2.7.0 - resolution: "cli-spinners@npm:2.7.0" - checksum: a9afaf73f58d1f951fb23742f503631b3cf513f43f4c7acb1b640100eb76bfa16efbcd1994d149ffc6603a6d75dd3d4a516a76f125f90dce437de9b16fd0ee6f +"cli-table3@npm:^0.6.1": + version: 0.6.3 + resolution: "cli-table3@npm:0.6.3" + dependencies: + "@colors/colors": 1.5.0 + string-width: ^4.2.0 + dependenciesMeta: + "@colors/colors": + optional: true + checksum: 09897f68467973f827c04e7eaadf13b55f8aec49ecd6647cc276386ea660059322e2dd8020a8b6b84d422dbdd619597046fa89cbbbdc95b2cea149a2df7c096c languageName: node linkType: hard @@ -6914,6 +9784,38 @@ __metadata: languageName: node linkType: hard +"cli-width@npm:^3.0.0": + version: 3.0.0 + resolution: "cli-width@npm:3.0.0" + checksum: 4c94af3769367a70e11ed69aa6095f1c600c0ff510f3921ab4045af961820d57c0233acfa8b6396037391f31b4c397e1f614d234294f979ff61430a6c166c3f6 + languageName: node + linkType: hard + +"client-only@npm:0.0.1": + version: 0.0.1 + resolution: "client-only@npm:0.0.1" + checksum: 0c16bf660dadb90610553c1d8946a7fdfb81d624adea073b8440b7d795d5b5b08beb3c950c6a2cf16279365a3265158a236876d92bce16423c485c322d7dfaf8 + languageName: node + linkType: hard + +"clipanion@npm:^2.6.2": + version: 2.6.2 + resolution: "clipanion@npm:2.6.2" + checksum: 7a1dfc8c9ae70362fc12a8d148827b584f598c9f983143a847b33a84ec8a8c3a51e5888131a3e9847cddfa38096d17a38ced870ee2fd4bef5babb971ec198287 + languageName: node + linkType: hard + +"clipanion@npm:^3.2.0": + version: 3.2.0 + resolution: "clipanion@npm:3.2.0" + dependencies: + typanion: ^3.8.0 + peerDependencies: + typanion: "*" + checksum: e28e6f0d48aecff86097823c604aa486082d76d2a5d3abc71069a0d9f3338af769fd7c6634b2f444c5b1aac0743b503325cc0b30552c094c01ebc602631b273d + languageName: node + linkType: hard + "cliui@npm:^6.0.0": version: 6.0.0 resolution: "cliui@npm:6.0.0" @@ -6947,6 +9849,17 @@ __metadata: languageName: node linkType: hard +"clone-deep@npm:^4.0.1": + version: 4.0.1 + resolution: "clone-deep@npm:4.0.1" + dependencies: + is-plain-object: ^2.0.4 + kind-of: ^6.0.2 + shallow-clone: ^3.0.0 + checksum: 770f912fe4e6f21873c8e8fbb1e99134db3b93da32df271d00589ea4a29dbe83a9808a322c93f3bcaf8584b8b4fa6fc269fc8032efbaa6728e0c9886c74467d2 + languageName: node + linkType: hard + "clone-response@npm:^1.0.2": version: 1.0.3 resolution: "clone-response@npm:1.0.3" @@ -6963,23 +9876,30 @@ __metadata: languageName: node linkType: hard +"clsx@npm:1.2.1": + version: 1.2.1 + resolution: "clsx@npm:1.2.1" + checksum: 30befca8019b2eb7dbad38cff6266cf543091dae2825c856a62a8ccf2c3ab9c2907c4d12b288b73101196767f66812365400a227581484a05f968b0307cfaf12 + languageName: node + linkType: hard + "cluster-key-slot@npm:^1.1.0": - version: 1.1.1 - resolution: "cluster-key-slot@npm:1.1.1" - checksum: 2fb7390e7950075acb09fc8aad3dc939abb64b139ba1b5f6341efdd0beda8cdc8b508e5f30d943370cf30ea0c13741c579e0846efd007b328bdc1a5a712264da + version: 1.1.2 + resolution: "cluster-key-slot@npm:1.1.2" + checksum: be0ad2d262502adc998597e83f9ded1b80f827f0452127c5a37b22dfca36bab8edf393f7b25bb626006fb9fb2436106939ede6d2d6ecf4229b96a47f27edd681 languageName: node linkType: hard -"cmdk@npm:^0.1.20": - version: 0.1.20 - resolution: "cmdk@npm:0.1.20" +"cmdk@npm:^0.2.0": + version: 0.2.0 + resolution: "cmdk@npm:0.2.0" dependencies: "@radix-ui/react-dialog": 1.0.0 command-score: 0.1.2 peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 - checksum: 5098aef2c0cbfbf6a6a689703ee0c8c435ea4b79c591ef43100e18b4182208fbb83a426d19b241cc1d486277e3ec954978fd7e7516d305ab45dae932e144b72a + checksum: b81add6daebb192e0ab79bd776aa22c75a9aa5c8ca3c40d6c99cbe3ab4f276bf580eb49d1e568126b6af1e72c0012b53ec260c241a594baf782a80b866a0d17e languageName: node linkType: hard @@ -6997,10 +9917,10 @@ __metadata: languageName: node linkType: hard -"code-block-writer@npm:^11.0.3": - version: 11.0.3 - resolution: "code-block-writer@npm:11.0.3" - checksum: f0a2605f19963d7087267c9b0fd0b05a6638a50e7b29b70f97aa01a514f59475b0626f8aa092188df853ee6d96745426dfa132d6a677795df462c6ce32c21639 +"code-block-writer@npm:^12.0.0": + version: 12.0.0 + resolution: "code-block-writer@npm:12.0.0" + checksum: 9f6505a4d668c9131c6f3f686359079439e66d5f50c236614d52fcfa53aeb0bc615b2c6c64ef05b5511e3b0433ccfd9f7756ad40eb3b9298af6a7d791ab1981d languageName: node linkType: hard @@ -7053,7 +9973,7 @@ __metadata: languageName: node linkType: hard -"color-name@npm:^1.0.0, color-name@npm:~1.1.4": +"color-name@npm:^1.0.0, color-name@npm:^1.1.4, color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 @@ -7089,10 +10009,10 @@ __metadata: languageName: node linkType: hard -"colorette@npm:^2.0.16, colorette@npm:^2.0.17, colorette@npm:^2.0.19": - version: 2.0.19 - resolution: "colorette@npm:2.0.19" - checksum: 888cf5493f781e5fcf54ce4d49e9d7d698f96ea2b2ef67906834bb319a392c667f9ec69f4a10e268d2946d13a9503d2d19b3abaaaf174e3451bfe91fb9d82427 +"colorette@npm:^2.0.19, colorette@npm:^2.0.20": + version: 2.0.20 + resolution: "colorette@npm:2.0.20" + checksum: 0c016fea2b91b733eb9f4bcdb580018f52c0bc0979443dad930e5037a968237ac53d9beb98e218d2e9235834f8eebce7f8e080422d6194e957454255bde71d3d languageName: node linkType: hard @@ -7112,17 +10032,10 @@ __metadata: languageName: node linkType: hard -"comma-separated-tokens@npm:^1.0.0": - version: 1.0.8 - resolution: "comma-separated-tokens@npm:1.0.8" - checksum: 0adcb07174fa4d08cf0f5c8e3aec40a36b5ff0c2c720e5e23f50fe02e6789d1d00a67036c80e0c1e1539f41d3e7f0101b074039dd833b4e4a59031b659d6ca0d - languageName: node - linkType: hard - "comma-separated-tokens@npm:^2.0.0": - version: 2.0.2 - resolution: "comma-separated-tokens@npm:2.0.2" - checksum: 8fa68ff2605233571536a802a7c712b0c766e0c5088e067be72740054e84d040865eea945c984924ae84932bcc3e25a99f71601220b438e875b5f42b87277767 + version: 2.0.3 + resolution: "comma-separated-tokens@npm:2.0.3" + checksum: e3bf9e0332a5c45f49b90e79bcdb4a7a85f28d6a6f0876a94f1bb9b2bfbdbbb9292aac50e1e742d8c0db1e62a0229a106f57917e2d067fca951d81737651700d languageName: node linkType: hard @@ -7177,7 +10090,14 @@ __metadata: languageName: node linkType: hard -"commander@npm:^2.12.1, commander@npm:^2.20.0, commander@npm:^2.20.3": +"commander@npm:^10.0.0, commander@npm:^10.0.1": + version: 10.0.1 + resolution: "commander@npm:10.0.1" + checksum: 436901d64a818295803c1996cd856621a74f30b9f9e28a588e726b2b1670665bccd7c1a77007ebf328729f0139838a88a19265858a0fa7a8728c4656796db948 + languageName: node + linkType: hard + +"commander@npm:^2.12.1, commander@npm:^2.19.0": version: 2.20.3 resolution: "commander@npm:2.20.3" checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e @@ -7191,6 +10111,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^6.2.1": + version: 6.2.1 + resolution: "commander@npm:6.2.1" + checksum: d7090410c0de6bc5c67d3ca41c41760d6d268f3c799e530aafb73b7437d1826bbf0d2a3edac33f8b57cc9887b4a986dce307fa5557e109be40eadb7c43b21742 + languageName: node + linkType: hard + "commander@npm:^7.2.0": version: 7.2.0 resolution: "commander@npm:7.2.0" @@ -7198,10 +10125,23 @@ __metadata: languageName: node linkType: hard -"commander@npm:^9.3.0, commander@npm:^9.4.0, commander@npm:^9.4.1": - version: 9.4.1 - resolution: "commander@npm:9.4.1" - checksum: bfb18e325a5bdf772763c2213d5c7d9e77144d944124e988bcd8e5e65fb6d45d5d4e86b09155d0f2556c9a59c31e428720e57968bcd050b2306e910a0bf3cf13 +"commander@npm:^9.4.1": + version: 9.5.0 + resolution: "commander@npm:9.5.0" + checksum: c7a3e27aa59e913b54a1bafd366b88650bc41d6651f0cbe258d4ff09d43d6a7394232a4dadd0bf518b3e696fdf595db1028a0d82c785b88bd61f8a440cecfade + languageName: node + linkType: hard + +"comment-json@npm:^4.2.3": + version: 4.2.3 + resolution: "comment-json@npm:4.2.3" + dependencies: + array-timsort: ^1.0.3 + core-util-is: ^1.0.3 + esprima: ^4.0.1 + has-own-prop: ^2.0.0 + repeat-string: ^1.6.1 + checksum: 7f8d26266b0d49de9661f6365cbcc373fee4f4d0f422a203dfb17ad8f3d84c5be5ded444874935a197cd03cff297c53fe48910256cb4171cb2e52a3e6b9d317c languageName: node linkType: hard @@ -7212,13 +10152,6 @@ __metadata: languageName: node linkType: hard -"common-ancestor-path@npm:^1.0.1": - version: 1.0.1 - resolution: "common-ancestor-path@npm:1.0.1" - checksum: 1d2e4186067083d8cc413f00fc2908225f04ae4e19417ded67faa6494fb313c4fcd5b28a52326d1a62b466e2b3a4325e92c31133c5fee628cdf8856b3a57c3d7 - languageName: node - linkType: hard - "common-sequence@npm:^2.0.2": version: 2.0.2 resolution: "common-sequence@npm:2.0.2" @@ -7233,6 +10166,13 @@ __metadata: languageName: node linkType: hard +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 59715f2fc456a73f68826285718503340b9f0dd89bfffc42749906c5cf3d4277ef11ef1cca0350d0e79204f00f1f6d83851ececc9095dc88512a697ac0b9bdcb + languageName: node + linkType: hard + "compare-func@npm:^2.0.0": version: 2.0.0 resolution: "compare-func@npm:2.0.0" @@ -7250,6 +10190,30 @@ __metadata: languageName: node linkType: hard +"compressible@npm:~2.0.16": + version: 2.0.18 + resolution: "compressible@npm:2.0.18" + dependencies: + mime-db: ">= 1.43.0 < 2" + checksum: 58321a85b375d39230405654721353f709d0c1442129e9a17081771b816302a012471a9b8f4864c7dbe02eef7f2aaac3c614795197092262e94b409c9be108f0 + languageName: node + linkType: hard + +"compression@npm:^1.7.4": + version: 1.7.4 + resolution: "compression@npm:1.7.4" + dependencies: + accepts: ~1.3.5 + bytes: 3.0.0 + compressible: ~2.0.16 + debug: 2.6.9 + on-headers: ~1.0.2 + safe-buffer: 5.1.2 + vary: ~1.1.2 + checksum: 35c0f2eb1f28418978615dc1bc02075b34b1568f7f56c62d60f4214d4b7cc00d0f6d282b5f8a954f59872396bd770b6b15ffd8aa94c67d4bce9b8887b906999b + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -7257,7 +10221,7 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2": +"concat-stream@npm:^1.6.2": version: 1.6.2 resolution: "concat-stream@npm:1.6.2" dependencies: @@ -7281,23 +10245,39 @@ __metadata: languageName: node linkType: hard -"concurrently@npm:^7.4.0": - version: 7.4.0 - resolution: "concurrently@npm:7.4.0" +"concordance@npm:^5.0.4": + version: 5.0.4 + resolution: "concordance@npm:5.0.4" dependencies: - chalk: ^4.1.0 - date-fns: ^2.29.1 + date-time: ^3.1.0 + esutils: ^2.0.3 + fast-diff: ^1.2.0 + js-string-escape: ^1.0.1 + lodash: ^4.17.15 + md5-hex: ^3.0.1 + semver: ^7.3.2 + well-known-symbols: ^2.0.0 + checksum: 749153ba711492feb7c3d2f5bb04c107157440b3e39509bd5dd19ee7b3ac751d1e4cd75796d9f702e0a713312dbc661421c68aa4a2c34d5f6d91f47e3a1c64a6 + languageName: node + linkType: hard + +"concurrently@npm:^8.0.1": + version: 8.0.1 + resolution: "concurrently@npm:8.0.1" + dependencies: + chalk: ^4.1.2 + date-fns: ^2.29.3 lodash: ^4.17.21 - rxjs: ^7.0.0 - shell-quote: ^1.7.3 - spawn-command: ^0.0.2-1 - supports-color: ^8.1.0 + rxjs: ^7.8.0 + shell-quote: ^1.8.0 + spawn-command: 0.0.2-1 + supports-color: ^8.1.1 tree-kill: ^1.2.2 - yargs: ^17.3.1 + yargs: ^17.7.1 bin: conc: dist/bin/concurrently.js concurrently: dist/bin/concurrently.js - checksum: cc547866ad8d009d184ca3a7115d6636052a5f56f5429d123092d651286043d7233f6429257e30e50f509894cd12798ea831896ac18092d8135f67ffcc8ac3ea + checksum: cce10ab1bbd7fd099300234637cdbc8e12622a5fe53f8dd31dcd9562d9803f25d3d0410bdb6fffd54e8f4e11b852366c03994bd319843cce70e449c8a8a69526 languageName: node linkType: hard @@ -7324,10 +10304,10 @@ __metadata: languageName: node linkType: hard -"consola@npm:^2.15.3": - version: 2.15.3 - resolution: "consola@npm:2.15.3" - checksum: 8ef7a09b703ec67ac5c389a372a33b6dc97eda6c9876443a60d76a3076eea0259e7f67a4e54fd5a52f97df73690822d090cf8b7e102b5761348afef7c6d03e28 +"consola@npm:^3.1.0": + version: 3.1.0 + resolution: "consola@npm:3.1.0" + checksum: b4b16b0ff6a0645fb1b820cf89dd56c8601b9ae0e2c472652bce2f5d99932ed5b38ef7ad2cfa77f4534cd6264d99cf5cf9c3c888e98cc25fbd3c87d31c824975 languageName: node linkType: hard @@ -7348,13 +10328,29 @@ __metadata: linkType: hard "content-type@npm:~1.0.4": - version: 1.0.4 - resolution: "content-type@npm:1.0.4" - checksum: 3d93585fda985d1554eca5ebd251994327608d2e200978fdbfba21c0c679914d5faf266d17027de44b34a72c7b0745b18584ecccaa7e1fdfb6a68ac7114f12e0 + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766 languageName: node linkType: hard -"conventional-changelog-angular@npm:^5.0.11, conventional-changelog-angular@npm:^5.0.12, conventional-changelog-angular@npm:^5.0.13": +"contentlayer@npm:^0.3.2": + version: 0.3.2 + resolution: "contentlayer@npm:0.3.2" + dependencies: + "@contentlayer/cli": 0.3.2 + "@contentlayer/client": 0.3.2 + "@contentlayer/core": 0.3.2 + "@contentlayer/source-files": 0.3.2 + "@contentlayer/source-remote-files": 0.3.2 + "@contentlayer/utils": 0.3.2 + bin: + contentlayer: ./bin/cli.cjs + checksum: 6a432b953d86633479b140de27a8070da34a6fac85751ec674ec18ecaee50b7fa10c514f00f99fafa733f4a8f615e5365f68952310b6d9bb2012c0430f672c1b + languageName: node + linkType: hard + +"conventional-changelog-angular@npm:^5.0.11, conventional-changelog-angular@npm:^5.0.12": version: 5.0.13 resolution: "conventional-changelog-angular@npm:5.0.13" dependencies: @@ -7572,13 +10568,20 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": +"convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": version: 1.9.0 resolution: "convert-source-map@npm:1.9.0" checksum: dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 languageName: node linkType: hard +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 63ae9933be5a2b8d4509daca5124e20c14d023c820258e484e32dc324d34c2754e71297c94a05784064ad27615037ef677e3f0c00469fb55f409d2bb21261035 + languageName: node + linkType: hard + "cookie-signature@npm:1.0.6": version: 1.0.6 resolution: "cookie-signature@npm:1.0.6" @@ -7586,42 +10589,42 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.5.0, cookie@npm:^0.5.0": +"cookie@npm:0.5.0": version: 0.5.0 resolution: "cookie@npm:0.5.0" checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 languageName: node linkType: hard -"cookiejar@npm:^2.1.3": - version: 2.1.3 - resolution: "cookiejar@npm:2.1.3" - checksum: 88259983ebc52ceb23cdacfa48762b6a518a57872eff1c7ed01d214fff5cf492e2660d7d5c04700a28f1787a76811df39e8639f8e17670b3cf94ecd86e161f07 +"cookie@npm:^0.4.1": + version: 0.4.2 + resolution: "cookie@npm:0.4.2" + checksum: a00833c998bedf8e787b4c342defe5fa419abd96b32f4464f718b91022586b8f1bafbddd499288e75c037642493c83083da426c6a9080d309e3bd90fd11baa9b + languageName: node + linkType: hard + +"cookiejar@npm:^2.1.4": + version: 2.1.4 + resolution: "cookiejar@npm:2.1.4" + checksum: c4442111963077dc0e5672359956d6556a195d31cbb35b528356ce5f184922b99ac48245ac05ed86cf993f7df157c56da10ab3efdadfed79778a0d9b1b092d5b languageName: node linkType: hard "copy-to-clipboard@npm:^3.3.1": - version: 3.3.2 - resolution: "copy-to-clipboard@npm:3.3.2" + version: 3.3.3 + resolution: "copy-to-clipboard@npm:3.3.3" dependencies: toggle-selection: ^1.0.6 - checksum: 968ec7ec3d0cf3067542b63dd244ba5d05e743899d7a0361fb0a3130e731d277f5ea54ea4d90fc88cc66eea2e4c67dc2dd8698e4ed360f921af5aa7c60b889ac + checksum: e0a325e39b7615108e6c1c8ac110ae7b829cdc4ee3278b1df6a0e4228c490442cc86444cd643e2da344fbc424b3aab8909e2fec82f8bc75e7e5b190b7c24eecf languageName: node linkType: hard "core-js-compat@npm:^3.25.1": - version: 3.25.5 - resolution: "core-js-compat@npm:3.25.5" + version: 3.30.2 + resolution: "core-js-compat@npm:3.30.2" dependencies: - browserslist: ^4.21.4 - checksum: 30686b750d675b685426ee25e41e30b83aa05ff7b79def94b457529d05c1ad123cd4d0b70d9162b077a15dc9f6f177ee997d846d0a3324176dd3c504e917309c - languageName: node - linkType: hard - -"core-js-pure@npm:^3.25.1": - version: 3.25.5 - resolution: "core-js-pure@npm:3.25.5" - checksum: e48799a8ab28f00ef3db18377142ff2c578574ab2b18ebddde6cbf12823e0181a57c80e3caa6046ce2a2e439d603a252be767583ddc54248e3d1060bc5012127 + browserslist: ^4.21.5 + checksum: 4c81d635559eebc2f81db60f5095a235f580a2f90698113c4124c72761393592b139e30974cce6095a9a6aad6bb3cd467b24b20c32e77ed24ca74eb5944d0638 languageName: node linkType: hard @@ -7632,7 +10635,7 @@ __metadata: languageName: node linkType: hard -"core-util-is@npm:~1.0.0": +"core-util-is@npm:^1.0.3, core-util-is@npm:~1.0.0": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" checksum: 9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 @@ -7640,48 +10643,98 @@ __metadata: linkType: hard "cosmiconfig-typescript-loader@npm:^4.0.0": - version: 4.1.1 - resolution: "cosmiconfig-typescript-loader@npm:4.1.1" + version: 4.3.0 + resolution: "cosmiconfig-typescript-loader@npm:4.3.0" peerDependencies: "@types/node": "*" cosmiconfig: ">=7" ts-node: ">=10" typescript: ">=3" - checksum: a774961868f0406d0fd75e448c2e1a0ddb95de27d477fa325a37369a2cbd892cf4d639a109082cd886840dea7707ea9bed5c38a468b52de18400c4f1d495d35a + checksum: ea61dfd8e112cf2bb18df0ef89280bd3ae3dd5b997b4a9fc22bbabdc02513aadfbc6d4e15e922b6a9a5d987e9dad42286fa38caf77a9b8dcdbe7d4ce1c9db4fb languageName: node linkType: hard -"cosmiconfig@npm:^7.0.0": - version: 7.0.1 - resolution: "cosmiconfig@npm:7.0.1" +"cosmiconfig@npm:^8.0.0, cosmiconfig@npm:^8.1.3": + version: 8.1.3 + resolution: "cosmiconfig@npm:8.1.3" dependencies: - "@types/parse-json": ^4.0.0 import-fresh: ^3.2.1 + js-yaml: ^4.1.0 parse-json: ^5.0.0 path-type: ^4.0.0 - yaml: ^1.10.0 - checksum: 4be63e7117955fd88333d7460e4c466a90f556df6ef34efd59034d2463484e339666c41f02b523d574a797ec61f4a91918c5b89a316db2ea2f834e0d2d09465b + checksum: b3d277bc3a8a9e649bf4c3fc9740f4c52bf07387481302aa79839f595045368903bf26ea24a8f7f7b8b180bf46037b027c5cb63b1391ab099f3f78814a147b2b languageName: node linkType: hard -"create-require@npm:^1.1.0": - version: 1.1.1 - resolution: "create-require@npm:1.1.1" - checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff +"cp-file@npm:^9.1.0": + version: 9.1.0 + resolution: "cp-file@npm:9.1.0" + dependencies: + graceful-fs: ^4.1.2 + make-dir: ^3.0.0 + nested-error-stacks: ^2.0.0 + p-event: ^4.1.0 + checksum: 0ba0fb568baf502676fe15d0869f06703fc108d892bc2dd42097f9019c0215b83b4663b0ee4af5c1048c6d52530c67dfcfe855474be3532b559c4e0f549acb7a languageName: node linkType: hard -"critters@npm:0.0.16": - version: 0.0.16 - resolution: "critters@npm:0.0.16" +"cpy-cli@npm:^4.2.0": + version: 4.2.0 + resolution: "cpy-cli@npm:4.2.0" dependencies: - chalk: ^4.1.0 - css-select: ^4.2.0 - parse5: ^6.0.1 - parse5-htmlparser2-tree-adapter: ^6.0.1 - postcss: ^8.3.7 - pretty-bytes: ^5.3.0 - checksum: cfccfbb94f0b461fffd3c02a20f033cc42b78191a8e2fe68f825e263a6f3c53bd091d5e3cfc477100ddc5be162f9601cb4f7f080a0993a030621bc5d3359e979 + cpy: ^9.0.0 + meow: ^10.1.2 + bin: + cpy: cli.js + checksum: 883b142133fad9b57f10cf36483870c28e99bff34d4c166946e7bc26de1ec2786fca2e5102a061f7ff1fc73e5beaf90191f8a72eabdc3a4c97bd7f93e1fd793e + languageName: node + linkType: hard + +"cpy@npm:^9.0.0": + version: 9.0.1 + resolution: "cpy@npm:9.0.1" + dependencies: + arrify: ^3.0.0 + cp-file: ^9.1.0 + globby: ^13.1.1 + junk: ^4.0.0 + micromatch: ^4.0.4 + nested-error-stacks: ^2.1.0 + p-filter: ^3.0.0 + p-map: ^5.3.0 + checksum: 5139dfc07d181caefe3ec62c956340a1d02c4afeb794f8c199ddfc7e0cb0bdf5f5e4989ec08d6c07984be119bbb07eb323f21e8edb0733051ddf125a1084b565 + languageName: node + linkType: hard + +"create-discord-bot@workspace:packages/create-discord-bot": + version: 0.0.0-use.local + resolution: "create-discord-bot@workspace:packages/create-discord-bot" + dependencies: + "@favware/cliff-jumper": ^2.0.0 + "@microsoft/api-extractor": ^7.35.0 + "@types/node": 16.18.32 + "@types/validate-npm-package-name": ^4.0.0 + "@vitest/coverage-c8": ^0.31.1 + chalk: ^5.2.0 + commander: ^10.0.1 + cross-env: ^7.0.3 + eslint: ^8.41.0 + eslint-config-neon: ^0.1.47 + eslint-formatter-pretty: ^5.0.0 + prettier: ^2.8.8 + tsup: ^6.7.0 + typescript: ^5.0.4 + validate-npm-package-name: ^5.0.0 + vitest: ^0.31.1 + bin: + create-discord-bot: ./dist/create-discord-bot.mjs + languageName: unknown + linkType: soft + +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff languageName: node linkType: hard @@ -7697,26 +10750,16 @@ __metadata: languageName: node linkType: hard -"cross-fetch@npm:^3.1.5": - version: 3.1.5 - resolution: "cross-fetch@npm:3.1.5" - dependencies: - node-fetch: 2.6.7 - checksum: f6b8c6ee3ef993ace6277fd789c71b6acf1b504fd5f5c7128df4ef2f125a429e29cd62dc8c127523f04a5f2fa4771ed80e3f3d9695617f441425045f505cf3bb - languageName: node - linkType: hard - -"cross-spawn-async@npm:^2.1.1": - version: 2.2.5 - resolution: "cross-spawn-async@npm:2.2.5" +"cross-fetch@npm:3.1.6, cross-fetch@npm:^3.1.5, cross-fetch@npm:^3.1.6": + version: 3.1.6 + resolution: "cross-fetch@npm:3.1.6" dependencies: - lru-cache: ^4.0.0 - which: ^1.2.8 - checksum: 6d9059a68a643d9a7506c0d7ca518a803a4293d62cbd3763bdb18cac0dd7bfa9b07d6705361a23c486c7b790e4a2fbfc3d63b93e21de52ad862794b12c6f055f + node-fetch: ^2.6.11 + checksum: 704b3519ab7de488328cc49a52cf1aa14132ec748382be5b9557b22398c33ffa7f8c2530e8a97ed8cb55da52b0a9740a9791d361271c4591910501682d981d9c languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:7.0.3, cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -7734,6 +10777,13 @@ __metadata: languageName: node linkType: hard +"csp_evaluator@npm:1.1.1": + version: 1.1.1 + resolution: "csp_evaluator@npm:1.1.1" + checksum: 2db7806838385a1aa2715a86d07364cc2253bb18afa49d503094b8170e2bc94bc3ca312226eba4fe5041abab945a671696308a7d76755f9c3a2b9d58a121fb3f + languageName: node + linkType: hard + "css-background-parser@npm:^0.1.0": version: 0.1.0 resolution: "css-background-parser@npm:0.1.0" @@ -7755,48 +10805,45 @@ __metadata: languageName: node linkType: hard -"css-in-js-utils@npm:^2.0.0": - version: 2.0.1 - resolution: "css-in-js-utils@npm:2.0.1" +"css-in-js-utils@npm:^3.1.0": + version: 3.1.0 + resolution: "css-in-js-utils@npm:3.1.0" dependencies: - hyphenate-style-name: ^1.0.2 - isobject: ^3.0.1 - checksum: c9964c4708216954c468b69bbee2d971fd759ada4f40637b8ca4d3f79caba4818d0532a4f190ac560227c08742ad063ffec7a30afddc4d96b66a18c3a008f0d8 + hyphenate-style-name: ^1.0.3 + checksum: 066318e918c04a5e5bce46b38fe81052ea6ac051bcc6d3c369a1d59ceb1546cb2b6086901ab5d22be084122ee3732169996a3dfb04d3406eaee205af77aec61b languageName: node linkType: hard -"css-select@npm:^4.1.3, css-select@npm:^4.2.0": - version: 4.3.0 - resolution: "css-select@npm:4.3.0" +"css-loader@npm:^6.7.3": + version: 6.7.4 + resolution: "css-loader@npm:6.7.4" dependencies: - boolbase: ^1.0.0 - css-what: ^6.0.1 - domhandler: ^4.3.1 - domutils: ^2.8.0 - nth-check: ^2.0.1 - checksum: d6202736839194dd7f910320032e7cfc40372f025e4bf21ca5bf6eb0a33264f322f50ba9c0adc35dadd342d3d6fae5ca244779a4873afbfa76561e343f2058e0 - languageName: node - linkType: hard - -"css-selector-parser@npm:^1.0.0": - version: 1.4.1 - resolution: "css-selector-parser@npm:1.4.1" - checksum: 31948754e579eedb918c2fb2d5a4c643ec769ff4a0d03a7bd10b43b25d44973f8cbe86d7ec00c4494269f7ff38b3d2ab0f6ea801cece0ef0974e74469dff770c + icss-utils: ^5.1.0 + postcss: ^8.4.21 + postcss-modules-extract-imports: ^3.0.0 + postcss-modules-local-by-default: ^4.0.1 + postcss-modules-scope: ^3.0.0 + postcss-modules-values: ^4.0.0 + postcss-value-parser: ^4.2.0 + semver: ^7.3.8 + peerDependencies: + webpack: ^5.0.0 + checksum: 6021fa9e375d767b9675e295c1513f2ee4ae04f76d9de69a75b8446e05f6e02b2170407ea72939925b788dcd5aa308527f6b41be3870dc1f4b0bfff8d2532c6e languageName: node linkType: hard "css-to-react-native@npm:^3.0.0": - version: 3.0.0 - resolution: "css-to-react-native@npm:3.0.0" + version: 3.2.0 + resolution: "css-to-react-native@npm:3.2.0" dependencies: camelize: ^1.0.0 css-color-keywords: ^1.0.0 postcss-value-parser: ^4.0.2 - checksum: 98a2e9d4fbe9cabc8b744dfdd5ec108396ce497a7b860912a95b299bd52517461281810fcb707965a021a8be39adca9587184a26fb4e926211391a1557aca3c1 + checksum: 263be65e805aef02c3f20c064665c998a8c35293e1505dbe6e3054fb186b01a9897ac6cf121f9840e5a9dfe3fb3994f6fcd0af84a865f1df78ba5bf89e77adce languageName: node linkType: hard -"css-tree@npm:^1.1.2, css-tree@npm:^1.1.3": +"css-tree@npm:^1.1.2": version: 1.1.3 resolution: "css-tree@npm:1.1.3" dependencies: @@ -7806,20 +10853,20 @@ __metadata: languageName: node linkType: hard -"css-tree@npm:^2.2.1, css-tree@npm:~2.2.0": - version: 2.2.1 - resolution: "css-tree@npm:2.2.1" +"css-tree@npm:^2.3.1": + version: 2.3.1 + resolution: "css-tree@npm:2.3.1" dependencies: - mdn-data: 2.0.28 + mdn-data: 2.0.30 source-map-js: ^1.0.1 - checksum: b94aa8cc2f09e6f66c91548411fcf74badcbad3e150345074715012d16333ce573596ff5dfca03c2a87edf1924716db765120f94247e919d72753628ba3aba27 + checksum: 493cc24b5c22b05ee5314b8a0d72d8a5869491c1458017ae5ed75aeb6c3596637dbe1b11dac2548974624adec9f7a1f3a6cf40593dc1f9185eb0e8279543fbc0 languageName: node linkType: hard -"css-what@npm:^6.0.1": - version: 6.1.0 - resolution: "css-what@npm:6.1.0" - checksum: b975e547e1e90b79625918f84e67db5d33d896e6de846c9b584094e529f0c63e2ab85ee33b9daffd05bff3a146a1916bec664e18bb76dd5f66cbff9fc13b2bbe +"css-what@npm:^5.0.1": + version: 5.1.0 + resolution: "css-what@npm:5.1.0" + checksum: 0b75d1bac95c885c168573c85744a6c6843d8c33345f54f717218b37ea6296b0e99bb12105930ea170fd4a921990392a7c790c16c585c1d8960c49e2b7ec39f7 languageName: node linkType: hard @@ -7839,28 +10886,10 @@ __metadata: languageName: node linkType: hard -"csso@npm:5.0.5": - version: 5.0.5 - resolution: "csso@npm:5.0.5" - dependencies: - css-tree: ~2.2.0 - checksum: 0ad858d36bf5012ed243e9ec69962a867509061986d2ee07cc040a4b26e4d062c00d4c07e5ba8d430706ceb02dd87edd30a52b5937fd45b1b6f2119c4993d59a - languageName: node - linkType: hard - -"csso@npm:^4.2.0": - version: 4.2.0 - resolution: "csso@npm:4.2.0" - dependencies: - css-tree: ^1.1.2 - checksum: 380ba9663da3bcea58dee358a0d8c4468bb6539be3c439dc266ac41c047217f52fd698fb7e4b6b6ccdfb8cf53ef4ceed8cc8ceccb8dfca2aa628319826b5b998 - languageName: node - linkType: hard - -"csstype@npm:^3.0.2, csstype@npm:^3.0.6": - version: 3.1.1 - resolution: "csstype@npm:3.1.1" - checksum: 1f7b4f5fdd955b7444b18ebdddf3f5c699159f13e9cf8ac9027ae4a60ae226aef9bbb14a6e12ca7dba3358b007cee6354b116e720262867c398de6c955ea451d +"csstype@npm:^3.0.2, csstype@npm:^3.0.6, csstype@npm:^3.0.7": + version: 3.1.2 + resolution: "csstype@npm:3.1.2" + checksum: e1a52e6c25c1314d6beef5168da704ab29c5186b877c07d822bd0806717d9a265e8493a2e35ca7e68d0f5d472d43fac1cdce70fd79fd0853dff81f3028d857b5 languageName: node linkType: hard @@ -7887,17 +10916,35 @@ __metadata: languageName: node linkType: hard +"data-uri-to-buffer@npm:3": + version: 3.0.1 + resolution: "data-uri-to-buffer@npm:3.0.1" + checksum: c59c3009686a78c071806b72f4810856ec28222f0f4e252aa495ec027ed9732298ceea99c50328cf59b151dd34cbc3ad6150bbb43e41fc56fa19f48c99e9fc30 + languageName: node + linkType: hard + "data-uri-to-buffer@npm:^4.0.0": - version: 4.0.0 - resolution: "data-uri-to-buffer@npm:4.0.0" - checksum: a010653869abe8bb51259432894ac62c52bf79ad761d418d94396f48c346f2ae739c46b254e8bb5987bded8a653d467db1968db3a69bab1d33aa5567baa5cfc7 + version: 4.0.1 + resolution: "data-uri-to-buffer@npm:4.0.1" + checksum: 0d0790b67ffec5302f204c2ccca4494f70b4e2d940fea3d36b09f0bb2b8539c2e86690429eb1f1dc4bcc9e4df0644193073e63d9ee48ac9fce79ec1506e4aa4c + languageName: node + linkType: hard + +"date-fns@npm:^2.29.3": + version: 2.30.0 + resolution: "date-fns@npm:2.30.0" + dependencies: + "@babel/runtime": ^7.21.0 + checksum: f7be01523282e9bb06c0cd2693d34f245247a29098527d4420628966a2d9aad154bd0e90a6b1cf66d37adcb769cd108cf8a7bd49d76db0fb119af5cdd13644f4 languageName: node linkType: hard -"date-fns@npm:^2.29.1": - version: 2.29.3 - resolution: "date-fns@npm:2.29.3" - checksum: e01cf5b62af04e05dfff921bb9c9933310ed0e1ae9a81eb8653452e64dc841acf7f6e01e1a5ae5644d0337e9a7f936175fd2cb6819dc122fdd9c5e86c56be484 +"date-time@npm:^3.1.0": + version: 3.1.0 + resolution: "date-time@npm:3.1.0" + dependencies: + time-zone: ^1.0.0 + checksum: f9cfcd1b15dfeabab15c0b9d18eb9e4e2d9d4371713564178d46a8f91ad577a290b5178b80050718d02d9c0cf646f8a875011e12d1ed05871e9f72c72c8a8fe6 languageName: node linkType: hard @@ -7908,6 +10955,16 @@ __metadata: languageName: node linkType: hard +"deasync@npm:^0.1.0": + version: 0.1.28 + resolution: "deasync@npm:0.1.28" + dependencies: + bindings: ^1.5.0 + node-addon-api: ^1.7.1 + checksum: e0c1ef427875c897e0d903a08410df1d0a3dfd0d2a0a1e43fb6c2824dfbc504b810bd08a0d30653117259316e1aa65409c96dbed40101c934f75bac7499e1265 + languageName: node + linkType: hard + "debug@npm:2.6.9, debug@npm:^2.6.9": version: 2.6.9 resolution: "debug@npm:2.6.9" @@ -7917,7 +10974,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -7939,12 +10996,12 @@ __metadata: linkType: hard "decamelize-keys@npm:^1.1.0": - version: 1.1.0 - resolution: "decamelize-keys@npm:1.1.0" + version: 1.1.1 + resolution: "decamelize-keys@npm:1.1.1" dependencies: decamelize: ^1.1.0 map-obj: ^1.0.0 - checksum: 8bc5d32e035a072f5dffc1f1f3d26ca7ab1fb44a9cade34c97ab6cd1e62c81a87e718101e96de07d78cecda20a3fdb955df958e46671ccad01bb8dcf0de2e298 + checksum: fc645fe20b7bda2680bbf9481a3477257a7f9304b1691036092b97ab04c0ab53e3bf9fcc2d2ae382536568e402ec41fb11e1d4c3836a9abe2d813dd9ef4311e0 languageName: node linkType: hard @@ -7971,22 +11028,6 @@ __metadata: languageName: node linkType: hard -"decode-uri-component@npm:^0.2.0": - version: 0.2.0 - resolution: "decode-uri-component@npm:0.2.0" - checksum: f3749344ab9305ffcfe4bfe300e2dbb61fc6359e2b736812100a3b1b6db0a5668cba31a05e4b45d4d63dbf1a18dfa354cd3ca5bb3ededddabb8cd293f4404f94 - languageName: node - linkType: hard - -"decompress-response@npm:^3.3.0": - version: 3.3.0 - resolution: "decompress-response@npm:3.3.0" - dependencies: - mimic-response: ^1.0.0 - checksum: 952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 - languageName: node - linkType: hard - "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -8003,12 +11044,38 @@ __metadata: languageName: node linkType: hard -"deep-eql@npm:^3.0.1": - version: 3.0.1 - resolution: "deep-eql@npm:3.0.1" +"deep-eql@npm:^4.1.2": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" dependencies: type-detect: ^4.0.0 - checksum: 4f4c9fb79eb994fb6e81d4aa8b063adc40c00f831588aa65e20857d5d52f15fb23034a6576ecf886f7ff6222d5ae42e71e9b7d57113e0715b1df7ea1e812b125 + checksum: 7f6d30cb41c713973dc07eaadded848b2ab0b835e518a88b91bea72f34e08c4c71d167a722a6f302d3a6108f05afd8e6d7650689a84d5d29ec7fe6220420397f + languageName: node + linkType: hard + +"deep-equal@npm:^2.0.5": + version: 2.2.1 + resolution: "deep-equal@npm:2.2.1" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.2 + es-get-iterator: ^1.1.3 + get-intrinsic: ^1.2.0 + is-arguments: ^1.1.1 + is-array-buffer: ^3.0.2 + is-date-object: ^1.0.5 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + isarray: ^2.0.5 + object-is: ^1.1.5 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.0 + side-channel: ^1.0.4 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.9 + checksum: 561f0e001a07b2f1b80ff914d0b3d76964bbfc102f34c2128bc8039c0050e63b1a504a8911910e011d8cd1cd4b600a9686c049e327f4ef94420008efc42d25f4 languageName: node linkType: hard @@ -8019,28 +11086,28 @@ __metadata: languageName: node linkType: hard -"deep-is@npm:^0.1.3": +"deep-is@npm:^0.1.3, deep-is@npm:~0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" checksum: edb65dd0d7d1b9c40b2f50219aef30e116cedd6fc79290e740972c132c09106d2e80aa0bc8826673dd5a00222d4179c84b36a790eef63a4c4bca75a37ef90804 languageName: node linkType: hard -"deepmerge-ts@npm:4.2.2, deepmerge-ts@npm:^4.2.2": - version: 4.2.2 - resolution: "deepmerge-ts@npm:4.2.2" - checksum: 137c3650519d9b1a220db7e23a3f56304cd02e7f97b2b8392e2767251055a29318425bacdb2ab2ff175a4645f7179643acf0e038d5dafbfdbc11bdf322f79697 +"deep-object-diff@npm:^1.1.9": + version: 1.1.9 + resolution: "deep-object-diff@npm:1.1.9" + checksum: ecd42455e4773f653595d28070295e7aaa8402db5f8ab21d0bec115a7cb4de5e207a5665514767da5f025c96597f1d3a0a4888aeb4dd49e03c996871a3aa05ef languageName: node linkType: hard "deepmerge@npm:^4.2.2": - version: 4.2.2 - resolution: "deepmerge@npm:4.2.2" - checksum: a8c43a1ed8d6d1ed2b5bf569fa4c8eb9f0924034baf75d5d406e47e157a451075c4db353efea7b6bcc56ec48116a8ce72fccf867b6e078e7c561904b5897530b + version: 4.3.1 + resolution: "deepmerge@npm:4.3.1" + checksum: 2024c6a980a1b7128084170c4cf56b0fd58a63f2da1660dcfe977415f27b17dbe5888668b59d0b063753f3220719d5e400b7f113609489c90160bb9a5518d052 languageName: node linkType: hard -"default-browser-id@npm:^3.0.0": +"default-browser-id@npm:3.0.0, default-browser-id@npm:^3.0.0": version: 3.0.0 resolution: "default-browser-id@npm:3.0.0" dependencies: @@ -8050,15 +11117,15 @@ __metadata: languageName: node linkType: hard -"default-browser@npm:^3.1.0": - version: 3.1.0 - resolution: "default-browser@npm:3.1.0" +"default-browser@npm:^4.0.0": + version: 4.0.0 + resolution: "default-browser@npm:4.0.0" dependencies: bundle-name: ^3.0.0 default-browser-id: ^3.0.0 - execa: ^5.0.0 - xdg-default-browser: ^2.1.0 - checksum: 651505a396522c2a12445443924577a1fd45f1ddf174ed08b4abb626b7ac9ce1a096d6d26aa02b4e8f0c830fe8385a75ed3247800bed16038854cd77aa33e433 + execa: ^7.1.1 + titleize: ^3.0.0 + checksum: 40c5af984799042b140300be5639c9742599bda76dc9eba5ac9ad5943c83dd36cebc4471eafcfddf8e0ec817166d5ba89d56f08e66a126c7c7908a179cead1a7 languageName: node linkType: hard @@ -8071,10 +11138,10 @@ __metadata: languageName: node linkType: hard -"defer-to-connect@npm:^1.0.1": - version: 1.1.3 - resolution: "defer-to-connect@npm:1.1.3" - checksum: 9491b301dcfa04956f989481ba7a43c2231044206269eb4ab64a52d6639ee15b1252262a789eb4239fb46ab63e44d4e408641bae8e0793d640aee55398cb3930 +"defer-to-connect@npm:^2.0.0": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b languageName: node linkType: hard @@ -8085,20 +11152,55 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4": - version: 1.1.4 - resolution: "define-properties@npm:1.1.4" +"define-lazy-prop@npm:^3.0.0": + version: 3.0.0 + resolution: "define-lazy-prop@npm:3.0.0" + checksum: 54884f94caac0791bf6395a3ec530ce901cf71c47b0196b8754f3fd17edb6c0e80149c1214429d851873bb0d689dbe08dcedbb2306dc45c8534a5934723851b6 + languageName: node + linkType: hard + +"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": + version: 1.2.0 + resolution: "define-properties@npm:1.2.0" dependencies: has-property-descriptors: ^1.0.0 object-keys: ^1.1.1 - checksum: ce0aef3f9eb193562b5cfb79b2d2c86b6a109dfc9fdcb5f45d680631a1a908c06824ddcdb72b7573b54e26ace07f0a23420aaba0d5c627b34d2c1de8ef527e2b + checksum: e60aee6a19b102df4e2b1f301816804e81ab48bb91f00d0d935f269bf4b3f79c88b39e4f89eaa132890d23267335fd1140dfcd8d5ccd61031a0a2c41a54e33a6 languageName: node linkType: hard -"defu@npm:^6.1.0": - version: 6.1.0 - resolution: "defu@npm:6.1.0" - checksum: 403a9ba8ab08dca87576eb062fa488c5cc58a5c8601955f2325dcc077c23da8a68169591505654a8c70ca3567006516ef92a4c44129643f928c58c4e7281195a +"defu@npm:^6.1.2": + version: 6.1.2 + resolution: "defu@npm:6.1.2" + checksum: 2ec0ff8414d5a1ab2b8c7e9a79bbad6d97d23ea7ebf5dcf80c3c7ffd9715c30f84a3cc47b917379ea756b3db0dc4701ce6400e493a1ae1688dffcd0f884233b2 + languageName: node + linkType: hard + +"degenerator@npm:^3.0.2": + version: 3.0.4 + resolution: "degenerator@npm:3.0.4" + dependencies: + ast-types: ^0.13.2 + escodegen: ^1.8.1 + esprima: ^4.0.0 + vm2: ^3.9.17 + checksum: 99c27c9456095e32c4f6e01091d2b5c249f246b574487c52bca571e1e586b02d4b74a0ea7f22f30cc953c914383d02e2038d7d476a22f2704a8c1e88b671007d + languageName: node + linkType: hard + +"del@npm:^6.0.0": + version: 6.1.1 + resolution: "del@npm:6.1.1" + dependencies: + globby: ^11.0.1 + graceful-fs: ^4.2.4 + is-glob: ^4.0.1 + is-path-cwd: ^2.2.0 + is-path-inside: ^3.0.2 + p-map: ^4.0.0 + rimraf: ^3.0.2 + slash: ^3.0.0 + checksum: 563288b73b8b19a7261c47fd21a330eeab6e2acd7c6208c49790dfd369127120dd7836cdf0c1eca216b77c94782a81507eac6b4734252d3bef2795cb366996b6 languageName: node linkType: hard @@ -8116,38 +11218,31 @@ __metadata: languageName: node linkType: hard -"denque@npm:^2.0.1": +"denque@npm:^2.1.0": version: 2.1.0 resolution: "denque@npm:2.1.0" checksum: 1d4ae1d05e59ac3a3481e7b478293f4b4c813819342273f3d5b826c7ffa9753c520919ba264f377e09108d24ec6cf0ec0ac729a5686cbb8f32d797126c5dae74 languageName: node linkType: hard -"depd@npm:2.0.0": +"depd@npm:2.0.0, depd@npm:^2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" checksum: abbe19c768c97ee2eed6282d8ce3031126662252c58d711f646921c9623f9052e3e1906443066beec1095832f534e57c523b7333f8e7e0d93051ab6baef5ab3a languageName: node linkType: hard -"depd@npm:^1.1.2": - version: 1.1.2 - resolution: "depd@npm:1.1.2" - checksum: 6b406620d269619852885ce15965272b829df6f409724415e0002c8632ab6a8c0a08ec1f0bd2add05dc7bd7507606f7e2cc034fa24224ab829580040b835ecd9 - languageName: node - linkType: hard - -"dequal@npm:^2.0.0": +"dequal@npm:^2.0.0, dequal@npm:^2.0.2": version: 2.0.3 resolution: "dequal@npm:2.0.3" checksum: 8679b850e1a3d0ebbc46ee780d5df7b478c23f335887464023a631d1b9af051ad4a6595a44220f9ff8ff95a8ddccf019b5ad778a976fd7bbf77383d36f412f90 languageName: node linkType: hard -"destr@npm:^1.1.1": - version: 1.1.1 - resolution: "destr@npm:1.1.1" - checksum: 334886494cef39d39526061071b83384dee493b531a7a13f6705e92a168ebb072b45be4aba4179aaba88c4a32c3e35d8058d1357871179dbaf74890584199019 +"destr@npm:^1.2.2": + version: 1.2.2 + resolution: "destr@npm:1.2.2" + checksum: 3906b49513a64d8442dacb8b798c59d66257ded4ccd2ef1d99b58644d4aa6b30ca61f9a9823d3dcbc78b4db812596e53e85e499f39a498b3b165a045b5228b2b languageName: node linkType: hard @@ -8158,6 +11253,13 @@ __metadata: languageName: node linkType: hard +"detect-indent@npm:^6.0.0, detect-indent@npm:^6.1.0": + version: 6.1.0 + resolution: "detect-indent@npm:6.1.0" + checksum: ab953a73c72dbd4e8fc68e4ed4bfd92c97eb6c43734af3900add963fd3a9316f3bc0578b018b24198d4c31a358571eff5f0656e81a1f3b9ad5c547d58b2d093d + languageName: node + linkType: hard + "detect-libc@npm:^2.0.0, detect-libc@npm:^2.0.1": version: 2.0.1 resolution: "detect-libc@npm:2.0.1" @@ -8165,7 +11267,7 @@ __metadata: languageName: node linkType: hard -"detect-newline@npm:^3.0.0": +"detect-newline@npm:3.1.0, detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" checksum: ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 @@ -8179,20 +11281,49 @@ __metadata: languageName: node linkType: hard -"detect-node@npm:^2.0.4": - version: 2.1.0 - resolution: "detect-node@npm:2.1.0" - checksum: 832184ec458353e41533ac9c622f16c19f7c02d8b10c303dfd3a756f56be93e903616c0bb2d4226183c9351c15fc0b3dba41a17a2308262afabcfa3776e6ae6e +"detect-package-manager@npm:^2.0.1": + version: 2.0.1 + resolution: "detect-package-manager@npm:2.0.1" + dependencies: + execa: ^5.1.1 + checksum: e72b910182d5ad479198d4235be206ac64a479257b32201bb06f3c842cc34c65ea851d46f72cc1d4bf535bcc6c4b44b5b86bb29fe1192b8c9c07b46883672f28 languageName: node linkType: hard -"dezalgo@npm:1.0.3": - version: 1.0.3 - resolution: "dezalgo@npm:1.0.3" +"detect-port@npm:^1.3.0": + version: 1.5.1 + resolution: "detect-port@npm:1.5.1" + dependencies: + address: ^1.0.1 + debug: 4 + bin: + detect: bin/detect-port.js + detect-port: bin/detect-port.js + checksum: b48da9340481742547263d5d985e65d078592557863402ecf538511735e83575867e94f91fe74405ea19b61351feb99efccae7e55de9a151d5654e3417cea05b + languageName: node + linkType: hard + +"devtools-protocol@npm:0.0.1120988": + version: 0.0.1120988 + resolution: "devtools-protocol@npm:0.0.1120988" + checksum: 68eb7aa6a2fe20f8321168f9381849296b203355a5c052461b7ed95e8787b34458029dd64c8d4a8640d9fd329138a6d82f41237f5331ea4267c090dcbf6581f7 + languageName: node + linkType: hard + +"devtools-protocol@npm:0.0.1130274": + version: 0.0.1130274 + resolution: "devtools-protocol@npm:0.0.1130274" + checksum: ccd5b01bc251d69e33aab5fcecce52049b9f2b50f92d55c7f966741ddf9b03b65f6dd2c1fcb620516c15b6eca5b48dffadd2b806b3b2fb7586558613850ecb33 + languageName: node + linkType: hard + +"dezalgo@npm:^1.0.4": + version: 1.0.4 + resolution: "dezalgo@npm:1.0.4" dependencies: asap: ^2.0.0 wrappy: 1 - checksum: 8b26238db91423b2702a7a6d9629d0019c37c415e7b6e75d4b3e8d27e9464e21cac3618dd145f4d4ee96c70cc6ff034227b5b8a0e9c09015a8bdbe6dace3cfb9 + checksum: 895389c6aead740d2ab5da4d3466d20fa30f738010a4d3f4dcccc9fc645ca31c9d10b7e1804ae489b1eb02c7986f9f1f34ba132d409b043082a86d9a4e745624 languageName: node linkType: hard @@ -8203,17 +11334,10 @@ __metadata: languageName: node linkType: hard -"diff-sequences@npm:^29.0.0": - version: 29.0.0 - resolution: "diff-sequences@npm:29.0.0" - checksum: 2c084a3db03ecde26f649f6f2559974e01e174451debeb301a7e17199e73423a8e8ddeb9a35ae38638c084b4fa51296a4a20fa7f44f3db0c0ba566bdc704ed3d - languageName: node - linkType: hard - -"diff-sequences@npm:^29.2.0": - version: 29.2.0 - resolution: "diff-sequences@npm:29.2.0" - checksum: e7b874cc7a4ce76fd199794c4d5fabb099ab4bce069592407ac2933e3a10e05f035111498e2f2c86572f5cfa9668a191b09e79f1d967dc39d9ca0a12aacde41a +"diff-sequences@npm:^29.4.3": + version: 29.4.3 + resolution: "diff-sequences@npm:29.4.3" + checksum: 28b265e04fdddcf7f9f814effe102cc95a9dec0564a579b5aed140edb24fc345c611ca52d76d725a3cab55d3888b915b5e8a4702e0f6058968a90fa5f41fcde7 languageName: node linkType: hard @@ -8231,7 +11355,7 @@ __metadata: languageName: node linkType: hard -"diff@npm:^5.0.0, diff@npm:^5.1.0": +"diff@npm:^5.0.0": version: 5.1.0 resolution: "diff@npm:5.1.0" checksum: c7bf0df7c9bfbe1cf8a678fd1b2137c4fb11be117a67bc18a0e03ae75105e8533dbfb1cda6b46beb3586ef5aed22143ef9d70713977d5fb1f9114e21455fba90 @@ -8247,19 +11371,10 @@ __metadata: languageName: node linkType: hard -"direction@npm:^2.0.0": - version: 2.0.1 - resolution: "direction@npm:2.0.1" - bin: - direction: cli.js - checksum: 30d2d93ff284b8b55adeeba28204f8f9d357361510d08fea621c64387be908e3c16b52b7383f36122d3c2be8c8a634e98dc36037e7e0cce3e07d296896c629e3 - languageName: node - linkType: hard - -"discord-api-types@npm:^0.37.15": - version: 0.37.15 - resolution: "discord-api-types@npm:0.37.15" - checksum: c54d2feeb8074509bdda430fb8ec0f6ff315512e7327d47399e0e7a78bbd0a6f0f0dcfc4b5e39825eb6141a13f33efa942711af89c9a5936a721cfc1e1d69d19 +"discord-api-types@npm:^0.37.42": + version: 0.37.42 + resolution: "discord-api-types@npm:0.37.42" + checksum: 3c4f78beae6e18ee8afbaf9e911ccc4ad6b0658c18ea5b95e35f0dc7e56f2cd32b69c16062ab014cce093140ba98d95172e83039cd197fe618873e72a4d26a8b languageName: node linkType: hard @@ -8270,53 +11385,49 @@ __metadata: "@discordjs/builders": "workspace:^" "@discordjs/collection": "workspace:^" "@discordjs/docgen": "workspace:^" + "@discordjs/formatters": "workspace:^" "@discordjs/rest": "workspace:^" "@discordjs/util": "workspace:^" - "@favware/cliff-jumper": ^1.8.8 - "@sapphire/snowflake": ^3.2.2 - "@types/node": 16.11.68 - "@types/ws": ^8.5.3 - discord-api-types: ^0.37.15 + "@discordjs/ws": "workspace:^" + "@favware/cliff-jumper": ^2.0.0 + "@sapphire/snowflake": ^3.5.1 + "@types/node": 16.18.32 + "@types/ws": ^8.5.4 + discord-api-types: ^0.37.42 dtslint: ^4.2.1 - eslint: ^8.25.0 - eslint-formatter-pretty: ^4.1.0 + eslint: ^8.41.0 + eslint-formatter-pretty: ^5.0.0 fast-deep-equal: ^3.1.3 - jest: ^29.2.1 + jest: ^29.5.0 lodash.snakecase: ^4.1.1 - prettier: ^2.7.1 - tsd: ^0.24.1 - tslib: ^2.4.0 + prettier: ^2.8.8 + tsd: ^0.28.1 + tslib: ^2.5.2 tslint: ^6.1.3 - typescript: ^4.8.4 - undici: ^5.11.0 - ws: ^8.9.0 + turbo: ^1.9.8 + typescript: ^5.0.4 + undici: ^5.22.1 + ws: ^8.13.0 languageName: unknown linkType: soft -"dlv@npm:^1.1.3": - version: 1.1.3 - resolution: "dlv@npm:1.1.3" - checksum: d7381bca22ed11933a1ccf376db7a94bee2c57aa61e490f680124fa2d1cd27e94eba641d9f45be57caab4f9a6579de0983466f620a2cd6230d7ec93312105ae7 - languageName: node - linkType: hard - -"dmd@npm:^6.1.0": - version: 6.1.0 - resolution: "dmd@npm:6.1.0" +"dmd@npm:^6.2.0": + version: 6.2.0 + resolution: "dmd@npm:6.2.0" dependencies: array-back: ^6.2.2 cache-point: ^2.0.0 common-sequence: ^2.0.2 file-set: ^4.0.2 handlebars: ^4.7.7 - marked: ^4.0.12 + marked: ^4.2.3 object-get: ^2.1.1 reduce-flatten: ^3.0.1 reduce-unique: ^2.0.1 reduce-without: ^1.0.1 test-value: ^3.0.0 walk-back: ^5.1.0 - checksum: 3ae5730dac70e261c321299b2a4b355822660ab54da8a75d1521cc3f9cf8546c634fea7d42f24e3374ca7b34895590fdd92e536caf1f18c2a0db12eff3aa18e4 + checksum: c10a10c466b78ed320cf2b3bd1a34fe39a2efbe0845db39158c61d85d1374cc072f2ad7e73ded2c9767828d5f2afaa96c73f88053aa9df50b3f344d6649a9893 languageName: node linkType: hard @@ -8339,9 +11450,9 @@ __metadata: linkType: hard "dom-accessibility-api@npm:^0.5.9": - version: 0.5.14 - resolution: "dom-accessibility-api@npm:0.5.14" - checksum: 782c813f75a09ba6735ef03b5e1624406a3829444ae49d5bdedd272a49d437ae3354f53e02ffc8c9fd9165880250f41546538f27461f839dd4ea1234e77e8d5e + version: 0.5.16 + resolution: "dom-accessibility-api@npm:0.5.16" + checksum: 005eb283caef57fc1adec4d5df4dd49189b628f2f575af45decb210e04d634459e3f1ee64f18b41e2dcf200c844bc1d9279d80807e686a30d69a4756151ad248 languageName: node linkType: hard @@ -8356,67 +11467,39 @@ __metadata: languageName: node linkType: hard -"dom-serializer@npm:^1.0.1": - version: 1.4.1 - resolution: "dom-serializer@npm:1.4.1" - dependencies: - domelementtype: ^2.0.1 - domhandler: ^4.2.0 - entities: ^2.0.0 - checksum: fbb0b01f87a8a2d18e6e5a388ad0f7ec4a5c05c06d219377da1abc7bb0f674d804f4a8a94e3f71ff15f6cb7dcfc75704a54b261db672b9b3ab03da6b758b0b22 - languageName: node - linkType: hard - -"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0": - version: 2.3.0 - resolution: "domelementtype@npm:2.3.0" - checksum: ee837a318ff702622f383409d1f5b25dd1024b692ef64d3096ff702e26339f8e345820f29a68bcdcea8cfee3531776b3382651232fbeae95612d6f0a75efb4f6 - languageName: node - linkType: hard - -"domhandler@npm:^4.2.0, domhandler@npm:^4.3.1": - version: 4.3.1 - resolution: "domhandler@npm:4.3.1" +"dot-prop@npm:^5.1.0, dot-prop@npm:^5.2.0": + version: 5.3.0 + resolution: "dot-prop@npm:5.3.0" dependencies: - domelementtype: ^2.2.0 - checksum: 4c665ceed016e1911bf7d1dadc09dc888090b64dee7851cccd2fcf5442747ec39c647bb1cb8c8919f8bbdd0f0c625a6bafeeed4b2d656bbecdbae893f43ffaaa + is-obj: ^2.0.0 + checksum: d5775790093c234ef4bfd5fbe40884ff7e6c87573e5339432870616331189f7f5d86575c5b5af2dcf0f61172990f4f734d07844b1f23482fff09e3c4bead05ea languageName: node linkType: hard -"domutils@npm:^2.8.0": - version: 2.8.0 - resolution: "domutils@npm:2.8.0" - dependencies: - dom-serializer: ^1.0.1 - domelementtype: ^2.2.0 - domhandler: ^4.2.0 - checksum: abf7434315283e9aadc2a24bac0e00eab07ae4313b40cc239f89d84d7315ebdfd2fb1b5bf750a96bc1b4403d7237c7b2ebf60459be394d625ead4ca89b934391 +"dotenv-expand@npm:^10.0.0": + version: 10.0.0 + resolution: "dotenv-expand@npm:10.0.0" + checksum: 2a38b470efe0abcb1ac8490421a55e1d764dc9440fd220942bce40965074f3fb00b585f4346020cb0f0f219966ee6b4ee5023458b3e2953fe5b3214de1b314ee languageName: node linkType: hard -"dot-case@npm:^3.0.4": - version: 3.0.4 - resolution: "dot-case@npm:3.0.4" - dependencies: - no-case: ^3.0.4 - tslib: ^2.0.3 - checksum: a65e3519414856df0228b9f645332f974f2bf5433370f544a681122eab59e66038fc3349b4be1cdc47152779dac71a5864f1ccda2f745e767c46e9c6543b1169 +"dotenv@npm:^16.0.0": + version: 16.0.3 + resolution: "dotenv@npm:16.0.3" + checksum: afcf03f373d7a6d62c7e9afea6328e62851d627a4e73f2e12d0a8deae1cd375892004f3021883f8aec85932cd2834b091f568ced92b4774625b321db83b827f8 languageName: node linkType: hard -"dot-prop@npm:^5.1.0, dot-prop@npm:^5.2.0": - version: 5.3.0 - resolution: "dot-prop@npm:5.3.0" +"downlevel-dts@npm:^0.11.0": + version: 0.11.0 + resolution: "downlevel-dts@npm:0.11.0" dependencies: - is-obj: ^2.0.0 - checksum: d5775790093c234ef4bfd5fbe40884ff7e6c87573e5339432870616331189f7f5d86575c5b5af2dcf0f61172990f4f734d07844b1f23482fff09e3c4bead05ea - languageName: node - linkType: hard - -"dset@npm:^3.1.2": - version: 3.1.2 - resolution: "dset@npm:3.1.2" - checksum: 4f8066f517aa0a70af688c66e9a0a5590f0aada76f6edc7ba9ddb309e27d3a6d65c0a2e31ab2a84005d4c791e5327773cdde59b8ab169050330a0dc283663e87 + semver: ^7.3.2 + shelljs: ^0.8.3 + typescript: next + bin: + downlevel-dts: index.js + checksum: 846ad69da03795340b2fbd9432ff41605b885bf5a7d6636faa86342e91d9e4b27a49c2f68380a2f7ba26ddc28a11b3b02581a41c6b5c7034b8b0fb099c017307 languageName: node linkType: hard @@ -8458,13 +11541,6 @@ __metadata: languageName: node linkType: hard -"duplexer3@npm:^0.1.4": - version: 0.1.5 - resolution: "duplexer3@npm:0.1.5" - checksum: e677cb4c48f031ca728601d6a20bf6aed4c629d69ef9643cb89c67583d673c4ec9317cc6427501f38bd8c368d3a18f173987cc02bd99d8cf8fe3d94259a22a20 - languageName: node - linkType: hard - "duplexer@npm:^0.1.2": version: 0.1.2 resolution: "duplexer@npm:0.1.2" @@ -8472,6 +11548,18 @@ __metadata: languageName: node linkType: hard +"duplexify@npm:^3.5.0, duplexify@npm:^3.6.0": + version: 3.7.1 + resolution: "duplexify@npm:3.7.1" + dependencies: + end-of-stream: ^1.0.0 + inherits: ^2.0.1 + readable-stream: ^2.0.0 + stream-shift: ^1.0.0 + checksum: 3c2ed2223d956a5da713dae12ba8295acb61d9acd966ccbba938090d04f4574ca4dca75cca089b5077c2d7e66101f32e6ea9b36a78ca213eff574e7a8b8accf2 + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -8489,14 +11577,14 @@ __metadata: languageName: node linkType: hard -"edge-runtime@npm:1.1.0-beta.40": - version: 1.1.0-beta.40 - resolution: "edge-runtime@npm:1.1.0-beta.40" +"edge-runtime@npm:2.1.4": + version: 2.1.4 + resolution: "edge-runtime@npm:2.1.4" dependencies: - "@edge-runtime/format": 1.1.0-beta.34 - "@edge-runtime/vm": 1.1.0-beta.37 + "@edge-runtime/format": 2.0.1 + "@edge-runtime/vm": 2.1.2 + async-listen: 2.0.3 exit-hook: 2.2.1 - http-status: 1.5.3 mri: 1.2.0 picocolors: 1.0.0 pretty-bytes: 5.6.0 @@ -8504,7 +11592,7 @@ __metadata: time-span: 4.0.0 bin: edge-runtime: dist/cli/index.js - checksum: 7094c8df29480a3eac05d7b2828e5a3c3a6139acc6df9b98d3087e43278af98d6ca4d168d8f8705d85f3aeb62dc7f196f4bda4c8f5f463fb3482dc0183f77ed1 + checksum: 726901aec8d1b023938400a8fe3e2616dea27332f9ac9a31ecdf0c5f0bf0a046a2b96d15299a5eb2ea0eb3457a0729a459aa55d771416b4f080b7350ddaf264f languageName: node linkType: hard @@ -8515,27 +11603,35 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.251": - version: 1.4.277 - resolution: "electron-to-chromium@npm:1.4.277" - checksum: 05002adf87dbaa6beb3895b7d64a1ee9442d46d5765582c71fc47c9aa8a4e710ada9939ce33bcd92da7c6fe61099462e036890b2edd21200c7f694309b31ea08 +"ejs@npm:^3.1.8": + version: 3.1.9 + resolution: "ejs@npm:3.1.9" + dependencies: + jake: ^10.8.5 + bin: + ejs: bin/cli.js + checksum: af6f10eb815885ff8a8cfacc42c6b6cf87daf97a4884f87a30e0c3271fedd85d76a3a297d9c33a70e735b97ee632887f85e32854b9cdd3a2d97edf931519a35f languageName: node linkType: hard -"emittery@npm:^0.10.2": - version: 0.10.2 - resolution: "emittery@npm:0.10.2" - checksum: ee3e21788b043b90885b18ea756ec3105c1cedc50b29709c92b01e239c7e55345d4bb6d3aef4ddbaf528eef448a40b3bb831bad9ee0fc9c25cbf1367ab1ab5ac +"electron-to-chromium@npm:^1.4.284": + version: 1.4.404 + resolution: "electron-to-chromium@npm:1.4.404" + checksum: 40e9ce607877e5d2a0578e78a3bd461ca6574cefb738f2dd82c171fad124c833cb078844947d9d21d6e6cf13a7d9b75b500ef4522c8cc67e99ad47d6b36cf078 languageName: node linkType: hard -"emmet@npm:^2.3.0": - version: 2.3.6 - resolution: "emmet@npm:2.3.6" - dependencies: - "@emmetio/abbreviation": ^2.2.3 - "@emmetio/css-abbreviation": ^2.1.4 - checksum: 96d56212d76023b7ecd4fd3b269a6b85b5a38d95d3135557d6321e38955e9c322d75b135435678d7697ed3d56741494ebf3f3974b74f2b89292b65565447ba4b +"emittery@npm:^0.13.1": + version: 0.13.1 + resolution: "emittery@npm:0.13.1" + checksum: 2b089ab6306f38feaabf4f6f02792f9ec85fc054fda79f44f6790e61bbf6bc4e1616afb9b232e0c5ec5289a8a452f79bfa6d905a6fd64e94b49981f0934001c6 + languageName: node + linkType: hard + +"emoji-regex@npm:^10.2.1": + version: 10.2.1 + resolution: "emoji-regex@npm:10.2.1" + checksum: 1aa2d16881c56531fdfc03d0b36f5c2b6221cc4097499a5665b88b711dc3fb4d5b8804f0ca6f00c56e5dcf89bac75f0487eee85da1da77df3a33accc6ecbe426 languageName: node linkType: hard @@ -8553,6 +11649,13 @@ __metadata: languageName: node linkType: hard +"emojis-list@npm:^3.0.0": + version: 3.0.0 + resolution: "emojis-list@npm:3.0.0" + checksum: ddaaa02542e1e9436c03970eeed445f4ed29a5337dfba0fe0c38dfdd2af5da2429c2a0821304e8a8d1cadf27fdd5b22ff793571fa803ae16852a6975c65e8e70 + languageName: node + linkType: hard + "encodeurl@npm:~1.0.2": version: 1.0.2 resolution: "encodeurl@npm:1.0.2" @@ -8569,7 +11672,7 @@ __metadata: languageName: node linkType: hard -"end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": +"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": version: 1.4.4 resolution: "end-of-stream@npm:1.4.4" dependencies: @@ -8578,17 +11681,38 @@ __metadata: languageName: node linkType: hard -"entities@npm:^2.0.0": - version: 2.2.0 - resolution: "entities@npm:2.2.0" - checksum: 19010dacaf0912c895ea262b4f6128574f9ccf8d4b3b65c7e8334ad0079b3706376360e28d8843ff50a78aabcb8f08f0a32dbfacdc77e47ed77ca08b713669b3 +"end-of-stream@npm:~1.1.0": + version: 1.1.0 + resolution: "end-of-stream@npm:1.1.0" + dependencies: + once: ~1.3.0 + checksum: 9fa637e259e50e5e3634e8e14064a183bd0d407733594631362f9df596409739bef5f7064840e6725212a9edc8b4a70a5a3088ac423e8564f9dc183dd098c719 languageName: node linkType: hard -"entities@npm:^4.3.1": - version: 4.4.0 - resolution: "entities@npm:4.4.0" - checksum: 84d250329f4b56b40fa93ed067b194db21e8815e4eb9b59f43a086f0ecd342814f6bc483de8a77da5d64e0f626033192b1b4f1792232a7ea6b970ebe0f3187c2 +"enhanced-resolve@npm:^5.12.0": + version: 5.14.0 + resolution: "enhanced-resolve@npm:5.14.0" + dependencies: + graceful-fs: ^4.2.4 + tapable: ^2.2.0 + checksum: fff1aaebbf376371e5df4502e111967f6247c37611ad3550e4e7fca657f6dcb29ef7ffe88bf14e5010b78997f1ddd984a8db97af87ee0a5477771398fd326f5b + languageName: node + linkType: hard + +"enquirer@npm:^2.3.6": + version: 2.3.6 + resolution: "enquirer@npm:2.3.6" + dependencies: + ansi-colors: ^4.1.1 + checksum: 1c0911e14a6f8d26721c91e01db06092a5f7675159f0261d69c403396a385afd13dd76825e7678f66daffa930cfaa8d45f506fb35f818a2788463d022af1b884 + languageName: node + linkType: hard + +"entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 853f8ebd5b425d350bffa97dd6958143179a5938352ccae092c62d1267c4e392a039be1bae7d51b6e4ffad25f51f9617531fedf5237f15df302ccfb452cbf2d7 languageName: node linkType: hard @@ -8606,10 +11730,12 @@ __metadata: languageName: node linkType: hard -"eol@npm:^0.9.1": - version: 0.9.1 - resolution: "eol@npm:0.9.1" - checksum: ba9fa998bc8148b935dcf85585eacf049eeaf18d2ab6196710d4d1f59e7dfd0e87b18508dc67144ff8ba12f835a4a4989aeea64c98b13cca77b74b9d4b33bce5 +"envinfo@npm:^7.7.3": + version: 7.8.1 + resolution: "envinfo@npm:7.8.1" + bin: + envinfo: dist/cli.js + checksum: de736c98d6311c78523628ff127af138451b162e57af5293c1b984ca821d0aeb9c849537d2fde0434011bed33f6bca5310ca2aab8a51a3f28fc719e89045d648 languageName: node linkType: hard @@ -8620,7 +11746,7 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.3.1": +"error-ex@npm:^1.3.1, error-ex@npm:^1.3.2": version: 1.3.2 resolution: "error-ex@npm:1.3.2" dependencies: @@ -8638,49 +11764,80 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1, es-abstract@npm:^1.19.2, es-abstract@npm:^1.19.5, es-abstract@npm:^1.20.1": - version: 1.20.4 - resolution: "es-abstract@npm:1.20.4" +"es-abstract@npm:^1.19.0, es-abstract@npm:^1.20.4": + version: 1.21.2 + resolution: "es-abstract@npm:1.21.2" dependencies: + array-buffer-byte-length: ^1.0.0 + available-typed-arrays: ^1.0.5 call-bind: ^1.0.2 + es-set-tostringtag: ^2.0.1 es-to-primitive: ^1.2.1 - function-bind: ^1.1.1 function.prototype.name: ^1.1.5 - get-intrinsic: ^1.1.3 + get-intrinsic: ^1.2.0 get-symbol-description: ^1.0.0 + globalthis: ^1.0.3 + gopd: ^1.0.1 has: ^1.0.3 has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 has-symbols: ^1.0.3 - internal-slot: ^1.0.3 + internal-slot: ^1.0.5 + is-array-buffer: ^3.0.2 is-callable: ^1.2.7 is-negative-zero: ^2.0.2 is-regex: ^1.1.4 is-shared-array-buffer: ^1.0.2 is-string: ^1.0.7 + is-typed-array: ^1.1.10 is-weakref: ^1.0.2 - object-inspect: ^1.12.2 + object-inspect: ^1.12.3 object-keys: ^1.1.1 object.assign: ^4.1.4 regexp.prototype.flags: ^1.4.3 safe-regex-test: ^1.0.0 - string.prototype.trimend: ^1.0.5 - string.prototype.trimstart: ^1.0.5 + string.prototype.trim: ^1.2.7 + string.prototype.trimend: ^1.0.6 + string.prototype.trimstart: ^1.0.6 + typed-array-length: ^1.0.4 unbox-primitive: ^1.0.2 - checksum: 89297cc785c31aedf961a603d5a07ed16471e435d3a1b6d070b54f157cf48454b95cda2ac55e4b86ff4fe3276e835fcffd2771578e6fa634337da49b26826141 + which-typed-array: ^1.1.9 + checksum: 037f55ee5e1cdf2e5edbab5524095a4f97144d95b94ea29e3611b77d852fd8c8a40e7ae7101fa6a759a9b9b1405f188c3c70928f2d3cd88d543a07fc0d5ad41a languageName: node linkType: hard -"es-array-method-boxes-properly@npm:^1.0.0": - version: 1.0.0 - resolution: "es-array-method-boxes-properly@npm:1.0.0" - checksum: 2537fcd1cecf187083890bc6f5236d3a26bf39237433587e5bf63392e88faae929dbba78ff0120681a3f6f81c23fe3816122982c160d63b38c95c830b633b826 +"es-get-iterator@npm:^1.1.3": + version: 1.1.3 + resolution: "es-get-iterator@npm:1.1.3" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + has-symbols: ^1.0.3 + is-arguments: ^1.1.1 + is-map: ^2.0.2 + is-set: ^2.0.2 + is-string: ^1.0.7 + isarray: ^2.0.5 + stop-iteration-iterator: ^1.0.0 + checksum: 8fa118da42667a01a7c7529f8a8cca514feeff243feec1ce0bb73baaa3514560bd09d2b3438873cf8a5aaec5d52da248131de153b28e2638a061b6e4df13267d + languageName: node + linkType: hard + +"es-module-lexer@npm:^0.9.3": + version: 0.9.3 + resolution: "es-module-lexer@npm:0.9.3" + checksum: 84bbab23c396281db2c906c766af58b1ae2a1a2599844a504df10b9e8dc77ec800b3211fdaa133ff700f5703d791198807bba25d9667392d27a5e9feda344da8 languageName: node linkType: hard -"es-module-lexer@npm:^0.10.5": - version: 0.10.5 - resolution: "es-module-lexer@npm:0.10.5" - checksum: d2f9debd9d913323322095934653e0558bb8220177645eb76d316b4afd911e8d83ffee0b748b0faa9f3ce1560db3eee4a0ac68d6c2f750c11f4250adce84cf02 +"es-set-tostringtag@npm:^2.0.1": + version: 2.0.1 + resolution: "es-set-tostringtag@npm:2.0.1" + dependencies: + get-intrinsic: ^1.1.3 + has: ^1.0.3 + has-tostringtag: ^1.0.0 + checksum: ec416a12948cefb4b2a5932e62093a7cf36ddc3efd58d6c58ca7ae7064475ace556434b869b0bbeb0c365f1032a8ccd577211101234b69837ad83ad204fff884 languageName: node linkType: hard @@ -8704,10 +11861,10 @@ __metadata: languageName: node linkType: hard -"es6-error@npm:^4.1.1": - version: 4.1.1 - resolution: "es6-error@npm:4.1.1" - checksum: ae41332a51ec1323da6bbc5d75b7803ccdeddfae17c41b6166ebbafc8e8beb7a7b80b884b7fab1cc80df485860ac3c59d78605e860bb4f8cd816b3d6ade0d010 +"es6-object-assign@npm:^1.1.0": + version: 1.1.0 + resolution: "es6-object-assign@npm:1.1.0" + checksum: 8d4fdf63484d78b5c64cacc2c2e1165bc7b6a64b739d2a9db6a4dc8641d99cc9efb433cdd4dc3d3d6b00bfa6ce959694e4665e3255190339945c5f33b692b5d8 languageName: node linkType: hard @@ -8718,20 +11875,6 @@ __metadata: languageName: node linkType: hard -"esbuild-android-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-android-64@npm:0.14.54" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"esbuild-android-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-android-64@npm:0.15.10" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - "esbuild-android-arm64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-android-arm64@npm:0.14.47" @@ -8739,20 +11882,6 @@ __metadata: languageName: node linkType: hard -"esbuild-android-arm64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-android-arm64@npm:0.14.54" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-android-arm64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-android-arm64@npm:0.15.10" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - "esbuild-darwin-64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-darwin-64@npm:0.14.47" @@ -8760,20 +11889,6 @@ __metadata: languageName: node linkType: hard -"esbuild-darwin-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-darwin-64@npm:0.14.54" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"esbuild-darwin-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-darwin-64@npm:0.15.10" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "esbuild-darwin-arm64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-darwin-arm64@npm:0.14.47" @@ -8781,20 +11896,6 @@ __metadata: languageName: node linkType: hard -"esbuild-darwin-arm64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-darwin-arm64@npm:0.14.54" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-darwin-arm64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-darwin-arm64@npm:0.15.10" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "esbuild-freebsd-64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-freebsd-64@npm:0.14.47" @@ -8802,20 +11903,6 @@ __metadata: languageName: node linkType: hard -"esbuild-freebsd-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-freebsd-64@npm:0.14.54" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"esbuild-freebsd-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-freebsd-64@npm:0.15.10" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - "esbuild-freebsd-arm64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-freebsd-arm64@npm:0.14.47" @@ -8823,20 +11910,6 @@ __metadata: languageName: node linkType: hard -"esbuild-freebsd-arm64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-freebsd-arm64@npm:0.14.54" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-freebsd-arm64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-freebsd-arm64@npm:0.15.10" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - "esbuild-linux-32@npm:0.14.47": version: 0.14.47 resolution: "esbuild-linux-32@npm:0.14.47" @@ -8844,20 +11917,6 @@ __metadata: languageName: node linkType: hard -"esbuild-linux-32@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-32@npm:0.14.54" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"esbuild-linux-32@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-32@npm:0.15.10" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - "esbuild-linux-64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-linux-64@npm:0.14.47" @@ -8865,20 +11924,6 @@ __metadata: languageName: node linkType: hard -"esbuild-linux-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-64@npm:0.14.54" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"esbuild-linux-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-64@npm:0.15.10" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - "esbuild-linux-arm64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-linux-arm64@npm:0.14.47" @@ -8886,20 +11931,6 @@ __metadata: languageName: node linkType: hard -"esbuild-linux-arm64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-arm64@npm:0.14.54" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-linux-arm64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-arm64@npm:0.15.10" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - "esbuild-linux-arm@npm:0.14.47": version: 0.14.47 resolution: "esbuild-linux-arm@npm:0.14.47" @@ -8907,37 +11938,9 @@ __metadata: languageName: node linkType: hard -"esbuild-linux-arm@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-arm@npm:0.14.54" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"esbuild-linux-arm@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-arm@npm:0.15.10" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - "esbuild-linux-mips64le@npm:0.14.47": version: 0.14.47 - resolution: "esbuild-linux-mips64le@npm:0.14.47" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"esbuild-linux-mips64le@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-mips64le@npm:0.14.54" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"esbuild-linux-mips64le@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-mips64le@npm:0.15.10" + resolution: "esbuild-linux-mips64le@npm:0.14.47" conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -8949,20 +11952,6 @@ __metadata: languageName: node linkType: hard -"esbuild-linux-ppc64le@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-ppc64le@npm:0.14.54" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"esbuild-linux-ppc64le@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-ppc64le@npm:0.15.10" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - "esbuild-linux-riscv64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-linux-riscv64@npm:0.14.47" @@ -8970,20 +11959,6 @@ __metadata: languageName: node linkType: hard -"esbuild-linux-riscv64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-riscv64@npm:0.14.54" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"esbuild-linux-riscv64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-riscv64@npm:0.15.10" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - "esbuild-linux-s390x@npm:0.14.47": version: 0.14.47 resolution: "esbuild-linux-s390x@npm:0.14.47" @@ -8991,20 +11966,6 @@ __metadata: languageName: node linkType: hard -"esbuild-linux-s390x@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-linux-s390x@npm:0.14.54" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"esbuild-linux-s390x@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-linux-s390x@npm:0.15.10" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - "esbuild-netbsd-64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-netbsd-64@npm:0.14.47" @@ -9012,20 +11973,6 @@ __metadata: languageName: node linkType: hard -"esbuild-netbsd-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-netbsd-64@npm:0.14.54" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"esbuild-netbsd-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-netbsd-64@npm:0.15.10" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - "esbuild-openbsd-64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-openbsd-64@npm:0.14.47" @@ -9033,46 +11980,48 @@ __metadata: languageName: node linkType: hard -"esbuild-openbsd-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-openbsd-64@npm:0.14.54" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"esbuild-openbsd-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-openbsd-64@npm:0.15.10" - conditions: os=openbsd & cpu=x64 +"esbuild-plugin-alias@npm:^0.2.1": + version: 0.2.1 + resolution: "esbuild-plugin-alias@npm:0.2.1" + checksum: afe2d2c8b5f09d5321cb8d9c0825e8a9f6e03c2d50df92f953a291d4620cc29eddb3da9e33b238f6d8f77738e0277bdcb831f127399449fecf78fb84c04e5da9 languageName: node linkType: hard -"esbuild-plugin-version-injector@npm:^1.0.0": - version: 1.0.0 - resolution: "esbuild-plugin-version-injector@npm:1.0.0" +"esbuild-plugin-polyfill-node@npm:^0.2.0": + version: 0.2.0 + resolution: "esbuild-plugin-polyfill-node@npm:0.2.0" dependencies: - "@sapphire/result": ^2.5.0 - checksum: 2a6eb3f2b3d3d24c6ca8af28925ad8e6f6d0a75f41cdb089bd76c7a74fbd6948d8f64563aa58bd65751054a28be0cfc081a0f56102a1952a5ba4ac541c2ff336 + "@jspm/core": ^2.0.1 + import-meta-resolve: ^2.2.2 + peerDependencies: + esbuild: "*" + checksum: 950f77f1ca7bda58982f38509384eb25ab4878e9356c71137cd1cfb243f5adaebca4166978efde62b309c43d65e8e2f5d2712a0a395bb1718e1681c5d4d8bac3 languageName: node linkType: hard -"esbuild-sunos-64@npm:0.14.47": - version: 0.14.47 - resolution: "esbuild-sunos-64@npm:0.14.47" - conditions: os=sunos & cpu=x64 +"esbuild-plugin-version-injector@npm:^1.1.0": + version: 1.1.0 + resolution: "esbuild-plugin-version-injector@npm:1.1.0" + dependencies: + "@sapphire/result": ^2.6.0 + checksum: 441a379eba7979eae9423056097aab7db9ea049967f322a3a65bec8fc361cf352d41425383954d0954a05cb38c3b5c035e8d11e629e78b9d85dae9f7b9360eea languageName: node linkType: hard -"esbuild-sunos-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-sunos-64@npm:0.14.54" - conditions: os=sunos & cpu=x64 +"esbuild-register@npm:^3.4.0": + version: 3.4.2 + resolution: "esbuild-register@npm:3.4.2" + dependencies: + debug: ^4.3.4 + peerDependencies: + esbuild: ">=0.12 <1" + checksum: f65d1ccb58b1ccbba376efb1fc023abe22731d9b79eead1b0120e57d4413318f063696257a5af637b527fa1d3f009095aa6edb1bf6ff69d637a9ab281fb727b3 languageName: node linkType: hard -"esbuild-sunos-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-sunos-64@npm:0.15.10" +"esbuild-sunos-64@npm:0.14.47": + version: 0.14.47 + resolution: "esbuild-sunos-64@npm:0.14.47" conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -9084,20 +12033,6 @@ __metadata: languageName: node linkType: hard -"esbuild-windows-32@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-windows-32@npm:0.14.54" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"esbuild-windows-32@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-windows-32@npm:0.15.10" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "esbuild-windows-64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-windows-64@npm:0.14.47" @@ -9105,20 +12040,6 @@ __metadata: languageName: node linkType: hard -"esbuild-windows-64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-windows-64@npm:0.14.54" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"esbuild-windows-64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-windows-64@npm:0.15.10" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "esbuild-windows-arm64@npm:0.14.47": version: 0.14.47 resolution: "esbuild-windows-arm64@npm:0.14.47" @@ -9126,20 +12047,6 @@ __metadata: languageName: node linkType: hard -"esbuild-windows-arm64@npm:0.14.54": - version: 0.14.54 - resolution: "esbuild-windows-arm64@npm:0.14.54" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"esbuild-windows-arm64@npm:0.15.10": - version: 0.15.10 - resolution: "esbuild-windows-arm64@npm:0.15.10" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "esbuild@npm:0.14.47": version: 0.14.47 resolution: "esbuild@npm:0.14.47" @@ -9211,154 +12118,157 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.14.0, esbuild@npm:^0.14.43": - version: 0.14.54 - resolution: "esbuild@npm:0.14.54" - dependencies: - "@esbuild/linux-loong64": 0.14.54 - esbuild-android-64: 0.14.54 - esbuild-android-arm64: 0.14.54 - esbuild-darwin-64: 0.14.54 - esbuild-darwin-arm64: 0.14.54 - esbuild-freebsd-64: 0.14.54 - esbuild-freebsd-arm64: 0.14.54 - esbuild-linux-32: 0.14.54 - esbuild-linux-64: 0.14.54 - esbuild-linux-arm: 0.14.54 - esbuild-linux-arm64: 0.14.54 - esbuild-linux-mips64le: 0.14.54 - esbuild-linux-ppc64le: 0.14.54 - esbuild-linux-riscv64: 0.14.54 - esbuild-linux-s390x: 0.14.54 - esbuild-netbsd-64: 0.14.54 - esbuild-openbsd-64: 0.14.54 - esbuild-sunos-64: 0.14.54 - esbuild-windows-32: 0.14.54 - esbuild-windows-64: 0.14.54 - esbuild-windows-arm64: 0.14.54 +"esbuild@npm:0.17.6": + version: 0.17.6 + resolution: "esbuild@npm:0.17.6" + dependencies: + "@esbuild/android-arm": 0.17.6 + "@esbuild/android-arm64": 0.17.6 + "@esbuild/android-x64": 0.17.6 + "@esbuild/darwin-arm64": 0.17.6 + "@esbuild/darwin-x64": 0.17.6 + "@esbuild/freebsd-arm64": 0.17.6 + "@esbuild/freebsd-x64": 0.17.6 + "@esbuild/linux-arm": 0.17.6 + "@esbuild/linux-arm64": 0.17.6 + "@esbuild/linux-ia32": 0.17.6 + "@esbuild/linux-loong64": 0.17.6 + "@esbuild/linux-mips64el": 0.17.6 + "@esbuild/linux-ppc64": 0.17.6 + "@esbuild/linux-riscv64": 0.17.6 + "@esbuild/linux-s390x": 0.17.6 + "@esbuild/linux-x64": 0.17.6 + "@esbuild/netbsd-x64": 0.17.6 + "@esbuild/openbsd-x64": 0.17.6 + "@esbuild/sunos-x64": 0.17.6 + "@esbuild/win32-arm64": 0.17.6 + "@esbuild/win32-ia32": 0.17.6 + "@esbuild/win32-x64": 0.17.6 dependenciesMeta: - "@esbuild/linux-loong64": + "@esbuild/android-arm": optional: true - esbuild-android-64: + "@esbuild/android-arm64": optional: true - esbuild-android-arm64: + "@esbuild/android-x64": optional: true - esbuild-darwin-64: + "@esbuild/darwin-arm64": optional: true - esbuild-darwin-arm64: + "@esbuild/darwin-x64": optional: true - esbuild-freebsd-64: + "@esbuild/freebsd-arm64": optional: true - esbuild-freebsd-arm64: + "@esbuild/freebsd-x64": optional: true - esbuild-linux-32: + "@esbuild/linux-arm": optional: true - esbuild-linux-64: + "@esbuild/linux-arm64": optional: true - esbuild-linux-arm: + "@esbuild/linux-ia32": optional: true - esbuild-linux-arm64: + "@esbuild/linux-loong64": optional: true - esbuild-linux-mips64le: + "@esbuild/linux-mips64el": optional: true - esbuild-linux-ppc64le: + "@esbuild/linux-ppc64": optional: true - esbuild-linux-riscv64: + "@esbuild/linux-riscv64": optional: true - esbuild-linux-s390x: + "@esbuild/linux-s390x": optional: true - esbuild-netbsd-64: + "@esbuild/linux-x64": optional: true - esbuild-openbsd-64: + "@esbuild/netbsd-x64": optional: true - esbuild-sunos-64: + "@esbuild/openbsd-x64": optional: true - esbuild-windows-32: + "@esbuild/sunos-x64": optional: true - esbuild-windows-64: + "@esbuild/win32-arm64": optional: true - esbuild-windows-arm64: + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": optional: true bin: esbuild: bin/esbuild - checksum: 49e360b1185c797f5ca3a7f5f0a75121494d97ddf691f65ed1796e6257d318f928342a97f559bb8eced6a90cf604dd22db4a30e0dbbf15edd9dbf22459b639af - languageName: node - linkType: hard - -"esbuild@npm:^0.15.1, esbuild@npm:^0.15.9": - version: 0.15.10 - resolution: "esbuild@npm:0.15.10" - dependencies: - "@esbuild/android-arm": 0.15.10 - "@esbuild/linux-loong64": 0.15.10 - esbuild-android-64: 0.15.10 - esbuild-android-arm64: 0.15.10 - esbuild-darwin-64: 0.15.10 - esbuild-darwin-arm64: 0.15.10 - esbuild-freebsd-64: 0.15.10 - esbuild-freebsd-arm64: 0.15.10 - esbuild-linux-32: 0.15.10 - esbuild-linux-64: 0.15.10 - esbuild-linux-arm: 0.15.10 - esbuild-linux-arm64: 0.15.10 - esbuild-linux-mips64le: 0.15.10 - esbuild-linux-ppc64le: 0.15.10 - esbuild-linux-riscv64: 0.15.10 - esbuild-linux-s390x: 0.15.10 - esbuild-netbsd-64: 0.15.10 - esbuild-openbsd-64: 0.15.10 - esbuild-sunos-64: 0.15.10 - esbuild-windows-32: 0.15.10 - esbuild-windows-64: 0.15.10 - esbuild-windows-arm64: 0.15.10 + checksum: 13c4c3bcaa7ff291810d2c8294a1eb997b4672c60a9285b32d8eafcbc552e4468e06efe9d1a15067f5cbd41adcb12ddb4362618845e2e916e437f281c9aa80ab + languageName: node + linkType: hard + +"esbuild@npm:0.17.x, esbuild@npm:^0.17.0, esbuild@npm:^0.17.5, esbuild@npm:^0.17.6": + version: 0.17.19 + resolution: "esbuild@npm:0.17.19" + dependencies: + "@esbuild/android-arm": 0.17.19 + "@esbuild/android-arm64": 0.17.19 + "@esbuild/android-x64": 0.17.19 + "@esbuild/darwin-arm64": 0.17.19 + "@esbuild/darwin-x64": 0.17.19 + "@esbuild/freebsd-arm64": 0.17.19 + "@esbuild/freebsd-x64": 0.17.19 + "@esbuild/linux-arm": 0.17.19 + "@esbuild/linux-arm64": 0.17.19 + "@esbuild/linux-ia32": 0.17.19 + "@esbuild/linux-loong64": 0.17.19 + "@esbuild/linux-mips64el": 0.17.19 + "@esbuild/linux-ppc64": 0.17.19 + "@esbuild/linux-riscv64": 0.17.19 + "@esbuild/linux-s390x": 0.17.19 + "@esbuild/linux-x64": 0.17.19 + "@esbuild/netbsd-x64": 0.17.19 + "@esbuild/openbsd-x64": 0.17.19 + "@esbuild/sunos-x64": 0.17.19 + "@esbuild/win32-arm64": 0.17.19 + "@esbuild/win32-ia32": 0.17.19 + "@esbuild/win32-x64": 0.17.19 dependenciesMeta: "@esbuild/android-arm": optional: true - "@esbuild/linux-loong64": + "@esbuild/android-arm64": optional: true - esbuild-android-64: + "@esbuild/android-x64": optional: true - esbuild-android-arm64: + "@esbuild/darwin-arm64": optional: true - esbuild-darwin-64: + "@esbuild/darwin-x64": optional: true - esbuild-darwin-arm64: + "@esbuild/freebsd-arm64": optional: true - esbuild-freebsd-64: + "@esbuild/freebsd-x64": optional: true - esbuild-freebsd-arm64: + "@esbuild/linux-arm": optional: true - esbuild-linux-32: + "@esbuild/linux-arm64": optional: true - esbuild-linux-64: + "@esbuild/linux-ia32": optional: true - esbuild-linux-arm: + "@esbuild/linux-loong64": optional: true - esbuild-linux-arm64: + "@esbuild/linux-mips64el": optional: true - esbuild-linux-mips64le: + "@esbuild/linux-ppc64": optional: true - esbuild-linux-ppc64le: + "@esbuild/linux-riscv64": optional: true - esbuild-linux-riscv64: + "@esbuild/linux-s390x": optional: true - esbuild-linux-s390x: + "@esbuild/linux-x64": optional: true - esbuild-netbsd-64: + "@esbuild/netbsd-x64": optional: true - esbuild-openbsd-64: + "@esbuild/openbsd-x64": optional: true - esbuild-sunos-64: + "@esbuild/sunos-x64": optional: true - esbuild-windows-32: + "@esbuild/win32-arm64": optional: true - esbuild-windows-64: + "@esbuild/win32-ia32": optional: true - esbuild-windows-arm64: + "@esbuild/win32-x64": optional: true bin: esbuild: bin/esbuild - checksum: bc2daadb952c527e7ab0a972fd4f79071c9fd3d948cd97290d3de8811b6b7fc0abc43fb20116dffa24dc923550f4fe7b0d930ff6418ae7dfbff3034c1a01d59a + checksum: ac11b1a5a6008e4e37ccffbd6c2c054746fc58d0ed4a2f9ee643bd030cfcea9a33a235087bc777def8420f2eaafb3486e76adb7bdb7241a9143b43a69a10afd8 languageName: node linkType: hard @@ -9369,13 +12279,6 @@ __metadata: languageName: node linkType: hard -"escape-goat@npm:^2.0.0": - version: 2.1.1 - resolution: "escape-goat@npm:2.1.1" - checksum: ce05c70c20dd7007b60d2d644b625da5412325fdb57acf671ba06cb2ab3cd6789e2087026921a05b665b0a03fadee2955e7fc0b9a67da15a6551a980b260eba7 - languageName: node - linkType: hard - "escape-html@npm:~1.0.3": version: 1.0.3 resolution: "escape-html@npm:1.0.3" @@ -9383,6 +12286,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:5.0.0, escape-string-regexp@npm:^5.0.0": + version: 5.0.0 + resolution: "escape-string-regexp@npm:5.0.0" + checksum: 20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e + languageName: node + linkType: hard + "escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -9404,72 +12314,105 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:^5.0.0": - version: 5.0.0 - resolution: "escape-string-regexp@npm:5.0.0" - checksum: 20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e +"escodegen@npm:^1.8.1": + version: 1.14.3 + resolution: "escodegen@npm:1.14.3" + dependencies: + esprima: ^4.0.1 + estraverse: ^4.2.0 + esutils: ^2.0.2 + optionator: ^0.8.1 + source-map: ~0.6.1 + dependenciesMeta: + source-map: + optional: true + bin: + escodegen: bin/escodegen.js + esgenerate: bin/esgenerate.js + checksum: 381cdc4767ecdb221206bbbab021b467bbc2a6f5c9a99c9e6353040080bdd3dfe73d7604ad89a47aca6ea7d58bc635f6bd3fbc8da9a1998e9ddfa8372362ccd0 languageName: node linkType: hard -"eslint-config-neon@npm:^0.1.39": - version: 0.1.39 - resolution: "eslint-config-neon@npm:0.1.39" +"escodegen@npm:^2.0.0": + version: 2.0.0 + resolution: "escodegen@npm:2.0.0" + dependencies: + esprima: ^4.0.1 + estraverse: ^5.2.0 + esutils: ^2.0.2 + optionator: ^0.8.1 + source-map: ~0.6.1 + dependenciesMeta: + source-map: + optional: true + bin: + escodegen: bin/escodegen.js + esgenerate: bin/esgenerate.js + checksum: 5aa6b2966fafe0545e4e77936300cc94ad57cfe4dc4ebff9950492eaba83eef634503f12d7e3cbd644ecc1bab388ad0e92b06fd32222c9281a75d1cf02ec6cef + languageName: node + linkType: hard + +"eslint-config-neon@npm:^0.1.47": + version: 0.1.47 + resolution: "eslint-config-neon@npm:0.1.47" dependencies: - "@angular-eslint/eslint-plugin": ^14.1.2 - "@angular-eslint/eslint-plugin-template": ^14.1.2 - "@angular-eslint/template-parser": ^14.1.2 - "@next/eslint-plugin-next": ^12.3.1 + "@angular-eslint/eslint-plugin": ^16.0.1 + "@angular-eslint/eslint-plugin-template": ^16.0.1 + "@angular-eslint/template-parser": ^16.0.1 + "@next/eslint-plugin-next": ^13.4.1 "@rushstack/eslint-patch": ^1.2.0 - "@typescript-eslint/eslint-plugin": ^5.40.1 - "@typescript-eslint/parser": ^5.40.1 - astro-eslint-parser: ^0.7.2 - eslint-config-prettier: ^8.5.0 - eslint-plugin-astro: ^0.20.0 - eslint-plugin-cypress: ^2.12.1 + "@typescript-eslint/eslint-plugin": ^5.59.2 + "@typescript-eslint/parser": ^5.59.2 + astro-eslint-parser: ^0.13.3 + eslint-config-prettier: ^8.8.0 + eslint-import-resolver-typescript: ^3.5.5 + eslint-plugin-astro: ^0.26.1 + eslint-plugin-cypress: ^2.13.3 eslint-plugin-import: "npm:eslint-plugin-i@latest" - eslint-plugin-jest: ^27.1.3 - eslint-plugin-jsdoc: ^39.3.14 - eslint-plugin-jsx-a11y: ^6.6.1 + eslint-plugin-jest: ^27.2.1 + eslint-plugin-jsdoc: ^43.2.0 + eslint-plugin-jsx-a11y: ^6.7.1 eslint-plugin-lodash: ^7.4.0 - eslint-plugin-n: ^15.3.0 + eslint-plugin-mdx: ^2.1.0 + eslint-plugin-n: ^15.7.0 eslint-plugin-promise: ^6.1.1 - eslint-plugin-react: ^7.31.10 + eslint-plugin-react: ^7.32.2 eslint-plugin-react-hooks: ^4.6.0 - eslint-plugin-rxjs: ^5.0.2 + eslint-plugin-rxjs: ^5.0.3 eslint-plugin-rxjs-angular: ^2.0.0 - eslint-plugin-sonarjs: ^0.16.0 + eslint-plugin-sonarjs: ^0.19.0 eslint-plugin-svelte3: ^4.0.0 eslint-plugin-tsdoc: ^0.2.17 - eslint-plugin-typescript-sort-keys: ^2.1.0 - eslint-plugin-unicorn: ^44.0.2 - eslint-plugin-vue: ^9.6.0 - vue-eslint-parser: ^9.1.0 - checksum: 8a4792fa90e7043c91906a3476a09b9c180217954a23970dce194ab8fe8751ea78349a1e36c91ca74ca019cb1c66aa2276932c12343890053b6afff4b34c0796 + eslint-plugin-typescript-sort-keys: ^2.3.0 + eslint-plugin-unicorn: ^47.0.0 + eslint-plugin-vue: ^9.11.0 + vue-eslint-parser: ^9.2.1 + checksum: 0aa250260822271bc7404d1d6e1319cf00fd64c376880be17dee265c29415a6015cd133f770c10a750887364b482cd4a98efe688f4c733c3a22cd9d9e45e8b2f languageName: node linkType: hard -"eslint-config-prettier@npm:^8.5.0": - version: 8.5.0 - resolution: "eslint-config-prettier@npm:8.5.0" +"eslint-config-prettier@npm:^8.8.0": + version: 8.8.0 + resolution: "eslint-config-prettier@npm:8.8.0" peerDependencies: eslint: ">=7.0.0" bin: eslint-config-prettier: bin/cli.js - checksum: 0d0f5c32e7a0ad91249467ce71ca92394ccd343178277d318baf32063b79ea90216f4c81d1065d60f96366fdc60f151d4d68ae7811a58bd37228b84c2083f893 + checksum: 1e94c3882c4d5e41e1dcfa2c368dbccbfe3134f6ac7d40101644d3bfbe3eb2f2ffac757f3145910b5eacf20c0e85e02b91293d3126d770cbf3dc390b3564681c languageName: node linkType: hard "eslint-etc@npm:^5.0.0, eslint-etc@npm:^5.1.0": - version: 5.2.0 - resolution: "eslint-etc@npm:5.2.0" + version: 5.2.1 + resolution: "eslint-etc@npm:5.2.1" dependencies: "@typescript-eslint/experimental-utils": ^5.0.0 tsutils: ^3.17.1 tsutils-etc: ^1.4.1 peerDependencies: eslint: ^8.0.0 - typescript: ^4.0.0 - checksum: ad89126fb643bf3772d34a8c47909f4ec05777d7c3a5d33c948cb36e4ca27eebded3a37dee8b4e4a87075b80163ae5f9a694827a2435a57a59fcaf02acfdb056 + typescript: ">=4.0.0" + checksum: 7b2ecef7f99b3a6bcbb8ed875061ca2876496e73fe7e51757b601631ab8cd958be91ba2dca7242f4659647b952429ce52c65ba0e708eb976f8b387cb7523dc77 languageName: node linkType: hard @@ -9489,52 +12432,112 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-node@npm:^0.3.6": - version: 0.3.6 - resolution: "eslint-import-resolver-node@npm:0.3.6" +"eslint-formatter-pretty@npm:^5.0.0": + version: 5.0.0 + resolution: "eslint-formatter-pretty@npm:5.0.0" + dependencies: + "@types/eslint": ^8.0.0 + ansi-escapes: ^4.2.1 + chalk: ^4.1.0 + eslint-rule-docs: ^1.1.235 + log-symbols: ^4.0.0 + plur: ^4.0.0 + string-width: ^4.2.0 + supports-hyperlinks: ^2.0.0 + checksum: 0bb8e685fbf1f53deb3c438ad4cef7871011b55697bc74cca090787b93a671153080e2d4b65489e825912ac733a1c9aceae5ad6f60efcea3c08efb8aee013dc4 + languageName: node + linkType: hard + +"eslint-import-resolver-node@npm:^0.3.7": + version: 0.3.7 + resolution: "eslint-import-resolver-node@npm:0.3.7" dependencies: debug: ^3.2.7 - resolve: ^1.20.0 - checksum: 6266733af1e112970e855a5bcc2d2058fb5ae16ad2a6d400705a86b29552b36131ffc5581b744c23d550de844206fb55e9193691619ee4dbf225c4bde526b1c8 + is-core-module: ^2.11.0 + resolve: ^1.22.1 + checksum: 3379aacf1d2c6952c1b9666c6fa5982c3023df695430b0d391c0029f6403a7775414873d90f397e98ba6245372b6c8960e16e74d9e4a3b0c0a4582f3bdbe3d6e languageName: node linkType: hard -"eslint-module-utils@npm:^2.7.3": - version: 2.7.4 - resolution: "eslint-module-utils@npm:2.7.4" +"eslint-import-resolver-typescript@npm:^3.5.5": + version: 3.5.5 + resolution: "eslint-import-resolver-typescript@npm:3.5.5" + dependencies: + debug: ^4.3.4 + enhanced-resolve: ^5.12.0 + eslint-module-utils: ^2.7.4 + get-tsconfig: ^4.5.0 + globby: ^13.1.3 + is-core-module: ^2.11.0 + is-glob: ^4.0.3 + synckit: ^0.8.5 + peerDependencies: + eslint: "*" + eslint-plugin-import: "*" + checksum: 27e6276fdff5d377c9036362ff736ac29852106e883ff589ea9092dc57d4bc2a67a82d75134221124f05045f9a7e2114a159b2c827d1f9f64d091f7afeab0f58 + languageName: node + linkType: hard + +"eslint-mdx@npm:^2.1.0": + version: 2.1.0 + resolution: "eslint-mdx@npm:2.1.0" + dependencies: + acorn: ^8.8.2 + acorn-jsx: ^5.3.2 + espree: ^9.5.1 + estree-util-visit: ^1.2.1 + remark-mdx: ^2.3.0 + remark-parse: ^10.0.1 + remark-stringify: ^10.0.2 + synckit: ^0.8.5 + tslib: ^2.5.0 + unified: ^10.1.2 + unified-engine: ^10.1.0 + unist-util-visit: ^4.1.2 + uvu: ^0.5.6 + vfile: ^5.3.7 + peerDependencies: + eslint: ">=8.0.0" + checksum: 9c73e92a3d5c2275a335e92321aa04f9c437acbd015ff51eaf0f630c26fde659d38dd0cc471bf7812b47e26f34de18908dc237c8f3fc3deda1dbeef76f3d33c2 + languageName: node + linkType: hard + +"eslint-module-utils@npm:^2.7.4": + version: 2.8.0 + resolution: "eslint-module-utils@npm:2.8.0" dependencies: debug: ^3.2.7 peerDependenciesMeta: eslint: optional: true - checksum: 5da13645daff145a5c922896b258f8bba560722c3767254e458d894ff5fbb505d6dfd945bffa932a5b0ae06714da2379bd41011c4c20d2d59cc83e23895360f7 + checksum: 74c6dfea7641ebcfe174be61168541a11a14aa8d72e515f5f09af55cd0d0862686104b0524aa4b8e0ce66418a44aa38a94d2588743db5fd07a6b49ffd16921d2 languageName: node linkType: hard -"eslint-plugin-astro@npm:^0.20.0": - version: 0.20.0 - resolution: "eslint-plugin-astro@npm:0.20.0" +"eslint-plugin-astro@npm:^0.26.1": + version: 0.26.2 + resolution: "eslint-plugin-astro@npm:0.26.2" dependencies: + "@eslint-community/eslint-utils": ^4.2.0 + "@jridgewell/sourcemap-codec": ^1.4.14 "@typescript-eslint/types": ^5.25.0 - astro-eslint-parser: ^0.7.0 - eslint-utils: ^3.0.0 + astro-eslint-parser: ^0.13.1 postcss: ^8.4.14 postcss-selector-parser: ^6.0.10 - sourcemap-codec: ^1.4.8 peerDependencies: eslint: ">=7.0.0" - checksum: eb046fd5644c788c32a1c6f553b945c2c2511c3d6b67a8ed9377b30bd9500cac068fa38b59b3a8efda087ab06aadf3b23ba8593279fc225ad795d8d358cd29d7 + checksum: d853b032147acd2b20caff8a7af7dad6ef3eeec105229a023f225827ca3897732505975d14ffab8810a5f8e50051e8ec85889d21af7a50155fc87204e2b01bef languageName: node linkType: hard -"eslint-plugin-cypress@npm:^2.12.1": - version: 2.12.1 - resolution: "eslint-plugin-cypress@npm:2.12.1" +"eslint-plugin-cypress@npm:^2.13.3": + version: 2.13.3 + resolution: "eslint-plugin-cypress@npm:2.13.3" dependencies: globals: ^11.12.0 peerDependencies: eslint: ">= 3.2.1" - checksum: 1f1c36e149304e9a6f58e2292a761abad58274da33b3a48b24ad55ad20cbce3ac7467321f2b6fcb052f9563c89f67004de4766eba2e2bdbcb010a6a0666989cf + checksum: 9affbcee29e030a4251c4794f7533e8e8c0e3b98ab3470a2c730ed059f733c5857a04c7ac214cc0ca7aeef1b11242e72595de7fc1f6b8b4d4578d9eca10af203 languageName: node linkType: hard @@ -9551,33 +12554,32 @@ __metadata: linkType: hard "eslint-plugin-import@npm:eslint-plugin-i@latest": - version: 2.26.0-2 - resolution: "eslint-plugin-i@npm:2.26.0-2" + version: 2.27.5-1 + resolution: "eslint-plugin-i@npm:2.27.5-1" dependencies: - array-includes: ^3.1.5 - array.prototype.flat: ^1.3.0 - debug: ^2.6.9 + array-includes: ^3.1.6 + array.prototype.flat: ^1.3.1 + array.prototype.flatmap: ^1.3.1 + debug: ^3.2.7 doctrine: ^2.1.0 - eslint-import-resolver-node: ^0.3.6 - eslint-module-utils: ^2.7.3 - get-own-property-symbols: ^0.9.5 - get-tsconfig: ^4.2.0 + eslint-import-resolver-node: ^0.3.7 + eslint-module-utils: ^2.7.4 has: ^1.0.3 - is-core-module: ^2.9.0 + is-core-module: ^2.11.0 is-glob: ^4.0.3 minimatch: ^3.1.2 - object.getownpropertydescriptors: ^2.1.4 - object.values: ^1.1.5 + object.values: ^1.1.6 resolve: ^1.22.1 + semver: ^6.3.0 peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: ec3f4694d6fe7138592ccbe3007ea35473a0162f0f2f1012606653dd173f0aca7061aad96560a261b825b49e55cae927ed30a2c8d47a56211d02901406e8c46d + checksum: cfd22f98c250869abf1d65893b476eef58f62beb91de8fa4d69d59d70f6622c937d7dd93c48f9c77ac081189fb07b39b5d8d094d6de85357780ceb31922e3cf6 languageName: node linkType: hard -"eslint-plugin-jest@npm:^27.1.3": - version: 27.1.3 - resolution: "eslint-plugin-jest@npm:27.1.3" +"eslint-plugin-jest@npm:^27.2.1": + version: 27.2.1 + resolution: "eslint-plugin-jest@npm:27.2.1" dependencies: "@typescript-eslint/utils": ^5.10.0 peerDependencies: @@ -9588,47 +12590,51 @@ __metadata: optional: true jest: optional: true - checksum: 427f39ad4bb50b4e50a1f6aba04962ee3686e25b716d3e4dff47a304c2a352a35b032fec7350b84dc6362838525d93a70f7ae0f961b182c79bf602e90ebb1a55 + checksum: 579a4d26304cc6748b2e6dff6c965ea7a21b618d8b051eb02727d25cf5c7767f6db8ef5237531635ff77e242b983b973e7cb8c820a4d20d5bda73358c452a8ab languageName: node linkType: hard -"eslint-plugin-jsdoc@npm:^39.3.14": - version: 39.3.14 - resolution: "eslint-plugin-jsdoc@npm:39.3.14" +"eslint-plugin-jsdoc@npm:^43.2.0": + version: 43.2.0 + resolution: "eslint-plugin-jsdoc@npm:43.2.0" dependencies: - "@es-joy/jsdoccomment": ~0.33.0 + "@es-joy/jsdoccomment": ~0.38.0 + are-docs-informative: ^0.0.2 comment-parser: 1.3.1 debug: ^4.3.4 escape-string-regexp: ^4.0.0 - esquery: ^1.4.0 - semver: ^7.3.8 + esquery: ^1.5.0 + semver: ^7.5.0 spdx-expression-parse: ^3.0.1 peerDependencies: eslint: ^7.0.0 || ^8.0.0 - checksum: 448cc78968a9d3481c21d1a2e99be4e8ccb73c9669ae0949df68957d8c219471501f68eb02095f869d91fde8c3d135563492fce5128523325d81dc5eb8112a15 + checksum: 8fc276c77a16903a2f130728dc360fc72f1679d6ebc55dc7b416c43c69a75d9b4ce48b212ff3a1a11382c15283b2e97e49f4f0b2b95c314d653f24a658eac436 languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:^6.6.1": - version: 6.6.1 - resolution: "eslint-plugin-jsx-a11y@npm:6.6.1" +"eslint-plugin-jsx-a11y@npm:^6.7.1": + version: 6.7.1 + resolution: "eslint-plugin-jsx-a11y@npm:6.7.1" dependencies: - "@babel/runtime": ^7.18.9 - aria-query: ^4.2.2 - array-includes: ^3.1.5 + "@babel/runtime": ^7.20.7 + aria-query: ^5.1.3 + array-includes: ^3.1.6 + array.prototype.flatmap: ^1.3.1 ast-types-flow: ^0.0.7 - axe-core: ^4.4.3 - axobject-query: ^2.2.0 + axe-core: ^4.6.2 + axobject-query: ^3.1.1 damerau-levenshtein: ^1.0.8 emoji-regex: ^9.2.2 has: ^1.0.3 - jsx-ast-utils: ^3.3.2 - language-tags: ^1.0.5 + jsx-ast-utils: ^3.3.3 + language-tags: =1.0.5 minimatch: ^3.1.2 + object.entries: ^1.1.6 + object.fromentries: ^2.0.6 semver: ^6.3.0 peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: baae7377f0e25a0cc9b34dc333a3dc6ead9ee8365e445451eff554c3ca267a0a6cb88127fe90395c578ab1b92cfed246aef7dc8d2b48b603389e10181799e144 + checksum: f166dd5fe7257c7b891c6692e6a3ede6f237a14043ae3d97581daf318fc5833ddc6b4871aa34ab7656187430170500f6d806895747ea17ecdf8231a666c3c2fd languageName: node linkType: hard @@ -9643,21 +12649,50 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-n@npm:^15.3.0": - version: 15.3.0 - resolution: "eslint-plugin-n@npm:15.3.0" +"eslint-plugin-markdown@npm:^3.0.0": + version: 3.0.0 + resolution: "eslint-plugin-markdown@npm:3.0.0" + dependencies: + mdast-util-from-markdown: ^0.8.5 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: ea9e8613cffcf7decbc2de0c900a83553ccdccfb6d90187e5d461a457a403d2634585a8c165cc4adf52c86f3b910161f33b1f24a46f296c4a577d2547780c997 + languageName: node + linkType: hard + +"eslint-plugin-mdx@npm:^2.1.0": + version: 2.1.0 + resolution: "eslint-plugin-mdx@npm:2.1.0" + dependencies: + eslint-mdx: ^2.1.0 + eslint-plugin-markdown: ^3.0.0 + remark-mdx: ^2.3.0 + remark-parse: ^10.0.1 + remark-stringify: ^10.0.2 + tslib: ^2.5.0 + unified: ^10.1.2 + vfile: ^5.3.7 + peerDependencies: + eslint: ">=8.0.0" + checksum: 05734fb7237ae0b41979ecda634af4b5fb0dcd7792995d74acfa06b73a4a50dda17eb4d99424185998005fee8c2f351fd08bc58574c61fc33172247bee869a6e + languageName: node + linkType: hard + +"eslint-plugin-n@npm:^15.7.0": + version: 15.7.0 + resolution: "eslint-plugin-n@npm:15.7.0" dependencies: builtins: ^5.0.1 eslint-plugin-es: ^4.1.0 eslint-utils: ^3.0.0 ignore: ^5.1.1 - is-core-module: ^2.10.0 + is-core-module: ^2.11.0 minimatch: ^3.1.2 resolve: ^1.22.1 - semver: ^7.3.7 + semver: ^7.3.8 peerDependencies: eslint: ">=7.0.0" - checksum: a5a4c778804a0d343ca904c917b8e583b4df28aaad593ea6d41893befac45d4f92ab38d895aac018ac757583697d38e99397d4deda783ec8ff650bb2041d23c8 + checksum: cfbcc67e62adf27712afdeadf13223cb9717f95d4af8442056d9d4c97a8b88af76b7969f75deaac26fa98481023d6b7c9e43a28909e7f0468f40b3024b7bcfae languageName: node linkType: hard @@ -9679,33 +12714,34 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:^7.31.10": - version: 7.31.10 - resolution: "eslint-plugin-react@npm:7.31.10" +"eslint-plugin-react@npm:^7.32.2": + version: 7.32.2 + resolution: "eslint-plugin-react@npm:7.32.2" dependencies: - array-includes: ^3.1.5 - array.prototype.flatmap: ^1.3.0 + array-includes: ^3.1.6 + array.prototype.flatmap: ^1.3.1 + array.prototype.tosorted: ^1.1.1 doctrine: ^2.1.0 estraverse: ^5.3.0 jsx-ast-utils: ^2.4.1 || ^3.0.0 minimatch: ^3.1.2 - object.entries: ^1.1.5 - object.fromentries: ^2.0.5 - object.hasown: ^1.1.1 - object.values: ^1.1.5 + object.entries: ^1.1.6 + object.fromentries: ^2.0.6 + object.hasown: ^1.1.2 + object.values: ^1.1.6 prop-types: ^15.8.1 - resolve: ^2.0.0-next.3 + resolve: ^2.0.0-next.4 semver: ^6.3.0 - string.prototype.matchall: ^4.0.7 + string.prototype.matchall: ^4.0.8 peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: f013669c296483559a760648fa06425f161b1aff93c668f14c4561c933d22a7836b745b88a795c53cab929c71513d5fd1f2ffdddff915709f01b77ac25f5b71b + checksum: 2232b3b8945aa50b7773919c15cd96892acf35d2f82503667a79e2f55def90f728ed4f0e496f0f157acbe1bd4397c5615b676ae7428fe84488a544ca53feb944 languageName: node linkType: hard "eslint-plugin-rxjs-angular@npm:^2.0.0": - version: 2.0.0 - resolution: "eslint-plugin-rxjs-angular@npm:2.0.0" + version: 2.0.1 + resolution: "eslint-plugin-rxjs-angular@npm:2.0.1" dependencies: "@typescript-eslint/experimental-utils": ^5.0.0 common-tags: ^1.8.0 @@ -9714,14 +12750,14 @@ __metadata: tslib: ^2.0.0 peerDependencies: eslint: ^8.0.0 - typescript: ^4.0.0 - checksum: 25031491405578d20df5877c227a9d8d35b6c5f0be183588b6982c521d9c7b471101d73ba6f0c02a551c8c108778ae997e60725a41e0feb14f8efc08c6338e96 + typescript: ">=4.0.0" + checksum: e8d17fd1093b02cfe9696f14fbcfabf3d2301cb327906ce3ce37ba015c9e0bbe06fb2b4b5d159f7fc08cc438fe810ef3abec853944b9d3b84c432f22e40ccda2 languageName: node linkType: hard -"eslint-plugin-rxjs@npm:^5.0.2": - version: 5.0.2 - resolution: "eslint-plugin-rxjs@npm:5.0.2" +"eslint-plugin-rxjs@npm:^5.0.3": + version: 5.0.3 + resolution: "eslint-plugin-rxjs@npm:5.0.3" dependencies: "@typescript-eslint/experimental-utils": ^5.0.0 common-tags: ^1.8.0 @@ -9734,17 +12770,31 @@ __metadata: tsutils-etc: ^1.4.1 peerDependencies: eslint: ^8.0.0 - typescript: ^4.0.0 - checksum: c1f2a3b26f3a154351fb24e209d9850c1b7454249695fdafe911932da2ff307728c6ba8116bbe8a1a036e804ea0daddae1167dd7c2ea13d491f3745447d1e506 + typescript: ">=4.0.0" + checksum: 45b4fb367ddbc5cb74028c91d1564665febdce6a6cd31090f79f46a4ebc393f45fa130dc9e4febe4437799eb8c2ffe0fcf2a4ac486f99df912c8f69bdad9de29 languageName: node linkType: hard -"eslint-plugin-sonarjs@npm:^0.16.0": - version: 0.16.0 - resolution: "eslint-plugin-sonarjs@npm:0.16.0" +"eslint-plugin-sonarjs@npm:^0.19.0": + version: 0.19.0 + resolution: "eslint-plugin-sonarjs@npm:0.19.0" peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 8421059eb208da147fc5652aa8bbe2aeedd8b57e7f6810a27b6e33c3042a7066870d7647e125d3f9e6a28db4809976c1c260d98a13fcda2360f8b0ae7a416908 + checksum: 893640583f62ce55584c6ddd481aa0fd6fa15fe0fffc32ac92b17f3fadde8eaf32414183bb80b612455212e9bb14400236398af6279ca04e8992f008e011926c + languageName: node + linkType: hard + +"eslint-plugin-storybook@npm:^0.6.12": + version: 0.6.12 + resolution: "eslint-plugin-storybook@npm:0.6.12" + dependencies: + "@storybook/csf": ^0.0.1 + "@typescript-eslint/utils": ^5.45.0 + requireindex: ^1.1.0 + ts-dedent: ^2.2.0 + peerDependencies: + eslint: ">=6" + checksum: 8e0e160c71216019c291a5a03b797b5359076067d16ea03b3dec63594093d45398f028d15c47eb89f2ddb6e8db18cc7e376b02d921dacc4fb31bbc8da46363c8 languageName: node linkType: hard @@ -9768,9 +12818,9 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-typescript-sort-keys@npm:^2.1.0": - version: 2.1.0 - resolution: "eslint-plugin-typescript-sort-keys@npm:2.1.0" +"eslint-plugin-typescript-sort-keys@npm:^2.3.0": + version: 2.3.0 + resolution: "eslint-plugin-typescript-sort-keys@npm:2.3.0" dependencies: "@typescript-eslint/experimental-utils": ^5.0.0 json-schema: ^0.4.0 @@ -9778,60 +12828,62 @@ __metadata: peerDependencies: "@typescript-eslint/parser": ^1 || ^2 || ^3 || ^4 || ^5 eslint: ^5 || ^6 || ^7 || ^8 - typescript: ^3 || ^4 - checksum: 98ea442519ca9cdd36aa4d7d4e4f3d96d16a9287e32ea69209865ff3cd10ce33d9c4acb86ddc2cc0406a072aea319841496e66b512f79c58aaf3924d85f73683 + typescript: ^3 || ^4 || ^5 + checksum: 3c00e77c2761dbd7c5b6d61883ddfb587eb32f4f5bddf2694f88ec278ac4e1f1c14694d04755c55cc6ed5313d7dcd407c376034cbc1871904f242f368a013091 languageName: node linkType: hard -"eslint-plugin-unicorn@npm:^44.0.2": - version: 44.0.2 - resolution: "eslint-plugin-unicorn@npm:44.0.2" +"eslint-plugin-unicorn@npm:^47.0.0": + version: 47.0.0 + resolution: "eslint-plugin-unicorn@npm:47.0.0" dependencies: "@babel/helper-validator-identifier": ^7.19.1 - ci-info: ^3.4.0 + "@eslint-community/eslint-utils": ^4.4.0 + ci-info: ^3.8.0 clean-regexp: ^1.0.0 - eslint-utils: ^3.0.0 - esquery: ^1.4.0 + esquery: ^1.5.0 indent-string: ^4.0.0 - is-builtin-module: ^3.2.0 + is-builtin-module: ^3.2.1 + jsesc: ^3.0.2 lodash: ^4.17.21 pluralize: ^8.0.0 read-pkg-up: ^7.0.1 regexp-tree: ^0.1.24 + regjsparser: ^0.10.0 safe-regex: ^2.1.1 - semver: ^7.3.7 + semver: ^7.3.8 strip-indent: ^3.0.0 peerDependencies: - eslint: ">=8.23.1" - checksum: b0ed6b3a60e36efab5b19a0e2a1ea4e4faba79ef315aa1eff9bdebaf28b70ada059837a0a4cdf20e0b678d8eee6155afc2c6300d0ff7d51b68eced4f0bcb56e0 + eslint: ">=8.38.0" + checksum: 8d93bd76d54fb44e134c6576e3bda72dbf4c9cb5bae90451ace6acf1c48e6d7329f1e36db1d19266a5da499afeff6bf0c647875d69adc92d546bcc2d8b765cca languageName: node linkType: hard -"eslint-plugin-vue@npm:^9.6.0": - version: 9.6.0 - resolution: "eslint-plugin-vue@npm:9.6.0" +"eslint-plugin-vue@npm:^9.11.0": + version: 9.14.0 + resolution: "eslint-plugin-vue@npm:9.14.0" dependencies: - eslint-utils: ^3.0.0 + "@eslint-community/eslint-utils": ^4.3.0 natural-compare: ^1.4.0 nth-check: ^2.0.1 postcss-selector-parser: ^6.0.9 semver: ^7.3.5 - vue-eslint-parser: ^9.0.1 + vue-eslint-parser: ^9.3.0 xml-name-validator: ^4.0.0 peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 - checksum: fcfb333b09af4d1db027f8a52b7ffdf0ebaa649f5738b7a6124bd02aaa1e075daaaa97e490a863667dda16c79e1d37688a8311d7685b9a63d3c4c0dd5f1d9622 + checksum: e4240a76494ae6bf1d9bd9b6bb26707dbbc91682412458be5def68381c2b7c25b7452eb1e13b138f41a79064cb10e8abb529a742fadb68a94fc9f275d0ba12de languageName: node linkType: hard -"eslint-rule-docs@npm:^1.1.5": +"eslint-rule-docs@npm:^1.1.235, eslint-rule-docs@npm:^1.1.5": version: 1.1.235 resolution: "eslint-rule-docs@npm:1.1.235" checksum: b163596f9a05568e287b2c78f51a280092122a2e43c45fa2c200f0bd3f61877af186c641dab97620978bec96d9e2cfb621e51728044d9efe42ddc24f5a594b26 languageName: node linkType: hard -"eslint-scope@npm:^5.1.0, eslint-scope@npm:^5.1.1": +"eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -9841,13 +12893,13 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.1.1": - version: 7.1.1 - resolution: "eslint-scope@npm:7.1.1" +"eslint-scope@npm:^7.0.0, eslint-scope@npm:^7.1.1, eslint-scope@npm:^7.2.0": + version: 7.2.0 + resolution: "eslint-scope@npm:7.2.0" dependencies: esrecurse: ^4.3.0 estraverse: ^5.2.0 - checksum: 9f6e974ab2db641ca8ab13508c405b7b859e72afe9f254e8131ff154d2f40c99ad4545ce326fd9fde3212ff29707102562a4834f1c48617b35d98c71a97fbf3e + checksum: 64591a2d8b244ade9c690b59ef238a11d5c721a98bcee9e9f445454f442d03d3e04eda88e95a4daec558220a99fa384309d9faae3d459bd40e7a81b4063980ae languageName: node linkType: hard @@ -9885,44 +12937,46 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.0.0, eslint-visitor-keys@npm:^3.3.0": - version: 3.3.0 - resolution: "eslint-visitor-keys@npm:3.3.0" - checksum: d59e68a7c5a6d0146526b0eec16ce87fbf97fe46b8281e0d41384224375c4e52f5ffb9e16d48f4ea50785cde93f766b0c898e31ab89978d88b0e1720fbfb7808 +"eslint-visitor-keys@npm:^3.0.0, eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1": + version: 3.4.1 + resolution: "eslint-visitor-keys@npm:3.4.1" + checksum: f05121d868202736b97de7d750847a328fcfa8593b031c95ea89425333db59676ac087fa905eba438d0a3c5769632f828187e0c1a0d271832a2153c1d3661c2c languageName: node linkType: hard -"eslint@npm:^8.25.0": - version: 8.25.0 - resolution: "eslint@npm:8.25.0" +"eslint@npm:^8.41.0": + version: 8.41.0 + resolution: "eslint@npm:8.41.0" dependencies: - "@eslint/eslintrc": ^1.3.3 - "@humanwhocodes/config-array": ^0.10.5 + "@eslint-community/eslint-utils": ^4.2.0 + "@eslint-community/regexpp": ^4.4.0 + "@eslint/eslintrc": ^2.0.3 + "@eslint/js": 8.41.0 + "@humanwhocodes/config-array": ^0.11.8 "@humanwhocodes/module-importer": ^1.0.1 + "@nodelib/fs.walk": ^1.2.8 ajv: ^6.10.0 chalk: ^4.0.0 cross-spawn: ^7.0.2 debug: ^4.3.2 doctrine: ^3.0.0 escape-string-regexp: ^4.0.0 - eslint-scope: ^7.1.1 - eslint-utils: ^3.0.0 - eslint-visitor-keys: ^3.3.0 - espree: ^9.4.0 - esquery: ^1.4.0 + eslint-scope: ^7.2.0 + eslint-visitor-keys: ^3.4.1 + espree: ^9.5.2 + esquery: ^1.4.2 esutils: ^2.0.2 fast-deep-equal: ^3.1.3 file-entry-cache: ^6.0.1 find-up: ^5.0.0 - glob-parent: ^6.0.1 - globals: ^13.15.0 - globby: ^11.1.0 - grapheme-splitter: ^1.0.4 + glob-parent: ^6.0.2 + globals: ^13.19.0 + graphemer: ^1.4.0 ignore: ^5.2.0 import-fresh: ^3.0.0 imurmurhash: ^0.1.4 is-glob: ^4.0.0 - js-sdsl: ^4.1.4 + is-path-inside: ^3.0.3 js-yaml: ^4.1.0 json-stable-stringify-without-jsonify: ^1.0.1 levn: ^0.4.1 @@ -9930,28 +12984,27 @@ __metadata: minimatch: ^3.1.2 natural-compare: ^1.4.0 optionator: ^0.9.1 - regexpp: ^3.2.0 strip-ansi: ^6.0.1 strip-json-comments: ^3.1.0 text-table: ^0.2.0 bin: eslint: bin/eslint.js - checksum: 7acf2693b522b573657b53d2245b5522d3a131e4224b1cbf01e2c3579632fdbf62599284f68bc483e6e4eba23ae3643c9544744e0214a86e727cc361cedcd0fa + checksum: 09979a6f8451dcc508a7005b6670845c8a518376280b3fd96657a406b8b6ef29d0e480d1ba11b4eb48da93d607e0c55c9b877676fe089d09973ec152354e23b2 languageName: node linkType: hard -"espree@npm:^9.0.0, espree@npm:^9.3.1, espree@npm:^9.4.0": - version: 9.4.0 - resolution: "espree@npm:9.4.0" +"espree@npm:^9.0.0, espree@npm:^9.3.1, espree@npm:^9.5.1, espree@npm:^9.5.2": + version: 9.5.2 + resolution: "espree@npm:9.5.2" dependencies: acorn: ^8.8.0 acorn-jsx: ^5.3.2 - eslint-visitor-keys: ^3.3.0 - checksum: 2e3020dde67892d2ba3632413b44d0dc31d92c29ce72267d7ec24216a562f0a6494d3696e2fa39a3ec8c0e0088d773947ab2925fbb716801a11eb8dd313ac89c + eslint-visitor-keys: ^3.4.1 + checksum: 6506289d6eb26471c0b383ee24fee5c8ae9d61ad540be956b3127be5ce3bf687d2ba6538ee5a86769812c7c552a9d8239e8c4d150f9ea056c6d5cbe8399c03c1 languageName: node linkType: hard -"esprima@npm:^4.0.0, esprima@npm:~4.0.0": +"esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -9961,12 +13014,12 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.0": - version: 1.4.0 - resolution: "esquery@npm:1.4.0" +"esquery@npm:^1.4.0, esquery@npm:^1.4.2, esquery@npm:^1.5.0": + version: 1.5.0 + resolution: "esquery@npm:1.5.0" dependencies: estraverse: ^5.1.0 - checksum: a0807e17abd7fbe5fbd4fab673038d6d8a50675cdae6b04fbaa520c34581be0c5fa24582990e8acd8854f671dd291c78bb2efb9e0ed5b62f33bac4f9cf820210 + checksum: aefb0d2596c230118656cd4ec7532d447333a410a48834d80ea648b1e7b5c9bc9ed8b5e33a89cb04e487b60d622f44cf5713bf4abed7c97343edefdc84a35900 languageName: node linkType: hard @@ -9979,7 +13032,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.1.1": +"estraverse@npm:^4.1.1, estraverse@npm:^4.2.0": version: 4.3.0 resolution: "estraverse@npm:4.3.0" checksum: a6299491f9940bb246124a8d44b7b7a413a8336f5436f9837aaa9330209bd9ee8af7e91a654a3545aee9c54b3308e78ee360cef1d777d37cfef77d2fa33b5827 @@ -9993,34 +13046,38 @@ __metadata: languageName: node linkType: hard -"estree-util-attach-comments@npm:^1.0.0": - version: 1.0.0 - resolution: "estree-util-attach-comments@npm:1.0.0" - checksum: 8a3279dd859afa168d8832f5d88c6b6f62a0997fb30ebce0090f15ef216246bf17d88bbd10f3b404937ff096be63218ecf551e4966eec572d0dc8d527454ff02 +"estree-to-babel@npm:^3.1.0": + version: 3.2.1 + resolution: "estree-to-babel@npm:3.2.1" + dependencies: + "@babel/traverse": ^7.1.6 + "@babel/types": ^7.2.0 + c8: ^7.6.0 + checksum: a4584d0c60b80ce41abe91b11052f5d48635e811c67839942c4ebd51aa33d9f9b156ad615f71ceae2a8260b5e3054f36d73db6d0d2a3b9951483f4b6187495c8 languageName: node linkType: hard "estree-util-attach-comments@npm:^2.0.0": - version: 2.1.0 - resolution: "estree-util-attach-comments@npm:2.1.0" + version: 2.1.1 + resolution: "estree-util-attach-comments@npm:2.1.1" dependencies: "@types/estree": ^1.0.0 - checksum: 8489b977dc420e4af59b03528487b2963d7bfe2d6d265819231dce5a1a5c389109230be102d4b7b85a86ec64f75a7e70b0f306542d56ec557c83f92ec326738a + checksum: c5c2c41c9a55a169fb4fba9627057843f0d2e21e47a2e3e24318a11ffcf6bc704c0f96f405a529bddac7969b7c44f6cf86711505faaf0c5862c2024419b19704 languageName: node linkType: hard "estree-util-build-jsx@npm:^2.0.0": - version: 2.2.0 - resolution: "estree-util-build-jsx@npm:2.2.0" + version: 2.2.2 + resolution: "estree-util-build-jsx@npm:2.2.2" dependencies: "@types/estree-jsx": ^1.0.0 estree-util-is-identifier-name: ^2.0.0 estree-walker: ^3.0.0 - checksum: 639b76f5395df5234e5424e092c583d656418a07075156947b72e69183c01feeb94946e79002117cd7dff374a25115832ab4af4ad449f1f6cac3594c95006aa5 + checksum: d008ac36a45d797eadca696f41b4c1ac0587ec0e0b52560cfb0e76d14ef15fc18e526f9023b6e5457dafa9cf3f010c9bb1dfc9c727ebd7cf0ba2ebbaa43919ac languageName: node linkType: hard -"estree-util-is-identifier-name@npm:^1.1.0": +"estree-util-is-identifier-name@npm:^1.0.0": version: 1.1.0 resolution: "estree-util-is-identifier-name@npm:1.1.0" checksum: ec55a74708b2fdac7de8d5a1dd82caf36783993608f11b8bc0dcd3b426746ccf21ee7da86ab94e4500c292dc1dde48b7ce65e5dc41f3dc4363a499ea15db32cc @@ -10028,30 +13085,39 @@ __metadata: linkType: hard "estree-util-is-identifier-name@npm:^2.0.0": - version: 2.0.1 - resolution: "estree-util-is-identifier-name@npm:2.0.1" - checksum: d91693dc1c8e7f9860e5c73d3f2e0ad4fc484dc9df432086e0432c27c89f1690fe3c63f0d608d11bce77bb026a4edef434c28da5cbad0761d0292741a96b1481 + version: 2.1.0 + resolution: "estree-util-is-identifier-name@npm:2.1.0" + checksum: cab317a071fafb99cf83b57df7924bccd2e6ab4e252688739e49f00b16cefd168e279c171442b0557c80a1c80ffaa927d670dadea65bb3c9b151efb8e772e89d languageName: node linkType: hard "estree-util-to-js@npm:^1.1.0": - version: 1.1.0 - resolution: "estree-util-to-js@npm:1.1.0" + version: 1.2.0 + resolution: "estree-util-to-js@npm:1.2.0" dependencies: "@types/estree-jsx": ^1.0.0 astring: ^1.8.0 source-map: ^0.7.0 - checksum: 3ce2ef2fd78497fa7a0e5250be0f217af9060c819f7ed4f4739285e4ade4ed244536cb88e8ba1e38986af98d3a9064165122bb1622f2c6d57fe7b241b884fc47 + checksum: 93a75e1051a6a4f5c631597ecd2ed95129fadbc80a58a10475d6d6b1b076a69393ba4a8d2bb71f698401f64ccca47e3f3828dd0042cac81439b988fae0f5f8e0 languageName: node linkType: hard -"estree-util-visit@npm:^1.0.0, estree-util-visit@npm:^1.2.0": - version: 1.2.0 - resolution: "estree-util-visit@npm:1.2.0" +"estree-util-value-to-estree@npm:^1.0.0": + version: 1.3.0 + resolution: "estree-util-value-to-estree@npm:1.3.0" + dependencies: + is-plain-obj: ^3.0.0 + checksum: a13c65f0712f32897ecae128d30dedafc439e39ab3722b0a4e51c455a6a0f506fcf2cd4f4c5cce35dafb738f1f55a933a3a44ce277e2140d4a4133968b2becb3 + languageName: node + linkType: hard + +"estree-util-visit@npm:^1.0.0, estree-util-visit@npm:^1.2.1": + version: 1.2.1 + resolution: "estree-util-visit@npm:1.2.1" dependencies: "@types/estree-jsx": ^1.0.0 "@types/unist": ^2.0.0 - checksum: d36a36aed82d6cb00d24615889052e22308ff008191b3760f65f93e9d0b06d3bc448af9f99a685947f1c69fba36d9a412da243b0b026096c66ecd74054c3b090 + checksum: 6feea4fdc43b0ba0f79faf1d57cf32373007e146d4810c7c09c13f5a9c1b8600c1ac57a8d949967cedd2a9a91dddd246e19b59bacfc01e417168b4ebf220f691 languageName: node linkType: hard @@ -10062,55 +13128,48 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^0.6.1": - version: 0.6.1 - resolution: "estree-walker@npm:0.6.1" - checksum: 9d6f82a4921f11eec18f8089fb3cce6e53bcf45a8e545c42a2674d02d055fb30f25f90495f8be60803df6c39680c80dcee7f944526867eb7aa1fc9254883b23d - languageName: node - linkType: hard - "estree-walker@npm:^3.0.0": - version: 3.0.1 - resolution: "estree-walker@npm:3.0.1" - checksum: 674096950819041f1ee471e63f7aa987f2ed3a3a441cc41a5176e9ed01ea5cfd6487822c3b9c2cddd0e2c8f9d7ef52d32d06147a19b5a9ca9f8ab0c094bd43b9 + version: 3.0.3 + resolution: "estree-walker@npm:3.0.3" + dependencies: + "@types/estree": ^1.0.0 + checksum: a65728d5727b71de172c5df323385755a16c0fdab8234dc756c3854cfee343261ddfbb72a809a5660fac8c75d960bb3e21aa898c2d7e9b19bb298482ca58a3af languageName: node linkType: hard -"esutils@npm:^2.0.2": +"esutils@npm:^2.0.2, esutils@npm:^2.0.3": version: 2.0.3 resolution: "esutils@npm:2.0.3" checksum: 22b5b08f74737379a840b8ed2036a5fb35826c709ab000683b092d9054e5c2a82c27818f12604bfc2a9a76b90b6834ef081edbc1c7ae30d1627012e067c6ec87 languageName: node linkType: hard -"etag@npm:~1.8.1": +"etag@npm:1.8.1, etag@npm:~1.8.1": version: 1.8.1 resolution: "etag@npm:1.8.1" checksum: 571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff languageName: node linkType: hard -"events@npm:^3.3.0": - version: 3.3.0 - resolution: "events@npm:3.3.0" - checksum: f6f487ad2198aa41d878fa31452f1a3c00958f46e9019286ff4787c84aac329332ab45c9cdc8c445928fc6d7ded294b9e005a7fce9426488518017831b272780 +"eval@npm:0.1.6": + version: 0.1.6 + resolution: "eval@npm:0.1.6" + dependencies: + require-like: ">= 0.1.1" + checksum: 0e9246bb16256eef07afa7f31408310a784407d2fec2ddd2d7fe1f885a45b7cf37e30739e658a65d000c3dcff8d5b5c96f9819188b00e1f667b6638e75eaf23c languageName: node linkType: hard -"execa@npm:^0.2.2": - version: 0.2.2 - resolution: "execa@npm:0.2.2" +"event-loop-spinner@npm:^2.0.0, event-loop-spinner@npm:^2.1.0": + version: 2.2.0 + resolution: "event-loop-spinner@npm:2.2.0" dependencies: - cross-spawn-async: ^2.1.1 - npm-run-path: ^1.0.0 - object-assign: ^4.0.1 - path-key: ^1.0.0 - strip-eof: ^1.0.0 - checksum: 1c309d0508be08dd03e1adf0893d588748d6d0761ececd1addeee628f3079545619ff8cd550a07aa54a8a3f89991bce293b7f5888a9a5d3a748bbaf32a9c4c90 + tslib: ^2.1.0 + checksum: 4580e81fc1d8883f37884925971f03dc9a28728dd9e39fb57d6c180ac49bf830859bed04c3ce451a6d2cb22da248b6fb74572b1222aa8169de3f7b6ef62ea02c languageName: node linkType: hard -"execa@npm:^5.0.0, execa@npm:^5.1.1": +"execa@npm:5.1.1, execa@npm:^5.0.0, execa@npm:^5.1.1": version: 5.1.1 resolution: "execa@npm:5.1.1" dependencies: @@ -10127,20 +13186,20 @@ __metadata: languageName: node linkType: hard -"execa@npm:^6.1.0": - version: 6.1.0 - resolution: "execa@npm:6.1.0" +"execa@npm:^7.0.0, execa@npm:^7.1.1": + version: 7.1.1 + resolution: "execa@npm:7.1.1" dependencies: cross-spawn: ^7.0.3 get-stream: ^6.0.1 - human-signals: ^3.0.1 + human-signals: ^4.3.0 is-stream: ^3.0.0 merge-stream: ^2.0.0 npm-run-path: ^5.1.0 onetime: ^6.0.0 signal-exit: ^3.0.7 strip-final-newline: ^3.0.0 - checksum: 1a4af799839134f5c72eb63d525b87304c1114a63aa71676c91d57ccef2e26f2f53e14c11384ab11c4ec479be1efa83d11c8190e00040355c2c5c3364327fa8e + checksum: 21fa46fc69314ace4068cf820142bdde5b643a5d89831c2c9349479c1555bff137a291b8e749e7efca36535e4e0a8c772c11008ca2e84d2cbd6ca141a3c8f937 languageName: node linkType: hard @@ -10165,33 +13224,20 @@ __metadata: languageName: node linkType: hard -"expect@npm:^29.0.0": - version: 29.1.2 - resolution: "expect@npm:29.1.2" +"expect@npm:^29.0.0, expect@npm:^29.5.0": + version: 29.5.0 + resolution: "expect@npm:29.5.0" dependencies: - "@jest/expect-utils": ^29.1.2 - jest-get-type: ^29.0.0 - jest-matcher-utils: ^29.1.2 - jest-message-util: ^29.1.2 - jest-util: ^29.1.2 - checksum: 578c61459e0f4b2b8f93f11f38264446aa3be1f8bf4b85eaeb56be035535877514bc15a5aaaffc714961b872fd0ea3c2bc7dfe6efd4acf0a3315ffab0597fd7a + "@jest/expect-utils": ^29.5.0 + jest-get-type: ^29.4.3 + jest-matcher-utils: ^29.5.0 + jest-message-util: ^29.5.0 + jest-util: ^29.5.0 + checksum: 58f70b38693df6e5c6892db1bcd050f0e518d6f785175dc53917d4fa6a7359a048e5690e19ddcb96b65c4493881dd89a3dabdab1a84dfa55c10cdbdabf37b2d7 languageName: node linkType: hard -"expect@npm:^29.2.1": - version: 29.2.1 - resolution: "expect@npm:29.2.1" - dependencies: - "@jest/expect-utils": ^29.2.1 - jest-get-type: ^29.2.0 - jest-matcher-utils: ^29.2.1 - jest-message-util: ^29.2.1 - jest-util: ^29.2.1 - checksum: 0a1347b569de246b8e988a282e1b037746a64f890c89197cff891087673e0ccdc0c485c40f182659d7cc0e910dc40546719c8a00f0e2bdabcc6f627f2af49891 - languageName: node - linkType: hard - -"express@npm:^4.18.1": +"express@npm:^4.17.1, express@npm:^4.17.3": version: 4.18.2 resolution: "express@npm:4.18.2" dependencies: @@ -10246,6 +13292,48 @@ __metadata: languageName: node linkType: hard +"external-editor@npm:^3.0.3": + version: 3.1.0 + resolution: "external-editor@npm:3.1.0" + dependencies: + chardet: ^0.7.0 + iconv-lite: ^0.4.24 + tmp: ^0.0.33 + checksum: 1c2a616a73f1b3435ce04030261bed0e22d4737e14b090bb48e58865da92529c9f2b05b893de650738d55e692d071819b45e1669259b2b354bc3154d27a698c7 + languageName: node + linkType: hard + +"extract-zip@npm:2.0.1": + version: 2.0.1 + resolution: "extract-zip@npm:2.0.1" + dependencies: + "@types/yauzl": ^2.9.1 + debug: ^4.1.1 + get-stream: ^5.1.0 + yauzl: ^2.10.0 + dependenciesMeta: + "@types/yauzl": + optional: true + bin: + extract-zip: cli.js + checksum: 8cbda9debdd6d6980819cc69734d874ddd71051c9fe5bde1ef307ebcedfe949ba57b004894b585f758b7c9eeeea0e3d87f2dda89b7d25320459c2c9643ebb635 + languageName: node + linkType: hard + +"extract-zip@npm:^1.6.6": + version: 1.7.0 + resolution: "extract-zip@npm:1.7.0" + dependencies: + concat-stream: ^1.6.2 + debug: ^2.6.9 + mkdirp: ^0.5.4 + yauzl: ^2.10.0 + bin: + extract-zip: cli.js + checksum: 011bab660d738614555773d381a6ba4815d98c1cfcdcdf027e154ebcc9fc8c9ef637b3ea5c9b2144013100071ee41722ed041fc9aacc60f6198ef747cac0c073 + languageName: node + linkType: hard + "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -10267,7 +13355,27 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:3.2.12, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": +"fast-diff@npm:^1.2.0": + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: d22d371b994fdc8cce9ff510d7b8dc4da70ac327bcba20df607dd5b9cae9f908f4d1028f5fe467650f058d1e7270235ae0b8230809a262b4df587a3b3aa216c3 + languageName: node + linkType: hard + +"fast-glob@npm:3.2.11": + version: 3.2.11 + resolution: "fast-glob@npm:3.2.11" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: f473105324a7780a20c06de842e15ddbb41d3cb7e71d1e4fe6e8373204f22245d54f5ab9e2061e6a1c613047345954d29b022e0e76f5c28b1df9858179a0e6d7 + languageName: node + linkType: hard + +"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.2, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": version: 3.2.12 resolution: "fast-glob@npm:3.2.12" dependencies: @@ -10287,13 +13395,20 @@ __metadata: languageName: node linkType: hard -"fast-levenshtein@npm:^2.0.6": +"fast-levenshtein@npm:^2.0.6, fast-levenshtein@npm:~2.0.6": version: 2.0.6 resolution: "fast-levenshtein@npm:2.0.6" checksum: 92cfec0a8dfafd9c7a15fba8f2cc29cd0b62b85f056d99ce448bbcd9f708e18ab2764bda4dd5158364f4145a7c72788538994f0d1787b956ef0d1062b0f7c24c languageName: node linkType: hard +"fast-loops@npm:^1.1.3": + version: 1.1.3 + resolution: "fast-loops@npm:1.1.3" + checksum: b674378ba2ed8364ca1a00768636e88b22201c8d010fa62a8588a4cace04f90bac46714c13cf638be82b03438d2fe813600da32291fb47297a1bd7fa6cef0cee + languageName: node + linkType: hard + "fast-safe-stringify@npm:^2.1.1": version: 2.1.1 resolution: "fast-safe-stringify@npm:2.1.1" @@ -10316,20 +13431,11 @@ __metadata: linkType: hard "fastq@npm:^1.6.0": - version: 1.13.0 - resolution: "fastq@npm:1.13.0" + version: 1.15.0 + resolution: "fastq@npm:1.15.0" dependencies: reusify: ^1.0.4 - checksum: 32cf15c29afe622af187d12fc9cd93e160a0cb7c31a3bb6ace86b7dea3b28e7b72acde89c882663f307b2184e14782c6c664fa315973c03626c7d4bff070bb0b - languageName: node - linkType: hard - -"fault@npm:^1.0.0": - version: 1.0.4 - resolution: "fault@npm:1.0.4" - dependencies: - format: ^0.2.0 - checksum: 5ac610d8b09424e0f2fa8cf913064372f2ee7140a203a79957f73ed557c0e79b1a3d096064d7f40bde8132a69204c1fe25ec23634c05c6da2da2039cff26c4e7 + checksum: 0170e6bfcd5d57a70412440b8ef600da6de3b2a6c5966aeaf0a852d542daff506a0ee92d6de7679d1de82e644bce69d7a574a6c93f0b03964b5337eed75ada1a languageName: node linkType: hard @@ -10351,6 +13457,15 @@ __metadata: languageName: node linkType: hard +"fd-slicer@npm:~1.1.0": + version: 1.1.0 + resolution: "fd-slicer@npm:1.1.0" + dependencies: + pend: ~1.2.0 + checksum: c8585fd5713f4476eb8261150900d2cb7f6ff2d87f8feb306ccc8a1122efd152f1783bdb2b8dc891395744583436bfd8081d8e63ece0ec8687eeefea394d4ff2 + languageName: node + linkType: hard + "fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4": version: 3.2.0 resolution: "fetch-blob@npm:3.2.0" @@ -10361,6 +13476,13 @@ __metadata: languageName: node linkType: hard +"fetch-retry@npm:^5.0.2": + version: 5.0.6 + resolution: "fetch-retry@npm:5.0.6" + checksum: 4ad8bca6ec7a7b1212e636bb422a9ae8bb9dce38df0b441c9eb77a29af99b368029d6248ff69427da67e3d43c53808b121135ea395e7fe4f8f383e0ad65b4f27 + languageName: node + linkType: hard + "fflate@npm:^0.7.3": version: 0.7.4 resolution: "fflate@npm:0.7.4" @@ -10368,6 +13490,15 @@ __metadata: languageName: node linkType: hard +"figures@npm:^3.0.0": + version: 3.2.0 + resolution: "figures@npm:3.2.0" + dependencies: + escape-string-regexp: ^1.0.5 + checksum: 85a6ad29e9aca80b49b817e7c89ecc4716ff14e3779d9835af554db91bac41c0f289c418923519392a1e582b4d10482ad282021330cd045bb7b80c84152f2a2b + languageName: node + linkType: hard + "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -10387,14 +13518,24 @@ __metadata: languageName: node linkType: hard -"file-type@npm:^18.0.0": - version: 18.0.0 - resolution: "file-type@npm:18.0.0" +"file-system-cache@npm:^2.0.0": + version: 2.3.0 + resolution: "file-system-cache@npm:2.3.0" + dependencies: + fs-extra: 11.1.1 + ramda: 0.29.0 + checksum: 74afa2870a062500643d41e02d1fbd47a3f30100f9e153dec5233d59f05545f4c8ada6085629d624e043479ac28c0cafc31824f7b49a3f997efab8cc5d05bfee + languageName: node + linkType: hard + +"file-type@npm:^18.4.0": + version: 18.4.0 + resolution: "file-type@npm:18.4.0" dependencies: readable-web-to-node-stream: ^3.0.2 strtok3: ^7.0.0 token-types: ^5.0.1 - checksum: 67f5a927b8030e35a4faf9dd9dea9e17bcb042fb61b9851b7dd1b1b3bb3ecfdd9f83bc3bc72686316ea2bac70df652c61e10affa9b5957b1a3d731df4925e3cb + checksum: 191aa44b662417d496efc51bfb061da4c51cddfe2e3f7467b580964c3d83dbd88f76662368ea231a84d489a7d8cfc0bc2df9fefc439b519c2e6ddc498122dae0 languageName: node linkType: hard @@ -10405,6 +13546,22 @@ __metadata: languageName: node linkType: hard +"file-uri-to-path@npm:2": + version: 2.0.0 + resolution: "file-uri-to-path@npm:2.0.0" + checksum: 4a71a99ddaa6ae7ae7bffe2948c34da59982ed465d930a0af9cb59fcc10fcd93366cc356ec3337c18373fde5df7ac52afda4558f155febd1799d135552207edb + languageName: node + linkType: hard + +"filelist@npm:^1.0.4": + version: 1.0.4 + resolution: "filelist@npm:1.0.4" + dependencies: + minimatch: ^5.0.1 + checksum: a303573b0821e17f2d5e9783688ab6fbfce5d52aaac842790ae85e704a6f5e4e3538660a63183d6453834dedf1e0f19a9dadcebfa3e926c72397694ea11f5160 + languageName: node + linkType: hard + "fill-range@npm:^7.0.1": version: 7.0.1 resolution: "fill-range@npm:7.0.1" @@ -10414,13 +13571,6 @@ __metadata: languageName: node linkType: hard -"filter-obj@npm:^1.1.0": - version: 1.1.0 - resolution: "filter-obj@npm:1.1.0" - checksum: cf2104a7c45ff48e7f505b78a3991c8f7f30f28bd8106ef582721f321f1c6277f7751aacd5d83026cb079d9d5091082f588d14a72e7c5d720ece79118fa61e10 - languageName: node - linkType: hard - "finalhandler@npm:1.2.0": version: 1.2.0 resolution: "finalhandler@npm:1.2.0" @@ -10436,6 +13586,28 @@ __metadata: languageName: node linkType: hard +"find-cache-dir@npm:^2.0.0": + version: 2.1.0 + resolution: "find-cache-dir@npm:2.1.0" + dependencies: + commondir: ^1.0.1 + make-dir: ^2.0.0 + pkg-dir: ^3.0.0 + checksum: 60ad475a6da9f257df4e81900f78986ab367d4f65d33cf802c5b91e969c28a8762f098693d7a571b6e4dd4c15166c2da32ae2d18b6766a18e2071079448fdce4 + languageName: node + linkType: hard + +"find-cache-dir@npm:^3.0.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: ^1.0.1 + make-dir: ^3.0.2 + pkg-dir: ^4.1.0 + checksum: 1e61c2e64f5c0b1c535bd85939ae73b0e5773142713273818cc0b393ee3555fb0fd44e1a5b161b8b6c3e03e98c2fcc9c227d784850a13a90a8ab576869576817 + languageName: node + linkType: hard + "find-replace@npm:^3.0.0": version: 3.0.0 resolution: "find-replace@npm:3.0.0" @@ -10454,6 +13626,15 @@ __metadata: languageName: node linkType: hard +"find-up@npm:^3.0.0": + version: 3.0.0 + resolution: "find-up@npm:3.0.0" + dependencies: + locate-path: ^3.0.0 + checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9 + languageName: node + linkType: hard + "find-up@npm:^4.0.0, find-up@npm:^4.1.0": version: 4.1.0 resolution: "find-up@npm:4.1.0" @@ -10474,16 +13655,6 @@ __metadata: languageName: node linkType: hard -"find-yarn-workspace-root2@npm:1.2.16": - version: 1.2.16 - resolution: "find-yarn-workspace-root2@npm:1.2.16" - dependencies: - micromatch: ^4.0.2 - pkg-dir: ^4.2.0 - checksum: b4abdd37ab87c2172e2abab69ecbfed365d63232742cd1f0a165020fba1b200478e944ec2035c6aaf0ae142ac4c523cbf08670f45e59b242bcc295731b017825 - languageName: node - linkType: hard - "flat-cache@npm:^3.0.4": version: 3.0.4 resolution: "flat-cache@npm:3.0.4" @@ -10501,6 +13672,22 @@ __metadata: languageName: node linkType: hard +"flow-parser@npm:0.*": + version: 0.206.0 + resolution: "flow-parser@npm:0.206.0" + checksum: 1b87d87b59815b09852a6981543ad222da7f4d0e0c26702f9d5e0065174f5f64d2563db76d07a487c6b55e1979344e3845ac42929db70f77a82e8c9171a62a86 + languageName: node + linkType: hard + +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + "foreground-child@npm:^2.0.0": version: 2.0.0 resolution: "foreground-child@npm:2.0.0" @@ -10511,6 +13698,16 @@ __metadata: languageName: node linkType: hard +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" + dependencies: + cross-spawn: ^7.0.0 + signal-exit: ^4.0.1 + checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 + languageName: node + linkType: hard + "forever-agent@npm:~0.6.1": version: 0.6.1 resolution: "forever-agent@npm:0.6.1" @@ -10518,14 +13715,14 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^2.2.0": - version: 2.5.1 - resolution: "form-data@npm:2.5.1" +"form-data@npm:^3.0.0": + version: 3.0.1 + resolution: "form-data@npm:3.0.1" dependencies: asynckit: ^0.4.0 - combined-stream: ^1.0.6 + combined-stream: ^1.0.8 mime-types: ^2.1.12 - checksum: 5134ada56cc246b293a1ac7678dba6830000603a3979cf83ff7b2f21f2e3725202237cfb89e32bcb38a1d35727efbd3c3a22e65b42321e8ade8eec01ce755d08 + checksum: b019e8d35c8afc14a2bd8a7a92fa4f525a4726b6d5a9740e8d2623c30e308fbb58dc8469f90415a856698933c8479b01646a9dff33c87cc4e76d72aedbbf860d languageName: node linkType: hard @@ -10567,15 +13764,15 @@ __metadata: languageName: node linkType: hard -"formidable@npm:^2.0.1": - version: 2.0.1 - resolution: "formidable@npm:2.0.1" +"formidable@npm:^2.1.2": + version: 2.1.2 + resolution: "formidable@npm:2.1.2" dependencies: - dezalgo: 1.0.3 - hexoid: 1.0.0 - once: 1.4.0 - qs: 6.9.3 - checksum: b35445444e7b6f6f3cacbadd5e6fadd6b5b2e83162e7c41fa22586df584cc515bbd1ee0dc2b701ce031fcb000d71769bc77bd0958db8a89a0ceb8b2227bdc695 + dezalgo: ^1.0.4 + hexoid: ^1.0.0 + once: ^1.4.0 + qs: ^6.11.0 + checksum: 81c8e5d89f5eb873e992893468f0de22c01678ca3d315db62be0560f9de1c77d4faefc9b1f4575098eb2263b3c81ba1024833a9fc3206297ddbac88a4f69b7a8 languageName: node linkType: hard @@ -10600,6 +13797,28 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:11.1.0": + version: 11.1.0 + resolution: "fs-extra@npm:11.1.0" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: 5ca476103fa1f5ff4a9b3c4f331548f8a3c1881edaae323a4415d3153b5dc11dc6a981c8d1dd93eec8367ceee27b53f8bd27eecbbf66ffcdd04927510c171e7f + languageName: node + linkType: hard + +"fs-extra@npm:11.1.1, fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.0, fs-extra@npm:^11.1.1": + version: 11.1.1 + resolution: "fs-extra@npm:11.1.1" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: fb883c68245b2d777fbc1f2082c9efb084eaa2bbf9fddaa366130d196c03608eebef7fb490541276429ee1ca99f317e2d73e96f5ca0999eefedf5a624ae1edfd + languageName: node + linkType: hard + "fs-extra@npm:^10.0.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -10653,6 +13872,22 @@ __metadata: languageName: node linkType: hard +"fs-minipass@npm:^3.0.0": + version: 3.0.2 + resolution: "fs-minipass@npm:3.0.2" + dependencies: + minipass: ^5.0.0 + checksum: e9cc0e1f2d01c6f6f62f567aee59530aba65c6c7b2ae88c5027bc34c711ebcfcfaefd0caf254afa6adfe7d1fba16bc2537508a6235196bac7276747d078aef0a + languageName: node + linkType: hard + +"fs-monkey@npm:^1.0.3": + version: 1.0.3 + resolution: "fs-monkey@npm:1.0.3" + checksum: cf50804833f9b88a476911ae911fe50f61a98d986df52f890bd97e7262796d023698cb2309fa9b74fdd8974f04315b648748a0a8ee059e7d5257b293bfc409c0 + languageName: node + linkType: hard + "fs-then-native@npm:^2.0.0": version: 2.0.0 resolution: "fs-then-native@npm:2.0.0" @@ -10679,7 +13914,7 @@ __metadata: "fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.2 - resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7" + resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1" dependencies: node-gyp: latest conditions: os=darwin @@ -10698,6 +13933,16 @@ __metadata: languageName: node linkType: hard +"ftp@npm:^0.3.10": + version: 0.3.10 + resolution: "ftp@npm:0.3.10" + dependencies: + readable-stream: 1.1.x + xregexp: 2.0.0 + checksum: ddd313c1d44eb7429f3a7d77a0155dc8fe86a4c64dca58f395632333ce4b4e74c61413c6e0ef66ea3f3d32d905952fbb6d028c7117d522f793eb1fa282e17357 + languageName: node + linkType: hard + "function-bind@npm:^1.1.1": version: 1.1.1 resolution: "function-bind@npm:1.1.1" @@ -10717,7 +13962,7 @@ __metadata: languageName: node linkType: hard -"functions-have-names@npm:^1.2.2": +"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 @@ -10773,6 +14018,15 @@ __metadata: languageName: node linkType: hard +"generic-names@npm:^4.0.0": + version: 4.0.0 + resolution: "generic-names@npm:4.0.0" + dependencies: + loader-utils: ^3.2.0 + checksum: 8dabd2505164191501b75f2861b5e1194458a344ae2a7c9776bdd72d1f50b248dff737bcdf118fff677275edb3632f2d10662e6ac122dd7b245c5baa8d303270 + languageName: node + linkType: hard + "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" @@ -10794,14 +14048,15 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3": - version: 1.1.3 - resolution: "get-intrinsic@npm:1.1.3" +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0": + version: 1.2.1 + resolution: "get-intrinsic@npm:1.2.1" dependencies: function-bind: ^1.1.1 has: ^1.0.3 + has-proto: ^1.0.1 has-symbols: ^1.0.3 - checksum: 152d79e87251d536cf880ba75cfc3d6c6c50e12b3a64e1ea960e73a3752b47c69f46034456eae1b0894359ce3bc64c55c186f2811f8a788b75b638b06fab228a + checksum: 5b61d88552c24b0cf6fa2d1b3bc5459d7306f699de060d76442cce49a4721f52b8c560a33ab392cf5575b7810277d54ded9d4d39a1ea61855619ebc005aa7e5f languageName: node linkType: hard @@ -10812,10 +14067,10 @@ __metadata: languageName: node linkType: hard -"get-own-property-symbols@npm:^0.9.5": - version: 0.9.5 - resolution: "get-own-property-symbols@npm:0.9.5" - checksum: 51763b9b5e28d2ee6ee3d760f790b5081b1fcdac0b41acb6844c4d00c5a69bb82eecf2d2145334c931892b0f342c02a3b0c56d6e7bed6d74cd2d667eb087dc14 +"get-npm-tarball-url@npm:^2.0.3": + version: 2.0.3 + resolution: "get-npm-tarball-url@npm:2.0.3" + checksum: 8ad48a6f1126697665e12ebf053e0d1c3b15b3c4f29ea6c458387ac68d044ea1c08f0f2eb5c0fe35447fdd2da4f2fb5c9882feb5a2ea195c773f94e762c9b886 languageName: node linkType: hard @@ -10830,82 +14085,175 @@ __metadata: version: 4.2.1 resolution: "get-pkg-repo@npm:4.2.1" dependencies: - "@hutson/parse-repository-url": ^3.0.0 - hosted-git-info: ^4.0.0 - through2: ^2.0.0 - yargs: ^16.2.0 + "@hutson/parse-repository-url": ^3.0.0 + hosted-git-info: ^4.0.0 + through2: ^2.0.0 + yargs: ^16.2.0 + bin: + get-pkg-repo: src/cli.js + checksum: 5abf169137665e45b09a857b33ad2fdcf2f4a09f0ecbd0ebdd789a7ce78c39186a21f58621127eb724d2d4a3a7ee8e6bd4ac7715efda01ad5200665afc218e0d + languageName: node + linkType: hard + +"get-port@npm:^5.1.1": + version: 5.1.1 + resolution: "get-port@npm:5.1.1" + checksum: 0162663ffe5c09e748cd79d97b74cd70e5a5c84b760a475ce5767b357fb2a57cb821cee412d646aa8a156ed39b78aab88974eddaa9e5ee926173c036c0713787 + languageName: node + linkType: hard + +"get-stream@npm:^5.1.0": + version: 5.2.0 + resolution: "get-stream@npm:5.2.0" + dependencies: + pump: ^3.0.0 + checksum: 8bc1a23174a06b2b4ce600df38d6c98d2ef6d84e020c1ddad632ad75bac4e092eeb40e4c09e0761c35fc2dbc5e7fff5dab5e763a383582c4a167dd69a905bd12 + languageName: node + linkType: hard + +"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad + languageName: node + linkType: hard + +"get-symbol-description@npm:^1.0.0": + version: 1.0.0 + resolution: "get-symbol-description@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 + languageName: node + linkType: hard + +"get-tsconfig@npm:^4.5.0": + version: 4.5.0 + resolution: "get-tsconfig@npm:4.5.0" + checksum: 687ee2bd69a5a07db2e2edeb4d6c41c3debb38f6281a66beb643e3f5b520252e27fcbbb5702bdd9a5f05dcf8c1d2e0150a4d8a960ad75cbdea74e06a51e91b02 + languageName: node + linkType: hard + +"get-uri@npm:3": + version: 3.0.2 + resolution: "get-uri@npm:3.0.2" + dependencies: + "@tootallnate/once": 1 + data-uri-to-buffer: 3 + debug: 4 + file-uri-to-path: 2 + fs-extra: ^8.1.0 + ftp: ^0.3.10 + checksum: 5325b2906b08ca37529ca421cf52bc50376e75c6a945e0a8064e3f76b4bb67b8ab1e316a2fc7a307c8c606ab36d030720f39a57c97b027ff1134335e12102946 + languageName: node + linkType: hard + +"getpass@npm:^0.1.1": + version: 0.1.7 + resolution: "getpass@npm:0.1.7" + dependencies: + assert-plus: ^1.0.0 + checksum: ab18d55661db264e3eac6012c2d3daeafaab7a501c035ae0ccb193c3c23e9849c6e29b6ac762b9c2adae460266f925d55a3a2a3a3c8b94be2f222df94d70c046 + languageName: node + linkType: hard + +"giget@npm:^1.0.0": + version: 1.1.2 + resolution: "giget@npm:1.1.2" + dependencies: + colorette: ^2.0.19 + defu: ^6.1.2 + https-proxy-agent: ^5.0.1 + mri: ^1.2.0 + node-fetch-native: ^1.0.2 + pathe: ^1.1.0 + tar: ^6.1.13 bin: - get-pkg-repo: src/cli.js - checksum: 5abf169137665e45b09a857b33ad2fdcf2f4a09f0ecbd0ebdd789a7ce78c39186a21f58621127eb724d2d4a3a7ee8e6bd4ac7715efda01ad5200665afc218e0d + giget: dist/cli.mjs + checksum: 76ad0f7e792ee95dd6c4e1096697fdcce61a2a3235a6c21761fc3e0d1053342074ce71c80059d6d4363fd34152e5d7b2e58221412f300c852ff7d4a12d0321fe languageName: node linkType: hard -"get-port@npm:^3.1.0": - version: 3.2.0 - resolution: "get-port@npm:3.2.0" - checksum: 31f530326569683ac4b7452eb7573c40e9dbe52aec14d80745c35475261e6389160da153d5b8ae911150b4ce99003472b30c69ba5be0cedeaa7865b95542d168 +"git-cliff-darwin-arm64@npm:1.2.0": + version: 1.2.0 + resolution: "git-cliff-darwin-arm64@npm:1.2.0" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"get-port@npm:^6.1.2": - version: 6.1.2 - resolution: "get-port@npm:6.1.2" - checksum: e3c3d591492a11393455ef220f24c812a28f7da56ec3e4a2512d931a1f196d42850b50ac6138349a44622eda6dc3c0ccd8495cd91376d968e2d9e6f6f849e0a9 +"git-cliff-darwin-x64@npm:1.2.0": + version: 1.2.0 + resolution: "git-cliff-darwin-x64@npm:1.2.0" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"get-stream@npm:^4.1.0": - version: 4.1.0 - resolution: "get-stream@npm:4.1.0" - dependencies: - pump: ^3.0.0 - checksum: 443e1914170c15bd52ff8ea6eff6dfc6d712b031303e36302d2778e3de2506af9ee964d6124010f7818736dcfde05c04ba7ca6cc26883106e084357a17ae7d73 +"git-cliff-linux-arm64@npm:1.2.0": + version: 1.2.0 + resolution: "git-cliff-linux-arm64@npm:1.2.0" + conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"get-stream@npm:^5.1.0": - version: 5.2.0 - resolution: "get-stream@npm:5.2.0" - dependencies: - pump: ^3.0.0 - checksum: 8bc1a23174a06b2b4ce600df38d6c98d2ef6d84e020c1ddad632ad75bac4e092eeb40e4c09e0761c35fc2dbc5e7fff5dab5e763a383582c4a167dd69a905bd12 +"git-cliff-linux-x64@npm:1.2.0": + version: 1.2.0 + resolution: "git-cliff-linux-x64@npm:1.2.0" + conditions: os=linux & cpu=x64 languageName: node linkType: hard -"get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": - version: 6.0.1 - resolution: "get-stream@npm:6.0.1" - checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad +"git-cliff-windows-arm64@npm:1.2.0": + version: 1.2.0 + resolution: "git-cliff-windows-arm64@npm:1.2.0" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" - dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.1.1 - checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 +"git-cliff-windows-x64@npm:1.2.0": + version: 1.2.0 + resolution: "git-cliff-windows-x64@npm:1.2.0" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"get-tsconfig@npm:^4.2.0": - version: 4.2.0 - resolution: "get-tsconfig@npm:4.2.0" - checksum: dfae3520bee20b71a651fdc93fd29901013dfc4df9fb41a423cf3efb4468c79087ef9d3bc3d0625b6486397730991d2a749eed4985d8ab411f481319c3e931e5 +"git-cliff@npm:^1.1.2": + version: 1.2.0 + resolution: "git-cliff@npm:1.2.0" + dependencies: + git-cliff-darwin-arm64: 1.2.0 + git-cliff-darwin-x64: 1.2.0 + git-cliff-linux-arm64: 1.2.0 + git-cliff-linux-x64: 1.2.0 + git-cliff-windows-arm64: 1.2.0 + git-cliff-windows-x64: 1.2.0 + dependenciesMeta: + git-cliff-darwin-arm64: + optional: true + git-cliff-darwin-x64: + optional: true + git-cliff-linux-arm64: + optional: true + git-cliff-linux-x64: + optional: true + git-cliff-windows-arm64: + optional: true + git-cliff-windows-x64: + optional: true + bin: + git-cliff: lib/index.js + checksum: f9081a5fd13db895e95f5c72194a3a9d4dfdfddbae748384b5f15d97dd65f5002a4318f0491c9fda0e9b45f6ddeb634b98ff4751e51123946754642545248474 languageName: node linkType: hard -"getpass@npm:^0.1.1": - version: 0.1.7 - resolution: "getpass@npm:0.1.7" - dependencies: - assert-plus: ^1.0.0 - checksum: ab18d55661db264e3eac6012c2d3daeafaab7a501c035ae0ccb193c3c23e9849c6e29b6ac762b9c2adae460266f925d55a3a2a3a3c8b94be2f222df94d70c046 +"git-hooks-list@npm:1.0.3": + version: 1.0.3 + resolution: "git-hooks-list@npm:1.0.3" + checksum: a1dd03d39c1d727ba08a35dbdbdcc6e96de8c4170c942dc95bf787ca6e34998d39fb5295a00242b58a3d265de0b69a0686d0cf583baa6b7830f268542c4576b9 languageName: node linkType: hard -"git-raw-commits@npm:^2.0.0, git-raw-commits@npm:^2.0.8": +"git-raw-commits@npm:^2.0.11, git-raw-commits@npm:^2.0.8": version: 2.0.11 resolution: "git-raw-commits@npm:2.0.11" dependencies: @@ -10958,10 +14306,17 @@ __metadata: languageName: node linkType: hard -"github-slugger@npm:^1.1.1, github-slugger@npm:^1.4.0": - version: 1.4.0 - resolution: "github-slugger@npm:1.4.0" - checksum: 4f52e7a21f5c6a4c5328f01fe4fe13ae8881fea78bfe31f9e72c4038f97e3e70d52fb85aa7633a52c501dc2486874474d9abd22aa61cbe9b113099a495551c6b +"github-slugger@npm:^1.0.0": + version: 1.5.0 + resolution: "github-slugger@npm:1.5.0" + checksum: c70988224578b3bdaa25df65973ffc8c24594a77a28550c3636e495e49d17aef5cdb04c04fa3f1744babef98c61eecc6a43299a13ea7f3cc33d680bf9053ffbe + languageName: node + linkType: hard + +"github-slugger@npm:^2.0.0": + version: 2.0.0 + resolution: "github-slugger@npm:2.0.0" + checksum: 250375cde2058f21454872c2c79f72c4637340c30c51ff158ca4ec71cbc478f33d54477d787a662f9207aeb095a2060f155bc01f15329ba8a5fb6698e0fc81f8 languageName: node linkType: hard @@ -10974,7 +14329,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^6.0.1": +"glob-parent@npm:^6.0.2": version: 6.0.2 resolution: "glob-parent@npm:6.0.2" dependencies: @@ -10983,10 +14338,32 @@ __metadata: languageName: node linkType: hard -"glob-regex@npm:^0.3.0": - version: 0.3.2 - resolution: "glob-regex@npm:0.3.2" - checksum: 4f7adee18e750cbc3a328acb879631feca56dbfc03016cec53d5a54e50663ddc96e24e244ec8c1a5ee883515126754d89deb825eba529d32b869a0ae46f95e5c +"glob-promise@npm:^4.2.0": + version: 4.2.2 + resolution: "glob-promise@npm:4.2.2" + dependencies: + "@types/glob": ^7.1.3 + peerDependencies: + glob: ^7.1.6 + checksum: c1a3d95f7c8393e4151d4899ec4e42bb2e8237160f840ad1eccbe9247407da8b6c13e28f463022e011708bc40862db87b9b77236d35afa3feb8aa86d518f2dfe + languageName: node + linkType: hard + +"glob-promise@npm:^6.0.2": + version: 6.0.2 + resolution: "glob-promise@npm:6.0.2" + dependencies: + "@types/glob": ^8.0.0 + peerDependencies: + glob: ^8.0.3 + checksum: 3caa63b052ddcf28d3498a0c93ef623bc43d0fa57487844782b77175c32db1602fd63e4e26091075125083b21eb3e81b4318d5d24139b9b033a764e64b6b3bc3 + languageName: node + linkType: hard + +"glob-to-regexp@npm:^0.4.1": + version: 0.4.1 + resolution: "glob-to-regexp@npm:0.4.1" + checksum: e795f4e8f06d2a15e86f76e4d92751cf8bbfcf0157cea5c2f0f35678a8195a750b34096b1256e436f0cebc1883b5ff0888c47348443e69546a5a87f9e1eb1167 languageName: node linkType: hard @@ -11018,7 +14395,22 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:~7.2.0": +"glob@npm:^10.2.2": + version: 10.2.6 + resolution: "glob@npm:10.2.6" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.0.3 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 + path-scurry: ^1.7.0 + bin: + glob: dist/cjs/src/bin.js + checksum: 94c5964bfa9df95207a69a3bd9b07b99ea7b5ba1f36dd73a8914378cee9436a205b9b5bdff58872abc238684ea7f4b4936e932155b8885250818bcc8d5321ddf + languageName: node + linkType: hard + +"glob@npm:^7.0.0, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0, glob@npm:~7.2.0": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -11032,30 +14424,16 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.1": - version: 8.0.3 - resolution: "glob@npm:8.0.3" +"glob@npm:^8.0.0, glob@npm:^8.0.1, glob@npm:^8.1.0": + version: 8.1.0 + resolution: "glob@npm:8.1.0" dependencies: fs.realpath: ^1.0.0 inflight: ^1.0.4 inherits: 2 minimatch: ^5.0.1 once: ^1.3.0 - checksum: 50bcdea19d8e79d8de5f460b1939ffc2b3299eac28deb502093fdca22a78efebc03e66bf54f0abc3d3d07d8134d19a32850288b7440d77e072aa55f9d33b18c5 - languageName: node - linkType: hard - -"global-agent@npm:^3.0.0": - version: 3.0.0 - resolution: "global-agent@npm:3.0.0" - dependencies: - boolean: ^3.0.1 - es6-error: ^4.1.1 - matcher: ^3.0.0 - roarr: ^2.15.3 - semver: ^7.3.2 - serialize-error: ^7.0.1 - checksum: 75074d80733b4bd5386c47f5df028e798018025beac0ab310e9908c72bf5639e408203e7bca0130d5ee01b5f4abc6d34385d96a9f950ea5fe1979bb431c808f7 + checksum: 92fbea3221a7d12075f26f0227abac435de868dd0736a17170663783296d0dd8d3d532a5672b4488a439bf5d7fb85cdd07c11185d6cd39184f0385cbdfb86a47 languageName: node linkType: hard @@ -11068,15 +14446,6 @@ __metadata: languageName: node linkType: hard -"global-dirs@npm:^3.0.0": - version: 3.0.0 - resolution: "global-dirs@npm:3.0.0" - dependencies: - ini: 2.0.0 - checksum: 953c17cf14bf6ee0e2100ae82a0d779934eed8a3ec5c94a7a4f37c5b3b592c31ea015fb9a15cf32484de13c79f4a814f3015152f3e1d65976cfbe47c1bfe4a88 - languageName: node - linkType: hard - "globals@npm:^11.1.0, globals@npm:^11.12.0": version: 11.12.0 resolution: "globals@npm:11.12.0" @@ -11084,16 +14453,16 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.15.0": - version: 13.17.0 - resolution: "globals@npm:13.17.0" +"globals@npm:^13.19.0": + version: 13.20.0 + resolution: "globals@npm:13.20.0" dependencies: type-fest: ^0.20.2 - checksum: fbaf4112e59b92c9f5575e85ce65e9e17c0b82711196ec5f58beb08599bbd92fd72703d6dfc9b080381fd35b644e1b11dcf25b38cc2341ec21df942594cbc8ce + checksum: ad1ecf914bd051325faad281d02ea2c0b1df5d01bd94d368dcc5513340eac41d14b3c61af325768e3c7f8d44576e72780ec0b6f2d366121f8eec6e03c3a3b97a languageName: node linkType: hard -"globalthis@npm:^1.0.1": +"globalthis@npm:^1.0.3": version: 1.0.3 resolution: "globalthis@npm:1.0.3" dependencies: @@ -11102,14 +14471,23 @@ __metadata: languageName: node linkType: hard -"globalyzer@npm:0.1.0": - version: 0.1.0 - resolution: "globalyzer@npm:0.1.0" - checksum: 419a0f95ba542534fac0842964d31b3dc2936a479b2b1a8a62bad7e8b61054faa9b0a06ad9f2e12593396b9b2621cac93358d9b3071d33723fb1778608d358a1 +"globby@npm:10.0.0": + version: 10.0.0 + resolution: "globby@npm:10.0.0" + dependencies: + "@types/glob": ^7.1.1 + array-union: ^2.1.0 + dir-glob: ^3.0.1 + fast-glob: ^3.0.3 + glob: ^7.1.3 + ignore: ^5.1.1 + merge2: ^1.2.3 + slash: ^3.0.0 + checksum: fbff58d2fcaedd9207901f6e3b5341ff885b6d499c3a095f7befde0fd03ec1ea634452a82f81e894e46f6a5d704da44b842ba93066f90dced52adf84d4b8d1cc languageName: node linkType: hard -"globby@npm:^11.0.1, globby@npm:^11.0.3, globby@npm:^11.1.0": +"globby@npm:^11.0.1, globby@npm:^11.0.2, globby@npm:^11.0.3, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -11123,49 +14501,51 @@ __metadata: languageName: node linkType: hard -"globby@npm:^13.1.2": - version: 13.1.2 - resolution: "globby@npm:13.1.2" +"globby@npm:^13.1.1, globby@npm:^13.1.3": + version: 13.1.4 + resolution: "globby@npm:13.1.4" dependencies: dir-glob: ^3.0.1 fast-glob: ^3.2.11 ignore: ^5.2.0 merge2: ^1.4.1 slash: ^4.0.0 - checksum: c148fcda0c981f00fb434bb94ca258f0a9d23cedbde6fb3f37098e1abde5b065019e2c63fe2aa2fad4daf2b54bf360b4d0423d85fb3a63d09ed75a2837d4de0f + checksum: e8bc13879972082d590cd1b0e27080d90d2e12fff7eeb2cee9329c29115ace14cc5b9f899e3d6beb136ba826307a727016658919a6f383e1511d698acee81741 languageName: node linkType: hard -"globrex@npm:^0.1.2": - version: 0.1.2 - resolution: "globrex@npm:0.1.2" - checksum: adca162494a176ce9ecf4dd232f7b802956bb1966b37f60c15e49d2e7d961b66c60826366dc2649093cad5a0d69970cfa8875bd1695b5a1a2f33dcd2aa88da3c +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 languageName: node linkType: hard -"got@npm:^9.6.0": - version: 9.6.0 - resolution: "got@npm:9.6.0" +"got@npm:^11.0.0, got@npm:^11.7.0": + version: 11.8.6 + resolution: "got@npm:11.8.6" dependencies: - "@sindresorhus/is": ^0.14.0 - "@szmarczak/http-timer": ^1.1.2 - cacheable-request: ^6.0.0 - decompress-response: ^3.3.0 - duplexer3: ^0.1.4 - get-stream: ^4.1.0 - lowercase-keys: ^1.0.1 - mimic-response: ^1.0.1 - p-cancelable: ^1.0.0 - to-readable-stream: ^1.0.0 - url-parse-lax: ^3.0.0 - checksum: 941807bd9704bacf5eb401f0cc1212ffa1f67c6642f2d028fd75900471c221b1da2b8527f4553d2558f3faeda62ea1cf31665f8b002c6137f5de8732f07370b0 + "@sindresorhus/is": ^4.0.0 + "@szmarczak/http-timer": ^4.0.5 + "@types/cacheable-request": ^6.0.1 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^5.0.3 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + http2-wrapper: ^1.0.0-beta.5.2 + lowercase-keys: ^2.0.0 + p-cancelable: ^2.0.0 + responselike: ^2.0.0 + checksum: bbc783578a8d5030c8164ef7f57ce41b5ad7db2ed13371e1944bef157eeca5a7475530e07c0aaa71610d7085474d0d96222c9f4268d41db333a17e39b463f45d languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.5, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": - version: 4.2.10 - resolution: "graceful-fs@npm:4.2.10" - checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 languageName: node linkType: hard @@ -11176,6 +14556,13 @@ __metadata: languageName: node linkType: hard +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: bab8f0be9b568857c7bec9fda95a89f87b783546d02951c40c33f84d05bb7da3fd10f863a9beb901463669b6583173a8c8cc6d6b306ea2b9b9d5d3d943c3a673 + languageName: node + linkType: hard + "gray-matter@npm:^4.0.3": version: 4.0.3 resolution: "gray-matter@npm:4.0.3" @@ -11188,6 +14575,22 @@ __metadata: languageName: node linkType: hard +"gunzip-maybe@npm:^1.4.2": + version: 1.4.2 + resolution: "gunzip-maybe@npm:1.4.2" + dependencies: + browserify-zlib: ^0.1.4 + is-deflate: ^1.0.0 + is-gzip: ^1.0.0 + peek-stream: ^1.1.0 + pumpify: ^1.3.3 + through2: ^2.0.3 + bin: + gunzip-maybe: bin.js + checksum: bc4d4977c24a2860238df271de75d53dd72a359d19f1248d1c613807dc221d3b8ae09624e3085c8106663e3e1b59db62a85b261d1138c2cc24efad9df577d4e1 + languageName: node + linkType: hard + "gzip-size@npm:^6.0.0": version: 6.0.0 resolution: "gzip-size@npm:6.0.0" @@ -11215,18 +14618,17 @@ __metadata: languageName: node linkType: hard -"happy-dom@npm:^7.6.0": - version: 7.6.0 - resolution: "happy-dom@npm:7.6.0" +"happy-dom@npm:^9.20.1": + version: 9.20.1 + resolution: "happy-dom@npm:9.20.1" dependencies: css.escape: ^1.5.1 - he: ^1.2.0 - node-fetch: ^2.x.x - sync-request: ^6.1.0 + entities: ^4.5.0 + iconv-lite: ^0.6.3 webidl-conversions: ^7.0.0 whatwg-encoding: ^2.0.0 whatwg-mimetype: ^3.0.0 - checksum: 96fd73ccea28edfbbe97bc900d358ac0bff340694ccdc4fb6b6cd45ab60701329c047f4c6071770f88d29b3b640d50d039772529df8042e12452e7f9a8204ce9 + checksum: 4c388ddb9cacfc30900e4d93183ad02540d2a8da94c0297d707c3f9f37f7464532d7beeb02055ff292732bdd8f56c76e2897d6a119c6c66e878146006cf010dd languageName: node linkType: hard @@ -11284,12 +14686,10 @@ __metadata: languageName: node linkType: hard -"has-package-exports@npm:^1.1.0": - version: 1.3.0 - resolution: "has-package-exports@npm:1.3.0" - dependencies: - "@ljharb/has-package-exports-patterns": ^0.0.2 - checksum: d3c68581c4a2f92d3a44480b757ee3a06e31c1dec7089ac88d10bf59cadb9596c69fcf0d8bf6e5c623a1bd3f0c636b8f9736894fdd9ce8757de7058e76d2b766 +"has-own-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "has-own-prop@npm:2.0.0" + checksum: ca6336e85ead2295c9603880cbc199e2d3ff7eaea0e9035d68fbc79892e9cf681abc62c0909520f112c671dad9961be2173b21dff951358cc98425c560e789e0 languageName: node linkType: hard @@ -11302,6 +14702,13 @@ __metadata: languageName: node linkType: hard +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e + languageName: node + linkType: hard + "has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" @@ -11325,13 +14732,6 @@ __metadata: languageName: node linkType: hard -"has-yarn@npm:^2.1.0": - version: 2.1.0 - resolution: "has-yarn@npm:2.1.0" - checksum: 5eb1d0bb8518103d7da24532bdbc7124ffc6d367b5d3c10840b508116f2f1bcbcf10fd3ba843ff6e2e991bdf9969fd862d42b2ed58aade88343326c950b7e7f7 - languageName: node - linkType: hard - "has@npm:^1.0.3": version: 1.0.3 resolution: "has@npm:1.0.3" @@ -11341,82 +14741,66 @@ __metadata: languageName: node linkType: hard -"hast-to-hyperscript@npm:^10.0.0": - version: 10.0.1 - resolution: "hast-to-hyperscript@npm:10.0.1" - dependencies: - "@types/unist": ^2.0.0 - comma-separated-tokens: ^2.0.0 - property-information: ^6.0.0 - space-separated-tokens: ^2.0.0 - style-to-object: ^0.3.0 - unist-util-is: ^5.0.0 - web-namespaces: ^2.0.0 - checksum: 0ec7a6f873312421c6cfa84f8c842fa00c74e96018c371ace4800fda6590e208db8e31d4e84b09e436fe6b9b87b2fd2968b30c27881ff82fc9fe466a0f59b922 +"hash-wasm@npm:^4.9.0": + version: 4.9.0 + resolution: "hash-wasm@npm:4.9.0" + checksum: b8734247fb7f69941f6564179dd891b7de21aa5877b9e32a5c6d777c2ab45cf5a6b021ade2b0156ec780ac41188486d571d9d526ef8206dda1ad306c81112a8a languageName: node linkType: hard "hast-util-from-parse5@npm:^7.0.0": - version: 7.1.0 - resolution: "hast-util-from-parse5@npm:7.1.0" + version: 7.1.2 + resolution: "hast-util-from-parse5@npm:7.1.2" dependencies: "@types/hast": ^2.0.0 - "@types/parse5": ^6.0.0 "@types/unist": ^2.0.0 hastscript: ^7.0.0 property-information: ^6.0.0 vfile: ^5.0.0 vfile-location: ^4.0.0 web-namespaces: ^2.0.0 - checksum: 4a774700042e03aeecca6b6977f0e915069eefcf81c30d59ae0e1d2d7170e419065bcd8708504cb7b4d19b05367daee2177ddce47db1b5a654bb7ec19ba8d227 + checksum: 7b4ed5b508b1352127c6719f7b0c0880190cf9859fe54ccaf7c9228ecf623d36cef3097910b3874d2fe1aac6bf4cf45d3cc2303daac3135a05e9ade6534ddddb languageName: node linkType: hard "hast-util-has-property@npm:^2.0.0": - version: 2.0.0 - resolution: "hast-util-has-property@npm:2.0.0" - checksum: 6f35c11445a02927a731c34cadce81d1b01db814e336d61624c9a9f78440e555bf1819ea340964f0c283f47aa9c1f50fcd94c1b13f2c73e53bd820efca55f79a + version: 2.0.1 + resolution: "hast-util-has-property@npm:2.0.1" + checksum: cc909b7e2964fbfa4c53e33bfbc6f3ed883d1936f3e41a7fa020d3cb8cc5d3c903670e62bec15b55dea5a272ed86724815e8b136ba5475e138489384b1b71fa8 languageName: node linkType: hard "hast-util-heading-rank@npm:^2.0.0": - version: 2.1.0 - resolution: "hast-util-heading-rank@npm:2.1.0" + version: 2.1.1 + resolution: "hast-util-heading-rank@npm:2.1.1" dependencies: "@types/hast": ^2.0.0 - checksum: 6b0f66bf411cde4bc33f2bb80081cc9be2b7f86aa85a996a4766970ae34510824a93ea774c0ac1f5695b906f27358829939cc38bd7fc6b2965b78c226b82cb3a + checksum: a49233e9ac78f66e948dd29d6c75f41c72899854f276290423c5f59eb827dee3c42cf181ce9103f3a8295359b613ca0b9c51475dd38ecdd6c26ed291344061f1 languageName: node linkType: hard "hast-util-is-element@npm:^2.0.0": - version: 2.1.2 - resolution: "hast-util-is-element@npm:2.1.2" + version: 2.1.3 + resolution: "hast-util-is-element@npm:2.1.3" dependencies: "@types/hast": ^2.0.0 "@types/unist": ^2.0.0 - checksum: c5fe9f7cde3775d4cbe19a9a55631a80b7a4ea0131fc2e3d097ebe228a35f09b9219f64b788b7a9cf819e6dcb6d1fc7830fd2f10ad536649e436e8c83da41e00 - languageName: node - linkType: hard - -"hast-util-parse-selector@npm:^2.0.0": - version: 2.2.5 - resolution: "hast-util-parse-selector@npm:2.2.5" - checksum: 22ee4afbd11754562144cb3c4f3ec52524dafba4d90ee52512902d17cf11066d83b38f7bdf6ca571bbc2541f07ba30db0d234657b6ecb8ca4631587466459605 + checksum: 9d988f6839a50566a895a3dd19222e6ab1591243f6a3c36bba835b7e9339a2845f1ff1c583425afd602de1a57a76c5bae8a6dc0ab1d6e5d1e252b422cdeadbb7 languageName: node linkType: hard "hast-util-parse-selector@npm:^3.0.0": - version: 3.1.0 - resolution: "hast-util-parse-selector@npm:3.1.0" + version: 3.1.1 + resolution: "hast-util-parse-selector@npm:3.1.1" dependencies: "@types/hast": ^2.0.0 - checksum: 8be1a2334652866b40fde72a8b7d0867a791ce8a70d15fd7bb44b9a4f349913b77999e5add41900466bc9461c6b0fdea391875ef534b33cacf7a2aee9d8e447c + checksum: 511d373465f60dd65e924f88bf0954085f4fb6e3a2b062a4b5ac43b93cbfd36a8dce6234b5d1e3e63499d936375687e83fc5da55628b22bd6b581b5ee167d1c4 languageName: node linkType: hard -"hast-util-raw@npm:^7.2.0": - version: 7.2.2 - resolution: "hast-util-raw@npm:7.2.2" +"hast-util-raw@npm:^7.0.0, hast-util-raw@npm:^7.2.0": + version: 7.2.3 + resolution: "hast-util-raw@npm:7.2.3" dependencies: "@types/hast": ^2.0.0 "@types/parse5": ^6.0.0 @@ -11429,54 +14813,13 @@ __metadata: vfile: ^5.0.0 web-namespaces: ^2.0.0 zwitch: ^2.0.0 - checksum: e0bf5ba2256d7d2c28faf78a9041eb51383f6d8fe38d533494f4666715a8b02c3a2f9e306cbb31985afae2fffc7be54230530e77b6d4412c9be38b0d2b9673df - languageName: node - linkType: hard - -"hast-util-select@npm:~5.0.1": - version: 5.0.2 - resolution: "hast-util-select@npm:5.0.2" - dependencies: - "@types/hast": ^2.0.0 - "@types/unist": ^2.0.0 - bcp-47-match: ^2.0.0 - comma-separated-tokens: ^2.0.0 - css-selector-parser: ^1.0.0 - direction: ^2.0.0 - hast-util-has-property: ^2.0.0 - hast-util-is-element: ^2.0.0 - hast-util-to-string: ^2.0.0 - hast-util-whitespace: ^2.0.0 - not: ^0.1.0 - nth-check: ^2.0.0 - property-information: ^6.0.0 - space-separated-tokens: ^2.0.0 - unist-util-visit: ^4.0.0 - zwitch: ^2.0.0 - checksum: 9710fbb877169d2ea6e0c04ec265f25c4a51cdee69fbd61fbf36ede36942882f3a4f96f56ef083e9579b7f930fcca9b8aee382bb7c65be7866e44d9fdf8bd8c2 - languageName: node - linkType: hard - -"hast-util-to-estree@npm:^1.4.0": - version: 1.4.0 - resolution: "hast-util-to-estree@npm:1.4.0" - dependencies: - comma-separated-tokens: ^1.0.0 - estree-util-attach-comments: ^1.0.0 - estree-util-is-identifier-name: ^1.1.0 - hast-util-whitespace: ^1.0.0 - property-information: ^5.0.0 - space-separated-tokens: ^1.0.0 - style-to-object: ^0.3.0 - unist-util-position: ^3.1.0 - zwitch: ^1.0.0 - checksum: 00eb3e0b807fced6452b690751b8122a438bd0f761965a9c9d6580d58384b9be0a71e772d47e755507d6158b5f263e736a53acd3d16ad28cf9c624b7c82792e1 + checksum: 21857eea3ffb8fd92d2d9be7793b56d0b2c40db03c4cfa14828855ae41d7c584917aa83efb7157220b2e41e25e95f81f24679ac342c35145e5f1c1d39015f81f languageName: node linkType: hard "hast-util-to-estree@npm:^2.0.0": - version: 2.1.0 - resolution: "hast-util-to-estree@npm:2.1.0" + version: 2.3.3 + resolution: "hast-util-to-estree@npm:2.3.3" dependencies: "@types/estree": ^1.0.0 "@types/estree-jsx": ^1.0.0 @@ -11490,42 +14833,43 @@ __metadata: mdast-util-mdxjs-esm: ^1.0.0 property-information: ^6.0.0 space-separated-tokens: ^2.0.0 - style-to-object: ^0.3.0 + style-to-object: ^0.4.1 unist-util-position: ^4.0.0 zwitch: ^2.0.0 - checksum: 1e14cfbfd57ff00ffda48cfef23bcebb6ebbea0385bb03d748a9432591c60f0a69428baaba82375a8cdbc924217ba9e75d30820b3641fdbe12ae62aa6c3f90a7 + checksum: a09de0214db4d71f11cbd6f18663a8032116f82cb076b05d2d735444c05a9692902dae1023b70d0a254fc0a776f81e97450ca396bb9252c8fd631c3ba2e12f24 languageName: node linkType: hard -"hast-util-to-html@npm:^8.0.0, hast-util-to-html@npm:^8.0.3": - version: 8.0.3 - resolution: "hast-util-to-html@npm:8.0.3" +"hast-util-to-html@npm:^8.0.0": + version: 8.0.4 + resolution: "hast-util-to-html@npm:8.0.4" dependencies: "@types/hast": ^2.0.0 + "@types/unist": ^2.0.0 ccount: ^2.0.0 comma-separated-tokens: ^2.0.0 - hast-util-is-element: ^2.0.0 + hast-util-raw: ^7.0.0 hast-util-whitespace: ^2.0.0 html-void-elements: ^2.0.0 property-information: ^6.0.0 space-separated-tokens: ^2.0.0 - stringify-entities: ^4.0.2 - unist-util-is: ^5.0.0 - checksum: 128bf69be025a37168c871899c5c3b662fd1754609e83b999406d1c4e81088bf0460cd97a048ec6953753b3c14b192ecb30a66612a17d53e6d6b98a32040f5d3 + stringify-entities: ^4.0.0 + zwitch: ^2.0.4 + checksum: 8f2ae071df2ced5afb4f19f76af8fd3a2f837dc47bcc1c0e0c1578d29dafcd28738f9617505d13c4a2adf13d70e043143e2ad8f130d5554ab4fc11bfa8f74094 languageName: node linkType: hard "hast-util-to-parse5@npm:^7.0.0": - version: 7.0.0 - resolution: "hast-util-to-parse5@npm:7.0.0" + version: 7.1.0 + resolution: "hast-util-to-parse5@npm:7.1.0" dependencies: "@types/hast": ^2.0.0 - "@types/parse5": ^6.0.0 - hast-to-hyperscript: ^10.0.0 + comma-separated-tokens: ^2.0.0 property-information: ^6.0.0 + space-separated-tokens: ^2.0.0 web-namespaces: ^2.0.0 zwitch: ^2.0.0 - checksum: a30ceaca3f456b0a4c8d8330d782d9bcf7e05abe362b2cf208b204afeaef155d580ed84c959c0ef719edeac413e04759000f3e3318816aea41e7841876e5f890 + checksum: 3a7f2175a3db599bbae7e49ba73d3e5e688e5efca7590ff50130ba108ad649f728402815d47db49146f6b94c14c934bf119915da9f6964e38802c122bcc8af6b languageName: node linkType: hard @@ -11538,78 +14882,40 @@ __metadata: languageName: node linkType: hard -"hast-util-whitespace@npm:^1.0.0": - version: 1.0.4 - resolution: "hast-util-whitespace@npm:1.0.4" - checksum: b7f4a1942bc78239a6fe4741aca34e3e7f84487e15e2cd2b6ca07bbba3055571763d877d7c077d7a2a029ede7500bc50a62af7b6dfe88e0644b16228b91dee0d - languageName: node - linkType: hard - "hast-util-whitespace@npm:^2.0.0": - version: 2.0.0 - resolution: "hast-util-whitespace@npm:2.0.0" - checksum: abeb5386075bfb0facfce89eed0e13d2cb27a0910cec8fd234b48821a1538387a73fa7f458842e8c404148dc69434acbc10488d75b02817e460652c2c894c024 - languageName: node - linkType: hard - -"hastscript@npm:^6.0.0": - version: 6.0.0 - resolution: "hastscript@npm:6.0.0" - dependencies: - "@types/hast": ^2.0.0 - comma-separated-tokens: ^1.0.0 - hast-util-parse-selector: ^2.0.0 - property-information: ^5.0.0 - space-separated-tokens: ^1.0.0 - checksum: 5e50b85af0d2cb7c17979cb1ddca75d6b96b53019dd999b39e7833192c9004201c3cee6445065620ea05d0087d9ae147a4844e582d64868be5bc6b0232dfe52d + version: 2.0.1 + resolution: "hast-util-whitespace@npm:2.0.1" + checksum: 431be6b2f35472f951615540d7a53f69f39461e5e080c0190268bdeb2be9ab9b1dddfd1f467dd26c1de7e7952df67beb1307b6ee940baf78b24a71b5e0663868 languageName: node linkType: hard -"hastscript@npm:^7.0.0, hastscript@npm:^7.1.0": - version: 7.1.0 - resolution: "hastscript@npm:7.1.0" +"hastscript@npm:^7.0.0, hastscript@npm:^7.2.0": + version: 7.2.0 + resolution: "hastscript@npm:7.2.0" dependencies: "@types/hast": ^2.0.0 comma-separated-tokens: ^2.0.0 hast-util-parse-selector: ^3.0.0 property-information: ^6.0.0 space-separated-tokens: ^2.0.0 - checksum: 5c88419b72379ef4d9e141be5ccd13a91a0ff7b9623396b4f83a88d42987fdada27a1126d7e3efd3f9004eed0942fc0672f83baa923239f4147137852f35f733 + checksum: 928a21576ff7b9a8c945e7940bcbf2d27f770edb4279d4d04b33dc90753e26ca35c1172d626f54afebd377b2afa32331e399feb3eb0f7b91a399dca5927078ae languageName: node linkType: hard -"he@npm:^1.2.0": - version: 1.2.0 - resolution: "he@npm:1.2.0" - bin: - he: bin/he - checksum: 3d4d6babccccd79c5c5a3f929a68af33360d6445587d628087f39a965079d84f18ce9c3d3f917ee1e3978916fc833bb8b29377c3b403f919426f91bc6965e7a7 +"hex-rgb@npm:^4.1.0": + version: 4.3.0 + resolution: "hex-rgb@npm:4.3.0" + checksum: e654648db8647446f0111c68690d9b340eb192a93c8b2c6789a2b8deb5c20e757515ae209c5ae67074acfddf8575f9fc645d4ffaa0596d859457b08e180d791d languageName: node linkType: hard -"hexoid@npm:1.0.0": +"hexoid@npm:^1.0.0": version: 1.0.0 resolution: "hexoid@npm:1.0.0" checksum: 27a148ca76a2358287f40445870116baaff4a0ed0acc99900bf167f0f708ffd82e044ff55e9949c71963852b580fc024146d3ac6d5d76b508b78d927fa48ae2d languageName: node linkType: hard -"highlight.js@npm:^10.4.1, highlight.js@npm:~10.7.0": - version: 10.7.3 - resolution: "highlight.js@npm:10.7.3" - checksum: defeafcd546b535d710d8efb8e650af9e3b369ef53e28c3dc7893eacfe263200bba4c5fcf43524ae66d5c0c296b1af0870523ceae3e3104d24b7abf6374a4fea - languageName: node - linkType: hard - -"history@npm:^5.3.0": - version: 5.3.0 - resolution: "history@npm:5.3.0" - dependencies: - "@babel/runtime": ^7.7.6 - checksum: d73c35df49d19ac172f9547d30a21a26793e83f16a78386d99583b5bf1429cc980799fcf1827eb215d31816a6600684fba9686ce78104e23bd89ec239e7c726f - languageName: node - linkType: hard - "hosted-git-info@npm:^2.1.4": version: 2.8.9 resolution: "hosted-git-info@npm:2.8.9" @@ -11626,19 +14932,12 @@ __metadata: languageName: node linkType: hard -"hosted-git-info@npm:^5.0.0": - version: 5.1.0 - resolution: "hosted-git-info@npm:5.1.0" +"hosted-git-info@npm:^6.0.0": + version: 6.1.1 + resolution: "hosted-git-info@npm:6.1.1" dependencies: lru-cache: ^7.5.1 - checksum: 22abbc6a7418344c883e2df6e791e94b38192b2a61256b19c955999d878b8d5365ea51683fd1f0cc8f217e9bd121db88d5aaa7cf0407c4b7ff287b79aabacbd3 - languageName: node - linkType: hard - -"html-entities@npm:^2.3.3": - version: 2.3.3 - resolution: "html-entities@npm:2.3.3" - checksum: 92521501da8aa5f66fee27f0f022d6e9ceae62667dae93aa6a2f636afa71ad530b7fb24a18d4d6c124c9885970cac5f8a52dbf1731741161002816ae43f98196 + checksum: fcd3ca2eaa05f3201425ccbb8aa47f88cdda4a3a6d79453f8e269f7171356278bd1db08f059d8439eb5eaa91c6a8a20800fc49cca6e9e4e899b202a332d5ba6b languageName: node linkType: hard @@ -11656,20 +14955,10 @@ __metadata: languageName: node linkType: hard -"html-minifier-terser@npm:7.0.0": - version: 7.0.0 - resolution: "html-minifier-terser@npm:7.0.0" - dependencies: - camel-case: ^4.1.2 - clean-css: 5.2.0 - commander: ^9.4.0 - entities: ^4.3.1 - param-case: ^3.0.4 - relateurl: ^0.2.7 - terser: ^5.14.2 - bin: - html-minifier-terser: cli.js - checksum: eabd3b4835d9663bf7c30ea0f1c57870b0d8f7dc27b9fa17852ea57bfdd5fdc0ed9b7b83a7f13edd8626ccf98d3082e347764754278a661cab291469fd37dced +"html-tags@npm:^3.1.0": + version: 3.3.1 + resolution: "html-tags@npm:3.3.1" + checksum: b4ef1d5a76b678e43cce46e3783d563607b1d550cab30b4f511211564574770aa8c658a400b100e588bc60b8234e59b35ff72c7851cc28f3b5403b13a2c6cbce languageName: node linkType: hard @@ -11680,22 +14969,10 @@ __metadata: languageName: node linkType: hard -"http-basic@npm:^8.1.1": - version: 8.1.3 - resolution: "http-basic@npm:8.1.3" - dependencies: - caseless: ^0.12.0 - concat-stream: ^1.6.2 - http-response-object: ^3.0.1 - parse-cache-control: ^1.0.1 - checksum: 7df5dc4d4b6eb8cc3beaa77f8e5c3074288ec3835abd83c85e5bb66d8a95a0ef97664d862caf5e225698cb795f78f9a5abd0d39404e5356ccd3e5e10c87936a5 - languageName: node - linkType: hard - -"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0": - version: 4.1.0 - resolution: "http-cache-semantics@npm:4.1.0" - checksum: 974de94a81c5474be07f269f9fd8383e92ebb5a448208223bfb39e172a9dbc26feff250192ecc23b9593b3f92098e010406b0f24bd4d588d631f80214648ed42 +"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0, http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 languageName: node linkType: hard @@ -11712,7 +14989,14 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^5.0.0": +"http-link-header@npm:^1.1.1": + version: 1.1.1 + resolution: "http-link-header@npm:1.1.1" + checksum: f9225b5500aefe34a74e82a21250758f6da17e472f21d8c3ea0b7c7e7c03bbc6cfafaf5d26d9cb5f860aa4936937e5fb94dbeee058b648d23dec2580d52b177b + languageName: node + linkType: hard + +"http-proxy-agent@npm:5.0.0, http-proxy-agent@npm:^5.0.0": version: 5.0.0 resolution: "http-proxy-agent@npm:5.0.0" dependencies: @@ -11723,12 +15007,14 @@ __metadata: languageName: node linkType: hard -"http-response-object@npm:^3.0.1": - version: 3.0.2 - resolution: "http-response-object@npm:3.0.2" +"http-proxy-agent@npm:^4.0.0, http-proxy-agent@npm:^4.0.1": + version: 4.0.1 + resolution: "http-proxy-agent@npm:4.0.1" dependencies: - "@types/node": ^10.0.3 - checksum: 6cbdcb4ce7b27c9158a131b772c903ed54add2ba831e29cc165e91c3969fa6f8105ddf924aac5b954b534ad15a1ae697b693331b2be5281ee24d79aae20c3264 + "@tootallnate/once": 1 + agent-base: 6 + debug: 4 + checksum: c6a5da5a1929416b6bbdf77b1aca13888013fe7eb9d59fc292e25d18e041bb154a8dfada58e223fc7b76b9b2d155a87e92e608235201f77d34aa258707963a82 languageName: node linkType: hard @@ -11743,14 +15029,17 @@ __metadata: languageName: node linkType: hard -"http-status@npm:1.5.3": - version: 1.5.3 - resolution: "http-status@npm:1.5.3" - checksum: bcb07045f790dcf184c3940b1399113381d1b895bfb7f4d7d8eacf6bd1aef5461064b8fbc4e23c7276bfe4a275a3ebedc50d80e5216b3909478fb3dc58dbbb04 +"http2-wrapper@npm:^1.0.0-beta.5.2": + version: 1.0.3 + resolution: "http2-wrapper@npm:1.0.3" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.0.0 + checksum: 74160b862ec699e3f859739101ff592d52ce1cb207b7950295bf7962e4aa1597ef709b4292c673bece9c9b300efad0559fc86c71b1409c7a1e02b7229456003e languageName: node linkType: hard -"https-proxy-agent@npm:^5.0.0": +"https-proxy-agent@npm:5, https-proxy-agent@npm:5.0.1, https-proxy-agent@npm:^5.0.0, https-proxy-agent@npm:^5.0.1": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" dependencies: @@ -11760,6 +15049,16 @@ __metadata: languageName: node linkType: hard +"https-proxy-agent@npm:^4.0.0": + version: 4.0.0 + resolution: "https-proxy-agent@npm:4.0.0" + dependencies: + agent-base: 5 + debug: 4 + checksum: 19471d5aae3e747b1c98b17556647e2a1362e68220c6b19585a8527498f32e62e03c41d2872d059d8720d56846bd7460a80ac06f876bccfa786468ff40dd5eef + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -11767,10 +15066,10 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^3.0.1": - version: 3.0.1 - resolution: "human-signals@npm:3.0.1" - checksum: f252a7769c8094a5c9dc6772816bdb417b188820b04c8b42d0fc468e03a0ba905b1dd07afabe9385cc83504af1ccc2b985cd1e4aeeeb8e0029896c5af2e6f354 +"human-signals@npm:^4.3.0": + version: 4.3.1 + resolution: "human-signals@npm:4.3.1" + checksum: 6f12958df3f21b6fdaf02d90896c271df00636a31e2bbea05bddf817a35c66b38a6fdac5863e2df85bd52f34958997f1f50350ff97249e1dff8452865d5235d1 languageName: node linkType: hard @@ -11783,23 +15082,23 @@ __metadata: languageName: node linkType: hard -"husky@npm:^8.0.1": - version: 8.0.1 - resolution: "husky@npm:8.0.1" +"husky@npm:^8.0.3": + version: 8.0.3 + resolution: "husky@npm:8.0.3" bin: husky: lib/bin.js - checksum: 943a73a13d0201318fd30e83d299bb81d866bd245b69e6277804c3b462638dc1921694cb94c2b8c920a4a187060f7d6058d3365152865406352e934c5fff70dc + checksum: 837bc7e4413e58c1f2946d38fb050f5d7324c6f16b0fd66411ffce5703b294bd21429e8ba58711cd331951ee86ed529c5be4f76805959ff668a337dbfa82a1b0 languageName: node linkType: hard -"hyphenate-style-name@npm:^1.0.2": +"hyphenate-style-name@npm:^1.0.3": version: 1.0.4 resolution: "hyphenate-style-name@npm:1.0.4" checksum: 4f5bf4b055089754924babebaa23c17845937bcca6aee95d5d015f8fa1e6814279002bd6a9e541e3fac2cd02519fc76305396727066c57c8e21a7e73e7a12137 languageName: node linkType: hard -"iconv-lite@npm:0.4.24": +"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" dependencies: @@ -11808,7 +15107,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2": +"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" dependencies: @@ -11817,6 +15116,15 @@ __metadata: languageName: node linkType: hard +"icss-utils@npm:^5.0.0, icss-utils@npm:^5.1.0": + version: 5.1.0 + resolution: "icss-utils@npm:5.1.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 5c324d283552b1269cfc13a503aaaa172a280f914e5b81544f3803bc6f06a3b585fb79f66f7c771a2c052db7982c18bf92d001e3b47282e3abbbb4c4cc488d68 + languageName: node + linkType: hard + "ieee754@npm:^1.1.13, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -11824,21 +15132,24 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.1, ignore@npm:^5.2.0": - version: 5.2.0 - resolution: "ignore@npm:5.2.0" - checksum: 6b1f926792d614f64c6c83da3a1f9c83f6196c2839aa41e1e32dd7b8d174cef2e329d75caabb62cb61ce9dc432f75e67d07d122a037312db7caa73166a1bdb77 +"ignore@npm:^5.0.0, ignore@npm:^5.1.1, ignore@npm:^5.2.0": + version: 5.2.4 + resolution: "ignore@npm:5.2.4" + checksum: 3d4c309c6006e2621659311783eaea7ebcd41fe4ca1d78c91c473157ad6666a57a2df790fe0d07a12300d9aac2888204d7be8d59f9aaf665b1c7fcdb432517ef languageName: node linkType: hard -"image-size@npm:^1.0.2": - version: 1.0.2 - resolution: "image-size@npm:1.0.2" - dependencies: - queue: 6.0.2 - bin: - image-size: bin/image-size.js - checksum: 01745fdb47f87cecf538e69c63f9adc5bfab30a345345c2de91105f3afbd1bfcfba1256af02bf3323077b33b0004469a837e077bf0cbb9c907e9c1e9e7547585 +"image-ssim@npm:^0.2.0": + version: 0.2.0 + resolution: "image-ssim@npm:0.2.0" + checksum: c1bb7c6d6c33733dafc525593d14be0beaf67010dc403c779ee21c8bed155f30e94b5ef7f4ed34b3fe026159251bc585cd4a11475d145decb6a9f7546925c141 + languageName: node + linkType: hard + +"imagescript@npm:^1.2.16": + version: 1.2.16 + resolution: "imagescript@npm:1.2.16" + checksum: be6b14bf9ebb478233e03e22343bc5d222fd04d9f99fac59eb9c4978e8685d47920cceccb1d8562bc11b5cfdd9bfdee3965b324417759e03513678d758f8ace2 languageName: node linkType: hard @@ -11852,13 +15163,6 @@ __metadata: languageName: node linkType: hard -"import-lazy@npm:^2.1.0": - version: 2.1.0 - resolution: "import-lazy@npm:2.1.0" - checksum: 05294f3b9dd4971d3a996f0d2f176410fb6745d491d6e73376429189f5c1c3d290548116b2960a7cf3e89c20cdf11431739d1d2d8c54b84061980795010e803a - languageName: node - linkType: hard - "import-lazy@npm:~4.0.0": version: 4.0.0 resolution: "import-lazy@npm:4.0.0" @@ -11878,10 +15182,10 @@ __metadata: languageName: node linkType: hard -"import-meta-resolve@npm:^2.1.0": - version: 2.1.0 - resolution: "import-meta-resolve@npm:2.1.0" - checksum: 4554ea5e2daecbdeb7ebe4df23ced97e6a64ad41ed26889b3c86ed896830dbbe63889c8fad49b7dea76c0f9aad46f7d32412fa727c335e11f3cc79f63a91f8e1 +"import-meta-resolve@npm:^2.0.0, import-meta-resolve@npm:^2.2.2": + version: 2.2.2 + resolution: "import-meta-resolve@npm:2.2.2" + checksum: 3a5910a6f914b5f06b307d7d1c25710bc56f12e21e923d5b2180dd0d53c6c2d51e7b55df26f168b63f5670babcaca9422b7a9429e877bbb8c1997d79bd65882b languageName: node linkType: hard @@ -11899,6 +15203,13 @@ __metadata: languageName: node linkType: hard +"indent-string@npm:^5.0.0": + version: 5.0.0 + resolution: "indent-string@npm:5.0.0" + checksum: e466c27b6373440e6d84fbc19e750219ce25865cb82d578e41a6053d727e5520dc5725217d6eb1cc76005a1bb1696a0f106d84ce7ebda3033b963a38583fb3b3 + languageName: node + linkType: hard + "infer-owner@npm:^1.0.4": version: 1.0.4 resolution: "infer-owner@npm:1.0.4" @@ -11906,6 +15217,13 @@ __metadata: languageName: node linkType: hard +"inflection@npm:^2.0.1": + version: 2.0.1 + resolution: "inflection@npm:2.0.1" + checksum: bb095b495e10a77afc043cc349ae0f7c8c53e4d1fbcd7781111c18d17bde87ce31ea08bd883774bcbb2ff50c301dd4835b5448c80eb50b5e4e080165b6030f3b + languageName: node + linkType: hard + "inflight@npm:^1.0.4": version: 1.0.6 resolution: "inflight@npm:1.0.6" @@ -11916,20 +15234,13 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.0, inherits@npm:~2.0.3": +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.0, inherits@npm:~2.0.1, inherits@npm:~2.0.3": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 languageName: node linkType: hard -"ini@npm:2.0.0": - version: 2.0.0 - resolution: "ini@npm:2.0.0" - checksum: e7aadc5fb2e4aefc666d74ee2160c073995a4061556b1b5b4241ecb19ad609243b9cceafe91bae49c219519394bbd31512516cb22a3b1ca6e66d869e0447e84e - languageName: node - linkType: hard - "ini@npm:^1.3.2, ini@npm:^1.3.4, ini@npm:~1.3.0": version: 1.3.8 resolution: "ini@npm:1.3.8" @@ -11937,6 +15248,13 @@ __metadata: languageName: node linkType: hard +"ini@npm:^4.1.0": + version: 4.1.1 + resolution: "ini@npm:4.1.1" + checksum: 0e5909554074fbc31824fa5415b0f604de4a665514c96a897a77bf77353a7ad4743927321270e9d0610a9d510ccd1f3cd77422f7cc80d8f4542dbce75476fb6d + languageName: node + linkType: hard + "inline-style-parser@npm:0.1.1": version: 0.1.1 resolution: "inline-style-parser@npm:0.1.1" @@ -11945,22 +15263,69 @@ __metadata: linkType: hard "inline-style-prefixer@npm:^6.0.0": - version: 6.0.1 - resolution: "inline-style-prefixer@npm:6.0.1" + version: 6.0.4 + resolution: "inline-style-prefixer@npm:6.0.4" dependencies: - css-in-js-utils: ^2.0.0 - checksum: 0bfa6fa89faa21e425c71425910c37c7b35a16ea753586c408fcc9246c84937c1b8184e6ce792139cda5de5cce8e1bc9eb0ba9f30968bdc97e7a06ece21c0737 + css-in-js-utils: ^3.1.0 + fast-loops: ^1.1.3 + checksum: caf7a75d18acbedc7e3b8bfac17563082becd2df6b65accad964a6afdf490329b42315c37fe65ba0177cc10fd32809eb40d62aba23a0118c74d87d4fc58defa2 languageName: node linkType: hard -"internal-slot@npm:^1.0.3": - version: 1.0.3 - resolution: "internal-slot@npm:1.0.3" +"inquirer@npm:^8.2.1": + version: 8.2.5 + resolution: "inquirer@npm:8.2.5" + dependencies: + ansi-escapes: ^4.2.1 + chalk: ^4.1.1 + cli-cursor: ^3.1.0 + cli-width: ^3.0.0 + external-editor: ^3.0.3 + figures: ^3.0.0 + lodash: ^4.17.21 + mute-stream: 0.0.8 + ora: ^5.4.1 + run-async: ^2.4.0 + rxjs: ^7.5.5 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + through: ^2.3.6 + wrap-ansi: ^7.0.0 + checksum: f13ee4c444187786fb393609dedf6b30870115a57b603f2e6424f29a99abc13446fd45ee22461c33c9c40a92a60a8df62d0d6b25d74fc6676fa4cb211de55b55 + languageName: node + linkType: hard + +"internal-slot@npm:^1.0.3, internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": + version: 1.0.5 + resolution: "internal-slot@npm:1.0.5" dependencies: - get-intrinsic: ^1.1.0 + get-intrinsic: ^1.2.0 has: ^1.0.3 side-channel: ^1.0.4 - checksum: 1944f92e981e47aebc98a88ff0db579fd90543d937806104d0b96557b10c1f170c51fb777b97740a8b6ddeec585fca8c39ae99fd08a8e058dfc8ab70937238bf + checksum: 97e84046bf9e7574d0956bd98d7162313ce7057883b6db6c5c7b5e5f05688864b0978ba07610c726d15d66544ffe4b1050107d93f8a39ebc59b15d8b429b497a + languageName: node + linkType: hard + +"interpret@npm:^1.0.0": + version: 1.4.0 + resolution: "interpret@npm:1.4.0" + checksum: 2e5f51268b5941e4a17e4ef0575bc91ed0ab5f8515e3cf77486f7c14d13f3010df9c0959f37063dcc96e78d12dc6b0bb1b9e111cdfe69771f4656d2993d36155 + languageName: node + linkType: hard + +"intl-messageformat-parser@npm:^1.8.1": + version: 1.8.1 + resolution: "intl-messageformat-parser@npm:1.8.1" + checksum: 73e5e372c1f1ca40165e4c91b84a177237fda8ecbe7b680cb36bf6e9162ac2c2b97c520344255bfb0cb02758f8f40803f1291d60f9179c44c1a1ad2c3d964609 + languageName: node + linkType: hard + +"intl-messageformat@npm:^4.4.0": + version: 4.4.0 + resolution: "intl-messageformat@npm:4.4.0" + dependencies: + intl-messageformat-parser: ^1.8.1 + checksum: f8e91e5515523c93d061bdb07efab4a921589fb1288a7f37f6251b1235f16f29242c3af6757fa5058eede8941768a0224abd183fe56e783eb50703b39db170e8 languageName: node linkType: hard @@ -11973,20 +15338,27 @@ __metadata: languageName: node linkType: hard -"ioredis@npm:^5.2.3": - version: 5.2.3 - resolution: "ioredis@npm:5.2.3" +"ioredis@npm:^5.3.2": + version: 5.3.2 + resolution: "ioredis@npm:5.3.2" dependencies: "@ioredis/commands": ^1.1.1 cluster-key-slot: ^1.1.0 debug: ^4.3.4 - denque: ^2.0.1 + denque: ^2.1.0 lodash.defaults: ^4.2.0 lodash.isarguments: ^3.1.0 redis-errors: ^1.2.0 redis-parser: ^3.0.0 standard-as-callback: ^2.1.0 - checksum: 2cb7f0f4217e6774accad3620af1b7114722721c1d1824be2c9f0c2a77ab9629f2e0848d18b1a7208bc37796ae1207cb3e0898fce61900cfe797da0382724ad1 + checksum: 9a23559133e862a768778301efb68ae8c2af3c33562174b54a4c2d6574b976e85c75a4c34857991af733e35c48faf4c356e7daa8fb0a3543d85ff1768c8754bc + languageName: node + linkType: hard + +"ip@npm:^1.1.5": + version: 1.1.8 + resolution: "ip@npm:1.1.8" + checksum: a2ade53eb339fb0cbe9e69a44caab10d6e3784662285eb5d2677117ee4facc33a64679051c35e0dfdb1a3983a51ce2f5d2cb36446d52e10d01881789b76e28fb languageName: node linkType: hard @@ -12005,9 +15377,16 @@ __metadata: linkType: hard "irregular-plurals@npm:^3.2.0": - version: 3.3.0 - resolution: "irregular-plurals@npm:3.3.0" - checksum: 1282d8adfb00a9718655ce21e5b096d4b31d2115c817a30e1e3254648ae4ac0f84d706cd0cad2a93c64f4bb5c5572ea8f63fcc9766f005a5362031c56d9e77b5 + version: 3.5.0 + resolution: "irregular-plurals@npm:3.5.0" + checksum: 5b663091dc89155df7b2e9d053e8fb11941a0c4be95c4b6549ed3ea020489fdf4f75ea586c915b5b543704252679a5a6e8c6c3587da5ac3fc57b12da90a9aee7 + languageName: node + linkType: hard + +"is-absolute-url@npm:^3.0.0": + version: 3.0.3 + resolution: "is-absolute-url@npm:3.0.3" + checksum: 5159b51d065d9ad29e16a2f78d6c0e41c43227caf90a45e659c54ea6fd50ef0595b1871ce392e84b1df7cfdcad9a8e66eec0813a029112188435abf115accb16 languageName: node linkType: hard @@ -12045,6 +15424,27 @@ __metadata: languageName: node linkType: hard +"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.1": + version: 1.1.1 + resolution: "is-arguments@npm:1.1.1" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 7f02700ec2171b691ef3e4d0e3e6c0ba408e8434368504bb593d0d7c891c0dbfda6d19d30808b904a6cb1929bca648c061ba438c39f296c2a8ca083229c49f27 + languageName: node + linkType: hard + +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + is-typed-array: ^1.1.10 + checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -12094,33 +15494,22 @@ __metadata: languageName: node linkType: hard -"is-builtin-module@npm:^3.2.0": - version: 3.2.0 - resolution: "is-builtin-module@npm:3.2.0" +"is-builtin-module@npm:^3.2.1": + version: 3.2.1 + resolution: "is-builtin-module@npm:3.2.1" dependencies: builtin-modules: ^3.3.0 - checksum: 0315751b898feff0646511c896e88b608a755c5025d0ce9a3ad25783de50be870e47dafb838cebbb06fbb2a948b209ea55348eee267836c9dd40d3a11ec717d3 + checksum: e8f0ffc19a98240bda9c7ada84d846486365af88d14616e737d280d378695c8c448a621dcafc8332dbf0fcd0a17b0763b845400709963fa9151ddffece90ae88 languageName: node linkType: hard -"is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.1.5, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac languageName: node linkType: hard -"is-ci@npm:^2.0.0": - version: 2.0.0 - resolution: "is-ci@npm:2.0.0" - dependencies: - ci-info: ^2.0.0 - bin: - is-ci: bin.js - checksum: 77b869057510f3efa439bbb36e9be429d53b3f51abd4776eeea79ab3b221337fe1753d1e50058a9e2c650d38246108beffb15ccfd443929d77748d8c0cc90144 - languageName: node - linkType: hard - "is-ci@npm:^3.0.1": version: 3.0.1 resolution: "is-ci@npm:3.0.1" @@ -12132,16 +15521,16 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.1.0, is-core-module@npm:^2.10.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.9.0": - version: 2.10.0 - resolution: "is-core-module@npm:2.10.0" +"is-core-module@npm:^2.1.0, is-core-module@npm:^2.11.0, is-core-module@npm:^2.12.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.9.0": + version: 2.12.1 + resolution: "is-core-module@npm:2.12.1" dependencies: has: ^1.0.3 - checksum: 0f3f77811f430af3256fa7bbc806f9639534b140f8ee69476f632c3e1eb4e28a38be0b9d1b8ecf596179c841b53576129279df95e7051d694dac4ceb6f967593 + checksum: f04ea30533b5e62764e7b2e049d3157dc0abd95ef44275b32489ea2081176ac9746ffb1cdb107445cf1ff0e0dfcad522726ca27c27ece64dadf3795428b8e468 languageName: node linkType: hard -"is-date-object@npm:^1.0.1": +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" dependencies: @@ -12164,6 +15553,13 @@ __metadata: languageName: node linkType: hard +"is-deflate@npm:^1.0.0": + version: 1.0.0 + resolution: "is-deflate@npm:1.0.0" + checksum: c2f9f2d3db79ac50c5586697d1e69a55282a2b0cc5e437b3c470dd47f24e40b6216dcd7e024511e21381607bf57afa019343e3bd0e08a119032818b596004262 + languageName: node + linkType: hard + "is-docker@npm:^2.0.0, is-docker@npm:^2.1.1": version: 2.2.1 resolution: "is-docker@npm:2.2.1" @@ -12182,6 +15578,13 @@ __metadata: languageName: node linkType: hard +"is-empty@npm:^1.0.0": + version: 1.2.0 + resolution: "is-empty@npm:1.2.0" + checksum: dc80e0a8ad5439d98d128d126fe69e5dcd6b474e29753107bcfe82fc7d628c9da618d48bb24878a7891f231696405ad0a854dfe3cfc955c23d24e80d9e252e62 + languageName: node + linkType: hard + "is-extendable@npm:^0.1.0": version: 0.1.1 resolution: "is-extendable@npm:0.1.1" @@ -12226,6 +15629,15 @@ __metadata: languageName: node linkType: hard +"is-generator-function@npm:^1.0.7": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d54644e7dbaccef15ceb1e5d91d680eb5068c9ee9f9eb0a9e04173eb5542c9b51b5ab52c5537f5703e48d5fddfd376817c1ca07a84a407b7115b769d4bdde72b + languageName: node + linkType: hard + "is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" @@ -12235,6 +15647,13 @@ __metadata: languageName: node linkType: hard +"is-gzip@npm:^1.0.0": + version: 1.0.0 + resolution: "is-gzip@npm:1.0.0" + checksum: 0d28931c1f445fa29c900cf9f48e06e9d1d477a3bf7bd7332e7ce68f1333ccd8cb381de2f0f62a9a262d9c0912608a9a71b4a40e788e201b3dbd67072bb20d86 + languageName: node + linkType: hard + "is-hexadecimal@npm:^1.0.0": version: 1.0.4 resolution: "is-hexadecimal@npm:1.0.4" @@ -12249,20 +15668,21 @@ __metadata: languageName: node linkType: hard -"is-installed-globally@npm:^0.4.0": - version: 0.4.0 - resolution: "is-installed-globally@npm:0.4.0" +"is-inside-container@npm:^1.0.0": + version: 1.0.0 + resolution: "is-inside-container@npm:1.0.0" dependencies: - global-dirs: ^3.0.0 - is-path-inside: ^3.0.2 - checksum: 3359840d5982d22e9b350034237b2cda2a12bac1b48a721912e1ab8e0631dd07d45a2797a120b7b87552759a65ba03e819f1bd63f2d7ab8657ec0b44ee0bf399 + is-docker: ^3.0.0 + bin: + is-inside-container: cli.js + checksum: c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03 languageName: node linkType: hard -"is-interactive@npm:^2.0.0": - version: 2.0.0 - resolution: "is-interactive@npm:2.0.0" - checksum: e8d52ad490bed7ae665032c7675ec07732bbfe25808b0efbc4d5a76b1a1f01c165f332775c63e25e9a03d319ebb6b24f571a9e902669fc1e40b0a60b5be6e26c +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 824808776e2d468b2916cdd6c16acacebce060d844c35ca6d82267da692e92c3a16fdba624c50b54a63f38bdc4016055b6f443ce57d7147240de4f8cdabaf6f9 languageName: node linkType: hard @@ -12273,17 +15693,27 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.2": +"is-map@npm:^2.0.1, is-map@npm:^2.0.2": version: 2.0.2 - resolution: "is-negative-zero@npm:2.0.2" - checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a + resolution: "is-map@npm:2.0.2" + checksum: ace3d0ecd667bbdefdb1852de601268f67f2db725624b1958f279316e13fecb8fa7df91fd60f690d7417b4ec180712f5a7ee967008e27c65cfd475cc84337728 languageName: node linkType: hard -"is-npm@npm:^5.0.0": - version: 5.0.0 - resolution: "is-npm@npm:5.0.0" - checksum: 9baff02b0c69a3d3c79b162cb2f9e67fb40ef6d172c16601b2e2471c21e9a4fa1fc9885a308d7bc6f3a3cd2a324c27fa0bf284c133c3349bb22571ab70d041cc +"is-nan@npm:^1.2.1": + version: 1.3.2 + resolution: "is-nan@npm:1.3.2" + dependencies: + call-bind: ^1.0.0 + define-properties: ^1.1.3 + checksum: 5dfadcef6ad12d3029d43643d9800adbba21cf3ce2ec849f734b0e14ee8da4070d82b15fdb35138716d02587c6578225b9a22779cab34888a139cc43e4e3610a + languageName: node + linkType: hard + +"is-negative-zero@npm:^2.0.2": + version: 2.0.2 + resolution: "is-negative-zero@npm:2.0.2" + checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a languageName: node linkType: hard @@ -12310,13 +15740,27 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.2": +"is-path-cwd@npm:^2.2.0": + version: 2.2.0 + resolution: "is-path-cwd@npm:2.2.0" + checksum: 46a840921bb8cc0dc7b5b423a14220e7db338072a4495743a8230533ce78812dc152548c86f4b828411fe98c5451959f07cf841c6a19f611e46600bd699e8048 + languageName: node + linkType: hard + +"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" checksum: abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 languageName: node linkType: hard +"is-plain-obj@npm:2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + "is-plain-obj@npm:^1.1.0": version: 1.1.0 resolution: "is-plain-obj@npm:1.1.0" @@ -12324,13 +15768,6 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:^2.0.0": - version: 2.1.0 - resolution: "is-plain-obj@npm:2.1.0" - checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa - languageName: node - linkType: hard - "is-plain-obj@npm:^3.0.0": version: 3.0.0 resolution: "is-plain-obj@npm:3.0.0" @@ -12345,12 +15782,28 @@ __metadata: languageName: node linkType: hard +"is-plain-object@npm:5.0.0": + version: 5.0.0 + resolution: "is-plain-object@npm:5.0.0" + checksum: e32d27061eef62c0847d303125440a38660517e586f2f3db7c9d179ae5b6674ab0f469d519b2e25c147a1a3bc87156d0d5f4d8821e0ce4a9ee7fe1fcf11ce45c + languageName: node + linkType: hard + +"is-plain-object@npm:^2.0.4": + version: 2.0.4 + resolution: "is-plain-object@npm:2.0.4" + dependencies: + isobject: ^3.0.1 + checksum: 2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca + languageName: node + linkType: hard + "is-reference@npm:^3.0.0": - version: 3.0.0 - resolution: "is-reference@npm:3.0.0" + version: 3.0.1 + resolution: "is-reference@npm:3.0.1" dependencies: "@types/estree": "*" - checksum: 408bb3442ff5f90a9740bf578e8fa2863f68bc07ee99b92079a358a34af58341dc7014b054e8cc51a3da5d1ab83f635b6ee1ce2982db7899a128d7a05173898f + checksum: 12c316d16191961938057e949c9f59ecac3c00c8101005a81ee351fde0775590238939c294ecac3a371400eb85d4b2556675396ebd4db821b767c145df28623f languageName: node linkType: hard @@ -12364,6 +15817,13 @@ __metadata: languageName: node linkType: hard +"is-set@npm:^2.0.1, is-set@npm:^2.0.2": + version: 2.0.2 + resolution: "is-set@npm:2.0.2" + checksum: b64343faf45e9387b97a6fd32be632ee7b269bd8183701f3b3f5b71a7cf00d04450ed8669d0bd08753e08b968beda96fca73a10fd0ff56a32603f64deba55a57 + languageName: node + linkType: hard + "is-shared-array-buffer@npm:^1.0.2": version: 1.0.2 resolution: "is-shared-array-buffer@npm:1.0.2" @@ -12414,6 +15874,19 @@ __metadata: languageName: node linkType: hard +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.9": + version: 1.1.10 + resolution: "is-typed-array@npm:1.1.10" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.0 + checksum: aac6ecb59d4c56a1cdeb69b1f129154ef462bbffe434cb8a8235ca89b42f258b7ae94073c41b3cb7bce37f6a1733ad4499f07882d5d5093a7ba84dfc4ebb8017 + languageName: node + linkType: hard + "is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" @@ -12428,10 +15901,10 @@ __metadata: languageName: node linkType: hard -"is-unicode-supported@npm:^1.1.0": - version: 1.3.0 - resolution: "is-unicode-supported@npm:1.3.0" - checksum: 20a1fc161afafaf49243551a5ac33b6c4cf0bbcce369fcd8f2951fbdd000c30698ce320de3ee6830497310a8f41880f8066d440aa3eb0a853e2aa4836dd89abc +"is-weakmap@npm:^2.0.1": + version: 2.0.1 + resolution: "is-weakmap@npm:2.0.1" + checksum: 1222bb7e90c32bdb949226e66d26cb7bce12e1e28e3e1b40bfa6b390ba3e08192a8664a703dff2a00a84825f4e022f9cd58c4599ff9981ab72b1d69479f4f7f6 languageName: node linkType: hard @@ -12444,7 +15917,17 @@ __metadata: languageName: node linkType: hard -"is-wsl@npm:^2.2.0": +"is-weakset@npm:^2.0.1": + version: 2.0.2 + resolution: "is-weakset@npm:2.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 5d8698d1fa599a0635d7ca85be9c26d547b317ed8fd83fc75f03efbe75d50001b5eececb1e9971de85fcde84f69ae6f8346bc92d20d55d46201d328e4c74a367 + languageName: node + linkType: hard + +"is-wsl@npm:^2.1.1, is-wsl@npm:^2.2.0": version: 2.2.0 resolution: "is-wsl@npm:2.2.0" dependencies: @@ -12453,10 +15936,24 @@ __metadata: languageName: node linkType: hard -"is-yarn-global@npm:^0.3.0": - version: 0.3.0 - resolution: "is-yarn-global@npm:0.3.0" - checksum: bca013d65fee2862024c9fbb3ba13720ffca2fe750095174c1c80922fdda16402b5c233f5ac9e265bc12ecb5446e7b7f519a32d9541788f01d4d44e24d2bf481 +"is@npm:^3.2.1": + version: 3.3.0 + resolution: "is@npm:3.3.0" + checksum: 81fad3b40c606984c2d0699207c4c48d2a0d29cc834b274d0b74c172f3eeebdb981301fe0d690ce090a96bf021a8a1f8b1325262ad9870c525e557ac4a559c56 + languageName: node + linkType: hard + +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: bd5bbe4104438c4196ba58a54650116007fa0262eccef13a4c55b2e09a5b36b59f1e75b9fcc49883dd9d4953892e6fc007eef9e9155648ceea036e184b0f930a languageName: node linkType: hard @@ -12481,6 +15978,16 @@ __metadata: languageName: node linkType: hard +"isomorphic-unfetch@npm:^3.1.0": + version: 3.1.0 + resolution: "isomorphic-unfetch@npm:3.1.0" + dependencies: + node-fetch: ^2.6.1 + unfetch: ^4.2.0 + checksum: 82b92fe4ec2823a81ab0fc0d11bd94d710e6f9a940d56b3cba31896d4345ec9ffc7949f4ff31ebcae84f6b95f7ebf3474c4c7452b834eb4078ea3f2c37e459c5 + languageName: node + linkType: hard + "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -12540,57 +16047,92 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^29.2.0": - version: 29.2.0 - resolution: "jest-changed-files@npm:29.2.0" +"jackspeak@npm:^2.0.3": + version: 2.2.1 + resolution: "jackspeak@npm:2.2.1" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: e29291c0d0f280a063fa18fbd1e891ab8c2d7519fd34052c0ebde38538a15c603140d60c2c7f432375ff7ee4c5f1c10daa8b2ae19a97c3d4affe308c8360c1df + languageName: node + linkType: hard + +"jake@npm:^10.8.5": + version: 10.8.6 + resolution: "jake@npm:10.8.6" + dependencies: + async: ^3.2.3 + chalk: ^4.0.2 + filelist: ^1.0.4 + minimatch: ^3.1.2 + bin: + jake: bin/cli.js + checksum: eebebd3ca62a01ced630afc116f429d727d34bebe58a9424c0d5a0618ad6c1db893163fb4fbcdff01f34d34d6d63c0dd2448de598270bcd27d9440630de4aeea + languageName: node + linkType: hard + +"javascript-stringify@npm:^2.0.1": + version: 2.1.0 + resolution: "javascript-stringify@npm:2.1.0" + checksum: 009981ec84299da88795fc764221ed213e3d52251cc93a396430a7a02ae09f1163a9be36a36808689681a8e6113cf00fe97ec2eea2552df48111f79be59e9358 + languageName: node + linkType: hard + +"jest-changed-files@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-changed-files@npm:29.5.0" dependencies: execa: ^5.0.0 p-limit: ^3.1.0 - checksum: 8ad8290324db1de2ee3c9443d3e3fbfdcb6d72ec7054c5796be2854b2bc239dea38a7c797c8c9c2bd959f539d44305790f2f75b18f3046b04317ed77c7480cb1 + checksum: a67a7cb3c11f8f92bd1b7c79e84f724cbd11a9ad51f3cdadafe3ce7ee3c79ee50dbea128f920f5fddc807e9e4e83f5462143094391feedd959a77dd20ab96cf3 languageName: node linkType: hard -"jest-circus@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-circus@npm:29.2.1" +"jest-circus@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-circus@npm:29.5.0" dependencies: - "@jest/environment": ^29.2.1 - "@jest/expect": ^29.2.1 - "@jest/test-result": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/environment": ^29.5.0 + "@jest/expect": ^29.5.0 + "@jest/test-result": ^29.5.0 + "@jest/types": ^29.5.0 "@types/node": "*" chalk: ^4.0.0 co: ^4.6.0 dedent: ^0.7.0 is-generator-fn: ^2.0.0 - jest-each: ^29.2.1 - jest-matcher-utils: ^29.2.1 - jest-message-util: ^29.2.1 - jest-runtime: ^29.2.1 - jest-snapshot: ^29.2.1 - jest-util: ^29.2.1 + jest-each: ^29.5.0 + jest-matcher-utils: ^29.5.0 + jest-message-util: ^29.5.0 + jest-runtime: ^29.5.0 + jest-snapshot: ^29.5.0 + jest-util: ^29.5.0 p-limit: ^3.1.0 - pretty-format: ^29.2.1 + pretty-format: ^29.5.0 + pure-rand: ^6.0.0 slash: ^3.0.0 stack-utils: ^2.0.3 - checksum: 3fe8bf27a42d25e68ba869fe5ef0103acf67294c3a2e63c0895b5efaa4ed7fcb35f8c14eeab1a7e6bdee0cb46740fe24177d581976391da740b468aa81bccbbb + checksum: 44ff5d06acedae6de6c866e20e3b61f83e29ab94cf9f960826e7e667de49c12dd9ab9dffd7fa3b7d1f9688a8b5bfb1ebebadbea69d9ed0d3f66af4a0ff8c2b27 languageName: node linkType: hard -"jest-cli@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-cli@npm:29.2.1" +"jest-cli@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-cli@npm:29.5.0" dependencies: - "@jest/core": ^29.2.1 - "@jest/test-result": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/core": ^29.5.0 + "@jest/test-result": ^29.5.0 + "@jest/types": ^29.5.0 chalk: ^4.0.0 exit: ^0.1.2 graceful-fs: ^4.2.9 import-local: ^3.0.2 - jest-config: ^29.2.1 - jest-util: ^29.2.1 - jest-validate: ^29.2.1 + jest-config: ^29.5.0 + jest-util: ^29.5.0 + jest-validate: ^29.5.0 prompts: ^2.0.1 yargs: ^17.3.1 peerDependencies: @@ -12600,34 +16142,34 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 6f190450a6cc462fdb63617ad6fa67fc5e0daaa2ea47e41e2fcc1b16d02886b5be9228066295ba51847be0aee1317dad71648e4ad3b5373f7db0ba93eb8e50f2 + checksum: 39897bbbc0f0d8a6b975ab12fd13887eaa28d92e3dee9e0173a5cb913ae8cc2ae46e090d38c6d723e84d9d6724429cd08685b4e505fa447d31ca615630c7dbba languageName: node linkType: hard -"jest-config@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-config@npm:29.2.1" +"jest-config@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-config@npm:29.5.0" dependencies: "@babel/core": ^7.11.6 - "@jest/test-sequencer": ^29.2.1 - "@jest/types": ^29.2.1 - babel-jest: ^29.2.1 + "@jest/test-sequencer": ^29.5.0 + "@jest/types": ^29.5.0 + babel-jest: ^29.5.0 chalk: ^4.0.0 ci-info: ^3.2.0 deepmerge: ^4.2.2 glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-circus: ^29.2.1 - jest-environment-node: ^29.2.1 - jest-get-type: ^29.2.0 - jest-regex-util: ^29.2.0 - jest-resolve: ^29.2.1 - jest-runner: ^29.2.1 - jest-util: ^29.2.1 - jest-validate: ^29.2.1 + jest-circus: ^29.5.0 + jest-environment-node: ^29.5.0 + jest-get-type: ^29.4.3 + jest-regex-util: ^29.4.3 + jest-resolve: ^29.5.0 + jest-runner: ^29.5.0 + jest-util: ^29.5.0 + jest-validate: ^29.5.0 micromatch: ^4.0.4 parse-json: ^5.2.0 - pretty-format: ^29.2.1 + pretty-format: ^29.5.0 slash: ^3.0.0 strip-json-comments: ^3.1.1 peerDependencies: @@ -12638,7 +16180,7 @@ __metadata: optional: true ts-node: optional: true - checksum: a2052eb47d4cd964b1bb9e34cddf608bd252d185e58376c012447afb2fe6c93d17d452a0f38ce45b0621adaec60d68e6d3538146928bb7e5e553523f805dc80d + checksum: c37c4dab964c54ab293d4e302d40b09687037ac9d00b88348ec42366970747feeaf265e12e3750cd3660b40c518d4031335eda11ac10b70b10e60797ebbd4b9c languageName: node linkType: hard @@ -12654,63 +16196,51 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^29.1.2": - version: 29.1.2 - resolution: "jest-diff@npm:29.1.2" +"jest-diff@npm:^29.0.3, jest-diff@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-diff@npm:29.5.0" dependencies: chalk: ^4.0.0 - diff-sequences: ^29.0.0 - jest-get-type: ^29.0.0 - pretty-format: ^29.1.2 - checksum: 0c9774155965f38ddeebacc1a0c3301f27f8c35935020e6088278cc37d5b1470ae8a8ade848b3e20ba066e146f79e3c52f0fb76c1b99f1574732e7c697dfb305 + diff-sequences: ^29.4.3 + jest-get-type: ^29.4.3 + pretty-format: ^29.5.0 + checksum: dfd0f4a299b5d127779c76b40106c37854c89c3e0785098c717d52822d6620d227f6234c3a9291df204d619e799e3654159213bf93220f79c8e92a55475a3d39 languageName: node linkType: hard -"jest-diff@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-diff@npm:29.2.1" - dependencies: - chalk: ^4.0.0 - diff-sequences: ^29.2.0 - jest-get-type: ^29.2.0 - pretty-format: ^29.2.1 - checksum: e3553e5bf556b786b864e3da0ef0a2cde8b260a7bb281eaf47d34aee0bf303bf557bc75416c20f9454e2e1b6ac0ae53684d5be7af5cfc010dc08805bdcb3f457 - languageName: node - linkType: hard - -"jest-docblock@npm:^29.2.0": - version: 29.2.0 - resolution: "jest-docblock@npm:29.2.0" +"jest-docblock@npm:^29.4.3": + version: 29.4.3 + resolution: "jest-docblock@npm:29.4.3" dependencies: detect-newline: ^3.0.0 - checksum: b3f1227b7d73fc9e4952180303475cf337b36fa65c7f730ac92f0580f1c08439983262fee21cf3dba11429aa251b4eee1e3bc74796c5777116b400d78f9d2bbe + checksum: e0e9df1485bb8926e5b33478cdf84b3387d9caf3658e7dc1eaa6dc34cb93dea0d2d74797f6e940f0233a88f3dadd60957f2288eb8f95506361f85b84bf8661df languageName: node linkType: hard -"jest-each@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-each@npm:29.2.1" +"jest-each@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-each@npm:29.5.0" dependencies: - "@jest/types": ^29.2.1 + "@jest/types": ^29.5.0 chalk: ^4.0.0 - jest-get-type: ^29.2.0 - jest-util: ^29.2.1 - pretty-format: ^29.2.1 - checksum: 877bd64a08ff4245400c4d84d65a6fb87898e53498b65f53915c7e66e66bf49a4559bc5ca584a3dab57251e88815f48c1053e40c0c1017fbb7d9813f40eb25b8 + jest-get-type: ^29.4.3 + jest-util: ^29.5.0 + pretty-format: ^29.5.0 + checksum: b8b297534d25834c5d4e31e4c687359787b1e402519e42664eb704cc3a12a7a91a017565a75acb02e8cf9afd3f4eef3350bd785276bec0900184641b765ff7a5 languageName: node linkType: hard -"jest-environment-node@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-environment-node@npm:29.2.1" +"jest-environment-node@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-environment-node@npm:29.5.0" dependencies: - "@jest/environment": ^29.2.1 - "@jest/fake-timers": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/environment": ^29.5.0 + "@jest/fake-timers": ^29.5.0 + "@jest/types": ^29.5.0 "@types/node": "*" - jest-mock: ^29.2.1 - jest-util: ^29.2.1 - checksum: fc001e4292ae7516829008c1f030ff176cce9e63d845e3b209bf0c9088d32fc464174032fd41c7cf7c9899801033991aa7bd9f661729cb5691c9179b29188888 + jest-mock: ^29.5.0 + jest-util: ^29.5.0 + checksum: 57981911cc20a4219b0da9e22b2e3c9f31b505e43f78e61c899e3227ded455ce1a3a9483842c69cfa4532f02cfb536ae0995bf245f9211608edacfc1e478d411 languageName: node linkType: hard @@ -12721,230 +16251,204 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^29.0.0": - version: 29.0.0 - resolution: "jest-get-type@npm:29.0.0" - checksum: 9abdd11d69788963a92fb9d813a7b887654ecc8f3a3c8bf83166d33aaf4d57ed380e74ab8ef106f57565dd235446ca6ebc607679f0c516c4633e6d09f0540a2b - languageName: node - linkType: hard - -"jest-get-type@npm:^29.2.0": - version: 29.2.0 - resolution: "jest-get-type@npm:29.2.0" - checksum: e396fd880a30d08940ed8a8e43cd4595db1b8ff09649018eb358ca701811137556bae82626af73459e3c0f8c5e972ed1e57fd3b1537b13a260893dac60a90942 +"jest-get-type@npm:^29.4.3": + version: 29.4.3 + resolution: "jest-get-type@npm:29.4.3" + checksum: 6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce languageName: node linkType: hard -"jest-haste-map@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-haste-map@npm:29.2.1" +"jest-haste-map@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-haste-map@npm:29.5.0" dependencies: - "@jest/types": ^29.2.1 + "@jest/types": ^29.5.0 "@types/graceful-fs": ^4.1.3 "@types/node": "*" anymatch: ^3.0.3 fb-watchman: ^2.0.0 fsevents: ^2.3.2 graceful-fs: ^4.2.9 - jest-regex-util: ^29.2.0 - jest-util: ^29.2.1 - jest-worker: ^29.2.1 + jest-regex-util: ^29.4.3 + jest-util: ^29.5.0 + jest-worker: ^29.5.0 micromatch: ^4.0.4 walker: ^1.0.8 dependenciesMeta: fsevents: optional: true - checksum: 1880e5dd12b83c8ffbd527b80c81bd694a9018ed003d1ecc72ed4e1a0c2be0bc2a26a96c7439c4be8954912cd01ecaea807d2739b24d2ac7dd23f5aa672d9da1 + checksum: 3828ff7783f168e34be2c63887f82a01634261f605dcae062d83f979a61c37739e21b9607ecb962256aea3fbe5a530a1acee062d0026fcb47c607c12796cf3b7 languageName: node linkType: hard -"jest-leak-detector@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-leak-detector@npm:29.2.1" +"jest-leak-detector@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-leak-detector@npm:29.5.0" dependencies: - jest-get-type: ^29.2.0 - pretty-format: ^29.2.1 - checksum: c30107ae583c7b1a30b8ac32f98997597ac5c46c243ef69a2b4bbaf803eefe0a696c6049a75434afdd0b0adbff418081a202903fcf00d38e4f8c1fe442c0f660 + jest-get-type: ^29.4.3 + pretty-format: ^29.5.0 + checksum: 0fb845da7ac9cdfc9b3b2e35f6f623a41c547d7dc0103ceb0349013459d00de5870b5689a625e7e37f9644934b40e8f1dcdd5422d14d57470600350364676313 languageName: node linkType: hard -"jest-matcher-utils@npm:^29.1.2": - version: 29.1.2 - resolution: "jest-matcher-utils@npm:29.1.2" +"jest-matcher-utils@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-matcher-utils@npm:29.5.0" dependencies: chalk: ^4.0.0 - jest-diff: ^29.1.2 - jest-get-type: ^29.0.0 - pretty-format: ^29.1.2 - checksum: 648afe4349eecf33316b08cf92b85a9a61aa6d1cf9b086a619ba494842888e1d883a783616d09c07a7a63e030983d4bb902e9a6b07702dc5247282d25c4c644f + jest-diff: ^29.5.0 + jest-get-type: ^29.4.3 + pretty-format: ^29.5.0 + checksum: 1d3e8c746e484a58ce194e3aad152eff21fd0896e8b8bf3d4ab1a4e2cbfed95fb143646f4ad9fdf6e42212b9e8fc033268b58e011b044a9929df45485deb5ac9 languageName: node linkType: hard -"jest-matcher-utils@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-matcher-utils@npm:29.2.1" - dependencies: - chalk: ^4.0.0 - jest-diff: ^29.2.1 - jest-get-type: ^29.2.0 - pretty-format: ^29.2.1 - checksum: d2a2f1ca8389e6ee529dc160786d912dec6cadfb395139fa1afa0f2e175775c7cf50dfe00981baae71ee0cbcab0d7f9f2d9cf9b9665dcda1d2cc04294fbd9979 - languageName: node - linkType: hard - -"jest-message-util@npm:^29.1.2": - version: 29.1.2 - resolution: "jest-message-util@npm:29.1.2" +"jest-message-util@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-message-util@npm:29.5.0" dependencies: "@babel/code-frame": ^7.12.13 - "@jest/types": ^29.1.2 + "@jest/types": ^29.5.0 "@types/stack-utils": ^2.0.0 chalk: ^4.0.0 graceful-fs: ^4.2.9 micromatch: ^4.0.4 - pretty-format: ^29.1.2 + pretty-format: ^29.5.0 slash: ^3.0.0 stack-utils: ^2.0.3 - checksum: d1541bd7264ee048f486b01e9b7d30fef0c343576119401e6569b3b865e9f2146e30e5d0f3b3bdf34f3feee42e5137affbfbe5bebea93a661be96d1abb167f29 + checksum: daddece6bbf846eb6a2ab9be9f2446e54085bef4e5cecd13d2a538fa9c01cb89d38e564c6b74fd8e12d37ed9eface8a362240ae9f21d68b214590631e7a0d8bf languageName: node linkType: hard -"jest-message-util@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-message-util@npm:29.2.1" +"jest-mock@npm:^27.0.6": + version: 27.5.1 + resolution: "jest-mock@npm:27.5.1" dependencies: - "@babel/code-frame": ^7.12.13 - "@jest/types": ^29.2.1 - "@types/stack-utils": ^2.0.0 - chalk: ^4.0.0 - graceful-fs: ^4.2.9 - micromatch: ^4.0.4 - pretty-format: ^29.2.1 - slash: ^3.0.0 - stack-utils: ^2.0.3 - checksum: 1ec1341dea7f0f04dfa9912647e5c4a092954c122becd9560e43e317407fd401745d99766048be7ee5f0b0b5ff09c84d3c853aa777af57139050efed0ad78376 + "@jest/types": ^27.5.1 + "@types/node": "*" + checksum: f5b5904bb1741b4a1687a5f492535b7b1758dc26534c72a5423305f8711292e96a601dec966df81bb313269fb52d47227e29f9c2e08324d79529172f67311be0 languageName: node linkType: hard -"jest-mock@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-mock@npm:29.2.1" +"jest-mock@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-mock@npm:29.5.0" dependencies: - "@jest/types": ^29.2.1 + "@jest/types": ^29.5.0 "@types/node": "*" - jest-util: ^29.2.1 - checksum: fb28fc277ed788fec45adb8ed1e45d6c7fc02938b5db2e87bfaccc83e385f6fcabfe3433562c50a051efffa02676c07e9e7fdc90d177be67d87a6831c5fc19fe + jest-util: ^29.5.0 + checksum: 2a9cf07509948fa8608898c445f04fe4dd6e2049ff431e5531eee028c808d3ba3c67f226ac87b0cf383feaa1055776900d197c895e89783016886ac17a4ff10c languageName: node linkType: hard "jest-pnp-resolver@npm:^1.2.2": - version: 1.2.2 - resolution: "jest-pnp-resolver@npm:1.2.2" + version: 1.2.3 + resolution: "jest-pnp-resolver@npm:1.2.3" peerDependencies: jest-resolve: "*" peerDependenciesMeta: jest-resolve: optional: true - checksum: bd85dcc0e76e0eb0c3d56382ec140f08d25ff4068cda9d0e360bb78fb176cb726d0beab82dc0e8694cafd09f55fee7622b8bcb240afa5fad301f4ed3eebb4f47 + checksum: db1a8ab2cb97ca19c01b1cfa9a9c8c69a143fde833c14df1fab0766f411b1148ff0df878adea09007ac6a2085ec116ba9a996a6ad104b1e58c20adbf88eed9b2 languageName: node linkType: hard -"jest-regex-util@npm:^29.2.0": - version: 29.2.0 - resolution: "jest-regex-util@npm:29.2.0" - checksum: 7c533e51c51230dac20c0d7395b19b8366cb022f7c6e08e6bcf2921626840ff90424af4c9b4689f02f0addfc9b071c4cd5f8f7a989298a4c8e0f9c94418ca1c3 +"jest-regex-util@npm:^29.4.3": + version: 29.4.3 + resolution: "jest-regex-util@npm:29.4.3" + checksum: 96fc7fc28cd4dd73a63c13a526202c4bd8b351d4e5b68b1a2a2c88da3308c2a16e26feaa593083eb0bac38cca1aa9dd05025412e7de013ba963fb8e66af22b8a languageName: node linkType: hard -"jest-resolve-dependencies@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-resolve-dependencies@npm:29.2.1" +"jest-resolve-dependencies@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-resolve-dependencies@npm:29.5.0" dependencies: - jest-regex-util: ^29.2.0 - jest-snapshot: ^29.2.1 - checksum: d29908195298f3f3d22f4632bc6eecde89d586d8b8563539072ffbfc5e6ea8973051ef7cbc8336060fcd8b91ea2e42353e8e20958d1fa68dbd6e1c8511a68023 + jest-regex-util: ^29.4.3 + jest-snapshot: ^29.5.0 + checksum: 479d2e5365d58fe23f2b87001e2e0adcbffe0147700e85abdec8f14b9703b0a55758c1929a9989e3f5d5e954fb88870ea4bfa04783523b664562fcf5f10b0edf languageName: node linkType: hard -"jest-resolve@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-resolve@npm:29.2.1" +"jest-resolve@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-resolve@npm:29.5.0" dependencies: chalk: ^4.0.0 graceful-fs: ^4.2.9 - jest-haste-map: ^29.2.1 + jest-haste-map: ^29.5.0 jest-pnp-resolver: ^1.2.2 - jest-util: ^29.2.1 - jest-validate: ^29.2.1 + jest-util: ^29.5.0 + jest-validate: ^29.5.0 resolve: ^1.20.0 - resolve.exports: ^1.1.0 + resolve.exports: ^2.0.0 slash: ^3.0.0 - checksum: d9ea07ccfa91fcbc7461a0c90bdf9b928f86c9b5de0b01a0a5f73c55aa9cf4f6f7b00439248d4babb9a021070df08be8e4716bc3c73d91311719a400c76f9c82 + checksum: 9a125f3cf323ceef512089339d35f3ee37f79fe16a831fb6a26773ea6a229b9e490d108fec7af334142e91845b5996de8e7cdd85a4d8d617078737d804e29c8f languageName: node linkType: hard -"jest-runner@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-runner@npm:29.2.1" +"jest-runner@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-runner@npm:29.5.0" dependencies: - "@jest/console": ^29.2.1 - "@jest/environment": ^29.2.1 - "@jest/test-result": ^29.2.1 - "@jest/transform": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/console": ^29.5.0 + "@jest/environment": ^29.5.0 + "@jest/test-result": ^29.5.0 + "@jest/transform": ^29.5.0 + "@jest/types": ^29.5.0 "@types/node": "*" chalk: ^4.0.0 - emittery: ^0.10.2 + emittery: ^0.13.1 graceful-fs: ^4.2.9 - jest-docblock: ^29.2.0 - jest-environment-node: ^29.2.1 - jest-haste-map: ^29.2.1 - jest-leak-detector: ^29.2.1 - jest-message-util: ^29.2.1 - jest-resolve: ^29.2.1 - jest-runtime: ^29.2.1 - jest-util: ^29.2.1 - jest-watcher: ^29.2.1 - jest-worker: ^29.2.1 + jest-docblock: ^29.4.3 + jest-environment-node: ^29.5.0 + jest-haste-map: ^29.5.0 + jest-leak-detector: ^29.5.0 + jest-message-util: ^29.5.0 + jest-resolve: ^29.5.0 + jest-runtime: ^29.5.0 + jest-util: ^29.5.0 + jest-watcher: ^29.5.0 + jest-worker: ^29.5.0 p-limit: ^3.1.0 source-map-support: 0.5.13 - checksum: 5aaa04b80eb9d2c78cf5e0ae815a2b418ec5ab24e3fa0bd5a1fa17c886a4c5e9938f5d8508f2ac24ed9dc8cf93c0742c8e538ae31833ed3dfa9fe6e2bc612fa9 + checksum: 437dea69c5dddca22032259787bac74790d5a171c9d804711415f31e5d1abfb64fa52f54a9015bb17a12b858fd0cf3f75ef6f3c9e94255a8596e179f707229c4 languageName: node linkType: hard -"jest-runtime@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-runtime@npm:29.2.1" +"jest-runtime@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-runtime@npm:29.5.0" dependencies: - "@jest/environment": ^29.2.1 - "@jest/fake-timers": ^29.2.1 - "@jest/globals": ^29.2.1 - "@jest/source-map": ^29.2.0 - "@jest/test-result": ^29.2.1 - "@jest/transform": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/environment": ^29.5.0 + "@jest/fake-timers": ^29.5.0 + "@jest/globals": ^29.5.0 + "@jest/source-map": ^29.4.3 + "@jest/test-result": ^29.5.0 + "@jest/transform": ^29.5.0 + "@jest/types": ^29.5.0 "@types/node": "*" chalk: ^4.0.0 cjs-module-lexer: ^1.0.0 collect-v8-coverage: ^1.0.0 glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-haste-map: ^29.2.1 - jest-message-util: ^29.2.1 - jest-mock: ^29.2.1 - jest-regex-util: ^29.2.0 - jest-resolve: ^29.2.1 - jest-snapshot: ^29.2.1 - jest-util: ^29.2.1 + jest-haste-map: ^29.5.0 + jest-message-util: ^29.5.0 + jest-mock: ^29.5.0 + jest-regex-util: ^29.4.3 + jest-resolve: ^29.5.0 + jest-snapshot: ^29.5.0 + jest-util: ^29.5.0 slash: ^3.0.0 strip-bom: ^4.0.0 - checksum: bfd535ece219f5a1e36758b51c498246e7aac63458a12cb85b3b2156a632d5ee802f43fdc566714fb36c12521589fe495727e9838cdae14b3369e122e44e8c2b + checksum: 7af27bd9d54cf1c5735404cf8d76c6509d5610b1ec0106a21baa815c1aff15d774ce534ac2834bc440dccfe6348bae1885fd9a806f23a94ddafdc0f5bae4b09d languageName: node linkType: hard -"jest-snapshot@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-snapshot@npm:29.2.1" +"jest-snapshot@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-snapshot@npm:29.5.0" dependencies: "@babel/core": ^7.11.6 "@babel/generator": ^7.7.2 @@ -12952,83 +16456,68 @@ __metadata: "@babel/plugin-syntax-typescript": ^7.7.2 "@babel/traverse": ^7.7.2 "@babel/types": ^7.3.3 - "@jest/expect-utils": ^29.2.1 - "@jest/transform": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/expect-utils": ^29.5.0 + "@jest/transform": ^29.5.0 + "@jest/types": ^29.5.0 "@types/babel__traverse": ^7.0.6 "@types/prettier": ^2.1.5 babel-preset-current-node-syntax: ^1.0.0 chalk: ^4.0.0 - expect: ^29.2.1 + expect: ^29.5.0 graceful-fs: ^4.2.9 - jest-diff: ^29.2.1 - jest-get-type: ^29.2.0 - jest-haste-map: ^29.2.1 - jest-matcher-utils: ^29.2.1 - jest-message-util: ^29.2.1 - jest-util: ^29.2.1 + jest-diff: ^29.5.0 + jest-get-type: ^29.4.3 + jest-matcher-utils: ^29.5.0 + jest-message-util: ^29.5.0 + jest-util: ^29.5.0 natural-compare: ^1.4.0 - pretty-format: ^29.2.1 + pretty-format: ^29.5.0 semver: ^7.3.5 - checksum: bb09952d13477f403d20c72803ea1b07e0ae7b7abb658bee0a03d3e16f75bb4c85502dbca1e3f5d8b3885063308b4a9acfdb0316339a16bfddd4907c7c79a662 + checksum: fe5df54122ed10eed625de6416a45bc4958d5062b018f05b152bf9785ab7f355dcd55e40cf5da63895bf8278f8d7b2bb4059b2cfbfdee18f509d455d37d8aa2b languageName: node linkType: hard -"jest-util@npm:^29.1.2": - version: 29.1.2 - resolution: "jest-util@npm:29.1.2" +"jest-util@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-util@npm:29.5.0" dependencies: - "@jest/types": ^29.1.2 + "@jest/types": ^29.5.0 "@types/node": "*" chalk: ^4.0.0 ci-info: ^3.2.0 graceful-fs: ^4.2.9 picomatch: ^2.2.3 - checksum: 6c55464e2028032692c4801b339bc1f7418826072d75981b8f29ded6ccba8cb8e1f164eb3d12d859cb63c24a8e9be90204f0d3c4d33e530375f1e5935755b5a9 + checksum: fd9212950d34d2ecad8c990dda0d8ea59a8a554b0c188b53ea5d6c4a0829a64f2e1d49e6e85e812014933d17426d7136da4785f9cf76fff1799de51b88bc85d3 languageName: node linkType: hard -"jest-util@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-util@npm:29.2.1" +"jest-validate@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-validate@npm:29.5.0" dependencies: - "@jest/types": ^29.2.1 - "@types/node": "*" - chalk: ^4.0.0 - ci-info: ^3.2.0 - graceful-fs: ^4.2.9 - picomatch: ^2.2.3 - checksum: 781bd14a65599d24b7449877020f4da32e8cb8fbc31c4e849c589ffde58f0eec27de9f690dba182e3ca369fe651c0bb9c307de29a0927d12777677ded56bafb8 - languageName: node - linkType: hard - -"jest-validate@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-validate@npm:29.2.1" - dependencies: - "@jest/types": ^29.2.1 + "@jest/types": ^29.5.0 camelcase: ^6.2.0 chalk: ^4.0.0 - jest-get-type: ^29.2.0 + jest-get-type: ^29.4.3 leven: ^3.1.0 - pretty-format: ^29.2.1 - checksum: 33bf2671f9c72f542ac3847b62d96c6717dabab1738c172aef46de06c98ae4c78ed1972ca39c5b1360eaebe47460a39e1d04fd0f7e724241a648d33f3b4d0466 + pretty-format: ^29.5.0 + checksum: 43ca5df7cb75572a254ac3e92fbbe7be6b6a1be898cc1e887a45d55ea003f7a112717d814a674d37f9f18f52d8de40873c8f084f17664ae562736c78dd44c6a1 languageName: node linkType: hard -"jest-watcher@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-watcher@npm:29.2.1" +"jest-watcher@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-watcher@npm:29.5.0" dependencies: - "@jest/test-result": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/test-result": ^29.5.0 + "@jest/types": ^29.5.0 "@types/node": "*" ansi-escapes: ^4.2.1 chalk: ^4.0.0 - emittery: ^0.10.2 - jest-util: ^29.2.1 + emittery: ^0.13.1 + jest-util: ^29.5.0 string-length: ^4.0.1 - checksum: c14224af26d1f8c4664d9731d28bb21a6959ce32c4a4ed76b21a5447eca9d635963db5e7a8dbc30df46535b5e4bad589092f47c26bfb705ed203ce80061e744f + checksum: 62303ac7bdc7e61a8b4239a239d018f7527739da2b2be6a81a7be25b74ca769f1c43ee8558ce8e72bb857245c46d6e03af331227ffb00a57280abb2a928aa776 languageName: node linkType: hard @@ -13042,26 +16531,26 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^29.2.1": - version: 29.2.1 - resolution: "jest-worker@npm:29.2.1" +"jest-worker@npm:^29.5.0": + version: 29.5.0 + resolution: "jest-worker@npm:29.5.0" dependencies: "@types/node": "*" - jest-util: ^29.2.1 + jest-util: ^29.5.0 merge-stream: ^2.0.0 supports-color: ^8.0.0 - checksum: 10365612fae02412376e963de9f069d854deaf5aec8ff818ce49c299cd0373256a387a2da68db8225fb0f18483f2cc9072a52d1846881d44b756b1e36bc7f4ed + checksum: 1151a1ae3602b1ea7c42a8f1efe2b5a7bf927039deaa0827bf978880169899b705744e288f80a63603fb3fc2985e0071234986af7dc2c21c7a64333d8777c7c9 languageName: node linkType: hard -"jest@npm:^29.2.1": - version: 29.2.1 - resolution: "jest@npm:29.2.1" +"jest@npm:^29.5.0": + version: 29.5.0 + resolution: "jest@npm:29.5.0" dependencies: - "@jest/core": ^29.2.1 - "@jest/types": ^29.2.1 + "@jest/core": ^29.5.0 + "@jest/types": ^29.5.0 import-local: ^3.0.2 - jest-cli: ^29.2.1 + jest-cli: ^29.5.0 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -13069,16 +16558,16 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: b19bf0b490b08c99ec221f9eb69302e02b8f220b080bde22032200b7638896a7d7ae2e559455859b7158e43d07454690b638dd4be5a35d33f00cc973da2da9aa + checksum: a8ff2eb0f421623412236e23cbe67c638127fffde466cba9606bc0c0553b4c1e5cb116d7e0ef990b5d1712851652c8ee461373b578df50857fe635b94ff455d5 languageName: node linkType: hard -"jiti@npm:^1.16.0": - version: 1.16.0 - resolution: "jiti@npm:1.16.0" +"jiti@npm:^1.18.2": + version: 1.18.2 + resolution: "jiti@npm:1.18.2" bin: jiti: bin/jiti.js - checksum: 28844cd69168fd0491b296d4925e0034cc9f23aba51bdb94b896818e444059092af838f98d406477dc1b6e0ca15a5ff4522e060bf3f289f9e1ca1ee572a54e6b + checksum: 46c41cd82d01c6efdee3fc0ae9b3e86ed37457192d6366f19157d863d64961b07982ab04e9d5879576a1af99cc4d132b0b73b336094f86a5ce9fb1029ec2d29f languageName: node linkType: hard @@ -13096,6 +16585,13 @@ __metadata: languageName: node linkType: hard +"jpeg-js@npm:^0.4.1, jpeg-js@npm:^0.4.4": + version: 0.4.4 + resolution: "jpeg-js@npm:0.4.4" + checksum: bd7cb61aa8df40a9ee2c2106839c3df6054891e56cfc22c0ac581402e06c6295f962a4754b0b2ac50a401789131b1c6dc9df8d24400f1352168be1894833c590 + languageName: node + linkType: hard + "js-cookie@npm:^2.2.1": version: 2.2.1 resolution: "js-cookie@npm:2.2.1" @@ -13103,10 +16599,17 @@ __metadata: languageName: node linkType: hard -"js-sdsl@npm:^4.1.4": - version: 4.1.5 - resolution: "js-sdsl@npm:4.1.5" - checksum: 695f657ddc5be462b97cac4e8e60f37de28d628ee0e23016baecff0bb584a18dddb5caeac537a775030f180b5afd62133ac4481e7024c8d03a62d73e4da0713e +"js-library-detector@npm:^6.6.0": + version: 6.6.0 + resolution: "js-library-detector@npm:6.6.0" + checksum: 7fb4d882cf3fbab70d0bebec1ca75edd62a46009e1caab17fb9914690bb53c257cf3ec08d907349b84ad67fdf2d08a925472996d1706bad03218bda7b842bc0c + languageName: node + linkType: hard + +"js-string-escape@npm:^1.0.1": + version: 1.0.1 + resolution: "js-string-escape@npm:1.0.1" + checksum: f11e0991bf57e0c183b55c547acec85bd2445f043efc9ea5aa68b41bd2a3e7d3ce94636cb233ae0d84064ba4c1a505d32e969813c5b13f81e7d4be12c59256fe languageName: node linkType: hard @@ -13124,7 +16627,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^3.13.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.7.0": +"js-yaml@npm:^3.10.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.7.0": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -13156,6 +16659,13 @@ __metadata: languageName: node linkType: hard +"jsbi@npm:^4.3.0": + version: 4.3.0 + resolution: "jsbi@npm:4.3.0" + checksum: 27c4f178eb7fd9d1756144066fdebc62f4a0176e877f55e646e8ce84075c13551bd575a316b9959ccdcca9d5dc05a81c9907cfa09f0cfeb43c9777797e36b0e9 + languageName: node + linkType: hard + "jsbn@npm:~0.1.0": version: 0.1.1 resolution: "jsbn@npm:0.1.1" @@ -13163,66 +16673,98 @@ __metadata: languageName: node linkType: hard -"jsdoc-api@npm:^7.1.1": - version: 7.1.1 - resolution: "jsdoc-api@npm:7.1.1" +"jscodeshift@npm:^0.14.0": + version: 0.14.0 + resolution: "jscodeshift@npm:0.14.0" + dependencies: + "@babel/core": ^7.13.16 + "@babel/parser": ^7.13.16 + "@babel/plugin-proposal-class-properties": ^7.13.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.13.8 + "@babel/plugin-proposal-optional-chaining": ^7.13.12 + "@babel/plugin-transform-modules-commonjs": ^7.13.8 + "@babel/preset-flow": ^7.13.13 + "@babel/preset-typescript": ^7.13.0 + "@babel/register": ^7.13.16 + babel-core: ^7.0.0-bridge.0 + chalk: ^4.1.2 + flow-parser: 0.* + graceful-fs: ^4.2.4 + micromatch: ^4.0.4 + neo-async: ^2.5.0 + node-dir: ^0.1.17 + recast: ^0.21.0 + temp: ^0.8.4 + write-file-atomic: ^2.3.0 + peerDependencies: + "@babel/preset-env": ^7.1.6 + bin: + jscodeshift: bin/jscodeshift.js + checksum: 54ea6d639455883336f80b38a70648821c88b7942315dc0fbab01bc34a9ad0f0f78e3bd69304b5ab167e4262d6ed7e6284c6d32525ab01c89d9118df89b3e2a0 + languageName: node + linkType: hard + +"jsdoc-api@npm:^8.0.0": + version: 8.0.0 + resolution: "jsdoc-api@npm:8.0.0" dependencies: array-back: ^6.2.2 cache-point: ^2.0.0 collect-all: ^1.0.4 file-set: ^4.0.2 fs-then-native: ^2.0.0 - jsdoc: ^3.6.10 + jsdoc: ^4.0.0 object-to-spawn-args: ^2.0.1 temp-path: ^1.0.0 walk-back: ^5.1.0 - checksum: 9d9e361f84208137e261e90b7291269cf3114d57091161ba58628652f2f143be8bbebeab6de0964dd5b474c4777d56ccb606733390e15bd84d9b3f2f269d7312 + checksum: 048d414895bf1fc4badba21385f43fe771f7f88e936b0e900744b0f9de67d0db224a51ea8df43c9aa92779cd220dfc1c042d06a5cd534f1eb35ad9397d5492ea languageName: node linkType: hard -"jsdoc-parse@npm:^6.1.0": - version: 6.1.0 - resolution: "jsdoc-parse@npm:6.1.0" +"jsdoc-parse@npm:^6.2.0": + version: 6.2.0 + resolution: "jsdoc-parse@npm:6.2.0" dependencies: array-back: ^6.2.2 lodash.omit: ^4.5.0 lodash.pick: ^4.4.0 reduce-extract: ^1.0.0 - sort-array: ^4.1.4 + sort-array: ^4.1.5 test-value: ^3.0.0 - checksum: a4294105d70157d033ce3d64104d0e6251dd42612cd489f0bc6ac6afb9df1fc36d5f979f115f4ad221d473b4b3c8a2dc148b80b64f046c98ba4b9ea93446b305 + checksum: eca1336773d69db87b366e0d44df1efaaeef938c9629cbd878a75c0fed6fe862d536421520751b4ea1b3e10172e12b11ebdfb939a82f07fd668fa52f42ea34e7 languageName: node linkType: hard -"jsdoc-to-markdown@npm:^7.1.1": - version: 7.1.1 - resolution: "jsdoc-to-markdown@npm:7.1.1" +"jsdoc-to-markdown@npm:^8.0.0": + version: 8.0.0 + resolution: "jsdoc-to-markdown@npm:8.0.0" dependencies: array-back: ^6.2.2 command-line-tool: ^0.8.0 config-master: ^3.1.0 - dmd: ^6.1.0 - jsdoc-api: ^7.1.1 - jsdoc-parse: ^6.1.0 + dmd: ^6.2.0 + jsdoc-api: ^8.0.0 + jsdoc-parse: ^6.2.0 walk-back: ^5.1.0 bin: jsdoc2md: bin/cli.js - checksum: bae4892fd552e65c46634b3a61fc9a15fd9bff26f2731fbc63cf8b8b75cbe0fa391af8ac04b53fac17a395cdde5c74ada1e6af479a39d2ba2758f5583ac3afc4 + checksum: 28acffe01b85e4bf5bec259ce9a8be8d28a1cedf1af0e4a9a6c13ddb4b398296c1fd9bdf6b486e619618fa90f23403f78fdf4a65a01ac3daa699be81f083282b languageName: node linkType: hard -"jsdoc-type-pratt-parser@npm:~3.1.0": - version: 3.1.0 - resolution: "jsdoc-type-pratt-parser@npm:3.1.0" - checksum: 2f437b57621f1e481918165f6cf0e48256628a9e510d8b3f88a2ab667bf2128bf8b94c628b57c43e78f555ca61983e9c282814703840dc091d2623992214a061 +"jsdoc-type-pratt-parser@npm:~4.0.0": + version: 4.0.0 + resolution: "jsdoc-type-pratt-parser@npm:4.0.0" + checksum: af0629c9517e484be778d8564440fec8de5b7610e0c9c88a3ba4554321364faf72b46689c8d8845faa12c0718437a9ed97e231977efc0f2d50e8a2dbad807eb3 languageName: node linkType: hard -"jsdoc@npm:^3.6.10": - version: 3.6.11 - resolution: "jsdoc@npm:3.6.11" +"jsdoc@npm:^4.0.0": + version: 4.0.2 + resolution: "jsdoc@npm:4.0.2" dependencies: - "@babel/parser": ^7.9.4 + "@babel/parser": ^7.20.15 + "@jsdoc/salty": ^0.2.1 "@types/markdown-it": ^12.2.3 bluebird: ^3.7.2 catharsis: ^0.9.0 @@ -13235,11 +16777,19 @@ __metadata: mkdirp: ^1.0.4 requizzle: ^0.2.3 strip-json-comments: ^3.1.0 - taffydb: 2.6.2 underscore: ~1.13.2 bin: jsdoc: jsdoc.js - checksum: 7920b5cba6200c8f56c9ac2ac5e89d06b6581dd1ce22e66976409fad8b68c16bfd8cd30fe9af58baeacc9f6bd9ba06d901ca4f5e234944f42a3c37e55e4ddcf0 + checksum: 04bf5ab005349b7581bd0e72ed99933eb71a41dcb47235b486b7d9146fbdf212a53e0cc044abe48ccf46012bd812dc1dfc007c6d679660ebdd053cd000242515 + languageName: node + linkType: hard + +"jsesc@npm:3.0.2, jsesc@npm:^3.0.2": + version: 3.0.2 + resolution: "jsesc@npm:3.0.2" + bin: + jsesc: bin/jsesc + checksum: a36d3ca40574a974d9c2063bf68c2b6141c20da8f2a36bd3279fc802563f35f0527a6c828801295bdfb2803952cf2cf387786c2c90ed564f88d5782475abfe3c languageName: node linkType: hard @@ -13261,10 +16811,23 @@ __metadata: languageName: node linkType: hard -"json-buffer@npm:3.0.0": - version: 3.0.0 - resolution: "json-buffer@npm:3.0.0" - checksum: 0cecacb8025370686a916069a2ff81f7d55167421b6aa7270ee74e244012650dd6bce22b0852202ea7ff8624fce50ff0ec1bdf95914ccb4553426e290d5a63fa +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 9026b03edc2847eefa2e37646c579300a1f3a4586cfb62bf857832b60c852042d0d6ae55d1afb8926163fa54c2b01d83ae24705f34990348bdac6273a29d4581 + languageName: node + linkType: hard + +"json-file-plus@npm:^3.3.1": + version: 3.3.1 + resolution: "json-file-plus@npm:3.3.1" + dependencies: + is: ^3.2.1 + node.extend: ^2.0.0 + object.assign: ^4.1.0 + promiseback: ^2.0.2 + safer-buffer: ^2.0.2 + checksum: 162c7a0c8f3e5a7eeea945aac4f2578c11567c87d3e2eafdd9db6972d1fc8657cc1e04b8a23ff3731759da794057a932f251a4db06a267abf5d181977753cf38 languageName: node linkType: hard @@ -13275,13 +16838,20 @@ __metadata: languageName: node linkType: hard -"json-parse-even-better-errors@npm:^2.3.0": +"json-parse-even-better-errors@npm:^2.3.0, json-parse-even-better-errors@npm:^2.3.1": version: 2.3.1 resolution: "json-parse-even-better-errors@npm:2.3.1" checksum: 798ed4cf3354a2d9ccd78e86d2169515a0097a5c133337807cdf7f1fc32e1391d207ccfc276518cc1d7d8d4db93288b8a50ba4293d212ad1336e52a8ec0a941f languageName: node linkType: hard +"json-parse-even-better-errors@npm:^3.0.0": + version: 3.0.0 + resolution: "json-parse-even-better-errors@npm:3.0.0" + checksum: f1970b5220c7fa23d888565510752c3d5e863f93668a202fcaa719739fa41485dfc6a1db212f702ebd3c873851cc067aebc2917e3f79763cae2fdb95046f38f3 + languageName: node + linkType: hard + "json-schema-to-ts@npm:1.6.4": version: 1.6.4 resolution: "json-schema-to-ts@npm:1.6.4" @@ -13321,11 +16891,11 @@ __metadata: linkType: hard "json-stable-stringify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify@npm:1.0.1" + version: 1.0.2 + resolution: "json-stable-stringify@npm:1.0.2" dependencies: - jsonify: ~0.0.0 - checksum: 65d6cbf0fca72a4136999f65f4401cf39a129f7aeff0fdd987ac3d3423a2113659294045fb8377e6e20d865cac32b1b8d70f3d87346c9786adcee60661d96ca5 + jsonify: ^0.0.1 + checksum: ec10863493fb728481ed7576551382768a173d5b884758db530def00523b862083a3fd70fee24b39e2f47f5f502e22f9a1489dd66da3535b63bf6241dbfca800 languageName: node linkType: hard @@ -13336,23 +16906,16 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.1.3, json5@npm:^2.2.1": - version: 2.2.1 - resolution: "json5@npm:2.2.1" +"json5@npm:^2.1.2, json5@npm:^2.2.2": + version: 2.2.3 + resolution: "json5@npm:2.2.3" bin: json5: lib/cli.js - checksum: 74b8a23b102a6f2bf2d224797ae553a75488b5adbaee9c9b6e5ab8b510a2fc6e38f876d4c77dea672d4014a44b2399e15f2051ac2b37b87f74c0c7602003543b - languageName: node - linkType: hard - -"jsonc-parser@npm:^2.3.0": - version: 2.3.1 - resolution: "jsonc-parser@npm:2.3.1" - checksum: de37640bd1d0dcc5b2e19f2514b3c2e05832ec6fdb86da65102509524d3eef0f2cc49bd471a0b28b8af2f8069bbca8396a9bd5cad4ae04001e1893e47df265eb + checksum: 2a7436a93393830bce797d4626275152e37e877b265e94ca69c99e3d20c2b9dab021279146a39cdb700e71b2dd32a4cebd1514cd57cee102b1af906ce5040349 languageName: node linkType: hard -"jsonc-parser@npm:^3.0.0": +"jsonc-parser@npm:^3.0.0, jsonc-parser@npm:^3.2.0": version: 3.2.0 resolution: "jsonc-parser@npm:3.2.0" checksum: 946dd9a5f326b745aa326d48a7257e3f4a4b62c5e98ec8e49fa2bdd8d96cef7e6febf1399f5c7016114fd1f68a1c62c6138826d5d90bc650448e3cf0951c53c7 @@ -13384,10 +16947,10 @@ __metadata: languageName: node linkType: hard -"jsonify@npm:~0.0.0": - version: 0.0.0 - resolution: "jsonify@npm:0.0.0" - checksum: d8d4ed476c116e6987a460dcb82f22284686caae9f498ac87b0502c1765ac1522f4f450a4cad4cc368d202fd3b27a3860735140a82867fc6d558f5f199c38bce +"jsonify@npm:^0.0.1": + version: 0.0.1 + resolution: "jsonify@npm:0.0.1" + checksum: 027287e1c0294fce15f18c0ff990cfc2318e7f01fb76515f784d5cd0784abfec6fc5c2355c3a2f2cb0ad7f4aa2f5b74ebbfe4e80476c35b2d13cabdb572e1134 languageName: node linkType: hard @@ -13410,7 +16973,7 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.2": +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.3": version: 3.3.3 resolution: "jsx-ast-utils@npm:3.3.3" dependencies: @@ -13420,12 +16983,19 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^3.0.0": - version: 3.1.0 - resolution: "keyv@npm:3.1.0" +"junk@npm:^4.0.0": + version: 4.0.1 + resolution: "junk@npm:4.0.1" + checksum: 4f0c94c0b2e46172284d9eaeb57bf1b784d86d218dbc673a1c8e08ef3443d03164238eb067591d0ad9f2c76a6ad012aeb618bb8135a2f0f26a6da931058e131b + languageName: node + linkType: hard + +"keyv@npm:^4.0.0": + version: 4.5.2 + resolution: "keyv@npm:4.5.2" dependencies: - json-buffer: 3.0.0 - checksum: bb7e8f3acffdbafbc2dd5b63f377fe6ec4c0e2c44fc82720449ef8ab54f4a7ce3802671ed94c0f475ae0a8549703353a2124561fcf3317010c141b32ca1ce903 + json-buffer: 3.0.1 + checksum: 13ad58303acd2261c0d4831b4658451603fd159e61daea2121fcb15feb623e75ee328cded0572da9ca76b7b3ceaf8e614f1806c6b3af5db73c9c35a345259651 languageName: node linkType: hard @@ -13452,17 +17022,24 @@ __metadata: languageName: node linkType: hard -"kleur@npm:^4.0.3, kleur@npm:^4.1.4, kleur@npm:^4.1.5": +"kleur@npm:^4.0.3": version: 4.1.5 resolution: "kleur@npm:4.1.5" checksum: 1dc476e32741acf0b1b5b0627ffd0d722e342c1b0da14de3e8ae97821327ca08f9fb944542fb3c126d90ac5f27f9d804edbe7c585bf7d12ef495d115e0f22c12 languageName: node linkType: hard -"kolorist@npm:^1.5.1, kolorist@npm:^1.6.0": - version: 1.6.0 - resolution: "kolorist@npm:1.6.0" - checksum: 4d898b782ceaaac3a51d9820a13563fcd0ed516d5493374a0e04ceda93ed4d74f9e267e8da5fb4453e508099b9f6b22e38ac1bff92fdc227081f460c003401c0 +"klona@npm:^2.0.4, klona@npm:^2.0.6": + version: 2.0.6 + resolution: "klona@npm:2.0.6" + checksum: ac9ee3732e42b96feb67faae4d27cf49494e8a3bf3fa7115ce242fe04786788e0aff4741a07a45a2462e2079aa983d73d38519c85d65b70ef11447bbc3c58ce7 + languageName: node + linkType: hard + +"kolorist@npm:^1.7.0": + version: 1.8.0 + resolution: "kolorist@npm:1.8.0" + checksum: b056de671acc8a17f1e78d6d46c47dae3e06481eabc9fed213dd9079a7454fd3a7ea1226ec718df81c9208877f7475d038ac27a400958fec278d975839e33643 languageName: node linkType: hard @@ -13473,7 +17050,7 @@ __metadata: languageName: node linkType: hard -"language-tags@npm:^1.0.5": +"language-tags@npm:=1.0.5": version: 1.0.5 resolution: "language-tags@npm:1.0.5" dependencies: @@ -13482,12 +17059,26 @@ __metadata: languageName: node linkType: hard -"latest-version@npm:^5.1.0": - version: 5.1.0 - resolution: "latest-version@npm:5.1.0" +"lazy-universal-dotenv@npm:^4.0.0": + version: 4.0.0 + resolution: "lazy-universal-dotenv@npm:4.0.0" + dependencies: + app-root-dir: ^1.0.2 + dotenv: ^16.0.0 + dotenv-expand: ^10.0.0 + checksum: 196e0d701100144fbfe078d604a477573413ebf38dfe8d543748605e6a7074978508a3bb9f8135acd319db4fa947eef78836497163617d15a22163c59a00996b + languageName: node + linkType: hard + +"less-loader@npm:^11.1.0": + version: 11.1.0 + resolution: "less-loader@npm:11.1.0" dependencies: - package-json: ^6.3.0 - checksum: fbc72b071eb66c40f652441fd783a9cca62f08bf42433651937f078cd9ef94bf728ec7743992777826e4e89305aef24f234b515e6030503a2cbee7fc9bdc2c0f + klona: ^2.0.4 + peerDependencies: + less: ^3.5.0 || ^4.0.0 + webpack: ^5.0.0 + checksum: 041216e0a6d95e24c9724f470719db3eb70b3888c45b1a1e9cd55edabe8ae79709522cd6c6713b466b3e9948544074e2a5b2be50ac3ced5ff41dfa9675f3b182 languageName: node linkType: hard @@ -13508,17 +17099,86 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:2.0.5": - version: 2.0.5 - resolution: "lilconfig@npm:2.0.5" - checksum: f7bb9e42656f06930ad04e583026f087508ae408d3526b8b54895e934eb2a966b7aafae569656f2c79a29fe6d779b3ec44ba577e80814734c8655d6f71cdf2d1 +"levn@npm:~0.3.0": + version: 0.3.0 + resolution: "levn@npm:0.3.0" + dependencies: + prelude-ls: ~1.1.2 + type-check: ~0.3.2 + checksum: 0d084a524231a8246bb10fec48cdbb35282099f6954838604f3c7fc66f2e16fa66fd9cc2f3f20a541a113c4dafdf181e822c887c8a319c9195444e6c64ac395e languageName: node linkType: hard -"lilconfig@npm:^2.0.5": - version: 2.0.6 - resolution: "lilconfig@npm:2.0.6" - checksum: 40a3cd72f103b1be5975f2ac1850810b61d4053e20ab09be8d3aeddfe042187e1ba70b4651a7e70f95efa1642e7dc8b2ae395b317b7d7753b241b43cef7c0f7d +"lighthouse-logger@npm:^1.0.0, lighthouse-logger@npm:^1.3.0": + version: 1.4.2 + resolution: "lighthouse-logger@npm:1.4.2" + dependencies: + debug: ^2.6.9 + marky: ^1.2.2 + checksum: ba6b73d93424318fab58b4e07c9ed246e3e969a3313f26b69515ed4c06457dd9a0b11bc706948398fdaef26aa4ba5e65cb848c37ce59f470d3c6c450b9b79a33 + languageName: node + linkType: hard + +"lighthouse-stack-packs@npm:1.10.0": + version: 1.10.0 + resolution: "lighthouse-stack-packs@npm:1.10.0" + checksum: 6bfa857a054939c09ba65452c8b0727c11b8bcd7bd90b9134b2e7e900c56303873f36e21902c3777eeba5c2ae5cc29ef72f71422a83f959488307edb9a40d7c1 + languageName: node + linkType: hard + +"lighthouse@npm:^10.2.0": + version: 10.2.0 + resolution: "lighthouse@npm:10.2.0" + dependencies: + "@sentry/node": ^6.17.4 + axe-core: 4.7.0 + chrome-launcher: ^0.15.2 + configstore: ^5.0.1 + csp_evaluator: 1.1.1 + devtools-protocol: 0.0.1130274 + enquirer: ^2.3.6 + http-link-header: ^1.1.1 + intl-messageformat: ^4.4.0 + jpeg-js: ^0.4.4 + js-library-detector: ^6.6.0 + lighthouse-logger: ^1.3.0 + lighthouse-stack-packs: 1.10.0 + lodash: ^4.17.21 + lookup-closest-locale: 6.2.0 + metaviewport-parser: 0.3.0 + open: ^8.4.0 + parse-cache-control: 1.0.1 + ps-list: ^8.0.0 + puppeteer-core: ^20.1.0 + robots-parser: ^3.0.0 + semver: ^5.3.0 + speedline-core: ^1.4.3 + third-party-web: ^0.20.2 + ws: ^7.0.0 + yargs: ^17.3.1 + yargs-parser: ^21.0.0 + bin: + chrome-debug: core/scripts/manual-chrome-launcher.js + lighthouse: cli/index.js + smokehouse: cli/test/smokehouse/frontends/smokehouse-bin.js + checksum: 358d4549ebfe49e2b2f763837267c32776efeb16ccf8a30c5e4e92ad0ff06acfe24ef637707d2b0909a34c4eed99f823c195a2133d1bab67f6af4d6c773d626b + languageName: node + linkType: hard + +"lilconfig@npm:2.1.0, lilconfig@npm:^2.0.5": + version: 2.1.0 + resolution: "lilconfig@npm:2.1.0" + checksum: 8549bb352b8192375fed4a74694cd61ad293904eee33f9d4866c2192865c44c4eb35d10782966242634e0cbc1e91fe62b1247f148dc5514918e3a966da7ea117 + languageName: node + linkType: hard + +"linebreak@npm:^1.1.0": + version: 1.1.0 + resolution: "linebreak@npm:1.1.0" + dependencies: + base64-js: 0.0.8 + unicode-trie: ^2.0.0 + checksum: 65cb66900b4b60d99bb761fb4143d8673ad5dd57dd850fcd921fe425a5a8e3c4416ebee76a68058a90d88b5033a50b210f522558a7e0c7d95ca907b5a2b52520 languageName: node linkType: hard @@ -13529,6 +17189,13 @@ __metadata: languageName: node linkType: hard +"lines-and-columns@npm:^2.0.2": + version: 2.0.3 + resolution: "lines-and-columns@npm:2.0.3" + checksum: 5955363dfd7d3d7c476d002eb47944dbe0310d57959e2112dce004c0dc76cecfd479cf8c098fd479ff344acdf04ee0e82b455462a26492231ac152f6c48d17a1 + languageName: node + linkType: hard + "linkify-it@npm:^3.0.1": version: 3.0.3 resolution: "linkify-it@npm:3.0.3" @@ -13538,39 +17205,39 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:^13.0.3": - version: 13.0.3 - resolution: "lint-staged@npm:13.0.3" +"lint-staged@npm:^13.2.2": + version: 13.2.2 + resolution: "lint-staged@npm:13.2.2" dependencies: + chalk: 5.2.0 cli-truncate: ^3.1.0 - colorette: ^2.0.17 - commander: ^9.3.0 + commander: ^10.0.0 debug: ^4.3.4 - execa: ^6.1.0 - lilconfig: 2.0.5 - listr2: ^4.0.5 + execa: ^7.0.0 + lilconfig: 2.1.0 + listr2: ^5.0.7 micromatch: ^4.0.5 normalize-path: ^3.0.0 - object-inspect: ^1.12.2 + object-inspect: ^1.12.3 pidtree: ^0.6.0 string-argv: ^0.3.1 - yaml: ^2.1.1 + yaml: ^2.2.2 bin: lint-staged: bin/lint-staged.js - checksum: 53d585007df06e162febab6b0836b55016d902586a267823c8a1158529d8c742dc7297e523f7023dff02250bef3eb0d6934f4ec4f9961adfc2ebbed5f54162d0 + checksum: f34f6e2e85e827364658ab8717bf8b35239473c2d4959d746b053a4cf158ac657348444c755820a8ef3eac2d4753a37c52e9db3e201ee20b085f26d2f2fbc9ed languageName: node linkType: hard -"listr2@npm:^4.0.5": - version: 4.0.5 - resolution: "listr2@npm:4.0.5" +"listr2@npm:^5.0.7": + version: 5.0.8 + resolution: "listr2@npm:5.0.8" dependencies: cli-truncate: ^2.1.0 - colorette: ^2.0.16 + colorette: ^2.0.19 log-update: ^4.0.0 p-map: ^4.0.0 rfdc: ^1.3.0 - rxjs: ^7.5.5 + rxjs: ^7.8.0 through: ^2.3.8 wrap-ansi: ^7.0.0 peerDependencies: @@ -13578,7 +17245,7 @@ __metadata: peerDependenciesMeta: enquirer: optional: true - checksum: 7af31851abe25969ef0581c6db808117e36af15b131401795182427769d9824f451ba9e8aff6ccd25b6a4f6c8796f816292caf08e5f1f9b1775e8e9c313dc6c5 + checksum: 8be9f5632627c4df0dc33f452c98d415a49e5f1614650d3cab1b103c33e95f2a7a0e9f3e1e5de00d51bf0b4179acd8ff11b25be77dbe097cf3773c05e728d46c languageName: node linkType: hard @@ -13594,29 +17261,45 @@ __metadata: languageName: node linkType: hard -"load-tsconfig@npm:^0.2.0": - version: 0.2.3 - resolution: "load-tsconfig@npm:0.2.3" - checksum: e28d1b2725fda76ee69fa4ee21b1257fd5b77b12e1be09cdc0b67f953e62ffbc3e7ac1a6267ec21309f95310cd10635e28a3cb38d04be3f7d683c4fe7914d7a9 +"load-plugin@npm:^5.0.0": + version: 5.1.0 + resolution: "load-plugin@npm:5.1.0" + dependencies: + "@npmcli/config": ^6.0.0 + import-meta-resolve: ^2.0.0 + checksum: d450c9a0838cec7f7581abcb8ff9170a5c6e1bc1ca816e4288e4a014bc0e819c4ca16163fd78b7e1fb6c1dffedf6ac881f9893d5a025b69f369a157d9a2aacf6 languageName: node linkType: hard -"load-yaml-file@npm:^0.2.0": - version: 0.2.0 - resolution: "load-yaml-file@npm:0.2.0" +"load-tsconfig@npm:^0.2.3": + version: 0.2.5 + resolution: "load-tsconfig@npm:0.2.5" + checksum: 631740833c4a7157bb7b6eeae6e1afb6a6fac7416b7ba91bd0944d5c5198270af2d68bf8347af3cc2ba821adc4d83ef98f66278bd263bc284c863a09ec441503 + languageName: node + linkType: hard + +"loader-utils@npm:^2.0.0": + version: 2.0.4 + resolution: "loader-utils@npm:2.0.4" dependencies: - graceful-fs: ^4.1.5 - js-yaml: ^3.13.0 - pify: ^4.0.1 - strip-bom: ^3.0.0 - checksum: d86d7ec7b15a1c35b40fb0d8abe710a7de83e0c1186c1d35a7eaaf8581611828089a3e706f64560c2939762bc73f18a7b85aed9335058c640e033933cf317f11 + big.js: ^5.2.2 + emojis-list: ^3.0.0 + json5: ^2.1.2 + checksum: a5281f5fff1eaa310ad5e1164095689443630f3411e927f95031ab4fb83b4a98f388185bb1fe949e8ab8d4247004336a625e9255c22122b815bb9a4c5d8fc3b7 languageName: node linkType: hard -"local-pkg@npm:^0.4.2": - version: 0.4.2 - resolution: "local-pkg@npm:0.4.2" - checksum: 22be451353c25c4411b552bf01880ebc9e995b93574b2facc7757968d888356df59199cacada14162ab53bbc9da055bb692c907b4171f008dbce45a2afc777c1 +"loader-utils@npm:^3.2.0": + version: 3.2.1 + resolution: "loader-utils@npm:3.2.1" + checksum: 4e3ea054cdc8be1ab1f1238f49f42fdf0483039eff920fb1d442039f3f0ad4ebd11fb8e584ccdf2cb7e3c56b3d40c1832416e6408a55651b843da288960cc792 + languageName: node + linkType: hard + +"local-pkg@npm:^0.4.3": + version: 0.4.3 + resolution: "local-pkg@npm:0.4.3" + checksum: 7825aca531dd6afa3a3712a0208697aa4a5cd009065f32e3fb732aafcc42ed11f277b5ac67229222e96f4def55197171cdf3d5522d0381b489d2e5547b407d55 languageName: node linkType: hard @@ -13630,6 +17313,16 @@ __metadata: languageName: node linkType: hard +"locate-path@npm:^3.0.0": + version: 3.0.0 + resolution: "locate-path@npm:3.0.0" + dependencies: + p-locate: ^3.0.0 + path-exists: ^3.0.0 + checksum: 53db3996672f21f8b0bf2a2c645ae2c13ffdae1eeecfcd399a583bce8516c0b88dcb4222ca6efbbbeb6949df7e46860895be2c02e8d3219abd373ace3bfb4e11 + languageName: node + linkType: hard + "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -13655,6 +17348,27 @@ __metadata: languageName: node linkType: hard +"lodash.clone@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clone@npm:4.5.0" + checksum: 5839f22acf3a43c026ac4325f7bcd378f34967415cd0b9fd7efa9bbbf38dc665900d36e040944c5afab94a51ff8a24f6cfc3781fe439705cbad5c722e9506b16 + languageName: node + linkType: hard + +"lodash.clonedeep@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeep@npm:4.5.0" + checksum: 92c46f094b064e876a23c97f57f81fbffd5d760bf2d8a1c61d85db6d1e488c66b0384c943abee4f6af7debf5ad4e4282e74ff83177c9e63d8ff081a4837c3489 + languageName: node + linkType: hard + +"lodash.constant@npm:^3.0.0": + version: 3.0.0 + resolution: "lodash.constant@npm:3.0.0" + checksum: 897c7b4b564c0481f93b935815b8f19d11d855ed330ac2c3f79791918a02551bbbbda191c6a4b6253e125c913764d2f4df60e7f0e32105efe3b3cfeef9d11e11 + languageName: node + linkType: hard + "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -13669,6 +17383,27 @@ __metadata: languageName: node linkType: hard +"lodash.filter@npm:^4.6.0": + version: 4.6.0 + resolution: "lodash.filter@npm:4.6.0" + checksum: f21d245d24818e15b560cb6cadc8404a1bf98bd87d037e5e51858aad57ca2b9db64d87e450a23c8f72dd2c66968efd09b034055ce86d93eef4a4eb6f1bbaf100 + languageName: node + linkType: hard + +"lodash.flatmap@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.flatmap@npm:4.5.0" + checksum: c01a47d32e99f8fce75409f0a4a9bd12fbb2d3a46519a0dde14deedb1e527b5ddccc2bf997705c67bdecb915f47749e8a9ffefa7a91c41f0c448e06348ec81c7 + languageName: node + linkType: hard + +"lodash.foreach@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.foreach@npm:4.5.0" + checksum: a940386b158ca0d62994db41fc16529eb8ae67138f29ced38e91f912cb5435d1b0ed34b18e6f7b9ddfc32ab676afc6dfec60d1e22633d8e3e4b33413402ab4ad + languageName: node + linkType: hard + "lodash.get@npm:^4.4.2": version: 4.4.2 resolution: "lodash.get@npm:4.4.2" @@ -13676,6 +17411,13 @@ __metadata: languageName: node linkType: hard +"lodash.has@npm:^4.5.2": + version: 4.5.2 + resolution: "lodash.has@npm:4.5.2" + checksum: b3ec829a86852331d48b3730ff06088a283d128a3965aa521ffd942bcf5c82e06bed3164ff7a7751d11e768d88f0d7bab316192091489caf20f452d42f7055d5 + languageName: node + linkType: hard + "lodash.isarguments@npm:^3.1.0": version: 3.1.0 resolution: "lodash.isarguments@npm:3.1.0" @@ -13683,6 +17425,13 @@ __metadata: languageName: node linkType: hard +"lodash.isempty@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.isempty@npm:4.4.0" + checksum: a8118f23f7ed72a1dbd176bf27f297d1e71aa1926288449cb8f7cef99ba1bc7527eab52fe7899ab080fa1dc150aba6e4a6367bf49fa4e0b78da1ecc095f8d8c5 + languageName: node + linkType: hard + "lodash.isequal@npm:^4.5.0": version: 4.5.0 resolution: "lodash.isequal@npm:4.5.0" @@ -13690,6 +17439,13 @@ __metadata: languageName: node linkType: hard +"lodash.isfunction@npm:^3.0.9": + version: 3.0.9 + resolution: "lodash.isfunction@npm:3.0.9" + checksum: 99e54c34b1e8a9ba75c034deb39cedbd2aca7af685815e67a2a8ec4f73ec9748cda6ebee5a07d7de4b938e90d421fd280e9c385cc190f903ac217ac8aff30314 + languageName: node + linkType: hard + "lodash.ismatch@npm:^4.4.0": version: 4.4.0 resolution: "lodash.ismatch@npm:4.4.0" @@ -13697,13 +17453,55 @@ __metadata: languageName: node linkType: hard -"lodash.merge@npm:^4.6.2": +"lodash.isplainobject@npm:^4.0.6": + version: 4.0.6 + resolution: "lodash.isplainobject@npm:4.0.6" + checksum: 29c6351f281e0d9a1d58f1a4c8f4400924b4c79f18dfc4613624d7d54784df07efaff97c1ff2659f3e085ecf4fff493300adc4837553104cef2634110b0d5337 + languageName: node + linkType: hard + +"lodash.isundefined@npm:^3.0.1": + version: 3.0.1 + resolution: "lodash.isundefined@npm:3.0.1" + checksum: 52b4d99a47bd41daa4e2860200258f56b1f2c99263c11a5f607fbbd91d6447fe674bdafc172735d099908a09136d4a0f98cf79715e38ca4b490fdda7162be289 + languageName: node + linkType: hard + +"lodash.kebabcase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.kebabcase@npm:4.1.1" + checksum: 5a6c59161914e1bae23438a298c7433e83d935e0f59853fa862e691164696bc07f6dfa4c313d499fbf41ba8d53314e9850416502376705a357d24ee6ca33af78 + languageName: node + linkType: hard + +"lodash.keys@npm:^4.2.0": + version: 4.2.0 + resolution: "lodash.keys@npm:4.2.0" + checksum: 055576c8c4a0bacc0c1da9bcbb520e6e70dcf94c609495263686c62c8242a440293e9ab8387a7398dda529cb05b76e8f783c3fd3d6ba7bc6d5d6d2e08e8512ae + languageName: node + linkType: hard + +"lodash.map@npm:^4.6.0": + version: 4.6.0 + resolution: "lodash.map@npm:4.6.0" + checksum: 7369a41d7d24d15ce3bbd02a7faa3a90f6266c38184e64932571b9b21b758bd10c04ffd117d1859be1a44156f29b94df5045eff172bf8a97fddf68bf1002d12f + languageName: node + linkType: hard + +"lodash.merge@npm:4.6.2, lodash.merge@npm:^4.6.2": version: 4.6.2 resolution: "lodash.merge@npm:4.6.2" checksum: ad580b4bdbb7ca1f7abf7e1bce63a9a0b98e370cf40194b03380a46b4ed799c9573029599caebc1b14e3f24b111aef72b96674a56cfa105e0f5ac70546cdc005 languageName: node linkType: hard +"lodash.mergewith@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.mergewith@npm:4.6.2" + checksum: a6db2a9339752411f21b956908c404ec1e088e783a65c8b29e30ae5b3b6384f82517662d6f425cc97c2070b546cc2c7daaa8d33f78db7b6e9be06cd834abdeb8 + languageName: node + linkType: hard + "lodash.omit@npm:^4.5.0": version: 4.5.0 resolution: "lodash.omit@npm:4.5.0" @@ -13725,6 +17523,20 @@ __metadata: languageName: node linkType: hard +"lodash.reduce@npm:^4.6.0": + version: 4.6.0 + resolution: "lodash.reduce@npm:4.6.0" + checksum: 81f2a1045440554f8427f895ef479f1de5c141edd7852dde85a894879312801efae0295116e5cf830c531c1a51cdab8f3628c3ad39fa21a9874bb9158d9ea075 + languageName: node + linkType: hard + +"lodash.size@npm:^4.2.0": + version: 4.2.0 + resolution: "lodash.size@npm:4.2.0" + checksum: 8d64ffa3dbd60a143c8e97964ce6476e4185e026408fa006ced60906943837b1797867eeadd833aae975a86bbe19209cba0fdc360941bc064518bdda9971c72f + languageName: node + linkType: hard + "lodash.snakecase@npm:^4.1.1": version: 4.1.1 resolution: "lodash.snakecase@npm:4.1.1" @@ -13739,21 +17551,63 @@ __metadata: languageName: node linkType: hard -"lodash.uniqwith@npm:^4.5.0": +"lodash.startcase@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.startcase@npm:4.4.0" + checksum: c03a4a784aca653845fe09d0ef67c902b6e49288dc45f542a4ab345a9c406a6dc194c774423fa313ee7b06283950301c1221dd2a1d8ecb2dac8dfbb9ed5606b5 + languageName: node + linkType: hard + +"lodash.topairs@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.topairs@npm:4.3.0" + checksum: 8efd69e706e5adb7f8c4521cd094be17ed4776dab30d9ae0a72e130f14e7bb696dd858cbc18c912aa20e97ccc76486f3cf2d0acb3ff30cb9af3fd525a7f9c9bd + languageName: node + linkType: hard + +"lodash.transform@npm:^4.6.0": + version: 4.6.0 + resolution: "lodash.transform@npm:4.6.0" + checksum: f9d0f583409212e4e94c08c0de1c9e71679e26658d2645be16ee6db55ee2572db5a8395c76f471c00c7d18f3a86c781f7ac51238a7cfa29e9cca253aa0b97149 + languageName: node + linkType: hard + +"lodash.union@npm:^4.6.0": + version: 4.6.0 + resolution: "lodash.union@npm:4.6.0" + checksum: 1514dc6508b2614ec071a6470f36eb7a70f69bf1abb6d55bdfdc21069635a4517783654b28504c0f025059a7598d37529766888e6d5902b8ab28b712228f7b2a + languageName: node + linkType: hard + +"lodash.uniq@npm:^4.5.0": version: 4.5.0 - resolution: "lodash.uniqwith@npm:4.5.0" - checksum: d49a4565ed64efd86674127d321622673c29cde3e060baebc0f30372f22886c61b2ead44709db8c890053db1b9660e8ed689689812c1a485eb5703caa94d1150 + resolution: "lodash.uniq@npm:4.5.0" + checksum: a4779b57a8d0f3c441af13d9afe7ecff22dd1b8ce1129849f71d9bbc8e8ee4e46dfb4b7c28f7ad3d67481edd6e51126e4e2a6ee276e25906d10f7140187c392d + languageName: node + linkType: hard + +"lodash.upperfirst@npm:^4.3.1": + version: 4.3.1 + resolution: "lodash.upperfirst@npm:4.3.1" + checksum: cadec6955900afe1928cc60cdc4923a79c2ef991e42665419cc81630ed9b4f952a1093b222e0141ab31cbc4dba549f97ec28ff67929d71e01861c97188a5fa83 + languageName: node + linkType: hard + +"lodash.values@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.values@npm:4.3.0" + checksum: 857e122ddf6edb50137887f0b834d471f96d66692ebb5de8b048ed277c8a3dd1bc8f85d82cf31b0f5c6dbc5b72c036a591205f76eec86bb11818a1a6f7e5a28c languageName: node linkType: hard -"lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:~4.17.15": +"lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:~4.17.15": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 languageName: node linkType: hard -"log-symbols@npm:^4.0.0": +"log-symbols@npm:^4.0.0, log-symbols@npm:^4.1.0": version: 4.1.0 resolution: "log-symbols@npm:4.1.0" dependencies: @@ -13763,16 +17617,6 @@ __metadata: languageName: node linkType: hard -"log-symbols@npm:^5.1.0": - version: 5.1.0 - resolution: "log-symbols@npm:5.1.0" - dependencies: - chalk: ^5.0.0 - is-unicode-supported: ^1.1.0 - checksum: 7291b6e7f1b3df6865bdaeb9b59605c832668ac2fa0965c63b1e7dd3700349aec09c1d7d40c368d5041ff58b7f89461a56e4009471921301af7b3609cbff9a29 - languageName: node - linkType: hard - "log-update@npm:^4.0.0": version: 4.0.0 resolution: "log-update@npm:4.0.0" @@ -13785,10 +17629,31 @@ __metadata: languageName: node linkType: hard +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 16afbe8f749c7c849db1f4de4e2e6a31ac6e617cead3bdc4f9605cb703cd20e1e9fc1a7baba674ffcca57d660a6e5b53a9e236d7b25a295d3855cca79cc06744 + languageName: node + linkType: hard + +"long@npm:^5.0.0": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 885ede7c3de4facccbd2cacc6168bae3a02c3e836159ea4252c87b6e34d40af819824b2d4edce330bfb5c4d6e8ce3ec5864bdcf9473fa1f53a4f8225860e5897 + languageName: node + linkType: hard + "longest-streak@npm:^3.0.0": - version: 3.0.1 - resolution: "longest-streak@npm:3.0.1" - checksum: 3b59c4c04ce3c70f137e339c10d574026fa3a711c45dc0e69a63a2c0ac981e57f837e1d5b64b991eee5234c4fa46fa10886a20626fb739ed3b04b77bcf6d14a8 + version: 3.1.0 + resolution: "longest-streak@npm:3.1.0" + checksum: d7f952ed004cbdb5c8bcfc4f7f5c3d65449e6c5a9e9be4505a656e3df5a57ee125f284286b4bf8ecea0c21a7b3bf2b8f9001ad506c319b9815ad6a63a47d0fd0 + languageName: node + linkType: hard + +"lookup-closest-locale@npm:6.2.0": + version: 6.2.0 + resolution: "lookup-closest-locale@npm:6.2.0" + checksum: 5ef9a8d48c14ff36dce324a88c2660ce4f04ecf51d2db406b6f0c32ac62634713764e9e7008e16a2f7da58419ff5d9f7fb7eada46ec3e1ba1209947b72ee9edc languageName: node linkType: hard @@ -13803,12 +17668,12 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^2.3.1": - version: 2.3.4 - resolution: "loupe@npm:2.3.4" +"loupe@npm:^2.3.1, loupe@npm:^2.3.6": + version: 2.3.6 + resolution: "loupe@npm:2.3.6" dependencies: get-func-name: ^2.0.0 - checksum: 5af91db61aa18530f1749a64735ee194ac263e65e9f4d1562bf3036c591f1baa948289c193e0e34c7b5e2c1b75d3c1dc4fce87f5edb3cee10b0c0df46bc9ffb3 + checksum: cc83f1b124a1df7384601d72d8d1f5fe95fd7a8185469fec48bb2e4027e45243949e7a013e8d91051a138451ff0552310c32aa9786e60b6a30d1e801bdc2163f languageName: node linkType: hard @@ -13821,13 +17686,6 @@ __metadata: languageName: node linkType: hard -"lowercase-keys@npm:^1.0.0, lowercase-keys@npm:^1.0.1": - version: 1.0.1 - resolution: "lowercase-keys@npm:1.0.1" - checksum: 4d045026595936e09953e3867722e309415ff2c80d7701d067546d75ef698dac218a4f53c6d1d0e7368b47e45fd7529df47e6cb56fbb90523ba599f898b3d147 - languageName: node - linkType: hard - "lowercase-keys@npm:^2.0.0": version: 2.0.0 resolution: "lowercase-keys@npm:2.0.0" @@ -13835,23 +17693,12 @@ __metadata: languageName: node linkType: hard -"lowlight@npm:^1.17.0": - version: 1.20.0 - resolution: "lowlight@npm:1.20.0" - dependencies: - fault: ^1.0.0 - highlight.js: ~10.7.0 - checksum: 14a1815d6bae202ddee313fc60f06d46e5235c02fa483a77950b401d85b4c1e12290145ccd17a716b07f9328bd5864aa2d402b6a819ff3be7c833d9748ff8ba7 - languageName: node - linkType: hard - -"lru-cache@npm:^4.0.0": - version: 4.1.5 - resolution: "lru-cache@npm:4.1.5" +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" dependencies: - pseudomap: ^1.0.2 - yallist: ^2.1.2 - checksum: 4bb4b58a36cd7dc4dcec74cbe6a8f766a38b7426f1ff59d4cf7d82a2aa9b9565cd1cb98f6ff60ce5cd174524868d7bc9b7b1c294371851356066ca9ac4cf135a + yallist: ^3.0.2 + checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb languageName: node linkType: hard @@ -13864,10 +17711,24 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^7.5.1, lru-cache@npm:^7.7.1": - version: 7.14.0 - resolution: "lru-cache@npm:7.14.0" - checksum: efdd329f2c1bb790b71d497c6c59272e6bc2d7dd060ba55fc136becd3dd31fc8346edb446275504d94cb60d3c8385dbf5267b79b23789e409b2bdf302d13f0d7 +"lru-cache@npm:^7.14.1, lru-cache@npm:^7.5.1, lru-cache@npm:^7.7.1": + version: 7.18.3 + resolution: "lru-cache@npm:7.18.3" + checksum: e550d772384709deea3f141af34b6d4fa392e2e418c1498c078de0ee63670f1f46f5eee746e8ef7e69e1c895af0d4224e62ee33e66a543a14763b0f2e74c1356 + languageName: node + linkType: hard + +"lru-cache@npm:^9.1.1": + version: 9.1.1 + resolution: "lru-cache@npm:9.1.1" + checksum: 4d703bb9b66216bbee55ead82a9682820a2b6acbdfca491b235390b1ef1056000a032d56dfb373fdf9ad4492f1fa9d04cc9a05a77f25bd7ce6901d21ad9b68b7 + languageName: node + linkType: hard + +"lru_map@npm:^0.3.3": + version: 0.3.3 + resolution: "lru_map@npm:0.3.3" + checksum: ca9dd43c65ed7a4f117c548028101c5b6855e10923ea9d1f635af53ad20c5868ff428c364d454a7b57fe391b89c704982275410c3c5099cca5aeee00d76e169a languageName: node linkType: hard @@ -13878,34 +17739,53 @@ __metadata: languageName: node linkType: hard -"lz-string@npm:^1.4.4": - version: 1.4.4 - resolution: "lz-string@npm:1.4.4" +"lz-string@npm:^1.4.4, lz-string@npm:^1.5.0": + version: 1.5.0 + resolution: "lz-string@npm:1.5.0" bin: lz-string: bin/bin.js - checksum: 54e31238a61a84d8f664d9860a9fba7310c5b97a52c444f80543069bc084815eff40b8d4474ae1d93992fdf6c252dca37cf27f6adbeb4dbc3df2f3ac773d0e61 + checksum: 1ee98b4580246fd90dd54da6e346fb1caefcf05f677c686d9af237a157fdea3fd7c83a4bc58f858cd5b10a34d27afe0fdcbd0505a47e0590726a873dc8b8f65d languageName: node linkType: hard -"magic-string@npm:^0.25.9": - version: 0.25.9 - resolution: "magic-string@npm:0.25.9" +"magic-string@npm:^0.27.0": + version: 0.27.0 + resolution: "magic-string@npm:0.27.0" dependencies: - sourcemap-codec: ^1.4.8 - checksum: 9a0e55a15c7303fc360f9572a71cffba1f61451bc92c5602b1206c9d17f492403bf96f946dfce7483e66822d6b74607262e24392e87b0ac27b786e69a40e9b1a + "@jridgewell/sourcemap-codec": ^1.4.13 + checksum: 273faaa50baadb7a2df6e442eac34ad611304fc08fe16e24fe2e472fd944bfcb73ffb50d2dc972dc04e92784222002af46868cb9698b1be181c81830fd95a13e languageName: node linkType: hard -"magic-string@npm:^0.26.2, magic-string@npm:^0.26.7": - version: 0.26.7 - resolution: "magic-string@npm:0.26.7" +"magic-string@npm:^0.29.0": + version: 0.29.0 + resolution: "magic-string@npm:0.29.0" dependencies: - sourcemap-codec: ^1.4.8 - checksum: 89b0d60cbb32bbf3d1e23c46ea93db082d18a8230b972027aecb10a40bba51be519ecce0674f995571e3affe917b76b09f59d8dbc9a1b2c9c4102a2b6e8a2b01 + "@jridgewell/sourcemap-codec": ^1.4.13 + checksum: 19e5398fcfc44804917127c72ad622c68a19a0a10cbdb8d4f9f9417584a087fe9e117140bfb2463d86743cf1ed9cf4182ae0b0ad1a7536f7fdda257ee4449ffb + languageName: node + linkType: hard + +"magic-string@npm:^0.30.0": + version: 0.30.0 + resolution: "magic-string@npm:0.30.0" + dependencies: + "@jridgewell/sourcemap-codec": ^1.4.13 + checksum: 7bdf22e27334d8a393858a16f5f840af63a7c05848c000fd714da5aa5eefa09a1bc01d8469362f25cc5c4a14ec01b46557b7fff8751365522acddf21e57c488d + languageName: node + linkType: hard + +"make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": + version: 2.1.0 + resolution: "make-dir@npm:2.1.0" + dependencies: + pify: ^4.0.1 + semver: ^5.6.0 + checksum: 043548886bfaf1820323c6a2997e6d2fa51ccc2586ac14e6f14634f7458b4db2daf15f8c310e2a0abd3e0cddc64df1890d8fc7263033602c47bb12cbfcf86aab languageName: node linkType: hard -"make-dir@npm:^3.0.0, make-dir@npm:^3.1.0": +"make-dir@npm:^3.0.0, make-dir@npm:^3.0.2, make-dir@npm:^3.1.0": version: 3.1.0 resolution: "make-dir@npm:3.1.0" dependencies: @@ -13921,7 +17801,7 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^10.0.3, make-fetch-happen@npm:^10.0.6": +"make-fetch-happen@npm:^10.0.3": version: 10.2.1 resolution: "make-fetch-happen@npm:10.2.1" dependencies: @@ -13945,6 +17825,29 @@ __metadata: languageName: node linkType: hard +"make-fetch-happen@npm:^11.0.0": + version: 11.1.1 + resolution: "make-fetch-happen@npm:11.1.1" + dependencies: + agentkeepalive: ^4.2.1 + cacache: ^17.0.0 + http-cache-semantics: ^4.1.1 + http-proxy-agent: ^5.0.0 + https-proxy-agent: ^5.0.0 + is-lambda: ^1.0.1 + lru-cache: ^7.7.1 + minipass: ^5.0.0 + minipass-fetch: ^3.0.0 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + negotiator: ^0.6.3 + promise-retry: ^2.0.1 + socks-proxy-agent: ^7.0.0 + ssri: ^10.0.0 + checksum: 7268bf274a0f6dcf0343829489a4506603ff34bd0649c12058753900b0eb29191dce5dba12680719a5d0a983d3e57810f594a12f3c18494e93a1fbc6348a4540 + languageName: node + linkType: hard + "makeerror@npm:1.0.12": version: 1.0.12 resolution: "makeerror@npm:1.0.12" @@ -13961,13 +17864,20 @@ __metadata: languageName: node linkType: hard -"map-obj@npm:^4.0.0": +"map-obj@npm:^4.0.0, map-obj@npm:^4.1.0": version: 4.3.0 resolution: "map-obj@npm:4.3.0" checksum: fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e languageName: node linkType: hard +"map-or-similar@npm:^1.5.0": + version: 1.5.0 + resolution: "map-or-similar@npm:1.5.0" + checksum: f65c0d420e272d0fce4e24db35f6a08109218480bca1d61eaa442cbe6cf46270b840218d3b5e94e4bfcc2595f1d0a1fa5885df750b52aac9ab1d437b29dcce38 + languageName: node + linkType: hard + "markdown-extensions@npm:^1.0.0": version: 1.1.1 resolution: "markdown-extensions@npm:1.1.1" @@ -13976,12 +17886,12 @@ __metadata: linkType: hard "markdown-it-anchor@npm:^8.4.1": - version: 8.6.5 - resolution: "markdown-it-anchor@npm:8.6.5" + version: 8.6.7 + resolution: "markdown-it-anchor@npm:8.6.7" peerDependencies: "@types/markdown-it": "*" markdown-it: "*" - checksum: 9a466279e52e3c04d67f1e706f2c14df9340e64ddac6eaad22ceaeca777e381103caa942464003e98765a7555bd1ccb5055b624565cb4522a7071dce6ae93460 + checksum: 828236768ac7f61ed5591393c1b1bfc5dbf2b6d0c58a3deec606c61dddaa12658a34450cbef37ab50a04453e618ce1efd47d86e4e52595024334898fd306225b languageName: node linkType: hard @@ -14001,27 +17911,43 @@ __metadata: linkType: hard "markdown-table@npm:^3.0.0": - version: 3.0.2 - resolution: "markdown-table@npm:3.0.2" - checksum: 7bd9eb54e7ac15165f79730ac6357b8194294552f727bcb34e29f3f1b72823c1220cb61153ebf0962c8faac4d25e49c62e8e9471cd6352a67cdca99928ecade1 + version: 3.0.3 + resolution: "markdown-table@npm:3.0.3" + checksum: 8fcd3d9018311120fbb97115987f8b1665a603f3134c93fbecc5d1463380c8036f789e2a62c19432058829e594fff8db9ff81c88f83690b2f8ed6c074f8d9e10 languageName: node linkType: hard -"marked@npm:^4.0.10, marked@npm:^4.0.12, marked@npm:^4.0.19": - version: 4.1.1 - resolution: "marked@npm:4.1.1" +"markdown-to-jsx@npm:^7.1.8": + version: 7.2.0 + resolution: "markdown-to-jsx@npm:7.2.0" + peerDependencies: + react: ">= 0.14.0" + checksum: ea417e684d7eec9f1beebc9423aba377116ef77c3cd83a2d622df1b9030ffef99aa9b3f431192b94f3237943a33560e6dda9be8a4c1d25187518d09986dad22f + languageName: node + linkType: hard + +"marked@npm:^4.0.10, marked@npm:^4.2.3, marked@npm:^4.3.0": + version: 4.3.0 + resolution: "marked@npm:4.3.0" bin: marked: bin/marked.js - checksum: 717e3357952ee53de831bf0eb110ed075bebca2376c58bcdf7ee523ef540d45308ad6d51b2c933da0968832ea4386f31c142ca65443e77c098e84f6cce73e418 + checksum: 0db6817893952c3ec710eb9ceafb8468bf5ae38cb0f92b7b083baa13d70b19774674be04db5b817681fa7c5c6a088f61300815e4dd75a59696f4716ad69f6260 languageName: node linkType: hard -"matcher@npm:^3.0.0": - version: 3.0.0 - resolution: "matcher@npm:3.0.0" +"marky@npm:^1.2.2": + version: 1.2.5 + resolution: "marky@npm:1.2.5" + checksum: 823b946677749551cdfc3b5221685478b5d1b9cc0dc03eff977c6f9a615fb05c67559f9556cb3c0fcb941a9ea0e195e37befd83026443396ccee8b724f54f4c5 + languageName: node + linkType: hard + +"md5-hex@npm:^3.0.1": + version: 3.0.1 + resolution: "md5-hex@npm:3.0.1" dependencies: - escape-string-regexp: ^4.0.0 - checksum: 8bee1a7ab7609c2c21d9c9254b6785fa708eadf289032b556d57a34e98fcd4c537659a004dafee6ce80ab157099e645c199dc52678dff1e7fb0a6684e0da4dbe + blueimp-md5: ^2.10.0 + checksum: 6799a19e8bdd3e0c2861b94c1d4d858a89220488d7885c1fa236797e367d0c2e5f2b789e05309307083503f85be3603a9686a5915568a473137d6b4117419cc2 languageName: node linkType: hard @@ -14035,30 +17961,44 @@ __metadata: linkType: hard "mdast-util-definitions@npm:^5.0.0": - version: 5.1.1 - resolution: "mdast-util-definitions@npm:5.1.1" + version: 5.1.2 + resolution: "mdast-util-definitions@npm:5.1.2" dependencies: "@types/mdast": ^3.0.0 "@types/unist": ^2.0.0 unist-util-visit: ^4.0.0 - checksum: f8025e2c35f6f8641528037abe18f492ef100e00a48c92cf78b7a313f9ccdb0e30c6aed0b40539767a3f425be09e78cb0f2f9bc4131fff41ea4664a1a7314a14 + checksum: 2544daccab744ea1ede76045c2577ae4f1cc1b9eb1ea51ab273fe1dca8db5a8d6f50f87759c0ce6484975914b144b7f40316f805cb9c86223a78db8de0b77bae languageName: node linkType: hard "mdast-util-find-and-replace@npm:^2.0.0": - version: 2.2.1 - resolution: "mdast-util-find-and-replace@npm:2.2.1" + version: 2.2.2 + resolution: "mdast-util-find-and-replace@npm:2.2.2" dependencies: + "@types/mdast": ^3.0.0 escape-string-regexp: ^5.0.0 unist-util-is: ^5.0.0 unist-util-visit-parents: ^5.0.0 - checksum: 9b23a6858b55cd63d0af27057efe3a6130a6f89b683a3cde76c9b93b5e20525e1eebedd8a8da391f7e99443e9dcbf2c0023c3a197766090daeee0ebf92a21fde + checksum: b4ce463c43fe6e1c38a53a89703f755c84ab5437f49bff9a0ac751279733332ca11c85ed0262aa6c17481f77b555d26ca6d64e70d6814f5b8d12d34a3e53a60b languageName: node linkType: hard -"mdast-util-from-markdown@npm:^1.0.0, mdast-util-from-markdown@npm:^1.2.0": - version: 1.2.0 - resolution: "mdast-util-from-markdown@npm:1.2.0" +"mdast-util-from-markdown@npm:^0.8.5": + version: 0.8.5 + resolution: "mdast-util-from-markdown@npm:0.8.5" + dependencies: + "@types/mdast": ^3.0.0 + mdast-util-to-string: ^2.0.0 + micromark: ~2.11.0 + parse-entities: ^2.0.0 + unist-util-stringify-position: ^2.0.0 + checksum: 5a9d0d753a42db763761e874c22365d0c7c9934a5a18b5ff76a0643610108a208a041ffdb2f3d3dd1863d3d915225a4020a0aade282af0facfd0df110601eee6 + languageName: node + linkType: hard + +"mdast-util-from-markdown@npm:^1.0.0, mdast-util-from-markdown@npm:^1.1.0": + version: 1.3.0 + resolution: "mdast-util-from-markdown@npm:1.3.0" dependencies: "@types/mdast": ^3.0.0 "@types/unist": ^2.0.0 @@ -14072,77 +18012,79 @@ __metadata: micromark-util-types: ^1.0.0 unist-util-stringify-position: ^3.0.0 uvu: ^0.5.0 - checksum: fadc3521a3d95f4adbadad462ca27c28b3bfe08740ae158dc0c4a22329bf5593254d98b8fd4024ecad8c47c77ec275454dfacfb907ff1b98ff8f5de25c716d40 + checksum: cc971d1ad381150f6504fd753fbcffcc64c0abb527540ce343625c2bba76104505262122ef63d14ab66eb47203f323267017c6d09abfa8535ee6a8e14069595f languageName: node linkType: hard "mdast-util-frontmatter@npm:^1.0.0": - version: 1.0.0 - resolution: "mdast-util-frontmatter@npm:1.0.0" + version: 1.0.1 + resolution: "mdast-util-frontmatter@npm:1.0.1" dependencies: + "@types/mdast": ^3.0.0 + mdast-util-to-markdown: ^1.3.0 micromark-extension-frontmatter: ^1.0.0 - checksum: 4fae0bd9f002e3b2a95829ab8d411a64cd7acf41de9c28fac8a70d6d96498efb6409c611e8433ce9e101b8b9d37a25ce3f9144dc7c06f0669ac5451460cc28e7 + checksum: 0b0552047b753931da8265f2231a0b79aad1309ad7ad6599181c2d264e9b70b61acf742f29bdf2de8e901eb6eb37dd42b6f66007e735fd8138b2bf4d9acb0118 languageName: node linkType: hard "mdast-util-gfm-autolink-literal@npm:^1.0.0": - version: 1.0.2 - resolution: "mdast-util-gfm-autolink-literal@npm:1.0.2" + version: 1.0.3 + resolution: "mdast-util-gfm-autolink-literal@npm:1.0.3" dependencies: "@types/mdast": ^3.0.0 ccount: ^2.0.0 mdast-util-find-and-replace: ^2.0.0 micromark-util-character: ^1.0.0 - checksum: 75e12f21ec24552ba33725f69a06cd703e5586d2296ca9d180927b2293c036e1bd39108adba83e8cbbefcc45ffd8821fb561b4c107684ed87bd9e5e286ba03bd + checksum: 1748a8727cfc533bac0c287d6e72d571d165bfa77ae0418be4828177a3ec73c02c3f2ee534d87eb75cbaffa00c0866853bbcc60ae2255babb8210f7636ec2ce2 languageName: node linkType: hard "mdast-util-gfm-footnote@npm:^1.0.0": - version: 1.0.1 - resolution: "mdast-util-gfm-footnote@npm:1.0.1" + version: 1.0.2 + resolution: "mdast-util-gfm-footnote@npm:1.0.2" dependencies: "@types/mdast": ^3.0.0 mdast-util-to-markdown: ^1.3.0 micromark-util-normalize-identifier: ^1.0.0 - checksum: 4caf69058b438c9e34004acfb1d2b20d58306898d760b889f73d27ed5702cd940be9fcb2a08f6e58b8d9d8e2b1c886c549cd7d23b659da5fb2ed87a22f44c13c + checksum: 2d77505f9377ed7e14472ef5e6b8366c3fec2cf5f936bb36f9fbe5b97ccb7cce0464d9313c236fa86fb844206fd585db05707e4fcfb755e4fc1864194845f1f6 languageName: node linkType: hard "mdast-util-gfm-strikethrough@npm:^1.0.0": - version: 1.0.1 - resolution: "mdast-util-gfm-strikethrough@npm:1.0.1" + version: 1.0.3 + resolution: "mdast-util-gfm-strikethrough@npm:1.0.3" dependencies: "@types/mdast": ^3.0.0 mdast-util-to-markdown: ^1.3.0 - checksum: ce81222ab4c130516278f8db57be23bd529e9f8c30bb16ab5b2bf294c0dfd57f2dc7a010deede65f349a8d37be73f90dbaecd962f76f70befa8f43bcd32fe5b9 + checksum: 17003340ff1bba643ec4a59fd4370fc6a32885cab2d9750a508afa7225ea71449fb05acaef60faa89c6378b8bcfbd86a9d94b05f3c6651ff27a60e3ddefc2549 languageName: node linkType: hard "mdast-util-gfm-table@npm:^1.0.0": - version: 1.0.6 - resolution: "mdast-util-gfm-table@npm:1.0.6" + version: 1.0.7 + resolution: "mdast-util-gfm-table@npm:1.0.7" dependencies: "@types/mdast": ^3.0.0 markdown-table: ^3.0.0 mdast-util-from-markdown: ^1.0.0 mdast-util-to-markdown: ^1.3.0 - checksum: 1b0469d9a9c9ca2f8d7cbd46f660963bb98984cb9b2b7e25dba05c0ea2743cc9fc46fbbfdb046735b84a3c67445f13c655dc449cefa5d38646c2edf944201f50 + checksum: 8b8c401bb4162e53f072a2dff8efbca880fd78d55af30601c791315ab6722cb2918176e8585792469a0c530cebb9df9b4e7fede75fdc4d83df2839e238836692 languageName: node linkType: hard "mdast-util-gfm-task-list-item@npm:^1.0.0": - version: 1.0.1 - resolution: "mdast-util-gfm-task-list-item@npm:1.0.1" + version: 1.0.2 + resolution: "mdast-util-gfm-task-list-item@npm:1.0.2" dependencies: "@types/mdast": ^3.0.0 mdast-util-to-markdown: ^1.3.0 - checksum: 9bb0f162532f8e11e571802ed19301572479fe9507652c8fb3f648279bbde3baa9f6377d9492dbba61eedd96755f8aff9c7c259287875544fb751907d79da69e + checksum: c9b86037d6953b84f11fb2fc3aa23d5b8e14ca0dfcb0eb2fb289200e172bb9d5647bfceb4f86606dc6d935e8d58f6a458c04d3e55e87ff8513c7d4ade976200b languageName: node linkType: hard "mdast-util-gfm@npm:^2.0.0": - version: 2.0.1 - resolution: "mdast-util-gfm@npm:2.0.1" + version: 2.0.2 + resolution: "mdast-util-gfm@npm:2.0.2" dependencies: mdast-util-from-markdown: ^1.0.0 mdast-util-gfm-autolink-literal: ^1.0.0 @@ -14151,24 +18093,24 @@ __metadata: mdast-util-gfm-table: ^1.0.0 mdast-util-gfm-task-list-item: ^1.0.0 mdast-util-to-markdown: ^1.0.0 - checksum: 8b39e6694521094ae28d12cbeff074ef3ec3f7f7ec59fbddd4e8a45a275e092c6ba6ecee4c720938eb3ee072ebd41d743b08cc0ab9171612a5aeddc1e78ae882 + checksum: 7078cb985255208bcbce94a121906417d38353c6b1a9acbe56ee8888010d3500608b5d51c16b0999ac63ca58848fb13012d55f26930ff6c6f3450f053d56514e languageName: node linkType: hard -"mdast-util-mdx-expression@npm:^1.0.0, mdast-util-mdx-expression@npm:^1.2.1": - version: 1.3.1 - resolution: "mdast-util-mdx-expression@npm:1.3.1" +"mdast-util-mdx-expression@npm:^1.0.0": + version: 1.3.2 + resolution: "mdast-util-mdx-expression@npm:1.3.2" dependencies: "@types/estree-jsx": ^1.0.0 "@types/hast": ^2.0.0 "@types/mdast": ^3.0.0 mdast-util-from-markdown: ^1.0.0 mdast-util-to-markdown: ^1.0.0 - checksum: 456d59a616a274416f5b02bce64bf5245c4b7247927b4539f4db35bec5674352580fb91f51ed11f1a769d17330c44eec7ca481faf81ee839c2efe71309195225 + checksum: e4c90f26deaa5eb6217b0a9af559a80de41da02ab3bcd864c56bed3304b056ae703896e9876bc6ded500f4aff59f4de5cbf6a4b109a5ba408f2342805fe6dc05 languageName: node linkType: hard -"mdast-util-mdx-jsx@npm:^1.2.0": +"mdast-util-mdx-jsx@npm:^1.0.0": version: 1.2.0 resolution: "mdast-util-mdx-jsx@npm:1.2.0" dependencies: @@ -14185,99 +18127,141 @@ __metadata: linkType: hard "mdast-util-mdx-jsx@npm:^2.0.0": - version: 2.1.0 - resolution: "mdast-util-mdx-jsx@npm:2.1.0" + version: 2.1.4 + resolution: "mdast-util-mdx-jsx@npm:2.1.4" dependencies: "@types/estree-jsx": ^1.0.0 "@types/hast": ^2.0.0 "@types/mdast": ^3.0.0 + "@types/unist": ^2.0.0 ccount: ^2.0.0 + mdast-util-from-markdown: ^1.1.0 mdast-util-to-markdown: ^1.3.0 parse-entities: ^4.0.0 stringify-entities: ^4.0.0 unist-util-remove-position: ^4.0.0 unist-util-stringify-position: ^3.0.0 vfile-message: ^3.0.0 - checksum: 40520a299449e4074ff1097789c7372220c9751e0de151566dcc133118d748c2231e29bafcbbf2c3beb3a917a85cfbbaa9195dadfb4122603bad479f93a61dbe + checksum: add3ff2dd1faf2419b506abb630a471da42edc99e16fdcff95f405d27f881cb4890a94b2a7a38de9592f37170bee1c135bc156699a0f74af4b69610f0b5fcf1d + languageName: node + linkType: hard + +"mdast-util-mdx@npm:^1.0.0": + version: 1.1.0 + resolution: "mdast-util-mdx@npm:1.1.0" + dependencies: + mdast-util-mdx-expression: ^1.0.0 + mdast-util-mdx-jsx: ^1.0.0 + mdast-util-mdxjs-esm: ^1.0.0 + checksum: 03a3364bd964596bc1989065689254ad726e063503cfd30b4416a53aa8fa7890959b36c2441b32a70da5b2969c8b9ed70dfe076d3998f59d7eb876c80c8b6f61 languageName: node linkType: hard "mdast-util-mdx@npm:^2.0.0": - version: 2.0.0 - resolution: "mdast-util-mdx@npm:2.0.0" + version: 2.0.1 + resolution: "mdast-util-mdx@npm:2.0.1" dependencies: + mdast-util-from-markdown: ^1.0.0 mdast-util-mdx-expression: ^1.0.0 mdast-util-mdx-jsx: ^2.0.0 mdast-util-mdxjs-esm: ^1.0.0 - checksum: 4744bfbbd337c2a99a3ef339673c549a670d6496e0d3a6d747d2451e112d6fef7d27613549b0bd62a5f92ea7919e3bacd78c731e8a3d80552a09b80896554cf6 + mdast-util-to-markdown: ^1.0.0 + checksum: 7303149230a26e524e319833b782bffca94e49cdab012996618701259bd056e014ca22a35d25ffa8880ba9064ee126a2a002f01e5c90a31ca726339ed775875e languageName: node linkType: hard "mdast-util-mdxjs-esm@npm:^1.0.0": - version: 1.3.0 - resolution: "mdast-util-mdxjs-esm@npm:1.3.0" + version: 1.3.1 + resolution: "mdast-util-mdxjs-esm@npm:1.3.1" dependencies: "@types/estree-jsx": ^1.0.0 "@types/hast": ^2.0.0 "@types/mdast": ^3.0.0 mdast-util-from-markdown: ^1.0.0 mdast-util-to-markdown: ^1.0.0 - checksum: df3902eb884b4f83cebbfe33647f51938b36db54d4539afd884dc83ff43052676cd48df4c382dc986335290f5c691576d1a848da8ffb671b69ade29fe1c317e0 + checksum: ee78a4f58adfec38723cbc920f05481201ebb001eff3982f2d0e5f5ce5c75685e732e9d361ad4a1be8b936b4e5de0f2599cb96b92ad4bd92698ac0c4a09bbec3 languageName: node linkType: hard -"mdast-util-to-hast@npm:^10.2.0": - version: 10.2.0 - resolution: "mdast-util-to-hast@npm:10.2.0" +"mdast-util-phrasing@npm:^3.0.0": + version: 3.0.1 + resolution: "mdast-util-phrasing@npm:3.0.1" dependencies: "@types/mdast": ^3.0.0 - "@types/unist": ^2.0.0 - mdast-util-definitions: ^4.0.0 + unist-util-is: ^5.0.0 + checksum: c5b616d9b1eb76a6b351d195d94318494722525a12a89d9c8a3b091af7db3dd1fc55d294f9d29266d8159a8267b0df4a7a133bda8a3909d5331c383e1e1ff328 + languageName: node + linkType: hard + +"mdast-util-to-hast@npm:^11.0.0": + version: 11.3.0 + resolution: "mdast-util-to-hast@npm:11.3.0" + dependencies: + "@types/hast": ^2.0.0 + "@types/mdast": ^3.0.0 + "@types/mdurl": ^1.0.0 + mdast-util-definitions: ^5.0.0 mdurl: ^1.0.0 - unist-builder: ^2.0.0 - unist-util-generated: ^1.0.0 - unist-util-position: ^3.0.0 - unist-util-visit: ^2.0.0 - checksum: 72df2dd9bfa2d07b4750a333444f82e0f3752dae75b6e300cf0a716407a185eb75095a54ecad90cbd6f6d133b20dea8844ff76c1ea78612550de170b43d4fa85 + unist-builder: ^3.0.0 + unist-util-generated: ^2.0.0 + unist-util-position: ^4.0.0 + unist-util-visit: ^4.0.0 + checksum: a968d034613aa5cfb44b9c03d8e61a08bb563bfde3a233fb3d83a28857357e2beef56b6767bab2867d3c3796dc5dd796af4d03fb83e3133aeb7f4187b5cc9327 languageName: node linkType: hard "mdast-util-to-hast@npm:^12.1.0": - version: 12.2.4 - resolution: "mdast-util-to-hast@npm:12.2.4" + version: 12.3.0 + resolution: "mdast-util-to-hast@npm:12.3.0" dependencies: "@types/hast": ^2.0.0 "@types/mdast": ^3.0.0 mdast-util-definitions: ^5.0.0 micromark-util-sanitize-uri: ^1.1.0 trim-lines: ^3.0.0 - unist-builder: ^3.0.0 unist-util-generated: ^2.0.0 unist-util-position: ^4.0.0 unist-util-visit: ^4.0.0 - checksum: c9a1c31527590a11ec7a637ae46a8f52b05b457523e9be9c4ca8bcc1efb3eac5ed1575353e97a70fffcf61e40c80d649bee28058fa1509bc1c213eacfa73bc5f + checksum: ea40c9f07dd0b731754434e81c913590c611b1fd753fa02550a1492aadfc30fb3adecaf62345ebb03cea2ddd250c15ab6e578fffde69c19955c9b87b10f2a9bb languageName: node linkType: hard "mdast-util-to-markdown@npm:^1.0.0, mdast-util-to-markdown@npm:^1.3.0": - version: 1.3.0 - resolution: "mdast-util-to-markdown@npm:1.3.0" + version: 1.5.0 + resolution: "mdast-util-to-markdown@npm:1.5.0" dependencies: "@types/mdast": ^3.0.0 "@types/unist": ^2.0.0 longest-streak: ^3.0.0 + mdast-util-phrasing: ^3.0.0 mdast-util-to-string: ^3.0.0 micromark-util-decode-string: ^1.0.0 unist-util-visit: ^4.0.0 zwitch: ^2.0.0 - checksum: 0ea4fc11b7a49b15d400d50044429c45222cb9bc583553288c7c54704d051f25049233817129ba56a6f581f1e20916e5c540870a80987318747a95b44a36ba3e + checksum: 64338eb33e49bb0aea417591fd986f72fdd39205052563bb7ce9eb9ecc160824509bfacd740086a05af355c6d5c36353aafe95cab9e6927d674478757cee6259 + languageName: node + linkType: hard + +"mdast-util-to-string@npm:^1.0.0": + version: 1.1.0 + resolution: "mdast-util-to-string@npm:1.1.0" + checksum: eec1eb283f3341376c8398b67ce512a11ab3e3191e3dbd5644d32a26784eac8d5f6d0b0fb81193af00d75a2c545cde765c8b03e966bd890076efb5d357fb4fe2 + languageName: node + linkType: hard + +"mdast-util-to-string@npm:^2.0.0": + version: 2.0.0 + resolution: "mdast-util-to-string@npm:2.0.0" + checksum: 0b2113ada10e002fbccb014170506dabe2f2ddacaacbe4bc1045c33f986652c5a162732a2c057c5335cdb58419e2ad23e368e5be226855d4d4e280b81c4e9ec2 languageName: node linkType: hard "mdast-util-to-string@npm:^3.0.0, mdast-util-to-string@npm:^3.1.0": - version: 3.1.0 - resolution: "mdast-util-to-string@npm:3.1.0" - checksum: f42ddd4e22f2215a75715b92ea6e3149c4ba356e7781d7b94fc86ded1c79cec3f986afeecef3a4a80068c9b224a6520099783a12146b957de24f020a3e47dd29 + version: 3.2.0 + resolution: "mdast-util-to-string@npm:3.2.0" + dependencies: + "@types/mdast": ^3.0.0 + checksum: dc40b544d54339878ae2c9f2b3198c029e1e07291d2126bd00ca28272ee6616d0d2194eb1c9828a7c34d412a79a7e73b26512a734698d891c710a1e73db1e848 languageName: node linkType: hard @@ -14288,10 +18272,10 @@ __metadata: languageName: node linkType: hard -"mdn-data@npm:2.0.28": - version: 2.0.28 - resolution: "mdn-data@npm:2.0.28" - checksum: f51d587a6ebe8e426c3376c74ea6df3e19ec8241ed8e2466c9c8a3904d5d04397199ea4f15b8d34d14524b5de926d8724ae85207984be47e165817c26e49e0aa +"mdn-data@npm:2.0.30": + version: 2.0.30 + resolution: "mdn-data@npm:2.0.30" + checksum: d6ac5ac7439a1607df44b22738ecf83f48e66a0874e4482d6424a61c52da5cde5750f1d1229b6f5fa1b80a492be89465390da685b11f97d62b8adcc6e88189aa languageName: node linkType: hard @@ -14302,6 +18286,34 @@ __metadata: languageName: node linkType: hard +"mdx-bundler@npm:^9.2.1": + version: 9.2.1 + resolution: "mdx-bundler@npm:9.2.1" + dependencies: + "@babel/runtime": ^7.16.3 + "@esbuild-plugins/node-resolve": ^0.1.4 + "@fal-works/esbuild-plugin-global-externals": ^2.1.2 + "@mdx-js/esbuild": ^2.0.0 + gray-matter: ^4.0.3 + remark-frontmatter: ^4.0.1 + remark-mdx-frontmatter: ^1.1.1 + uuid: ^8.3.2 + vfile: ^5.3.2 + peerDependencies: + esbuild: 0.* + checksum: 3a7e9269d8a6913dc87e5f54856b727230da02b0ae2858dc38398b15480fbf7a62fe43955fb4be2dc9b024bf8e60e08c15611473827287321afe5711bec26d23 + languageName: node + linkType: hard + +"media-query-parser@npm:^2.0.2": + version: 2.0.2 + resolution: "media-query-parser@npm:2.0.2" + dependencies: + "@babel/runtime": ^7.12.5 + checksum: 8ef956d9e63fe6f4041988beda69843b3a6bb48228ea2923a066f6e7c8f7c5dba75fae357318c48a97ed5beae840b8425cb7e727fc1bb77acc65f2005f8945ab + languageName: node + linkType: hard + "media-typer@npm:0.3.0": version: 0.3.0 resolution: "media-typer@npm:0.3.0" @@ -14309,12 +18321,50 @@ __metadata: languageName: node linkType: hard -"meilisearch@npm:^0.28.0": - version: 0.28.0 - resolution: "meilisearch@npm:0.28.0" +"meilisearch@npm:^0.32.4": + version: 0.32.4 + resolution: "meilisearch@npm:0.32.4" dependencies: - cross-fetch: ^3.1.5 - checksum: f83758249c15e13b0b88b1a491980d8d7a1c52ff0353c9bbffe3e0f42f1decf7c5de87f51d5b7850f39e4e526684677c9c2f2975f07070fb2c376ce1be70d069 + cross-fetch: ^3.1.6 + checksum: 3c4c6e3c92be3ce48730c7358d7b63ace28ffec9888900e84d792c0104df097349de89363d2f1659712693b31299d8d696e28ccce199d13b25093d8e70200e0f + languageName: node + linkType: hard + +"memfs@npm:^3.5.1": + version: 3.5.1 + resolution: "memfs@npm:3.5.1" + dependencies: + fs-monkey: ^1.0.3 + checksum: fcd037566a4bbb00d61dc991858395ccc06267ab5fe9471aeff28433f2a210bf5dd999e64e8b5473f8244f00dfb7ff3221b5c2fe41ff98af1439e5e2168fc410 + languageName: node + linkType: hard + +"memoizerific@npm:^1.11.3": + version: 1.11.3 + resolution: "memoizerific@npm:1.11.3" + dependencies: + map-or-similar: ^1.5.0 + checksum: d51bdc3ed8c39b4b73845c90eb62d243ddf21899914352d0c303f5e1d477abcb192f4c605e008caa4a31d823225eeb22a99ba5ee825fb88d0c33382db3aee95a + languageName: node + linkType: hard + +"meow@npm:^10.1.2": + version: 10.1.5 + resolution: "meow@npm:10.1.5" + dependencies: + "@types/minimist": ^1.2.2 + camelcase-keys: ^7.0.0 + decamelize: ^5.0.0 + decamelize-keys: ^1.1.0 + hard-rejection: ^2.1.0 + minimist-options: 4.1.0 + normalize-package-data: ^3.0.2 + read-pkg-up: ^8.0.0 + redent: ^4.0.0 + trim-newlines: ^4.0.2 + type-fest: ^1.2.2 + yargs-parser: ^20.2.9 + checksum: dd5f0caa4af18517813547dc66741dcbf52c4c23def5062578d39b11189fd9457aee5c1f2263a5cd6592a465023df8357e8ac876b685b64dbcf545e3f66c23a7 languageName: node linkType: hard @@ -14371,13 +18421,20 @@ __metadata: languageName: node linkType: hard -"merge2@npm:^1.3.0, merge2@npm:^1.4.1": +"merge2@npm:^1.2.3, merge2@npm:^1.3.0, merge2@npm:^1.4.1": version: 1.4.1 resolution: "merge2@npm:1.4.1" checksum: 7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 languageName: node linkType: hard +"metaviewport-parser@npm:0.3.0": + version: 0.3.0 + resolution: "metaviewport-parser@npm:0.3.0" + checksum: f88e092d66e7eb01d409136b3efa11e9de0f5026ed945e9d8a089a4dd0fe10ddc28726e2648ea030fc44c248078b12a911100537e758d43aac150978ff3967cb + languageName: node + linkType: hard + "methods@npm:^1.1.2, methods@npm:~1.1.2": version: 1.1.2 resolution: "methods@npm:1.1.2" @@ -14410,32 +18467,32 @@ __metadata: linkType: hard "micromark-extension-frontmatter@npm:^1.0.0": - version: 1.0.0 - resolution: "micromark-extension-frontmatter@npm:1.0.0" + version: 1.1.0 + resolution: "micromark-extension-frontmatter@npm:1.1.0" dependencies: fault: ^2.0.0 micromark-util-character: ^1.0.0 micromark-util-symbol: ^1.0.0 - checksum: d0bacd6aadd6e33e26245628b93f5bcaf9a1de47787cea6807f8569213ceeb1376c37fadcf059280f5eafe6a07682bd148989e65489e99c9a3f4d523eea5f5c0 + micromark-util-types: ^1.0.0 + checksum: 4700840d289d1d90c973ebfbe377abdef56235587ec57d84a206330c57d4586766cfcdf0db67392f875fe86e90bb7fd0cf9917aa3134c3b13c45c96cec667c70 languageName: node linkType: hard "micromark-extension-gfm-autolink-literal@npm:^1.0.0": - version: 1.0.3 - resolution: "micromark-extension-gfm-autolink-literal@npm:1.0.3" + version: 1.0.4 + resolution: "micromark-extension-gfm-autolink-literal@npm:1.0.4" dependencies: micromark-util-character: ^1.0.0 micromark-util-sanitize-uri: ^1.0.0 micromark-util-symbol: ^1.0.0 micromark-util-types: ^1.0.0 - uvu: ^0.5.0 - checksum: bb181972ac346ca73ca1ab0b80b80c9d6509ed149799d2217d5442670f499c38a94edff73d32fa52b390d89640974cfbd7f29e4ad7d599581d5e1cabcae636a2 + checksum: ea66602cc8375bffb414a662f54d7868ed8ba38a7fe9fca6b2c5f6d9ac632f6ed29e88a58dbd45a580c5c629e50c13e9b864382b796d549a69c5f69ba1df51f9 languageName: node linkType: hard "micromark-extension-gfm-footnote@npm:^1.0.0": - version: 1.0.4 - resolution: "micromark-extension-gfm-footnote@npm:1.0.4" + version: 1.1.0 + resolution: "micromark-extension-gfm-footnote@npm:1.1.0" dependencies: micromark-core-commonmark: ^1.0.0 micromark-factory-space: ^1.0.0 @@ -14445,13 +18502,13 @@ __metadata: micromark-util-symbol: ^1.0.0 micromark-util-types: ^1.0.0 uvu: ^0.5.0 - checksum: 8daa203f5cf753338d5ecdbaae6b3ab6319d34b6013b90ea6860bed299418cecf86e69e48dabe42562e334760c738c77c5acdb47e75ae26f5f01f02f3bf0952d + checksum: 7a5408625ef2cca5cc18e6591c2522a8a409f466a6fbc0ed938950aafe5fc9bf1eada65e1a4dd4e36ec3e7b24920de1f4b3e2c365d8f5cd2d6ccb1f8c2377c49 languageName: node linkType: hard "micromark-extension-gfm-strikethrough@npm:^1.0.0": - version: 1.0.4 - resolution: "micromark-extension-gfm-strikethrough@npm:1.0.4" + version: 1.0.5 + resolution: "micromark-extension-gfm-strikethrough@npm:1.0.5" dependencies: micromark-util-chunked: ^1.0.0 micromark-util-classify-character: ^1.0.0 @@ -14459,48 +18516,48 @@ __metadata: micromark-util-symbol: ^1.0.0 micromark-util-types: ^1.0.0 uvu: ^0.5.0 - checksum: f43d316b85fe93df1711cdcdc99a5320b941239349234bd262fc708cb67ad47bdfb41d1a7ebe2a5829816b0e9d3107380a5c1e558cb536a75354cbe4857823ba + checksum: 548c0f257753d735c741533411957f04253da53db31e1f398dc5dc1de9f398c45586baad5223dce8f3b55f9433c255e6eb695fc3104256b8c332dd8737136882 languageName: node linkType: hard "micromark-extension-gfm-table@npm:^1.0.0": - version: 1.0.5 - resolution: "micromark-extension-gfm-table@npm:1.0.5" + version: 1.0.6 + resolution: "micromark-extension-gfm-table@npm:1.0.6" dependencies: micromark-factory-space: ^1.0.0 micromark-util-character: ^1.0.0 micromark-util-symbol: ^1.0.0 micromark-util-types: ^1.0.0 uvu: ^0.5.0 - checksum: f0aab3b4333cc24b1534b08dc4cce986dd606df8b7ed913e5a1de9fe2d3ae67b2435663c0bc271b528874af4928e580e1ad540ea9117d7f2d74edb28859c97ef + checksum: 92a5c15314bc87c9630a0cb1bd0b0ba4493e13e1bc5d02d55fdd843b56bf6b229ced2c73e331dd98d90d721e0929f5cf16737d3dd1864d61e6d0b7748695349a languageName: node linkType: hard "micromark-extension-gfm-tagfilter@npm:^1.0.0": - version: 1.0.1 - resolution: "micromark-extension-gfm-tagfilter@npm:1.0.1" + version: 1.0.2 + resolution: "micromark-extension-gfm-tagfilter@npm:1.0.2" dependencies: micromark-util-types: ^1.0.0 - checksum: 63e8d68f25871722900a67a8001d5da21f19ea707f3566fc7d0b2eb1f6d52476848bb6a41576cf22470565124af9497c5aae842355faa4c14ec19cb1847e71ec + checksum: 7d2441df51f890c86f8e7cf7d331a570b69c8105fa1c2fc5b737cb739502c16c8ee01cf35550a8a78f89497c5dfacc97cf82d55de6274e8320f3aec25e2b0dd2 languageName: node linkType: hard "micromark-extension-gfm-task-list-item@npm:^1.0.0": - version: 1.0.3 - resolution: "micromark-extension-gfm-task-list-item@npm:1.0.3" + version: 1.0.4 + resolution: "micromark-extension-gfm-task-list-item@npm:1.0.4" dependencies: micromark-factory-space: ^1.0.0 micromark-util-character: ^1.0.0 micromark-util-symbol: ^1.0.0 micromark-util-types: ^1.0.0 uvu: ^0.5.0 - checksum: d320b0c5301f87e211c06a2330d1ee0fee6da14f0d6d44d5211055b465dadff34390cd6b258a5e0ca376fcda3364fef9a12fe6e26a0c858231fa3b98ddbf7785 + checksum: 2575bb47b320f2479d3cc2492ba7cf79d6baa9cd0200c0ed120fd0e318e64e8ebab4a93a056a3781cb5107193f3b36ebd2d86a5928308bef45fc121291f97eb5 languageName: node linkType: hard "micromark-extension-gfm@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-extension-gfm@npm:2.0.1" + version: 2.0.3 + resolution: "micromark-extension-gfm@npm:2.0.3" dependencies: micromark-extension-gfm-autolink-literal: ^1.0.0 micromark-extension-gfm-footnote: ^1.0.0 @@ -14510,13 +18567,13 @@ __metadata: micromark-extension-gfm-task-list-item: ^1.0.0 micromark-util-combine-extensions: ^1.0.0 micromark-util-types: ^1.0.0 - checksum: b181479c87be38d5ae8d28e6dc52fab73c894fd2706876746f27a91fb186644ce03532a9c35dca2186327a0e2285cd5242ad0361dc89adedd4a50376ffd94e22 + checksum: c4a917c16d7aa5d00d1767b5ce5f3b1a78c0de11dbd5c8f69d2545083568aa6bb13bd9d8e4c7fec5f4da10e7ed8344b15acffc843b33a615c17396a118bc2bc1 languageName: node linkType: hard -"micromark-extension-mdx-expression@npm:^1.0.0, micromark-extension-mdx-expression@npm:^1.0.3": - version: 1.0.3 - resolution: "micromark-extension-mdx-expression@npm:1.0.3" +"micromark-extension-mdx-expression@npm:^1.0.0": + version: 1.0.5 + resolution: "micromark-extension-mdx-expression@npm:1.0.5" dependencies: micromark-factory-mdx-expression: ^1.0.0 micromark-factory-space: ^1.0.0 @@ -14525,13 +18582,13 @@ __metadata: micromark-util-symbol: ^1.0.0 micromark-util-types: ^1.0.0 uvu: ^0.5.0 - checksum: ef4b4137894624a6754b951d3cb7abb20951ca7b37f9ad8a50d2e2b95d0cf880258d71296bfac6be4ff83a8d137b6b657ae852bb6f11f4ca11e5e6d62f1b025d + checksum: 93cc9810aaaa34b87fe310751d4872f27410311c8b638366269d6c6c4cd11d01d58dd32d361617ba86c8e143941112417af9cc0dcfed215e86ad3871c88cbb1a languageName: node linkType: hard "micromark-extension-mdx-jsx@npm:^1.0.0": - version: 1.0.3 - resolution: "micromark-extension-mdx-jsx@npm:1.0.3" + version: 1.0.4 + resolution: "micromark-extension-mdx-jsx@npm:1.0.4" dependencies: "@types/acorn": ^4.0.0 estree-util-is-identifier-name: ^2.0.0 @@ -14542,22 +18599,22 @@ __metadata: micromark-util-types: ^1.0.0 uvu: ^0.5.0 vfile-message: ^3.0.0 - checksum: 1a5566890aabc52fe96b78e3a3a507dee03a2232e44b9360b00617734e156f934e85bc6a477fbb856c793fe33c9fb7d2207a4f50e680168c0d04ba9c9336d960 + checksum: 339e2fb283ef883a289b0d2a95b91d4ad3c08ec544b3938d847de3549e3b88a6988c66a26aa22de1df220f001e2aba0af7b417c93b4e8a96e5bdd283e9be2a63 languageName: node linkType: hard "micromark-extension-mdx-md@npm:^1.0.0": - version: 1.0.0 - resolution: "micromark-extension-mdx-md@npm:1.0.0" + version: 1.0.1 + resolution: "micromark-extension-mdx-md@npm:1.0.1" dependencies: micromark-util-types: ^1.0.0 - checksum: b4f205e1d5f0946b4755541ef44ffd0b3be8c7ecfc08d8b139b6a21fbd3ff62d8fdb6b7e6d17bd9a3b610450267f43a41703dc48b341da9addd743a28cdefa64 + checksum: fdeaf8f4f973ec8ebefb74bb4cc1c25d2c3190e3ce4f8197e4cbc1ac325b39ac4dc2723a9f4ec8ff5b179d380e8ba37467acafa13c36dec8d312cd9822a5ab29 languageName: node linkType: hard "micromark-extension-mdxjs-esm@npm:^1.0.0": - version: 1.0.3 - resolution: "micromark-extension-mdxjs-esm@npm:1.0.3" + version: 1.0.4 + resolution: "micromark-extension-mdxjs-esm@npm:1.0.4" dependencies: micromark-core-commonmark: ^1.0.0 micromark-util-character: ^1.0.0 @@ -14567,13 +18624,13 @@ __metadata: unist-util-position-from-estree: ^1.1.0 uvu: ^0.5.0 vfile-message: ^3.0.0 - checksum: 756074656391a5e5bb96bc8a0e9c1df7d9f7be5299847c9719e6a90552e1c76a11876aa89986ad5da89ab485f776a4a43a61ea3acddd4f865a5cee43ac523ffd + checksum: 81eaf6542df854eb48ab2271884ef9fc60bb4902062f989d79f4d804f8099dd8d5f68260a602886548b3369cf8861f6e47c724b1b81fe56800a9c9fca9736351 languageName: node linkType: hard "micromark-extension-mdxjs@npm:^1.0.0": - version: 1.0.0 - resolution: "micromark-extension-mdxjs@npm:1.0.0" + version: 1.0.1 + resolution: "micromark-extension-mdxjs@npm:1.0.1" dependencies: acorn: ^8.0.0 acorn-jsx: ^5.0.0 @@ -14583,7 +18640,7 @@ __metadata: micromark-extension-mdxjs-esm: ^1.0.0 micromark-util-combine-extensions: ^1.0.0 micromark-util-types: ^1.0.0 - checksum: ba836c6d2dfc67597886e88f533ffa02f2029dbe216a0651f1066e70f8529a700bcc7fa2bc4201ee12fd3d1cd7da7093d5a442442daeb84b27df96aaffb7699c + checksum: 1e6bf3df765071dbfb80b20f1ca298f6789cf759dfd19d13301c91e33794940363989107b675afeedb78af446e4af590e0f0cf8c1ed63a70682a494c015eba52 languageName: node linkType: hard @@ -14611,10 +18668,10 @@ __metadata: linkType: hard "micromark-factory-mdx-expression@npm:^1.0.0": - version: 1.0.6 - resolution: "micromark-factory-mdx-expression@npm:1.0.6" + version: 1.0.8 + resolution: "micromark-factory-mdx-expression@npm:1.0.8" dependencies: - micromark-factory-space: ^1.0.0 + "@types/estree": ^1.0.0 micromark-util-character: ^1.0.0 micromark-util-events-to-acorn: ^1.0.0 micromark-util-symbol: ^1.0.0 @@ -14622,7 +18679,7 @@ __metadata: unist-util-position-from-estree: ^1.0.0 uvu: ^0.5.0 vfile-message: ^3.0.0 - checksum: 7b69f0e77664e9820639cf23c4f01d43aa0e7abd88021c3db428435e3a5a1f9446f8dc5c2a6ed4ac16c6495ca51937609a5c98ff59a62c54be382c2725500b39 + checksum: fe78cbecae72d489c6a985795bfa7e0ecf2b99c594930370f0b27a2529200db6810716c05aedc1d5d92a8847037ec9ac1fd4ec7837bef2ed6d5d9a1b5bdc94ff languageName: node linkType: hard @@ -14730,17 +18787,18 @@ __metadata: linkType: hard "micromark-util-events-to-acorn@npm:^1.0.0": - version: 1.2.0 - resolution: "micromark-util-events-to-acorn@npm:1.2.0" + version: 1.2.3 + resolution: "micromark-util-events-to-acorn@npm:1.2.3" dependencies: "@types/acorn": ^4.0.0 "@types/estree": ^1.0.0 + "@types/unist": ^2.0.0 estree-util-visit: ^1.0.0 + micromark-util-symbol: ^1.0.0 micromark-util-types: ^1.0.0 uvu: ^0.5.0 - vfile-location: ^4.0.0 vfile-message: ^3.0.0 - checksum: 422285d68c8e8a57042bf31eefa55a136eec5c1fb021278a7c25d60a000c4e3ddaf140c94065a270499281f79ff59999468b850a461f22b5731fc47eccb2c4c2 + checksum: aba0dadb8689a70fab6223386b843f3084c21db0f96b412ebd7be91d2392bb8571af899c60e13eeb373a5f851d6dcd690b584ed1e09833904ac72ddd0a88a7ab languageName: node linkType: hard @@ -14831,6 +18889,16 @@ __metadata: languageName: node linkType: hard +"micromark@npm:~2.11.0": + version: 2.11.4 + resolution: "micromark@npm:2.11.4" + dependencies: + debug: ^4.0.0 + parse-entities: ^2.0.0 + checksum: f8a5477d394908a5d770227aea71657a76423d420227c67ea0699e659a5f62eb39d504c1f7d69ec525a6af5aaeb6a7bffcdba95614968c03d41d3851edecb0d6 + languageName: node + linkType: hard + "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -14841,14 +18909,14 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0": +"mime-db@npm:1.52.0, mime-db@npm:>= 1.43.0 < 2": version: 1.52.0 resolution: "mime-db@npm:1.52.0" checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.25, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -14866,7 +18934,7 @@ __metadata: languageName: node linkType: hard -"mime@npm:2.6.0": +"mime@npm:2.6.0, mime@npm:^2.0.3": version: 2.6.0 resolution: "mime@npm:2.6.0" bin: @@ -14875,15 +18943,6 @@ __metadata: languageName: node linkType: hard -"mime@npm:^3.0.0": - version: 3.0.0 - resolution: "mime@npm:3.0.0" - bin: - mime: cli.js - checksum: f43f9b7bfa64534e6b05bd6062961681aeb406a5b53673b53b683f27fcc4e739989941836a355eef831f4478923651ecc739f4a5f6e20a76487b432bfd4db928 - languageName: node - linkType: hard - "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -14898,7 +18957,7 @@ __metadata: languageName: node linkType: hard -"mimic-response@npm:^1.0.0, mimic-response@npm:^1.0.1": +"mimic-response@npm:^1.0.0": version: 1.0.1 resolution: "mimic-response@npm:1.0.1" checksum: 034c78753b0e622bc03c983663b1cdf66d03861050e0c8606563d149bc2b02d63f62ce4d32be4ab50d0553ae0ffe647fc34d1f5281184c6e1e8cf4d85e8d9823 @@ -14912,14 +18971,14 @@ __metadata: languageName: node linkType: hard -"min-indent@npm:^1.0.0": +"min-indent@npm:^1.0.0, min-indent@npm:^1.0.1": version: 1.0.1 resolution: "min-indent@npm:1.0.1" checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 languageName: node linkType: hard -"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -14928,12 +18987,30 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": - version: 5.1.0 - resolution: "minimatch@npm:5.1.0" +"minimatch@npm:^5.0.1": + version: 5.1.6 + resolution: "minimatch@npm:5.1.6" + dependencies: + brace-expansion: ^2.0.1 + checksum: 7564208ef81d7065a370f788d337cd80a689e981042cb9a1d0e6580b6c6a8c9279eba80010516e258835a988363f99f54a6f711a315089b8b42694f5da9d0d77 + languageName: node + linkType: hard + +"minimatch@npm:^7.4.3": + version: 7.4.6 + resolution: "minimatch@npm:7.4.6" + dependencies: + brace-expansion: ^2.0.1 + checksum: 1a6c8d22618df9d2a88aabeef1de5622eb7b558e9f8010be791cb6b0fa6e102d39b11c28d75b855a1e377b12edc7db8ff12a99c20353441caa6a05e78deb5da9 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.1": + version: 9.0.1 + resolution: "minimatch@npm:9.0.1" dependencies: brace-expansion: ^2.0.1 - checksum: 15ce53d31a06361e8b7a629501b5c75491bc2b59712d53e802b1987121d91b433d73fcc5be92974fde66b2b51d8fb28d75a9ae900d249feb792bb1ba2a4f0a90 + checksum: 97f5f5284bb57dc65b9415dec7f17a0f6531a33572193991c60ff18450dcfad5c2dad24ffeaf60b5261dccd63aae58cc3306e2209d57e7f88c51295a532d8ec3 languageName: node linkType: hard @@ -14949,9 +19026,9 @@ __metadata: linkType: hard "minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.5, minimist@npm:^1.2.6": - version: 1.2.7 - resolution: "minimist@npm:1.2.7" - checksum: 7346574a1038ca23c32e02252f603801f09384dd1d78b69a943a4e8c2c28730b80e96193882d3d3b22a063445f460e48316b29b8a25addca2d7e5e8f75478bec + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 languageName: node linkType: hard @@ -14979,6 +19056,21 @@ __metadata: languageName: node linkType: hard +"minipass-fetch@npm:^3.0.0": + version: 3.0.3 + resolution: "minipass-fetch@npm:3.0.3" + dependencies: + encoding: ^0.1.13 + minipass: ^5.0.0 + minipass-sized: ^1.0.3 + minizlib: ^2.1.2 + dependenciesMeta: + encoding: + optional: true + checksum: af5ab2552a16fcf505d35fd7ffb84b57f4a0eeb269e6e1d9a2a75824dda48b36e527083250b7cca4a4def21d9544e2ade441e4730e233c0bc2133f6abda31e18 + languageName: node + linkType: hard + "minipass-flush@npm:^1.0.5": version: 1.0.5 resolution: "minipass-flush@npm:1.0.5" @@ -14998,7 +19090,7 @@ __metadata: languageName: node linkType: hard -"minipass-pipeline@npm:^1.2.4": +"minipass-pipeline@npm:^1.2.2, minipass-pipeline@npm:^1.2.4": version: 1.2.4 resolution: "minipass-pipeline@npm:1.2.4" dependencies: @@ -15016,12 +19108,26 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^3.0.0, minipass@npm:^3.1.1, minipass@npm:^3.1.6": - version: 3.3.5 - resolution: "minipass@npm:3.3.5" - dependencies: - yallist: ^4.0.0 - checksum: f89f02bcaa0e0e4bb4c44ec796008e69fbca62db0aba6ead1bc57d25bdaefdf42102130f4f9ecb7d9c6b6cd35ff7b0c7b97d001d3435da8e629fb68af3aea57e +"minipass@npm:^3.0.0, minipass@npm:^3.1.1, minipass@npm:^3.1.6": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: ^4.0.0 + checksum: a30d083c8054cee83cdcdc97f97e4641a3f58ae743970457b1489ce38ee1167b3aaf7d815cd39ec7a99b9c40397fd4f686e83750e73e652b21cb516f6d845e48 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2": + version: 6.0.2 + resolution: "minipass@npm:6.0.2" + checksum: d140b91f4ab2e5ce5a9b6c468c0e82223504acc89114c1a120d4495188b81fedf8cade72a9f4793642b4e66672f990f1e0d902dd858485216a07cd3c8a62fac9 languageName: node linkType: hard @@ -15035,6 +19141,13 @@ __metadata: languageName: node linkType: hard +"mitt@npm:3.0.0": + version: 3.0.0 + resolution: "mitt@npm:3.0.0" + checksum: f7be5049d27d18b1dbe9408452d66376fa60ae4a79fe9319869d1b90ae8cbaedadc7e9dab30b32d781411256d468be5538996bb7368941c09009ef6bbfa6bfc7 + languageName: node + linkType: hard + "mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3": version: 0.5.3 resolution: "mkdirp-classic@npm:0.5.3" @@ -15049,7 +19162,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:>=0.5 0, mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.3": +"mkdirp@npm:>=0.5 0, mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.3, mkdirp@npm:^0.5.4": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" dependencies: @@ -15069,10 +19182,31 @@ __metadata: languageName: node linkType: hard -"mock-socket@npm:^9.1.0, mock-socket@npm:^9.1.5": - version: 9.1.5 - resolution: "mock-socket@npm:9.1.5" - checksum: a01586bc2850eb5809eda6de0c7ab19255c1e0eb217a805f86ba662bb4aab00b919032d67e7c826c6c12bcfb2fbe19cecbacf0ab6184936487edc4ba37d3ba53 +"mkdirp@npm:^2.1.6": + version: 2.1.6 + resolution: "mkdirp@npm:2.1.6" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 8a1d09ffac585e55f41c54f445051f5bc33a7de99b952bb04c576cafdf1a67bb4bae8cb93736f7da6838771fbf75bc630430a3a59e1252047d2278690bd150ee + languageName: node + linkType: hard + +"mlly@npm:^1.1.0, mlly@npm:^1.2.0": + version: 1.2.1 + resolution: "mlly@npm:1.2.1" + dependencies: + acorn: ^8.8.2 + pathe: ^1.1.0 + pkg-types: ^1.0.3 + ufo: ^1.1.2 + checksum: 82939436ec0e1c53e400d86fd571bd005090383b3fa49d5d8b9df4b388b24bae2b7b2f0369ef0c905d29fb35377cd4724d2bf5e5cd130d922849f74948bb81f0 + languageName: node + linkType: hard + +"mock-socket@npm:^9.1.0, mock-socket@npm:^9.2.1": + version: 9.2.1 + resolution: "mock-socket@npm:9.2.1" + checksum: daf07689563163dbcefbefe23b2a9784a75d0af31706f23ad535c6ab2abbcdefa2e91acddeb50a3c39009139e47a8f909cbb38e8137452193ccb9331637fee3e languageName: node linkType: hard @@ -15083,7 +19217,7 @@ __metadata: languageName: node linkType: hard -"mri@npm:1.2.0, mri@npm:^1.1.0": +"mri@npm:1.2.0, mri@npm:^1.1.0, mri@npm:^1.2.0": version: 1.2.0 resolution: "mri@npm:1.2.0" checksum: 83f515abbcff60150873e424894a2f65d68037e5a7fcde8a9e2b285ee9c13ac581b63cfc1e6826c4732de3aeb84902f7c1e16b7aff46cd3f897a0f757a894e85 @@ -15104,6 +19238,13 @@ __metadata: languageName: node linkType: hard +"ms@npm:2.1.1": + version: 2.1.1 + resolution: "ms@npm:2.1.1" + checksum: 0078a23cd916a9a7435c413caa14c57d4b4f6e2470e0ab554b6964163c8a4436448ac7ae020e883685475da6b6796cc396b670f579cb275db288a21e3e57721e + languageName: node + linkType: hard + "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -15118,6 +19259,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:0.0.8": + version: 0.0.8 + resolution: "mute-stream@npm:0.0.8" + checksum: ff48d251fc3f827e5b1206cda0ffdaec885e56057ee86a3155e1951bc940fd5f33531774b1cc8414d7668c10a8907f863f6561875ee6e8768931a62121a531a1 + languageName: node + linkType: hard + "mz@npm:^2.7.0": version: 2.7.0 resolution: "mz@npm:2.7.0" @@ -15129,7 +19277,7 @@ __metadata: languageName: node linkType: hard -"nan@npm:^2.14.0": +"nan@npm:^2.17.0": version: 2.17.0 resolution: "nan@npm:2.17.0" dependencies: @@ -15157,12 +19305,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.4": - version: 3.3.4 - resolution: "nanoid@npm:3.3.4" +"nanoid@npm:^3.3.1, nanoid@npm:^3.3.4, nanoid@npm:^3.3.6": + version: 3.3.6 + resolution: "nanoid@npm:3.3.6" bin: nanoid: bin/nanoid.cjs - checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c + checksum: 7d0eda657002738aa5206107bd0580aead6c95c460ef1bdd0b1a87a9c7ae6277ac2e9b945306aaa5b32c6dcb7feaf462d0f552e7f8b5718abfc6ead5c94a71b3 languageName: node linkType: hard @@ -15194,37 +19342,53 @@ __metadata: languageName: node linkType: hard -"neo-async@npm:^2.6.0": +"neo-async@npm:^2.5.0, neo-async@npm:^2.6.0, neo-async@npm:^2.6.1, neo-async@npm:^2.6.2": version: 2.6.2 resolution: "neo-async@npm:2.6.2" checksum: deac9f8d00eda7b2e5cd1b2549e26e10a0faa70adaa6fdadca701cc55f49ee9018e427f424bac0c790b7c7e2d3068db97f3093f1093975f2acb8f8818b936ed9 languageName: node linkType: hard -"next-mdx-remote@npm:^4.1.0": - version: 4.1.0 - resolution: "next-mdx-remote@npm:4.1.0" +"nested-error-stacks@npm:^2.0.0, nested-error-stacks@npm:^2.1.0": + version: 2.1.1 + resolution: "nested-error-stacks@npm:2.1.1" + checksum: 5f452fad75db8480b4db584e1602894ff5977f8bf3d2822f7ba5cb7be80e89adf1fffa34dada3347ef313a4288850b4486eb0635b315c32bdfb505577e8880e3 + languageName: node + linkType: hard + +"netmask@npm:^2.0.2": + version: 2.0.2 + resolution: "netmask@npm:2.0.2" + checksum: c65cb8d3f7ea5669edddb3217e4c96910a60d0d9a4b52d9847ff6b28b2d0277cd8464eee0ef85133cdee32605c57940cacdd04a9a019079b091b6bba4cb0ec22 + languageName: node + linkType: hard + +"next-contentlayer@npm:^0.3.2": + version: 0.3.2 + resolution: "next-contentlayer@npm:0.3.2" dependencies: - "@mdx-js/mdx": ^2.0.0 - "@mdx-js/react": ^2.0.0 - vfile: ^5.3.0 - vfile-matter: ^3.0.1 + "@contentlayer/core": 0.3.2 + "@contentlayer/utils": 0.3.2 peerDependencies: - react: ">=16.x <=18.x" - react-dom: ">=16.x <=18.x" - checksum: 17a5b41ee47d90bf48cdc13850e635ea419cd281231f84cf0d66ed149ce416f82a5999d7e6eab59a8ceb1559aaf76e4c1d90ccb28a03645f3e52a2e717d7e678 + next: ^12 || ^13 + react: "*" + react-dom: "*" + checksum: 03296aec6f12f19a5d66d8ff233b9c9345b00422d738f455671044ba199469894e0049a2a3bcf57dec2297266dfb21a0249f77a1a3d089c58229d1f29cae7629 languageName: node linkType: hard -"next-progress@npm:^2.2.0": - version: 2.2.0 - resolution: "next-progress@npm:2.2.0" +"next-mdx-remote@npm:^4.4.1": + version: 4.4.1 + resolution: "next-mdx-remote@npm:4.4.1" dependencies: - nprogress: ^0.2.0 + "@mdx-js/mdx": ^2.2.1 + "@mdx-js/react": ^2.2.1 + vfile: ^5.3.0 + vfile-matter: ^3.0.1 peerDependencies: - next: ">=6.0.0" - react: ">=16.0.0" - checksum: ef0e2c66c6990a6d0cf20c28896461ab32a3322972d52f3cb3ee2d2d58bdc2b620a402b1d7df9e0340b230d9ec9a9457584871ea0b8b890b1fc334d1886d2b97 + react: ">=16.x <=18.x" + react-dom: ">=16.x <=18.x" + checksum: 95cd77d03ae8ad7ae691cde0e895597b35a2ddac99cbeb31f1307599b2c7e7628f9e2a0fa5ced8d55036f58d8a2006ae312e308d574b8c3b0948df7279fa393d languageName: node linkType: hard @@ -15239,48 +19403,38 @@ __metadata: languageName: node linkType: hard -"next@npm:^12.3.1": - version: 12.3.1 - resolution: "next@npm:12.3.1" - dependencies: - "@next/env": 12.3.1 - "@next/swc-android-arm-eabi": 12.3.1 - "@next/swc-android-arm64": 12.3.1 - "@next/swc-darwin-arm64": 12.3.1 - "@next/swc-darwin-x64": 12.3.1 - "@next/swc-freebsd-x64": 12.3.1 - "@next/swc-linux-arm-gnueabihf": 12.3.1 - "@next/swc-linux-arm64-gnu": 12.3.1 - "@next/swc-linux-arm64-musl": 12.3.1 - "@next/swc-linux-x64-gnu": 12.3.1 - "@next/swc-linux-x64-musl": 12.3.1 - "@next/swc-win32-arm64-msvc": 12.3.1 - "@next/swc-win32-ia32-msvc": 12.3.1 - "@next/swc-win32-x64-msvc": 12.3.1 - "@swc/helpers": 0.4.11 +"next@npm:^13.4.3": + version: 13.4.3 + resolution: "next@npm:13.4.3" + dependencies: + "@next/env": 13.4.3 + "@next/swc-darwin-arm64": 13.4.3 + "@next/swc-darwin-x64": 13.4.3 + "@next/swc-linux-arm64-gnu": 13.4.3 + "@next/swc-linux-arm64-musl": 13.4.3 + "@next/swc-linux-x64-gnu": 13.4.3 + "@next/swc-linux-x64-musl": 13.4.3 + "@next/swc-win32-arm64-msvc": 13.4.3 + "@next/swc-win32-ia32-msvc": 13.4.3 + "@next/swc-win32-x64-msvc": 13.4.3 + "@swc/helpers": 0.5.1 + busboy: 1.6.0 caniuse-lite: ^1.0.30001406 postcss: 8.4.14 - styled-jsx: 5.0.7 - use-sync-external-store: 1.2.0 + styled-jsx: 5.1.1 + zod: 3.21.4 peerDependencies: + "@opentelemetry/api": ^1.1.0 fibers: ">= 3.1.0" node-sass: ^6.0.0 || ^7.0.0 - react: ^17.0.2 || ^18.0.0-0 - react-dom: ^17.0.2 || ^18.0.0-0 + react: ^18.2.0 + react-dom: ^18.2.0 sass: ^1.3.0 dependenciesMeta: - "@next/swc-android-arm-eabi": - optional: true - "@next/swc-android-arm64": - optional: true "@next/swc-darwin-arm64": optional: true "@next/swc-darwin-x64": optional: true - "@next/swc-freebsd-x64": - optional: true - "@next/swc-linux-arm-gnueabihf": - optional: true "@next/swc-linux-arm64-gnu": optional: true "@next/swc-linux-arm64-musl": @@ -15296,6 +19450,8 @@ __metadata: "@next/swc-win32-x64-msvc": optional: true peerDependenciesMeta: + "@opentelemetry/api": + optional: true fibers: optional: true node-sass: @@ -15304,23 +19460,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: ac78592379999650f596a945019b14827818879e792ab37876bc71443bd697510d9ea00881787918f1543e6c6c5588111aeecb10342c2166a344e10ccd6bbc3e - languageName: node - linkType: hard - -"nlcst-to-string@npm:^2.0.0": - version: 2.0.4 - resolution: "nlcst-to-string@npm:2.0.4" - checksum: 251b5d894ca13893bfc9c4e892a0656a2effb9a053becf8c94d9655ce3d5acc50811f535b0e77cc2156f45ac4addcef29a9654fc4e5841337c86aa08fa2ea878 - languageName: node - linkType: hard - -"nlcst-to-string@npm:^3.0.0": - version: 3.1.0 - resolution: "nlcst-to-string@npm:3.1.0" - dependencies: - "@types/nlcst": ^1.0.0 - checksum: cab11f47426fcdde03759cba31c3c8763bf679f97fabdd71d5cf049ee67e2262e11e813435abec39b9abdb5849dd593a2462cca8f1ca9b60b48c446bf481fb16 + checksum: 65f13be0600b8b64de7ee51b5cf06b062f2f9f484bddf79002107750d6e92ab01542cb7de62f03a5be6eafbb060ee68fa688714ef02956c7e603e67bdd28cd84 languageName: node linkType: hard @@ -15335,20 +19475,38 @@ __metadata: linkType: hard "node-abi@npm:^3.3.0": - version: 3.26.0 - resolution: "node-abi@npm:3.26.0" + version: 3.40.0 + resolution: "node-abi@npm:3.40.0" dependencies: semver: ^7.3.5 - checksum: 01271cf7b7e5b62a1d3d556efa4756a625b63b085dfd20558107abff3458082bfb0aed82a2985b1f82ccacd400bf3959ead5c0d1249aaf167fc88b82280f1764 + checksum: 8f4ef0d9ac82352465e7e7a8ce3915dae49c0fd19d6cb49a93140ff587b612166443531111a60d25e479a18e6e6b9af09698c7870babe0f44aa54287aeaf5eef languageName: node linkType: hard -"node-addon-api@npm:^5.0.0": - version: 5.0.0 - resolution: "node-addon-api@npm:5.0.0" +"node-addon-api@npm:^1.7.1": + version: 1.7.2 + resolution: "node-addon-api@npm:1.7.2" + dependencies: + node-gyp: latest + checksum: 938922b3d7cb34ee137c5ec39df6289a3965e8cab9061c6848863324c21a778a81ae3bc955554c56b6b86962f6ccab2043dd5fa3f33deab633636bd28039333f + languageName: node + linkType: hard + +"node-addon-api@npm:^6.1.0": + version: 6.1.0 + resolution: "node-addon-api@npm:6.1.0" dependencies: node-gyp: latest - checksum: 7c5e2043ac37f6108784d94ed73a44ae6d3e68eb968de60680922fc6bc3d17fa69448c0feb4e0c9d3f4c74a0324822e566a8340a56916d9d6f23cb3e85620334 + checksum: 3a539510e677cfa3a833aca5397300e36141aca064cdc487554f2017110709a03a95da937e98c2a14ec3c626af7b2d1b6dabe629a481f9883143d0d5bff07bf2 + languageName: node + linkType: hard + +"node-dir@npm:^0.1.10, node-dir@npm:^0.1.17": + version: 0.1.17 + resolution: "node-dir@npm:0.1.17" + dependencies: + minimatch: ^3.0.2 + checksum: 29de9560e52cdac8d3f794d38d782f6799e13d4d11aaf96d3da8c28458e1c5e33bb5f8edfb42dc34172ec5516c50c5b8850c9e1526542616757a969267263328 languageName: node linkType: hard @@ -15359,16 +19517,30 @@ __metadata: languageName: node linkType: hard -"node-fetch-native@npm:^0.1.8": - version: 0.1.8 - resolution: "node-fetch-native@npm:0.1.8" - checksum: 1cea29dc30e9b570b5510656f41050e7d2df70acc41937911d4374c404ac35b4592d6b6959a81f336f00f2d74b321d039b80d8a1b62eaaa395747733bc31c799 +"node-fetch-native@npm:^1.0.2": + version: 1.1.1 + resolution: "node-fetch-native@npm:1.1.1" + checksum: 41fe59179eb94b6ffb25e657e5ed14b4b50e2ba7f6bf5346622970638c8abbf29653b011141c919c6c081979962edd1eb94424a7621412cd78c47a9cd8be1227 + languageName: node + linkType: hard + +"node-fetch@npm:2.6.9": + version: 2.6.9 + resolution: "node-fetch@npm:2.6.9" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: acb04f9ce7224965b2b59e71b33c639794d8991efd73855b0b250921382b38331ffc9d61bce502571f6cc6e11a8905ca9b1b6d4aeb586ab093e2756a1fd190d0 languageName: node linkType: hard -"node-fetch@npm:2.6.7, node-fetch@npm:^2.0.0, node-fetch@npm:^2.6.7, node-fetch@npm:^2.x.x": - version: 2.6.7 - resolution: "node-fetch@npm:2.6.7" +"node-fetch@npm:^2.0.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.11, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9": + version: 2.6.11 + resolution: "node-fetch@npm:2.6.11" dependencies: whatwg-url: ^5.0.0 peerDependencies: @@ -15376,35 +19548,35 @@ __metadata: peerDependenciesMeta: encoding: optional: true - checksum: 8d816ffd1ee22cab8301c7756ef04f3437f18dace86a1dae22cf81db8ef29c0bf6655f3215cb0cdb22b420b6fe141e64b26905e7f33f9377a7fa59135ea3e10b + checksum: 249d0666a9497553384d46b5ab296ba223521ac88fed4d8a17d6ee6c2efb0fc890f3e8091cafe7f9fba8151a5b8d925db2671543b3409a56c3cd522b468b47b3 languageName: node linkType: hard -"node-fetch@npm:^3.2.5": - version: 3.2.10 - resolution: "node-fetch@npm:3.2.10" +"node-fetch@npm:^3.0.0": + version: 3.3.1 + resolution: "node-fetch@npm:3.3.1" dependencies: data-uri-to-buffer: ^4.0.0 fetch-blob: ^3.1.4 formdata-polyfill: ^4.0.10 - checksum: e65322431f4897ded04197aa5923eaec63a8d53e00432de4e70a4f7006625c8dc32629c5c35f4fe8ee719a4825544d07bf53f6e146a7265914262f493e8deac1 + checksum: 62145fd3ba4770a76110bc31fdc0054ab2f5442b5ce96e9c4b39fc9e94a3d305560eec76e1165d9259eab866e02a8eecf9301062bb5dfc9f08a4d08b69d223dd languageName: node linkType: hard "node-gyp-build@npm:^4.2.2": - version: 4.5.0 - resolution: "node-gyp-build@npm:4.5.0" + version: 4.6.0 + resolution: "node-gyp-build@npm:4.6.0" bin: node-gyp-build: bin.js node-gyp-build-optional: optional.js node-gyp-build-test: build-test.js - checksum: d888bae0fb88335f69af1b57a2294a931c5042f36e413d8d364c992c9ebfa0b96ffe773179a5a2c8f04b73856e8634e09cce108dbb9804396d3cc8c5455ff2db + checksum: 25d78c5ef1f8c24291f4a370c47ba52fcea14f39272041a90a7894cd50d766f7c8cb8fb06c0f42bf6f69b204b49d9be3c8fc344aac09714d5bdb95965499eb15 languageName: node linkType: hard "node-gyp@npm:latest": - version: 9.3.0 - resolution: "node-gyp@npm:9.3.0" + version: 9.3.1 + resolution: "node-gyp@npm:9.3.1" dependencies: env-paths: ^2.2.0 glob: ^7.1.4 @@ -15418,7 +19590,7 @@ __metadata: which: ^2.0.2 bin: node-gyp: bin/node-gyp.js - checksum: 589ddd3ed967724ef425f9624bfa47cf73022640ab3eba6d556e92cdc4ddef33b63fce3a467c93b995a3f61df92eafd3c3d1e8dbe4a2c00c383334487dea99c3 + checksum: b860e9976fa645ca0789c69e25387401b4396b93c8375489b5151a6c55cf2640a3b6183c212b38625ef7c508994930b72198338e3d09b9d7ade5acc4aaf51ea7 languageName: node linkType: hard @@ -15429,10 +19601,20 @@ __metadata: languageName: node linkType: hard -"node-releases@npm:^2.0.6": - version: 2.0.6 - resolution: "node-releases@npm:2.0.6" - checksum: e86a926dc9fbb3b41b4c4a89d998afdf140e20a4e8dbe6c0a807f7b2948b42ea97d7fd3ad4868041487b6e9ee98409829c6e4d84a734a4215dff060a7fbeb4bf +"node-releases@npm:^2.0.8": + version: 2.0.11 + resolution: "node-releases@npm:2.0.11" + checksum: ade1c8e19852aa7d7b45691c2708e6275703dd4994b16bc191cdbf66add29ccf87c595ecdb03a39db54a8aaba645f228bccd7d9477e4066f1d97a94f857dae9d + languageName: node + linkType: hard + +"node.extend@npm:^2.0.0": + version: 2.0.2 + resolution: "node.extend@npm:2.0.2" + dependencies: + has: ^1.0.3 + is: ^3.2.1 + checksum: 1fe3a1ca7fc35392f169c8a46d889d07deb201bba3a20d17df23efab509698c9639737b0c235c9be772a34035e749bae5d477f74c9e26a1b67c78bd7d6dce8e4 languageName: node linkType: hard @@ -15458,6 +19640,17 @@ __metadata: languageName: node linkType: hard +"nopt@npm:^7.0.0": + version: 7.1.0 + resolution: "nopt@npm:7.1.0" + dependencies: + abbrev: ^2.0.0 + bin: + nopt: bin/nopt.js + checksum: 77185170d491b2ffdda0c72ce12dcf222b670814b7fb5ba1b750c708a6e5421b5607345c1f6341602476c8ef0a26929f5b861efa284e106c60b4baa6e6edb262 + languageName: node + linkType: hard + "normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" @@ -15470,7 +19663,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^3.0.0, normalize-package-data@npm:~1.0.1 || ^2.0.0 || ^3.0.0": +"normalize-package-data@npm:^3.0.0, normalize-package-data@npm:^3.0.2, normalize-package-data@npm:~1.0.1 || ^2.0.0 || ^3.0.0": version: 3.0.3 resolution: "normalize-package-data@npm:3.0.3" dependencies: @@ -15489,17 +19682,29 @@ __metadata: languageName: node linkType: hard -"normalize-url@npm:^4.1.0": - version: 4.5.1 - resolution: "normalize-url@npm:4.5.1" - checksum: 9a9dee01df02ad23e171171893e56e22d752f7cff86fb96aafeae074819b572ea655b60f8302e2d85dbb834dc885c972cc1c573892fea24df46b2765065dd05a +"normalize-url@npm:^6.0.1": + version: 6.1.0 + resolution: "normalize-url@npm:6.1.0" + checksum: 4a4944631173e7d521d6b80e4c85ccaeceb2870f315584fa30121f505a6dfd86439c5e3fdd8cd9e0e291290c41d0c3599f0cb12ab356722ed242584c30348e50 languageName: node linkType: hard -"not@npm:^0.1.0": - version: 0.1.0 - resolution: "not@npm:0.1.0" - checksum: 8043bb53bc1c465a4a4f751394f11aad1d8ccae08dd2123310c6a5d160a5ad4138706d50af905cf114b72507a328585d4f2a73cd3d6730981dd2675aa9c8436f +"npm-normalize-package-bin@npm:^3.0.0": + version: 3.0.1 + resolution: "npm-normalize-package-bin@npm:3.0.1" + checksum: de416d720ab22137a36292ff8a333af499ea0933ef2320a8c6f56a73b0f0448227fec4db5c890d702e26d21d04f271415eab6580b5546456861cc0c19498a4bf + languageName: node + linkType: hard + +"npm-package-arg@npm:^10.0.0": + version: 10.1.0 + resolution: "npm-package-arg@npm:10.1.0" + dependencies: + hosted-git-info: ^6.0.0 + proc-log: ^3.0.0 + semver: ^7.3.5 + validate-npm-package-name: ^5.0.0 + checksum: 8fe4b6a742502345e4836ed42fdf26c544c9f75563c476c67044a481ada6e81f71b55462489c7e1899d516e4347150e58028036a90fa11d47e320bcc9365fd30 languageName: node linkType: hard @@ -15514,39 +19719,18 @@ __metadata: languageName: node linkType: hard -"npm-package-arg@npm:^9.0.1, npm-package-arg@npm:^9.1.0": - version: 9.1.2 - resolution: "npm-package-arg@npm:9.1.2" - dependencies: - hosted-git-info: ^5.0.0 - proc-log: ^2.0.1 - semver: ^7.3.5 - validate-npm-package-name: ^4.0.0 - checksum: 3793488843985ed71deb14fcba7c068d8ed03a18fd8f6b235c6a64465c9a25f60261598106d5cc8677c0bee9548e405c34c2e3c7a822e3113d3389351c745dfa - languageName: node - linkType: hard - -"npm-registry-fetch@npm:^13.3.0": - version: 13.3.1 - resolution: "npm-registry-fetch@npm:13.3.1" +"npm-registry-fetch@npm:^14.0.2": + version: 14.0.5 + resolution: "npm-registry-fetch@npm:14.0.5" dependencies: - make-fetch-happen: ^10.0.6 - minipass: ^3.1.6 - minipass-fetch: ^2.0.3 + make-fetch-happen: ^11.0.0 + minipass: ^5.0.0 + minipass-fetch: ^3.0.0 minipass-json-stream: ^1.0.1 minizlib: ^2.1.2 - npm-package-arg: ^9.0.1 - proc-log: ^2.0.0 - checksum: 5a941c2c799568e0dbccfc15f280444da398dadf2eede1b1921f08ddd5cb5f32c7cb4d16be96401f95a33073aeec13a3fd928c753790d3c412c2e64e7f7c6ee4 - languageName: node - linkType: hard - -"npm-run-path@npm:^1.0.0": - version: 1.0.0 - resolution: "npm-run-path@npm:1.0.0" - dependencies: - path-key: ^1.0.0 - checksum: ffabf15b6e4cb6f511a49cb9c824db67cd13198938988d18362fb62e793650b10d5e87695016625d3bed06fb9ab6a3b359265d97910d8971c8fdca845d3aaadd + npm-package-arg: ^10.0.0 + proc-log: ^3.0.0 + checksum: c63649642955b424bc1baaff5955027144af312ae117ba8c24829e74484f859482591fe89687c6597d83e930c8054463eef23020ac69146097a72cc62ff10986 languageName: node linkType: hard @@ -15604,14 +19788,7 @@ __metadata: languageName: node linkType: hard -"nprogress@npm:^0.2.0": - version: 0.2.0 - resolution: "nprogress@npm:0.2.0" - checksum: 66b7bec5d563ecf2d1c3d2815e6d5eb74ed815eee8563e0afa63d3f185ab1b9cf2ddd97e1ded263b9995c5019d26d600320e849e50f3747984daa033744619dc - languageName: node - linkType: hard - -"nth-check@npm:^2.0.0, nth-check@npm:^2.0.1": +"nth-check@npm:^2.0.1": version: 2.1.1 resolution: "nth-check@npm:2.1.1" dependencies: @@ -15648,10 +19825,27 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.12.2, object-inspect@npm:^1.9.0": - version: 1.12.2 - resolution: "object-inspect@npm:1.12.2" - checksum: a534fc1b8534284ed71f25ce3a496013b7ea030f3d1b77118f6b7b1713829262be9e6243acbcb3ef8c626e2b64186112cb7f6db74e37b2789b9c789ca23048b2 +"object-hash@npm:^3.0.0": + version: 3.0.0 + resolution: "object-hash@npm:3.0.0" + checksum: 80b4904bb3857c52cc1bfd0b52c0352532ca12ed3b8a6ff06a90cd209dfda1b95cee059a7625eb9da29537027f68ac4619363491eedb2f5d3dddbba97494fd6c + languageName: node + linkType: hard + +"object-inspect@npm:^1.12.3, object-inspect@npm:^1.9.0": + version: 1.12.3 + resolution: "object-inspect@npm:1.12.3" + checksum: dabfd824d97a5f407e6d5d24810d888859f6be394d8b733a77442b277e0808860555176719c5905e765e3743a7cada6b8b0a3b85e5331c530fd418cc8ae991db + languageName: node + linkType: hard + +"object-is@npm:^1.0.1, object-is@npm:^1.1.5": + version: 1.1.5 + resolution: "object-is@npm:1.1.5" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.3 + checksum: 989b18c4cba258a6b74dc1d74a41805c1a1425bce29f6cabb50dcb1a6a651ea9104a1b07046739a49a5bb1bc49727bcb00efd5c55f932f6ea04ec8927a7901fe languageName: node linkType: hard @@ -15681,70 +19875,57 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.5": - version: 1.1.5 - resolution: "object.entries@npm:1.1.5" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - checksum: d658696f74fd222060d8428d2a9fda2ce736b700cb06f6bdf4a16a1892d145afb746f453502b2fa55d1dca8ead6f14ddbcf66c545df45adadea757a6c4cd86c7 - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.5": - version: 2.0.5 - resolution: "object.fromentries@npm:2.0.5" +"object.entries@npm:^1.1.6": + version: 1.1.6 + resolution: "object.entries@npm:1.1.6" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - checksum: 61a0b565ded97b76df9e30b569729866e1824cce902f98e90bb106e84f378aea20163366f66dc75c9000e2aad2ed0caf65c6f530cb2abc4c0c0f6c982102db4b + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + checksum: 0f8c47517e6a9a980241eafe3b73de11e59511883173c2b93d67424a008e47e11b77c80e431ad1d8a806f6108b225a1cab9223e53e555776c612a24297117d28 languageName: node linkType: hard -"object.getownpropertydescriptors@npm:^2.1.4": - version: 2.1.4 - resolution: "object.getownpropertydescriptors@npm:2.1.4" +"object.fromentries@npm:^2.0.6": + version: 2.0.6 + resolution: "object.fromentries@npm:2.0.6" dependencies: - array.prototype.reduce: ^1.0.4 call-bind: ^1.0.2 define-properties: ^1.1.4 - es-abstract: ^1.20.1 - checksum: 988c466fe49fc4f19a28d2d1d894c95c6abfe33c94674ec0b14d96eed71f453c7ad16873d430dc2acbb1760de6d3d2affac4b81237a306012cc4dc49f7539e7f + es-abstract: ^1.20.4 + checksum: 453c6d694180c0c30df451b60eaf27a5b9bca3fb43c37908fd2b78af895803dc631242bcf05582173afa40d8d0e9c96e16e8874b39471aa53f3ac1f98a085d85 languageName: node linkType: hard -"object.hasown@npm:^1.1.1": - version: 1.1.1 - resolution: "object.hasown@npm:1.1.1" +"object.hasown@npm:^1.1.2": + version: 1.1.2 + resolution: "object.hasown@npm:1.1.2" dependencies: define-properties: ^1.1.4 - es-abstract: ^1.19.5 - checksum: d8ed4907ce57f48b93e3b53c418fd6787bf226a51e8d698c91e39b78e80fe5b124cb6282f6a9d5be21cf9e2c7829ab10206dcc6112b7748860eefe641880c793 + es-abstract: ^1.20.4 + checksum: b936572536db0cdf38eb30afd2f1026a8b6f2cc5d2c4497c9d9bbb01eaf3e980dead4fd07580cfdd098e6383e5a9db8212d3ea0c6bdd2b5e68c60aa7e3b45566 languageName: node linkType: hard -"object.values@npm:^1.1.5": - version: 1.1.5 - resolution: "object.values@npm:1.1.5" +"object.values@npm:^1.1.6": + version: 1.1.6 + resolution: "object.values@npm:1.1.6" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - checksum: 0f17e99741ebfbd0fa55ce942f6184743d3070c61bd39221afc929c8422c4907618c8da694c6915bc04a83ab3224260c779ba37fc07bb668bdc5f33b66a902a4 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + checksum: f6fff9fd817c24cfd8107f50fb33061d81cd11bacc4e3dbb3852e9ff7692fde4dbce823d4333ea27cd9637ef1b6690df5fbb61f1ed314fa2959598dc3ae23d8e languageName: node linkType: hard -"ohmyfetch@npm:^0.4.20": - version: 0.4.20 - resolution: "ohmyfetch@npm:0.4.20" +"ofetch@npm:^1.0.1": + version: 1.0.1 + resolution: "ofetch@npm:1.0.1" dependencies: - destr: ^1.1.1 - node-fetch-native: ^0.1.8 - ufo: ^0.8.6 - undici: ^5.11.0 - checksum: dfaffa9f38bdcd6926281aaab9689a9dcdf9181c8d56a45278d7f6ed81d3c0ba3eed60e24078798c9e144b4ad348c92481dfcfb5106115d6864b4408dc7050f6 + destr: ^1.2.2 + node-fetch-native: ^1.0.2 + ufo: ^1.1.0 + checksum: f5bc96c8bb5467ec84b3a89315ac06ccf02a3917b534f137ad0b54b935173297f6c6cb9163b62678919710f64bb73e68d8e911a744ea7c7f029a3ed422b08a42 languageName: node linkType: hard @@ -15757,7 +19938,14 @@ __metadata: languageName: node linkType: hard -"once@npm:1.4.0, once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": +"on-headers@npm:~1.0.2": + version: 1.0.2 + resolution: "on-headers@npm:1.0.2" + checksum: 2bf13467215d1e540a62a75021e8b318a6cfc5d4fc53af8e8f84ad98dbcea02d506c6d24180cd62e1d769c44721ba542f3154effc1f7579a8288c9f7873ed8e5 + languageName: node + linkType: hard + +"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -15766,6 +19954,15 @@ __metadata: languageName: node linkType: hard +"once@npm:~1.3.0": + version: 1.3.3 + resolution: "once@npm:1.3.3" + dependencies: + wrappy: 1 + checksum: 8e832de08b1d73b470e01690c211cb4fcefccab1fd1bd19e706d572d74d3e9b7e38a8bfcdabdd364f9f868757d9e8e5812a59817dc473eaf698ff3bfae2219f2 + languageName: node + linkType: hard + "onetime@npm:^5.1.0, onetime@npm:^5.1.2": version: 5.1.2 resolution: "onetime@npm:5.1.2" @@ -15784,14 +19981,66 @@ __metadata: languageName: node linkType: hard +"oo-ascii-tree@npm:^1.80.0": + version: 1.82.0 + resolution: "oo-ascii-tree@npm:1.82.0" + checksum: a34c8bfd8abfb110f265408fdb64eda268f762a164a9972f49ff7d752c134a29561febb08dd3815331e97395b2e7f9a9fc7448a7a9fc3fe96aa70ba5fd0f044c + languageName: node + linkType: hard + +"open@npm:^7.0.3": + version: 7.4.2 + resolution: "open@npm:7.4.2" + dependencies: + is-docker: ^2.0.0 + is-wsl: ^2.1.1 + checksum: 3333900ec0e420d64c23b831bc3467e57031461d843c801f569b2204a1acc3cd7b3ec3c7897afc9dde86491dfa289708eb92bba164093d8bd88fb2c231843c91 + languageName: node + linkType: hard + "open@npm:^8.4.0": - version: 8.4.0 - resolution: "open@npm:8.4.0" + version: 8.4.2 + resolution: "open@npm:8.4.2" dependencies: define-lazy-prop: ^2.0.0 is-docker: ^2.1.1 is-wsl: ^2.2.0 - checksum: e9545bec64cdbf30a0c35c1bdc310344adf8428a117f7d8df3c0af0a0a24c513b304916a6d9b11db0190ff7225c2d578885080b761ed46a3d5f6f1eebb98b63c + checksum: 6388bfff21b40cb9bd8f913f9130d107f2ed4724ea81a8fd29798ee322b361ca31fa2cdfb491a5c31e43a3996cfe9566741238c7a741ada8d7af1cb78d85cf26 + languageName: node + linkType: hard + +"open@npm:^9.1.0": + version: 9.1.0 + resolution: "open@npm:9.1.0" + dependencies: + default-browser: ^4.0.0 + define-lazy-prop: ^3.0.0 + is-inside-container: ^1.0.0 + is-wsl: ^2.2.0 + checksum: 3993c0f61d51fed8ac290e99c9c3cf45d3b6cfb3e2aa2b74cafd312c3486c22fd81df16ac8f3ab91dd8a4e3e729a16fc2480cfc406c4833416cf908acf1ae7c9 + languageName: node + linkType: hard + +"opener@npm:^1.5.2": + version: 1.5.2 + resolution: "opener@npm:1.5.2" + bin: + opener: bin/opener-bin.js + checksum: 33b620c0d53d5b883f2abc6687dd1c5fd394d270dbe33a6356f2d71e0a2ec85b100d5bac94694198ccf5c30d592da863b2292c5539009c715a9c80c697b4f6cc + languageName: node + linkType: hard + +"optionator@npm:^0.8.1": + version: 0.8.3 + resolution: "optionator@npm:0.8.3" + dependencies: + deep-is: ~0.1.3 + fast-levenshtein: ~2.0.6 + levn: ~0.3.0 + prelude-ls: ~1.1.2 + type-check: ~0.3.2 + word-wrap: ~1.2.3 + checksum: b8695ddf3d593203e25ab0900e265d860038486c943ff8b774f596a310f8ceebdb30c6832407a8198ba3ec9debe1abe1f51d4aad94843612db3b76d690c61d34 languageName: node linkType: hard @@ -15809,27 +20058,66 @@ __metadata: languageName: node linkType: hard -"ora@npm:^6.1.0": - version: 6.1.2 - resolution: "ora@npm:6.1.2" - dependencies: - bl: ^5.0.0 - chalk: ^5.0.0 - cli-cursor: ^4.0.0 - cli-spinners: ^2.6.1 - is-interactive: ^2.0.0 - is-unicode-supported: ^1.1.0 - log-symbols: ^5.1.0 - strip-ansi: ^7.0.1 +"ora@npm:^5.4.1": + version: 5.4.1 + resolution: "ora@npm:5.4.1" + dependencies: + bl: ^4.1.0 + chalk: ^4.1.0 + cli-cursor: ^3.1.0 + cli-spinners: ^2.5.0 + is-interactive: ^1.0.0 + is-unicode-supported: ^0.1.0 + log-symbols: ^4.1.0 + strip-ansi: ^6.0.0 wcwidth: ^1.0.1 - checksum: d5af3d67ad7affcf3029ffe3ef547f3335fb72abdc382040ae8bd75ad5c629f5d165ed9e398fd4fb08100701eafbec34bb9dc3f29e919f6f75c443290faa1db2 + checksum: 28d476ee6c1049d68368c0dc922e7225e3b5600c3ede88fade8052837f9ed342625fdaa84a6209302587c8ddd9b664f71f0759833cbdb3a4cf81344057e63c63 languageName: node linkType: hard -"p-cancelable@npm:^1.0.0": - version: 1.1.0 - resolution: "p-cancelable@npm:1.1.0" - checksum: 2db3814fef6d9025787f30afaee4496a8857a28be3c5706432cbad76c688a6db1874308f48e364a42f5317f5e41e8e7b4f2ff5c8ff2256dbb6264bc361704ece +"os-tmpdir@npm:~1.0.2": + version: 1.0.2 + resolution: "os-tmpdir@npm:1.0.2" + checksum: 5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d + languageName: node + linkType: hard + +"outdent@npm:^0.8.0": + version: 0.8.0 + resolution: "outdent@npm:0.8.0" + checksum: 72b7c1a287674317ea477999ec24e73a9eda21de35eb9429218f4a5bab899e964afaee7508265898118fee5cbee1d79397916b66dd8aeee285cd948ea5b1f562 + languageName: node + linkType: hard + +"p-cancelable@npm:^2.0.0": + version: 2.1.1 + resolution: "p-cancelable@npm:2.1.1" + checksum: 3dba12b4fb4a1e3e34524535c7858fc82381bbbd0f247cc32dedc4018592a3950ce66b106d0880b4ec4c2d8d6576f98ca885dc1d7d0f274d1370be20e9523ddf + languageName: node + linkType: hard + +"p-event@npm:^4.1.0": + version: 4.2.0 + resolution: "p-event@npm:4.2.0" + dependencies: + p-timeout: ^3.1.0 + checksum: 8a3588f7a816a20726a3262dfeee70a631e3997e4773d23219176333eda55cce9a76219e3d2b441b331eb746e14fdb381eb2694ab9ff2fcf87c846462696fe89 + languageName: node + linkType: hard + +"p-filter@npm:^3.0.0": + version: 3.0.0 + resolution: "p-filter@npm:3.0.0" + dependencies: + p-map: ^5.1.0 + checksum: aacc36820f0531c01963334edc6debf5038b47c83a1c2255b7c14f6964a9a5fc1887ce0b93e72d137727403253bcc9bb26eed9bb79896ece1fa9f52d979bb97b + languageName: node + linkType: hard + +"p-finally@npm:^1.0.0": + version: 1.0.0 + resolution: "p-finally@npm:1.0.0" + checksum: 93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4 languageName: node linkType: hard @@ -15842,7 +20130,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^2.2.0": +"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" dependencies: @@ -15860,6 +20148,15 @@ __metadata: languageName: node linkType: hard +"p-limit@npm:^4.0.0": + version: 4.0.0 + resolution: "p-limit@npm:4.0.0" + dependencies: + yocto-queue: ^1.0.0 + checksum: 01d9d70695187788f984226e16c903475ec6a947ee7b21948d6f597bed788e3112cc7ec2e171c1d37125057a5f45f3da21d8653e04a3a793589e12e9e80e756b + languageName: node + linkType: hard + "p-locate@npm:^2.0.0": version: 2.0.0 resolution: "p-locate@npm:2.0.0" @@ -15869,6 +20166,15 @@ __metadata: languageName: node linkType: hard +"p-locate@npm:^3.0.0": + version: 3.0.0 + resolution: "p-locate@npm:3.0.0" + dependencies: + p-limit: ^2.0.0 + checksum: 83991734a9854a05fe9dbb29f707ea8a0599391f52daac32b86f08e21415e857ffa60f0e120bfe7ce0cc4faf9274a50239c7895fc0d0579d08411e513b83a4ae + languageName: node + linkType: hard + "p-locate@npm:^4.1.0": version: 4.1.0 resolution: "p-locate@npm:4.1.0" @@ -15896,6 +20202,24 @@ __metadata: languageName: node linkType: hard +"p-map@npm:^5.1.0, p-map@npm:^5.3.0": + version: 5.5.0 + resolution: "p-map@npm:5.5.0" + dependencies: + aggregate-error: ^4.0.0 + checksum: 065cb6fca6b78afbd070dd9224ff160dc23eea96e57863c09a0c8ea7ce921043f76854be7ee0abc295cff1ac9adcf700e79a1fbe3b80b625081087be58e7effb + languageName: node + linkType: hard + +"p-timeout@npm:^3.1.0": + version: 3.2.0 + resolution: "p-timeout@npm:3.2.0" + dependencies: + p-finally: ^1.0.0 + checksum: 3dd0eaa048780a6f23e5855df3dd45c7beacff1f820476c1d0d1bcd6648e3298752ba2c877aa1c92f6453c7dd23faaf13d9f5149fc14c0598a142e2c5e8d649c + languageName: node + linkType: hard + "p-try@npm:^1.0.0": version: 1.0.0 resolution: "p-try@npm:1.0.0" @@ -15910,25 +20234,45 @@ __metadata: languageName: node linkType: hard -"package-json@npm:^6.3.0": - version: 6.5.0 - resolution: "package-json@npm:6.5.0" +"pac-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "pac-proxy-agent@npm:5.0.0" + dependencies: + "@tootallnate/once": 1 + agent-base: 6 + debug: 4 + get-uri: 3 + http-proxy-agent: ^4.0.1 + https-proxy-agent: 5 + pac-resolver: ^5.0.0 + raw-body: ^2.2.0 + socks-proxy-agent: 5 + checksum: cfd26a0e2ebfea4ca6162465018ce093bf147d26cf6c8fb3e7155bc7c184370d80d4d09a1c097e3db7676d0e3f574ea1cb56a4aa7d1d2e5cca6238935fabf010 + languageName: node + linkType: hard + +"pac-resolver@npm:^5.0.0": + version: 5.0.1 + resolution: "pac-resolver@npm:5.0.1" dependencies: - got: ^9.6.0 - registry-auth-token: ^4.0.0 - registry-url: ^5.0.0 - semver: ^6.2.0 - checksum: cc9f890d3667d7610e6184decf543278b87f657d1ace0deb4a9c9155feca738ef88f660c82200763d3348010f4e42e9c7adc91e96ab0f86a770955995b5351e2 + degenerator: ^3.0.2 + ip: ^1.1.5 + netmask: ^2.0.2 + checksum: e3bd8aada70d173cd4cec1ac810fb56161678b7a597060a740c4a31d9c5f8cd95687b2d0fd90b69c0cafe5ef787404074f38042ba08c8d378fed48973f58e493 languageName: node linkType: hard -"param-case@npm:^3.0.4": - version: 3.0.4 - resolution: "param-case@npm:3.0.4" - dependencies: - dot-case: ^3.0.4 - tslib: ^2.0.3 - checksum: b34227fd0f794e078776eb3aa6247442056cb47761e9cd2c4c881c86d84c64205f6a56ef0d70b41ee7d77da02c3f4ed2f88e3896a8fefe08bdfb4deca037c687 +"packageurl-js@npm:^1.0.0": + version: 1.0.2 + resolution: "packageurl-js@npm:1.0.2" + checksum: a0d7ca869bea5321fe0f13b41e60a08683f26edfba730eec1591bfd0adea0cfa4b5c5a047207eaff27231028d218335fa486badedb792cf0eef3cb159b9d6c49 + languageName: node + linkType: hard + +"pako@npm:^0.2.5, pako@npm:~0.2.0": + version: 0.2.9 + resolution: "pako@npm:0.2.9" + checksum: 055f9487cd57fbb78df84315873bbdd089ba286f3499daed47d2effdc6253e981f5db6898c23486de76d4a781559f890d643bd3a49f70f1b4a18019c98aa5125 languageName: node linkType: hard @@ -15941,13 +20285,23 @@ __metadata: languageName: node linkType: hard -"parse-cache-control@npm:^1.0.1": +"parse-cache-control@npm:1.0.1": version: 1.0.1 resolution: "parse-cache-control@npm:1.0.1" checksum: 5a70868792124eb07c2dd07a78fcb824102e972e908254e9e59ce59a4796c51705ff28196d2b20d3b7353d14e9f98e65ed0e4eda9be072cc99b5297dc0466fee languageName: node linkType: hard +"parse-css-color@npm:^0.2.1": + version: 0.2.1 + resolution: "parse-css-color@npm:0.2.1" + dependencies: + color-name: ^1.1.4 + hex-rgb: ^4.1.0 + checksum: 3751e81fe904b491612ee4c92235b476d16419b88a0da2822319b657ff35311f5ffc13cd092bd385d17319058dc2188e5bcbee7d476516a77b90f6aa556d88d9 + languageName: node + linkType: hard + "parse-entities@npm:^2.0.0": version: 2.0.0 resolution: "parse-entities@npm:2.0.0" @@ -15963,8 +20317,8 @@ __metadata: linkType: hard "parse-entities@npm:^4.0.0": - version: 4.0.0 - resolution: "parse-entities@npm:4.0.0" + version: 4.0.1 + resolution: "parse-entities@npm:4.0.1" dependencies: "@types/unist": ^2.0.0 character-entities: ^2.0.0 @@ -15974,7 +20328,7 @@ __metadata: is-alphanumerical: ^2.0.0 is-decimal: ^2.0.0 is-hexadecimal: ^2.0.0 - checksum: cd9fa53bc056ad8cf8a45494bfd7ce65e8bf6f1b12dcc9a6343376fa529c2012041303c5d0f86babf70afbd13b71c2f219fc3a76fb97d9d559b66578e19cdaf0 + checksum: 32a6ff5b9acb9d2c4d71537308521fd265e685b9215691df73feedd9edfe041bb6da9f89bd0c35c4a2bc7d58e3e76e399bb6078c2fd7d2a343ff1dd46edbf1bd languageName: node linkType: hard @@ -16000,14 +20354,15 @@ __metadata: languageName: node linkType: hard -"parse-latin@npm:^5.0.0": - version: 5.0.0 - resolution: "parse-latin@npm:5.0.0" +"parse-json@npm:^6.0.0": + version: 6.0.2 + resolution: "parse-json@npm:6.0.2" dependencies: - nlcst-to-string: ^2.0.0 - unist-util-modify-children: ^2.0.0 - unist-util-visit-children: ^1.0.0 - checksum: 9dd00f91699586d3a4e7b2327df1ef8d916586b1dfccdf6d7a8fa24b4d620e8c192f613753b7ad439b0102982a21b189face2c0c117f5ce55fe54502a5f33c6e + "@babel/code-frame": ^7.16.0 + error-ex: ^1.3.2 + json-parse-even-better-errors: ^2.3.1 + lines-and-columns: ^2.0.2 + checksum: b33d93abf869f3102804896b9a1f8c04bf371e3c55d7afafaf18fca2813a20b2e14a1ae5c6823feea3b4fabc63f35984dc272fa057c4767531ffe1b46d52fa79 languageName: node linkType: hard @@ -16018,30 +20373,14 @@ __metadata: languageName: node linkType: hard -"parse-numeric-range@npm:^1.3.0": - version: 1.3.0 - resolution: "parse-numeric-range@npm:1.3.0" - checksum: 289ca126d5b8ace7325b199218de198014f58ea6895ccc88a5247491d07f0143bf047f80b4a31784f1ca8911762278d7d6ecb90a31dfae31da91cc1a2524c8ce - languageName: node - linkType: hard - -"parse5-htmlparser2-tree-adapter@npm:^6.0.1": - version: 6.0.1 - resolution: "parse5-htmlparser2-tree-adapter@npm:6.0.1" - dependencies: - parse5: ^6.0.1 - checksum: 1848378b355d027915645c13f13f982e60502d201f53bc2067a508bf2dba4aac08219fc781dcd160167f5f50f0c73f58d20fa4fb3d90ee46762c20234fa90a6d - languageName: node - linkType: hard - -"parse5@npm:^6.0.0, parse5@npm:^6.0.1": +"parse5@npm:^6.0.0": version: 6.0.1 resolution: "parse5@npm:6.0.1" checksum: 7d569a176c5460897f7c8f3377eff640d54132b9be51ae8a8fa4979af940830b2b0c296ce75e5bd8f4041520aadde13170dbdec44889975f906098ea0002f4bd languageName: node linkType: hard -"parseurl@npm:~1.3.3": +"parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" checksum: 407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 @@ -16093,13 +20432,6 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^1.0.0": - version: 1.0.0 - resolution: "path-key@npm:1.0.0" - checksum: 41c4aa248d3b2e4f98b98c753b3721da7a25060cdce1ac95944ae19c71b7d85702b790558763c0371bab46269f40aa8b5ec4a3353954d0c05c8231c41dae9cf0 - languageName: node - linkType: hard - "path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -16121,6 +20453,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^1.7.0": + version: 1.9.2 + resolution: "path-scurry@npm:1.9.2" + dependencies: + lru-cache: ^9.1.1 + minipass: ^5.0.0 || ^6.0.2 + checksum: 92888dfb68e285043c6d3291c8e971d5d2bc2f5082f4d7b5392896f34be47024c9d0a8b688dd7ae6d125acc424699195474927cb4f00049a9b1ec7c4256fa8e0 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -16135,7 +20477,7 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:^6.2.1": +"path-to-regexp@npm:6.2.1": version: 6.2.1 resolution: "path-to-regexp@npm:6.2.1" checksum: f0227af8284ea13300f4293ba111e3635142f976d4197f14d5ad1f124aebd9118783dd2e5f1fe16f7273743cc3dbeddfb7493f237bb27c10fdae07020cc9b698 @@ -16158,10 +20500,10 @@ __metadata: languageName: node linkType: hard -"pathe@npm:^0.3.9": - version: 0.3.9 - resolution: "pathe@npm:0.3.9" - checksum: 9afcbaa79c5f8ec603b6b0a20b9accfcec8de57e26738f4a844de4625cfb07cc733b7234387ef42c7ab23a49b91846b6b51cb247584793842a3179539af463df +"pathe@npm:^1.1.0": + version: 1.1.0 + resolution: "pathe@npm:1.1.0" + checksum: 6b9be9968ea08a90c0824934799707a1c6a1ad22ac1f22080f377e3f75856d5e53a331b01d327329bfce538a14590587cfb250e8e7947f64408797c84c252056 languageName: node linkType: hard @@ -16179,10 +20521,28 @@ __metadata: languageName: node linkType: hard -"perfect-debounce@npm:^0.1.3": - version: 0.1.3 - resolution: "perfect-debounce@npm:0.1.3" - checksum: c77465eb23d87669e5ee646d12331507c45278e0f2e6fc20a587104b956c1a53f9afe723915d882f73fa588e42770a2edd2bbd93eb0b958c9ff1eb7b915ccdc1 +"peek-stream@npm:^1.1.0": + version: 1.1.3 + resolution: "peek-stream@npm:1.1.3" + dependencies: + buffer-from: ^1.0.0 + duplexify: ^3.5.0 + through2: ^2.0.3 + checksum: a0e09d6d1a8a01158a3334f20d6b1cdd91747eba24eb06a1d742eefb620385593121a76d4378cc81f77cdce6a66df0575a41041b1189c510254aec91878afc99 + languageName: node + linkType: hard + +"pend@npm:~1.2.0": + version: 1.2.0 + resolution: "pend@npm:1.2.0" + checksum: 6c72f5243303d9c60bd98e6446ba7d30ae29e3d56fdb6fae8767e8ba6386f33ee284c97efe3230a0d0217e2b1723b8ab490b1bbf34fcbb2180dbc8a9de47850d + languageName: node + linkType: hard + +"perfect-debounce@npm:^1.0.0": + version: 1.0.0 + resolution: "perfect-debounce@npm:1.0.0" + checksum: 220343acf52976947958fef3599849471605316e924fe19c633ae2772576298e9d38f02cefa8db46f06607505ce7b232cbb35c9bfd477bd0329bd0a2ce37c594 languageName: node linkType: hard @@ -16194,12 +20554,13 @@ __metadata: linkType: hard "periscopic@npm:^3.0.0": - version: 3.0.4 - resolution: "periscopic@npm:3.0.4" + version: 3.1.0 + resolution: "periscopic@npm:3.1.0" dependencies: + "@types/estree": ^1.0.0 estree-walker: ^3.0.0 is-reference: ^3.0.0 - checksum: 0920ea1b0294c2463b7df858d7f895d0a69f15ec5c7b93d63749e7a8f6d9c065853ebea701305f1756f70310633832cf5c90e43e9363cce51abec44cc2f5c188 + checksum: 2153244352e58a0d76e7e8d9263e66fe74509495f809af388da20045fb30aa3e93f2f94468dc0b9166ecf206fcfc0d73d2c7641c6fbedc07b1de858b710142cb languageName: node linkType: hard @@ -16210,7 +20571,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3, picomatch@npm:^2.3.0, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 050c865ce81119c4822c45d3c84f1ced46f93a0126febae20737bd05ca20589c564d6e9226977df859ed5e03dc73f02584a2b0faad36e896936238238b0446cf @@ -16247,14 +20608,23 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.1, pirates@npm:^4.0.4": +"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": version: 4.0.5 resolution: "pirates@npm:4.0.5" checksum: c9994e61b85260bec6c4fc0307016340d9b0c4f4b6550a957afaaff0c9b1ad58fbbea5cfcf083860a25cb27a375442e2b0edf52e2e1e40e69934e08dcc52d227 languageName: node linkType: hard -"pkg-dir@npm:^4.2.0": +"pkg-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "pkg-dir@npm:3.0.0" + dependencies: + find-up: ^3.0.0 + checksum: 70c9476ffefc77552cc6b1880176b71ad70bfac4f367604b2b04efd19337309a4eec985e94823271c7c0e83946fa5aeb18cd360d15d10a5d7533e19344bfa808 + languageName: node + linkType: hard + +"pkg-dir@npm:^4.1.0, pkg-dir@npm:^4.2.0": version: 4.2.0 resolution: "pkg-dir@npm:4.2.0" dependencies: @@ -16263,6 +20633,26 @@ __metadata: languageName: node linkType: hard +"pkg-dir@npm:^5.0.0": + version: 5.0.0 + resolution: "pkg-dir@npm:5.0.0" + dependencies: + find-up: ^5.0.0 + checksum: b167bb8dac7bbf22b1d5e30ec223e6b064b84b63010c9d49384619a36734caf95ed23ad23d4f9bd975e8e8082b60a83395f43a89bb192df53a7c25a38ecb57d9 + languageName: node + linkType: hard + +"pkg-types@npm:^1.0.3": + version: 1.0.3 + resolution: "pkg-types@npm:1.0.3" + dependencies: + jsonc-parser: ^3.2.0 + mlly: ^1.2.0 + pathe: ^1.1.0 + checksum: 4b305c834b912ddcc8a0fe77530c0b0321fe340396f84cbb87aecdbc126606f47f2178f23b8639e71a4870f9631c7217aef52ffed0ae17ea2dbbe7e43d116a6e + languageName: node + linkType: hard + "plur@npm:^4.0.0": version: 4.0.0 resolution: "plur@npm:4.0.0" @@ -16272,6 +20662,13 @@ __metadata: languageName: node linkType: hard +"pluralize@npm:^7.0.0": + version: 7.0.0 + resolution: "pluralize@npm:7.0.0" + checksum: e3f694924b7c8c03dc9fa40b2312e17787998ac6e20fccace11efa1146046eb9931541bfd247b3ec5535e730d902a5aee7c32681d5bf9a00fc74a72039a3e609 + languageName: node + linkType: hard + "pluralize@npm:^8.0.0": version: 8.0.0 resolution: "pluralize@npm:8.0.0" @@ -16279,7 +20676,25 @@ __metadata: languageName: node linkType: hard -"postcss-load-config@npm:^3.0.1, postcss-load-config@npm:^3.1.4": +"polished@npm:^4.2.2": + version: 4.2.2 + resolution: "polished@npm:4.2.2" + dependencies: + "@babel/runtime": ^7.17.8 + checksum: 97fb927dc55cd34aeb11b31ae2a3332463f114351c86e8aa6580d7755864a0120164fdc3770e6160c8b1775052f0eda14db9a6e34402cd4b08ab2d658a593725 + languageName: node + linkType: hard + +"postcss-discard-duplicates@npm:^5.1.0": + version: 5.1.0 + resolution: "postcss-discard-duplicates@npm:5.1.0" + peerDependencies: + postcss: ^8.2.15 + checksum: 88d6964201b1f4ed6bf7a32cefe68e86258bb6e42316ca01d9b32bdb18e7887d02594f89f4a2711d01b51ea6e3fcca8c54be18a59770fe5f4521c61d3eb6ca35 + languageName: node + linkType: hard + +"postcss-load-config@npm:^3.0.1": version: 3.1.4 resolution: "postcss-load-config@npm:3.1.4" dependencies: @@ -16297,17 +20712,112 @@ __metadata: languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.10, postcss-selector-parser@npm:^6.0.9": - version: 6.0.10 - resolution: "postcss-selector-parser@npm:6.0.10" +"postcss-load-config@npm:^4.0.1": + version: 4.0.1 + resolution: "postcss-load-config@npm:4.0.1" + dependencies: + lilconfig: ^2.0.5 + yaml: ^2.1.1 + peerDependencies: + postcss: ">=8.0.9" + ts-node: ">=9.0.0" + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + checksum: b61f890499ed7dcda1e36c20a9582b17d745bad5e2b2c7bc96942465e406bc43ae03f270c08e60d1e29dab1ee50cb26970b5eb20c9aae30e066e20bd607ae4e4 + languageName: node + linkType: hard + +"postcss-loader@npm:^7.2.4": + version: 7.3.0 + resolution: "postcss-loader@npm:7.3.0" + dependencies: + cosmiconfig: ^8.1.3 + jiti: ^1.18.2 + klona: ^2.0.6 + semver: ^7.3.8 + peerDependencies: + postcss: ^7.0.0 || ^8.0.1 + webpack: ^5.0.0 + checksum: f09fe68bde5f686c264cc96c51bcdc0be00c55e856d73161ce86b302fdd503098fe5c9172231eb3b316a1969080101a4c46463bda784b408d4a4cb15e7b01fc5 + languageName: node + linkType: hard + +"postcss-modules-extract-imports@npm:^3.0.0": + version: 3.0.0 + resolution: "postcss-modules-extract-imports@npm:3.0.0" + peerDependencies: + postcss: ^8.1.0 + checksum: 4b65f2f1382d89c4bc3c0a1bdc5942f52f3cb19c110c57bd591ffab3a5fee03fcf831604168205b0c1b631a3dce2255c70b61aaae3ef39d69cd7eb450c2552d2 + languageName: node + linkType: hard + +"postcss-modules-local-by-default@npm:^4.0.0, postcss-modules-local-by-default@npm:^4.0.1": + version: 4.0.3 + resolution: "postcss-modules-local-by-default@npm:4.0.3" + dependencies: + icss-utils: ^5.0.0 + postcss-selector-parser: ^6.0.2 + postcss-value-parser: ^4.1.0 + peerDependencies: + postcss: ^8.1.0 + checksum: 2f8083687f3d6067885f8863dd32dbbb4f779cfcc7e52c17abede9311d84faf6d3ed8760e7c54c6380281732ae1f78e5e56a28baf3c271b33f450a11c9e30485 + languageName: node + linkType: hard + +"postcss-modules-scope@npm:^3.0.0": + version: 3.0.0 + resolution: "postcss-modules-scope@npm:3.0.0" + dependencies: + postcss-selector-parser: ^6.0.4 + peerDependencies: + postcss: ^8.1.0 + checksum: 330b9398dbd44c992c92b0dc612c0626135e2cc840fee41841eb61247a6cfed95af2bd6f67ead9dd9d0bb41f5b0367129d93c6e434fa3e9c58ade391d9a5a138 + languageName: node + linkType: hard + +"postcss-modules-values@npm:^4.0.0": + version: 4.0.0 + resolution: "postcss-modules-values@npm:4.0.0" + dependencies: + icss-utils: ^5.0.0 + peerDependencies: + postcss: ^8.1.0 + checksum: f7f2cdf14a575b60e919ad5ea52fed48da46fe80db2733318d71d523fc87db66c835814940d7d05b5746b0426e44661c707f09bdb83592c16aea06e859409db6 + languageName: node + linkType: hard + +"postcss-modules@npm:^6.0.0": + version: 6.0.0 + resolution: "postcss-modules@npm:6.0.0" + dependencies: + generic-names: ^4.0.0 + icss-utils: ^5.1.0 + lodash.camelcase: ^4.3.0 + postcss-modules-extract-imports: ^3.0.0 + postcss-modules-local-by-default: ^4.0.0 + postcss-modules-scope: ^3.0.0 + postcss-modules-values: ^4.0.0 + string-hash: ^1.1.1 + peerDependencies: + postcss: ^8.0.0 + checksum: 3bfcfabc0600f7c8fcb49873d67eb8c23c8d874b061dda840977cbe3de74d40be3be885f854594f51687d714d1aa57e83b46ac14ceb9b1b6e3a4d36f2596e2bb + languageName: node + linkType: hard + +"postcss-selector-parser@npm:^6.0.10, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.0.9": + version: 6.0.13 + resolution: "postcss-selector-parser@npm:6.0.13" dependencies: cssesc: ^3.0.0 util-deprecate: ^1.0.2 - checksum: 46afaa60e3d1998bd7adf6caa374baf857cc58d3ff944e29459c9a9e4680a7fe41597bd5b755fc81d7c388357e9bf67c0251d047c640a09f148e13606b8a8608 + checksum: f89163338a1ce3b8ece8e9055cd5a3165e79a15e1c408e18de5ad8f87796b61ec2d48a2902d179ae0c4b5de10fccd3a325a4e660596549b040bc5ad1b465f096 languageName: node linkType: hard -"postcss-value-parser@npm:^4.0.2, postcss-value-parser@npm:^4.2.0": +"postcss-value-parser@npm:^4.0.2, postcss-value-parser@npm:^4.1.0, postcss-value-parser@npm:^4.2.0": version: 4.2.0 resolution: "postcss-value-parser@npm:4.2.0" checksum: 819ffab0c9d51cf0acbabf8996dffbfafbafa57afc0e4c98db88b67f2094cb44488758f06e5da95d7036f19556a4a732525e84289a425f4f6fd8e412a9d7442f @@ -16325,14 +20835,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.3.7, postcss@npm:^8.4.14, postcss@npm:^8.4.16": - version: 8.4.17 - resolution: "postcss@npm:8.4.17" +"postcss@npm:^8.2.14, postcss@npm:^8.4.14, postcss@npm:^8.4.19, postcss@npm:^8.4.21, postcss@npm:^8.4.23": + version: 8.4.23 + resolution: "postcss@npm:8.4.23" dependencies: - nanoid: ^3.3.4 + nanoid: ^3.3.6 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: a6d9096dd711e17f7b1d18ff5dcb4fdedf3941d5a3dc8b0e4ea873b8f31972d57f73d6da9a8aed7ff389eb52190ed34f6a94f299a7f5ddc68b08a24a48f77eb9 + checksum: 8bb9d1b2ea6e694f8987d4f18c94617971b2b8d141602725fedcc2222fdc413b776a6e1b969a25d627d7b2681ca5aabb56f59e727ef94072e1b6ac8412105a2f languageName: node linkType: hard @@ -16358,18 +20868,6 @@ __metadata: languageName: node linkType: hard -"preferred-pm@npm:^3.0.3": - version: 3.0.3 - resolution: "preferred-pm@npm:3.0.3" - dependencies: - find-up: ^5.0.0 - find-yarn-workspace-root2: 1.2.16 - path-exists: ^4.0.0 - which-pm: 2.0.0 - checksum: 0de0948cb6ae22213f2ad7868032d89f1e1443d9caabc22ceeb9d284f19d359d65b67fab178f4db5c8c6ca6ae34642bdc72730b70ab1899ea158e2677a88a6d0 - languageName: node - linkType: hard - "prefix-style@npm:2.0.1": version: 2.0.1 resolution: "prefix-style@npm:2.0.1" @@ -16384,47 +20882,14 @@ __metadata: languageName: node linkType: hard -"prepend-http@npm:^2.0.0": - version: 2.0.0 - resolution: "prepend-http@npm:2.0.0" - checksum: 7694a9525405447662c1ffd352fcb41b6410c705b739b6f4e3a3e21cf5fdede8377890088e8934436b8b17ba55365a615f153960f30877bf0d0392f9e93503ea - languageName: node - linkType: hard - -"prettier-plugin-astro@npm:^0.5.3": - version: 0.5.5 - resolution: "prettier-plugin-astro@npm:0.5.5" - dependencies: - "@astrojs/compiler": ^0.23.4 - prettier: ^2.7.1 - sass-formatter: ^0.7.5 - synckit: ^0.7.0 - checksum: b0e527645158c97c2726aaf532e920ff4a1b98fe9cd594612e2c9c399f64eaa395255ec4371b2d0a527e5dc80af93b214adbcfe2a306e622878c35e128b6a761 - languageName: node - linkType: hard - -"prettier-plugin-astro@npm:^0.6.0": - version: 0.6.0 - resolution: "prettier-plugin-astro@npm:0.6.0" - dependencies: - "@astrojs/compiler": 0.27.2 - prettier: ^2.7.1 - sass-formatter: ^0.7.5 - synckit: ^0.8.4 - checksum: a2632b625e7fa048f6ddb522e0f2a20ad20b9215c83286b9450ee94271fd628747ea0ffd812dd626102a7d80599a549d2f18447ef481bf64140c93e9e649ca7c - languageName: node - linkType: hard - -"prettier-plugin-tailwindcss@npm:^0.1.13": - version: 0.1.13 - resolution: "prettier-plugin-tailwindcss@npm:0.1.13" - peerDependencies: - prettier: ">=2.2.0" - checksum: 1b9000686e661be81de7d36d514c5ee34a98b11639b538bce8dd3a482c073c0148feb9d54b526babaede681d1c5ecb318ad97f38e8d71dd5cc26c33dfcaf8344 +"prelude-ls@npm:~1.1.2": + version: 1.1.2 + resolution: "prelude-ls@npm:1.1.2" + checksum: c4867c87488e4a0c233e158e4d0d5565b609b105d75e4c05dc760840475f06b731332eb93cc8c9cecb840aa8ec323ca3c9a56ad7820ad2e63f0261dadcb154e4 languageName: node linkType: hard -"prettier@npm:^2.7.1": +"prettier@npm:2.7.1": version: 2.7.1 resolution: "prettier@npm:2.7.1" bin: @@ -16433,14 +20898,23 @@ __metadata: languageName: node linkType: hard -"pretty-bytes@npm:5.6.0, pretty-bytes@npm:^5.3.0": +"prettier@npm:^2.8.0, prettier@npm:^2.8.8": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" + bin: + prettier: bin-prettier.js + checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 + languageName: node + linkType: hard + +"pretty-bytes@npm:5.6.0, pretty-bytes@npm:^5.1.0": version: 5.6.0 resolution: "pretty-bytes@npm:5.6.0" checksum: 9c082500d1e93434b5b291bd651662936b8bd6204ec9fa17d563116a192d6d86b98f6d328526b4e8d783c07d5499e2614a807520249692da9ec81564b2f439cd languageName: node linkType: hard -"pretty-format@npm:^27.0.2": +"pretty-format@npm:^27.0.2, pretty-format@npm:^27.5.1": version: 27.5.1 resolution: "pretty-format@npm:27.5.1" dependencies: @@ -16463,29 +20937,25 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.1.2": - version: 29.1.2 - resolution: "pretty-format@npm:29.1.2" +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.5.0": + version: 29.5.0 + resolution: "pretty-format@npm:29.5.0" dependencies: - "@jest/schemas": ^29.0.0 + "@jest/schemas": ^29.4.3 ansi-styles: ^5.0.0 react-is: ^18.0.0 - checksum: b2c6e77666716e55094f29dcbd92e431a1b8cc0a06cd41ec1a3c8a10e5e56bb1f2d7b5942f1d8f6a0f69912712f3edb4c41713926d60cbb89f2a41355d49e7a4 + checksum: 4065356b558e6db25b4d41a01efb386935a6c06a0c9c104ef5ce59f2f476b8210edb8b3949b386e60ada0a6dc5ebcb2e6ccddc8c64dfd1a9943c3c3a9e7eaf89 languageName: node linkType: hard -"pretty-format@npm:^29.2.1": - version: 29.2.1 - resolution: "pretty-format@npm:29.2.1" - dependencies: - "@jest/schemas": ^29.0.0 - ansi-styles: ^5.0.0 - react-is: ^18.0.0 - checksum: d192cbd3dee72e9b60764629d1f098d60fddc3fc9435f44774a01dd1c5794f36a81fa6a7377a527f994317950d8fc6c5bf9c9915387c5d32f107525996e32a1c +"pretty-hrtime@npm:^1.0.3": + version: 1.0.3 + resolution: "pretty-hrtime@npm:1.0.3" + checksum: bae0e6832fe13c3de43d1a3d43df52bf6090499d74dc65a17f5552cb1a94f1f8019a23284ddf988c3c408a09678d743901e1d8f5b7a71bec31eeeac445bef371 languageName: node linkType: hard -"pretty-ms@npm:7.0.1": +"pretty-ms@npm:7.0.1, pretty-ms@npm:^7.0.1": version: 7.0.1 resolution: "pretty-ms@npm:7.0.1" dependencies: @@ -16494,11 +20964,11 @@ __metadata: languageName: node linkType: hard -"prism-media@npm:^1.3.4": - version: 1.3.4 - resolution: "prism-media@npm:1.3.4" +"prism-media@npm:^1.3.5": + version: 1.3.5 + resolution: "prism-media@npm:1.3.5" peerDependencies: - "@discordjs/opus": ^0.8.0 + "@discordjs/opus": ">=0.8.0 <1.0.0" ffmpeg-static: ^5.0.2 || ^4.2.7 || ^3.0.0 || ^2.4.0 node-opus: ^0.3.3 opusscript: ^0.0.8 @@ -16511,44 +20981,44 @@ __metadata: optional: true opusscript: optional: true - checksum: 703be28c87b4694714a52a0ea84516b19d2e62e510d0f204efc074b044ad93dde00241d4b4741c25aa2e27a00e3b472e60ad0f6c94e88710f0827dc63889373a + checksum: a4fbe5c91f2aa5aca6e0d7fb72c37627db814f59b2ffd702aced11d4cc6f6f15022a5830df48fc008e805f2d1fe79305e5d1b091307981a0083edf7223418679 languageName: node linkType: hard -"prism-react-renderer@npm:^1.3.5": - version: 1.3.5 - resolution: "prism-react-renderer@npm:1.3.5" - peerDependencies: - react: ">=0.14.9" - checksum: c18806dcbc4c0b4fd6fd15bd06b4f7c0a6da98d93af235c3e970854994eb9b59e23315abb6cfc29e69da26d36709a47e25da85ab27fed81b6812f0a52caf6dfa +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 languageName: node linkType: hard -"prismjs@npm:^1.27.0, prismjs@npm:^1.28.0": - version: 1.29.0 - resolution: "prismjs@npm:1.29.0" - checksum: 007a8869d4456ff8049dc59404e32d5666a07d99c3b0e30a18bd3b7676dfa07d1daae9d0f407f20983865fd8da56de91d09cb08e6aa61f5bc420a27c0beeaf93 +"process-nextick-args@npm:~2.0.0": + version: 2.0.1 + resolution: "process-nextick-args@npm:2.0.1" + checksum: 1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf languageName: node linkType: hard -"prismjs@npm:~1.27.0": - version: 1.27.0 - resolution: "prismjs@npm:1.27.0" - checksum: 85c7f4a3e999073502cc9e1882af01e3709706369ec254b60bff1149eda701f40d02512acab956012dc7e61cfd61743a3a34c1bd0737e8dbacd79141e5698bbc +"process@npm:^0.11.10": + version: 0.11.10 + resolution: "process@npm:0.11.10" + checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 languageName: node linkType: hard -"proc-log@npm:^2.0.0, proc-log@npm:^2.0.1": - version: 2.0.1 - resolution: "proc-log@npm:2.0.1" - checksum: f6f23564ff759097db37443e6e2765af84979a703d2c52c1b9df506ee9f87caa101ba49d8fdc115c1a313ec78e37e8134704e9069e6a870f3499d98bb24c436f +"progress@npm:2.0.3, progress@npm:^2.0.1": + version: 2.0.3 + resolution: "progress@npm:2.0.3" + checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 languageName: node linkType: hard -"process-nextick-args@npm:~2.0.0": - version: 2.0.1 - resolution: "process-nextick-args@npm:2.0.1" - checksum: 1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf +"promise-deferred@npm:^2.0.3": + version: 2.0.3 + resolution: "promise-deferred@npm:2.0.3" + dependencies: + promise: ^7.3.1 + checksum: 2e640ddd1e21da2543d66e589d6fa970eca8fa3a1e88629db3cd095cb77427536cdc426646bd092f6db05ff5e28e29f0ad87fb4e44d7529af9914e8e4b9e9899 languageName: node linkType: hard @@ -16569,16 +21039,26 @@ __metadata: languageName: node linkType: hard -"promise@npm:^8.0.0": - version: 8.2.0 - resolution: "promise@npm:8.2.0" +"promise@npm:^7.3.1": + version: 7.3.1 + resolution: "promise@npm:7.3.1" + dependencies: + asap: ~2.0.3 + checksum: 475bb069130179fbd27ed2ab45f26d8862376a137a57314cf53310bdd85cc986a826fd585829be97ebc0aaf10e9d8e68be1bfe5a4a0364144b1f9eedfa940cf1 + languageName: node + linkType: hard + +"promiseback@npm:^2.0.2": + version: 2.0.3 + resolution: "promiseback@npm:2.0.3" dependencies: - asap: ~2.0.6 - checksum: 45d65ffe4fbd9172ef848f790ac1366822e63f063a5ef42a14e75b577ffa3c37870a9d8472729d9d429d7c8a770428f9d13650b52aafaa361dcc69cf84873b20 + is-callable: ^1.1.5 + promise-deferred: ^2.0.3 + checksum: c4d75176df643be766cd11fca2df38fac83e62a1c5a9e3d5c89acb4d32080ce7f14c74b6794e8ea1d15687edb88df60404882105a47e27aecfa7e45800f68464 languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.4.2, prompts@npm:~2.4.2": +"prompts@npm:^2.0.1, prompts@npm:^2.4.0, prompts@npm:~2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -16588,7 +21068,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.5.10, prop-types@npm:^15.8.1": +"prop-types@npm:^15.5.10, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -16599,19 +21079,54 @@ __metadata: languageName: node linkType: hard -"property-information@npm:^5.0.0": - version: 5.6.0 - resolution: "property-information@npm:5.6.0" - dependencies: - xtend: ^4.0.0 - checksum: fcf87c6542e59a8bbe31ca0b3255a4a63ac1059b01b04469680288998bcfa97f341ca989566adbb63975f4d85339030b82320c324a511532d390910d1c583893 +"property-information@npm:^6.0.0": + version: 6.2.0 + resolution: "property-information@npm:6.2.0" + checksum: 23afce07ba821cbe7d926e63cdd680991961c82be4bbb6c0b17c47f48894359c1be6e51cd74485fc10a9d3fd361b475388e1e39311ed2b53127718f72aab1955 + languageName: node + linkType: hard + +"protobufjs@npm:^6.11.3": + version: 6.11.3 + resolution: "protobufjs@npm:6.11.3" + dependencies: + "@protobufjs/aspromise": ^1.1.2 + "@protobufjs/base64": ^1.1.2 + "@protobufjs/codegen": ^2.0.4 + "@protobufjs/eventemitter": ^1.1.0 + "@protobufjs/fetch": ^1.1.0 + "@protobufjs/float": ^1.0.2 + "@protobufjs/inquire": ^1.1.0 + "@protobufjs/path": ^1.1.2 + "@protobufjs/pool": ^1.1.0 + "@protobufjs/utf8": ^1.1.0 + "@types/long": ^4.0.1 + "@types/node": ">=13.7.0" + long: ^4.0.0 + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: 4a6ce1964167e4c45c53fd8a312d7646415c777dd31b4ba346719947b88e61654912326101f927da387d6b6473ab52a7ea4f54d6f15d63b31130ce28e2e15070 languageName: node linkType: hard -"property-information@npm:^6.0.0": - version: 6.1.1 - resolution: "property-information@npm:6.1.1" - checksum: 654b1e5c3578e1d522bd22b7cf48881f5054789969ddbefea22e5359805fda5dbf0c5ef76bb26516da26fedac8752587ddc4c8f3b9e16bc0c6e7feb8b6086864 +"protobufjs@npm:^7.0.0": + version: 7.2.3 + resolution: "protobufjs@npm:7.2.3" + dependencies: + "@protobufjs/aspromise": ^1.1.2 + "@protobufjs/base64": ^1.1.2 + "@protobufjs/codegen": ^2.0.4 + "@protobufjs/eventemitter": ^1.1.0 + "@protobufjs/fetch": ^1.1.0 + "@protobufjs/float": ^1.0.2 + "@protobufjs/inquire": ^1.1.0 + "@protobufjs/path": ^1.1.2 + "@protobufjs/pool": ^1.1.0 + "@protobufjs/utf8": ^1.1.0 + "@types/node": ">=13.7.0" + long: ^5.0.0 + checksum: 9afa6de5fced0139a5180c063718508fac3ea734a9f1aceb99712367b15473a83327f91193f16b63540f9112b09a40912f5f0441a9b0d3f3c6a1c7f707d78249 languageName: node linkType: hard @@ -16625,10 +21140,33 @@ __metadata: languageName: node linkType: hard -"pseudomap@npm:^1.0.2": - version: 1.0.2 - resolution: "pseudomap@npm:1.0.2" - checksum: 856c0aae0ff2ad60881168334448e898ad7a0e45fe7386d114b150084254c01e200c957cf378378025df4e052c7890c5bd933939b0e0d2ecfcc1dc2f0b2991f5 +"proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "proxy-agent@npm:5.0.0" + dependencies: + agent-base: ^6.0.0 + debug: 4 + http-proxy-agent: ^4.0.0 + https-proxy-agent: ^5.0.0 + lru-cache: ^5.1.1 + pac-proxy-agent: ^5.0.0 + proxy-from-env: ^1.0.0 + socks-proxy-agent: ^5.0.0 + checksum: 3b0bb73a4d3a07711d3cad72b2fa4320880f7a6ec1959cdcc186ac6ffb173db8137d7c4046c27fdfa6e2207b2eb75e802f3d5e14c766700586ec4d47299a5124 + languageName: node + linkType: hard + +"proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.0.0": + version: 1.1.0 + resolution: "proxy-from-env@npm:1.1.0" + checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 + languageName: node + linkType: hard + +"ps-list@npm:^8.0.0": + version: 8.1.1 + resolution: "ps-list@npm:8.1.1" + checksum: 102396b4db030936d7ea7c811b6b1d0322142a271b374444d9b8600268b1b1a67249d2cadd5605f491129a2b44cd4f83e21d1dfbf72ac5e85104eaf07f77c0ba languageName: node linkType: hard @@ -16639,6 +21177,16 @@ __metadata: languageName: node linkType: hard +"pump@npm:^2.0.0": + version: 2.0.1 + resolution: "pump@npm:2.0.1" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: e9f26a17be00810bff37ad0171edb35f58b242487b0444f92fb7d78bc7d61442fa9b9c5bd93a43fd8fd8ddd3cc75f1221f5e04c790f42907e5baab7cf5e2b931 + languageName: node + linkType: hard + "pump@npm:^3.0.0": version: 3.0.0 resolution: "pump@npm:3.0.0" @@ -16649,19 +21197,65 @@ __metadata: languageName: node linkType: hard +"pumpify@npm:^1.3.3": + version: 1.5.1 + resolution: "pumpify@npm:1.5.1" + dependencies: + duplexify: ^3.6.0 + inherits: ^2.0.3 + pump: ^2.0.0 + checksum: 26ca412ec8d665bd0d5e185c1b8f627728eff603440d75d22a58e421e3c66eaf86ec6fc6a6efc54808ecef65979279fa8e99b109a23ec1fa8d79f37e6978c9bd + languageName: node + linkType: hard + "punycode@npm:^2.1.0, punycode@npm:^2.1.1": - version: 2.1.1 - resolution: "punycode@npm:2.1.1" - checksum: 823bf443c6dd14f669984dea25757b37993f67e8d94698996064035edd43bed8a5a17a9f12e439c2b35df1078c6bec05a6c86e336209eb1061e8025c481168e8 + version: 2.3.0 + resolution: "punycode@npm:2.3.0" + checksum: 39f760e09a2a3bbfe8f5287cf733ecdad69d6af2fe6f97ca95f24b8921858b91e9ea3c9eeec6e08cede96181b3bb33f95c6ffd8c77e63986508aa2e8159fa200 languageName: node linkType: hard -"pupa@npm:^2.1.1": +"puppeteer-core@npm:^2.1.1": version: 2.1.1 - resolution: "pupa@npm:2.1.1" + resolution: "puppeteer-core@npm:2.1.1" dependencies: - escape-goat: ^2.0.0 - checksum: 49529e50372ffdb0cccf0efa0f3b3cb0a2c77805d0d9cc2725bd2a0f6bb414631e61c93a38561b26be1259550b7bb6c2cb92315aa09c8bf93f3bdcb49f2b2fb7 + "@types/mime-types": ^2.1.0 + debug: ^4.1.0 + extract-zip: ^1.6.6 + https-proxy-agent: ^4.0.0 + mime: ^2.0.3 + mime-types: ^2.1.25 + progress: ^2.0.1 + proxy-from-env: ^1.0.0 + rimraf: ^2.6.1 + ws: ^6.1.0 + checksum: 2ddb597ef1b2d162b4aa49833b977734129edf7c8fa558fc38c59d273e79aa1bd079481c642de87f7163665f7f37aa52683da2716bafb7d3cab68c262c36ec28 + languageName: node + linkType: hard + +"puppeteer-core@npm:^20.1.0": + version: 20.3.0 + resolution: "puppeteer-core@npm:20.3.0" + dependencies: + "@puppeteer/browsers": 1.3.0 + chromium-bidi: 0.4.9 + cross-fetch: 3.1.6 + debug: 4.3.4 + devtools-protocol: 0.0.1120988 + ws: 8.13.0 + peerDependencies: + typescript: ">= 4.7.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: df0b0e249c100d7985b23bca56df6f50e970540f61e6bd80341aff88a9097230185d349a37375954db0de8149d6c64f21823841df6a773ccd18dca7b9a81f938 + languageName: node + linkType: hard + +"pure-rand@npm:^6.0.0": + version: 6.0.2 + resolution: "pure-rand@npm:6.0.2" + checksum: 79de33876a4f515d759c48e98d00756bbd916b4ea260cc572d7adfa4b62cace9952e89f0241d0410214554503d25061140fe325c66f845213d2b1728ba8d413e languageName: node linkType: hard @@ -16672,7 +21266,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.11.0, qs@npm:^6.10.3, qs@npm:^6.4.0": +"qs@npm:6.11.0": version: 6.11.0 resolution: "qs@npm:6.11.0" dependencies: @@ -16681,10 +21275,12 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.9.3": - version: 6.9.3 - resolution: "qs@npm:6.9.3" - checksum: 89cd1b5e521c19a7e0a7a056ddc261c5c30889664608cf9ce6085f9f25606fc48568cf6a6249e641b4b5c04dac7889e3b82133142523abf397228eb4f488fc38 +"qs@npm:^6.10.0, qs@npm:^6.11.0": + version: 6.11.2 + resolution: "qs@npm:6.11.2" + dependencies: + side-channel: ^1.0.4 + checksum: e812f3c590b2262548647d62f1637b6989cc56656dc960b893fe2098d96e1bd633f36576f4cd7564dfbff9db42e17775884db96d846bebe4f37420d073ecdc0b languageName: node linkType: hard @@ -16695,18 +21291,6 @@ __metadata: languageName: node linkType: hard -"query-string@npm:^7.1.1": - version: 7.1.1 - resolution: "query-string@npm:7.1.1" - dependencies: - decode-uri-component: ^0.2.0 - filter-obj: ^1.1.0 - split-on-first: ^1.0.0 - strict-uri-encode: ^2.0.0 - checksum: b227d1f588ae93f9f0ad078c6b811295fa151dc5a160a03bb2bac5fa0e6919cb1daa570aad1d288e77c8e89fde5362ba505b1014e6e793da9b1e885b59a690a6 - languageName: node - linkType: hard - "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -16714,15 +21298,6 @@ __metadata: languageName: node linkType: hard -"queue@npm:6.0.2": - version: 6.0.2 - resolution: "queue@npm:6.0.2" - dependencies: - inherits: ~2.0.3 - checksum: ebc23639248e4fe40a789f713c20548e513e053b3dc4924b6cb0ad741e3f264dcff948225c8737834dd4f9ec286dbc06a1a7c13858ea382d9379f4303bcc0916 - languageName: node - linkType: hard - "quick-lru@npm:^4.0.1": version: 4.0.1 resolution: "quick-lru@npm:4.0.1" @@ -16730,6 +21305,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed + languageName: node + linkType: hard + "raf@npm:^3.1.0": version: 3.4.1 resolution: "raf@npm:3.4.1" @@ -16739,6 +21321,13 @@ __metadata: languageName: node linkType: hard +"ramda@npm:0.29.0": + version: 0.29.0 + resolution: "ramda@npm:0.29.0" + checksum: 9ab26c06eb7545cbb7eebcf75526d6ee2fcaae19e338f165b2bf32772121e7b28192d6664d1ba222ff76188ba26ab307342d66e805dbb02c860560adc4d5dd57 + languageName: node + linkType: hard + "range-parser@npm:~1.2.1": version: 1.2.1 resolution: "range-parser@npm:1.2.1" @@ -16758,7 +21347,19 @@ __metadata: languageName: node linkType: hard -"rc@npm:1.2.8, rc@npm:^1.2.7, rc@npm:^1.2.8": +"raw-body@npm:^2.2.0": + version: 2.5.2 + resolution: "raw-body@npm:2.5.2" + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + checksum: ba1583c8d8a48e8fbb7a873fdbb2df66ea4ff83775421bfe21ee120140949ab048200668c47d9ae3880012f6e217052690628cf679ddfbd82c9fc9358d574676 + languageName: node + linkType: hard + +"rc@npm:^1.2.7": version: 1.2.8 resolution: "rc@npm:1.2.8" dependencies: @@ -16772,6 +21373,16 @@ __metadata: languageName: node linkType: hard +"react-colorful@npm:^5.1.2": + version: 5.6.1 + resolution: "react-colorful@npm:5.6.1" + peerDependencies: + react: ">=16.8.0" + react-dom: ">=16.8.0" + checksum: e432b7cb0df57e8f0bcdc3b012d2e93fcbcb6092c9e0f85654788d5ebfc4442536d8cc35b2418061ba3c4afb8b7788cc101c606d86a1732407921de7a9244c8d + languageName: node + linkType: hard + "react-custom-scrollbars-2@npm:^4.5.0": version: 4.5.0 resolution: "react-custom-scrollbars-2@npm:4.5.0" @@ -16786,16 +21397,32 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:^17.0.2": - version: 17.0.2 - resolution: "react-dom@npm:17.0.2" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - scheduler: ^0.20.2 +"react-docgen-typescript@npm:^2.2.2": + version: 2.2.2 + resolution: "react-docgen-typescript@npm:2.2.2" peerDependencies: - react: 17.0.2 - checksum: 1c1eaa3bca7c7228d24b70932e3d7c99e70d1d04e13bb0843bbf321582bc25d7961d6b8a6978a58a598af2af496d1cedcfb1bf65f6b0960a0a8161cb8dab743c + typescript: ">= 4.3.x" + checksum: a9826459ea44e818f21402728dd47f5cae60bd936574cefd4f90ad101ff3eebacd67b6e017b793309734ce62c037aa3072dbc855d2b0e29bad1a38cbf5bac115 + languageName: node + linkType: hard + +"react-docgen@npm:6.0.0-alpha.3": + version: 6.0.0-alpha.3 + resolution: "react-docgen@npm:6.0.0-alpha.3" + dependencies: + "@babel/core": ^7.7.5 + "@babel/generator": ^7.12.11 + ast-types: ^0.14.2 + commander: ^2.19.0 + doctrine: ^3.0.0 + estree-to-babel: ^3.1.0 + neo-async: ^2.6.1 + node-dir: ^0.1.10 + resolve: ^1.17.0 + strip-indent: ^3.0.0 + bin: + react-docgen: bin/react-docgen.js + checksum: db4c300910e2ef7b854ccf4f454bd701875b787d0bc0f444f89415223e7c288a5808d6cd0f7ef6346332c9de2d068d648bc801d16b6b07a1699c3e10670c4801 languageName: node linkType: hard @@ -16811,27 +21438,21 @@ __metadata: languageName: node linkType: hard -"react-frame-component@npm:^5.2.3": - version: 5.2.3 - resolution: "react-frame-component@npm:5.2.3" - peerDependencies: - prop-types: ^15.5.9 - react: ">= 16.3" - react-dom: ">= 16.3" - checksum: 1843c48dce41a0af03590dd7351baaf8a68ecac4e850d9819d093517a34d1097668c2b2cd809a8f5cd70791c011c6f2dcaf90d43b6e773b33c212f1f4cf17f55 - languageName: node - linkType: hard - -"react-icons@npm:^4.6.0": - version: 4.6.0 - resolution: "react-icons@npm:4.6.0" +"react-element-to-jsx-string@npm:^15.0.0": + version: 15.0.0 + resolution: "react-element-to-jsx-string@npm:15.0.0" + dependencies: + "@base2/pretty-print-object": 1.0.1 + is-plain-object: 5.0.0 + react-is: 18.1.0 peerDependencies: - react: "*" - checksum: a08375d4563e381e156d826a8d551dd26c1bf7c424a79139173bf4c8df71e884badd7d4f5fe9faa0d73d18ace265bcc89891b65fd8f808812b1011b612ebbc53 + react: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0 + react-dom: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0 + checksum: c3907cc4c1d3e9ecc8ca7727058ebcba6ec89848d9e07bfd2c77ee8f28f1ad99bf55e38359dec8a1125de83d41ac09a2874f53c41415edc86ffa9840fa1b7856 languageName: node linkType: hard -"react-inspector@npm:^6.0.1": +"react-inspector@npm:^6.0.0": version: 6.0.1 resolution: "react-inspector@npm:6.0.1" peerDependencies: @@ -16840,6 +21461,13 @@ __metadata: languageName: node linkType: hard +"react-is@npm:18.1.0": + version: 18.1.0 + resolution: "react-is@npm:18.1.0" + checksum: d206a0fe6790851bff168727bfb896de02c5591695afb0c441163e8630136a3e13ee1a7ddd59fdccddcc93968b4721ae112c10f790b194b03b35a3dc13a355ef + languageName: node + linkType: hard + "react-is@npm:^16.13.1": version: 16.13.1 resolution: "react-is@npm:16.13.1" @@ -16869,8 +21497,8 @@ __metadata: linkType: hard "react-remove-scroll-bar@npm:^2.3.3": - version: 2.3.3 - resolution: "react-remove-scroll-bar@npm:2.3.3" + version: 2.3.4 + resolution: "react-remove-scroll-bar@npm:2.3.4" dependencies: react-style-singleton: ^2.2.1 tslib: ^2.0.0 @@ -16880,7 +21508,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: fc8c70014a473b12d4205071ad79bd3cfc6ded173c6589fe6baca01090729757f1ee9966278f16930f3b58029c6923e06d2e3193dcb878ecdcb4eb293b7b9bf4 + checksum: b5ce5f2f98d65c97a3e975823ae4043a4ba2a3b63b5ba284b887e7853f051b5cd6afb74abde6d57b421931c52f2e1fdbb625dc858b1cb5a32c27c14ab85649d4 languageName: node linkType: hard @@ -16920,21 +21548,6 @@ __metadata: languageName: node linkType: hard -"react-syntax-highlighter@npm:^15.5.0": - version: 15.5.0 - resolution: "react-syntax-highlighter@npm:15.5.0" - dependencies: - "@babel/runtime": ^7.3.1 - highlight.js: ^10.4.1 - lowlight: ^1.17.0 - prismjs: ^1.27.0 - refractor: ^3.6.0 - peerDependencies: - react: ">= 0.14.0" - checksum: c082b48f30f8ba8d0c55ed1d761910630860077c7ff5793c4c912adcb5760df06436ed0ad62be0de28113aac9ad2af55eccd995f8eee98df53382e4ced2072fb - languageName: node - linkType: hard - "react-universal-interface@npm:^0.6.2": version: 0.6.2 resolution: "react-universal-interface@npm:0.6.2" @@ -16970,16 +21583,6 @@ __metadata: languageName: node linkType: hard -"react@npm:^17.0.2": - version: 17.0.2 - resolution: "react@npm:17.0.2" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - checksum: b254cc17ce3011788330f7bbf383ab653c6848902d7936a87b09d835d091e3f295f7e9dd1597c6daac5dc80f90e778c8230218ba8ad599f74adcc11e33b9d61b - languageName: node - linkType: hard - "react@npm:^18.2.0": version: 18.2.0 resolution: "react@npm:18.2.0" @@ -16989,6 +21592,16 @@ __metadata: languageName: node linkType: hard +"read-package-json-fast@npm:^3.0.0, read-package-json-fast@npm:^3.0.2": + version: 3.0.2 + resolution: "read-package-json-fast@npm:3.0.2" + dependencies: + json-parse-even-better-errors: ^3.0.0 + npm-normalize-package-bin: ^3.0.0 + checksum: 8d406869f045f1d76e2a99865a8fd1c1af9c1dc06200b94d2b07eef87ed734b22703a8d72e1cd36ea36cc48e22020bdd187f88243c7dd0563f72114d38c17072 + languageName: node + linkType: hard + "read-pkg-up@npm:^3.0.0": version: 3.0.0 resolution: "read-pkg-up@npm:3.0.0" @@ -17010,6 +21623,17 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^8.0.0": + version: 8.0.0 + resolution: "read-pkg-up@npm:8.0.0" + dependencies: + find-up: ^5.0.0 + read-pkg: ^6.0.0 + type-fest: ^1.0.1 + checksum: fe4c80401656b40b408884457fffb5a8015c03b1018cfd8e48f8d82a5e9023e24963603aeb2755608d964593e046c15b34d29b07d35af9c7aa478be81805209c + languageName: node + linkType: hard + "read-pkg@npm:^3.0.0": version: 3.0.0 resolution: "read-pkg@npm:3.0.0" @@ -17033,20 +21657,44 @@ __metadata: languageName: node linkType: hard +"read-pkg@npm:^6.0.0": + version: 6.0.0 + resolution: "read-pkg@npm:6.0.0" + dependencies: + "@types/normalize-package-data": ^2.4.0 + normalize-package-data: ^3.0.2 + parse-json: ^5.2.0 + type-fest: ^1.0.1 + checksum: 0cebdff381128e923815c643074a87011070e5fc352bee575d327d6485da3317fab6d802a7b03deeb0be7be8d3ad1640397b3d5d2f044452caf4e8d1736bf94f + languageName: node + linkType: hard + +"readable-stream@npm:1.1.x": + version: 1.1.14 + resolution: "readable-stream@npm:1.1.14" + dependencies: + core-util-is: ~1.0.0 + inherits: ~2.0.1 + isarray: 0.0.1 + string_decoder: ~0.10.x + checksum: 17dfeae3e909945a4a1abc5613ea92d03269ef54c49288599507fc98ff4615988a1c39a999dcf9aacba70233d9b7040bc11a5f2bfc947e262dedcc0a8b32b5a0 + languageName: node + linkType: hard + "readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.0.2, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": - version: 3.6.0 - resolution: "readable-stream@npm:3.6.0" + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" dependencies: inherits: ^2.0.3 string_decoder: ^1.1.1 util-deprecate: ^1.0.1 - checksum: d4ea81502d3799439bb955a3a5d1d808592cf3133350ed352aeaa499647858b27b1c4013984900238b0873ec8d0d8defce72469fb7a83e61d53f5ad61cb80dc8 + checksum: bdcbe6c22e846b6af075e32cf8f4751c2576238c5043169a1c221c92ee2878458a816a4ea33f4c67623c0b6827c8a400409bfb3cf0bf3381392d0b1dfb52ac8d languageName: node linkType: hard -"readable-stream@npm:^2.0.6, readable-stream@npm:^2.2.2, readable-stream@npm:~2.3.6": - version: 2.3.7 - resolution: "readable-stream@npm:2.3.7" +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.6, readable-stream@npm:^2.2.2, readable-stream@npm:~2.3.6": + version: 2.3.8 + resolution: "readable-stream@npm:2.3.8" dependencies: core-util-is: ~1.0.0 inherits: ~2.0.3 @@ -17055,7 +21703,7 @@ __metadata: safe-buffer: ~5.1.1 string_decoder: ~1.1.1 util-deprecate: ~1.0.1 - checksum: e4920cf7549a60f8aaf694d483a0e61b2a878b969d224f89b3bc788b8d920075132c4b55a7494ee944c7b6a9a0eada28a7f6220d80b0312ece70bbf08eeca755 + checksum: 65645467038704f0c8aaf026a72fbb588a9e2ef7a75cd57a01702ee9db1c4a1e4b03aaad36861a6a0926546a74d174149c8c207527963e0c2d3eee2f37678a42 languageName: node linkType: hard @@ -17077,27 +21725,37 @@ __metadata: languageName: node linkType: hard -"recast@npm:^0.20.5": - version: 0.20.5 - resolution: "recast@npm:0.20.5" +"recast@npm:^0.21.0, recast@npm:^0.21.5": + version: 0.21.5 + resolution: "recast@npm:0.21.5" dependencies: - ast-types: 0.14.2 + ast-types: 0.15.2 esprima: ~4.0.0 source-map: ~0.6.1 tslib: ^2.0.1 - checksum: 14c35115cd9965950724cb2968f069a247fa79ce890643ab6dc3795c705b363f7b92a45238e9f765387c306763be9955f72047bb9d15b5d60b0a55f9e7912d5a + checksum: 03cc7f57562238ba258d468be67bf7446ce7a707bc87a087891dad15afead46c36e9aaeedf2130e2ab5a465244a9c62bfd4127849761cf8f4085abe2f3e5f485 languageName: node linkType: hard -"recrawl-sync@npm:^2.0.3": - version: 2.2.2 - resolution: "recrawl-sync@npm:2.2.2" +"recast@npm:^0.23.1": + version: 0.23.2 + resolution: "recast@npm:0.23.2" dependencies: - "@cush/relative": ^1.0.0 - glob-regex: ^0.3.0 - slash: ^3.0.0 - tslib: ^1.9.3 - checksum: ee0a3fdbb6c4fa7124a93ef13b87f69f9a4e7bdd0be157ca98e1951ae8d1a7bbee2ebc25de6946b0b53426f804c712ff32f6c93b916b719e865c90233386a126 + assert: ^2.0.0 + ast-types: ^0.16.1 + esprima: ~4.0.0 + source-map: ~0.6.1 + tslib: ^2.0.1 + checksum: 04c2617cb04c4d02a5c9e1bb75b8e7afc21d1ba7babce25303732f035c3d4b2f945d727f34c3976223d800592ea31e6641cfd33700a8699c02025040174af0b6 + languageName: node + linkType: hard + +"rechoir@npm:^0.6.2": + version: 0.6.2 + resolution: "rechoir@npm:0.6.2" + dependencies: + resolve: ^1.1.6 + checksum: fe76bf9c21875ac16e235defedd7cbd34f333c02a92546142b7911a0f7c7059d2e16f441fe6fb9ae203f459c05a31b2bcf26202896d89e390eda7514d5d2702b languageName: node linkType: hard @@ -17111,6 +21769,16 @@ __metadata: languageName: node linkType: hard +"redent@npm:^4.0.0": + version: 4.0.0 + resolution: "redent@npm:4.0.0" + dependencies: + indent-string: ^5.0.0 + strip-indent: ^4.0.0 + checksum: 6944e7b1d8f3fd28c2515f5c605b9f7f0ea0f4edddf41890bbbdd4d9ee35abb7540c3b278f03ff827bd278bb6ff4a5bd8692ca406b748c5c1c3ce7355e9fbf8f + languageName: node + linkType: hard + "redis-errors@npm:^1.0.0, redis-errors@npm:^1.2.0": version: 1.2.0 resolution: "redis-errors@npm:1.2.0" @@ -17166,17 +21834,6 @@ __metadata: languageName: node linkType: hard -"refractor@npm:^3.6.0": - version: 3.6.0 - resolution: "refractor@npm:3.6.0" - dependencies: - hastscript: ^6.0.0 - parse-entities: ^2.0.0 - prismjs: ~1.27.0 - checksum: 39b01c4168c77c5c8486f9bf8907bbb05f257f15026057ba5728535815a2d90eed620468a4bfbb2b8ceefbb3ce3931a1be8b17152dbdbc8b0eef92450ff750a2 - languageName: node - linkType: hard - "regenerate-unicode-properties@npm:^10.1.0": version: 10.1.0 resolution: "regenerate-unicode-properties@npm:10.1.0" @@ -17193,85 +21850,78 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:^0.13.4": - version: 0.13.9 - resolution: "regenerator-runtime@npm:0.13.9" - checksum: 65ed455fe5afd799e2897baf691ca21c2772e1a969d19bb0c4695757c2d96249eb74ee3553ea34a91062b2a676beedf630b4c1551cc6299afb937be1426ec55e +"regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.4": + version: 0.13.11 + resolution: "regenerator-runtime@npm:0.13.11" + checksum: 27481628d22a1c4e3ff551096a683b424242a216fee44685467307f14d58020af1e19660bf2e26064de946bad7eff28950eae9f8209d55723e2d9351e632bbb4 languageName: node linkType: hard -"regenerator-transform@npm:^0.15.0": - version: 0.15.0 - resolution: "regenerator-transform@npm:0.15.0" +"regenerator-transform@npm:^0.15.1": + version: 0.15.1 + resolution: "regenerator-transform@npm:0.15.1" dependencies: "@babel/runtime": ^7.8.4 - checksum: 86e54849ab1167618d28bb56d214c52a983daf29b0d115c976d79840511420049b6b42c9ebdf187defa8e7129bdd74b6dd266420d0d3868c9fa7f793b5d15d49 + checksum: 2d15bdeadbbfb1d12c93f5775493d85874dbe1d405bec323da5c61ec6e701bc9eea36167483e1a5e752de9b2df59ab9a2dfff6bf3784f2b28af2279a673d29a4 + languageName: node + linkType: hard + +"regex-parser@npm:^2.2.11": + version: 2.2.11 + resolution: "regex-parser@npm:2.2.11" + checksum: 78200331ec0cc372302d287a4946c38681eb5fe435453fca572cb53cac0ba579e5eb3b9e25eac24c0c80a555fb3ea7a637814a35da1e9bc88e8819110ae5de24 languageName: node linkType: hard "regexp-tree@npm:^0.1.24, regexp-tree@npm:~0.1.1": - version: 0.1.24 - resolution: "regexp-tree@npm:0.1.24" + version: 0.1.27 + resolution: "regexp-tree@npm:0.1.27" bin: regexp-tree: bin/regexp-tree - checksum: 5807013289d9205288d665e0f8d8cff94843dfd55fdedd1833eb9d9bbd07188a37dfa02942ec5cdc671180037f715148fac1ba6f18fd6be4268e5a8feb49d340 + checksum: 129aebb34dae22d6694ab2ac328be3f99105143737528ab072ef624d599afecbcfae1f5c96a166fa9e5f64fa1ecf30b411c4691e7924c3e11bbaf1712c260c54 languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.4.1, regexp.prototype.flags@npm:^1.4.3": - version: 1.4.3 - resolution: "regexp.prototype.flags@npm:1.4.3" +"regexp.prototype.flags@npm:^1.4.3, regexp.prototype.flags@npm:^1.5.0": + version: 1.5.0 + resolution: "regexp.prototype.flags@npm:1.5.0" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - functions-have-names: ^1.2.2 - checksum: 51228bae732592adb3ededd5e15426be25f289e9c4ef15212f4da73f4ec3919b6140806374b8894036a86020d054a8d2657d3fee6bb9b4d35d8939c20030b7a6 + define-properties: ^1.2.0 + functions-have-names: ^1.2.3 + checksum: c541687cdbdfff1b9a07f6e44879f82c66bbf07665f9a7544c5fd16acdb3ec8d1436caab01662d2fbcad403f3499d49ab0b77fbc7ef29ef961d98cc4bc9755b4 languageName: node linkType: hard -"regexpp@npm:^3.0.0, regexpp@npm:^3.2.0": +"regexpp@npm:^3.0.0": version: 3.2.0 resolution: "regexpp@npm:3.2.0" checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8 languageName: node linkType: hard -"regexpu-core@npm:^5.1.0": - version: 5.2.1 - resolution: "regexpu-core@npm:5.2.1" +"regexpu-core@npm:^5.3.1": + version: 5.3.2 + resolution: "regexpu-core@npm:5.3.2" dependencies: + "@babel/regjsgen": ^0.8.0 regenerate: ^1.4.2 regenerate-unicode-properties: ^10.1.0 - regjsgen: ^0.7.1 regjsparser: ^0.9.1 unicode-match-property-ecmascript: ^2.0.0 - unicode-match-property-value-ecmascript: ^2.0.0 - checksum: c1244db79f7a4597414cd7fdf5171fa73905f0cbc684385c78127fc6198f9cade8fe829a1c4036c8ec57ac75b1ffb8c196451abdd2e153f26a4d8043fa10bbb3 - languageName: node - linkType: hard - -"registry-auth-token@npm:^4.0.0": - version: 4.2.2 - resolution: "registry-auth-token@npm:4.2.2" - dependencies: - rc: 1.2.8 - checksum: c5030198546ecfdcbcb0722cbc3e260c4f5f174d8d07bdfedd4620e79bfdf17a2db735aa230d600bd388fce6edd26c0a9ed2eb7e9b4641ec15213a28a806688b + unicode-match-property-value-ecmascript: ^2.1.0 + checksum: 95bb97088419f5396e07769b7de96f995f58137ad75fac5811fb5fe53737766dfff35d66a0ee66babb1eb55386ef981feaef392f9df6d671f3c124812ba24da2 languageName: node linkType: hard -"registry-url@npm:^5.0.0": - version: 5.1.0 - resolution: "registry-url@npm:5.1.0" +"regjsparser@npm:^0.10.0": + version: 0.10.0 + resolution: "regjsparser@npm:0.10.0" dependencies: - rc: ^1.2.8 - checksum: bcea86c84a0dbb66467b53187fadebfea79017cddfb4a45cf27530d7275e49082fe9f44301976eb0164c438e395684bcf3dae4819b36ff9d1640d8cc60c73df9 - languageName: node - linkType: hard - -"regjsgen@npm:^0.7.1": - version: 0.7.1 - resolution: "regjsgen@npm:0.7.1" - checksum: 7cac399921c58db8e16454869283ff66871531180218064fa938ac05c11c2976792a00706c3c78bbc625e1d793ca373065ea90564e06189a751a7b4ae33acadc + jsesc: ~0.5.0 + bin: + regjsparser: bin/parser + checksum: 17550661f43ba792f8365fb95b3dbdb64e25f14e31ef7c2c11876c240a60e87b7bfc28c98589f4e76b7cf49307e45fb24d030f57d68dd0cc41c56b4d378e9254 languageName: node linkType: hard @@ -17301,40 +21951,6 @@ __metadata: languageName: node linkType: hard -"rehype-ignore@npm:^1.0.1": - version: 1.0.1 - resolution: "rehype-ignore@npm:1.0.1" - dependencies: - hast-util-select: ~5.0.1 - unified: ~10.1.2 - unist-util-visit: ~4.1.0 - checksum: b7d48742c9f98ab25b4d3b8c329b0761767ed0678d756625315712879c7aae27120cdb34328b84329bebb79914cc4c7969e48deeaf6d0e001c7794e7f4e22ddd - languageName: node - linkType: hard - -"rehype-parse@npm:^8.0.0": - version: 8.0.4 - resolution: "rehype-parse@npm:8.0.4" - dependencies: - "@types/hast": ^2.0.0 - hast-util-from-parse5: ^7.0.0 - parse5: ^6.0.0 - unified: ^10.0.0 - checksum: e678a5f9fa7cb91d5957f5f38bc37bc9fb90b8011a1ed6a90541ba6fff9f243c752c88b7f422cba8f5ba83ccb22942b1825654e8c3040970c703b85a6037efdf - languageName: node - linkType: hard - -"rehype-pretty-code@npm:^0.4.0": - version: 0.4.0 - resolution: "rehype-pretty-code@npm:0.4.0" - dependencies: - parse-numeric-range: ^1.3.0 - peerDependencies: - shiki: "*" - checksum: 1d6f45b06cac20958a03d16c27b09ccd5b3f89fe4bc7047052ee9b3005e464ec69b3efafe8382f01b7e5d1e24f1262963ce1a7e26f00e770b49945b2c20a200e - languageName: node - linkType: hard - "rehype-raw@npm:^6.1.1": version: 6.1.1 resolution: "rehype-raw@npm:6.1.1" @@ -17346,22 +21962,22 @@ __metadata: languageName: node linkType: hard -"rehype-slug@npm:^5.0.1": - version: 5.0.1 - resolution: "rehype-slug@npm:5.0.1" +"rehype-slug@npm:^5.1.0": + version: 5.1.0 + resolution: "rehype-slug@npm:5.1.0" dependencies: "@types/hast": ^2.0.0 - github-slugger: ^1.1.1 + github-slugger: ^2.0.0 hast-util-has-property: ^2.0.0 hast-util-heading-rank: ^2.0.0 hast-util-to-string: ^2.0.0 unified: ^10.0.0 unist-util-visit: ^4.0.0 - checksum: 33e6e9419fc8ac54d5bdac736fe788e3b1ae71b10a8bf1ea4be4af17c504afda9ae0438ce827a13cde0fe334725e9624d9fbde2f5d9fc061378ec5f0bb4c247d + checksum: 2a7c17fd74d83040e2f2ed2085b0a3274c19feb2c29eba6553fe007ff887c31f21b8aa6e07eaf59f4de610a5293c6339c59fafa8e231c43949a2f136e6ab6187 languageName: node linkType: hard -"rehype-stringify@npm:^9.0.0, rehype-stringify@npm:^9.0.3": +"rehype-stringify@npm:^9.0.3": version: 9.0.3 resolution: "rehype-stringify@npm:9.0.3" dependencies: @@ -17372,26 +21988,20 @@ __metadata: languageName: node linkType: hard -"rehype@npm:^12.0.1": - version: 12.0.1 - resolution: "rehype@npm:12.0.1" +"remark-external-links@npm:^8.0.0": + version: 8.0.0 + resolution: "remark-external-links@npm:8.0.0" dependencies: - "@types/hast": ^2.0.0 - rehype-parse: ^8.0.0 - rehype-stringify: ^9.0.0 - unified: ^10.0.0 - checksum: 08174db96f2d8d3543266ed36368e66ae050698b989498e1987f645f500606dcae946265341c87041d7db8d21927f686029792df116e9fd293c46b02a779869a - languageName: node - linkType: hard - -"relateurl@npm:^0.2.7": - version: 0.2.7 - resolution: "relateurl@npm:0.2.7" - checksum: 5891e792eae1dfc3da91c6fda76d6c3de0333a60aa5ad848982ebb6dccaa06e86385fb1235a1582c680a3d445d31be01c6bfc0804ebbcab5aaf53fa856fde6b6 + extend: ^3.0.0 + is-absolute-url: ^3.0.0 + mdast-util-definitions: ^4.0.0 + space-separated-tokens: ^1.0.0 + unist-util-visit: ^2.0.0 + checksum: 48c4a41fe38916f79febb390b0c4deefe82b554dd36dc534262d851860d17fb6d15d78d515f29194e5fa48db5f01f4405a6f6dd077aaf32812a2efffb01700d7 languageName: node linkType: hard -"remark-frontmatter@npm:^4.0.1": +"remark-frontmatter@npm:4.0.1, remark-frontmatter@npm:^4.0.1": version: 4.0.1 resolution: "remark-frontmatter@npm:4.0.1" dependencies: @@ -17415,24 +22025,36 @@ __metadata: languageName: node linkType: hard -"remark-mdx@npm:^2.0.0": - version: 2.1.4 - resolution: "remark-mdx@npm:2.1.4" +"remark-mdx-frontmatter@npm:^1.0.1, remark-mdx-frontmatter@npm:^1.1.1": + version: 1.1.1 + resolution: "remark-mdx-frontmatter@npm:1.1.1" + dependencies: + estree-util-is-identifier-name: ^1.0.0 + estree-util-value-to-estree: ^1.0.0 + js-yaml: ^4.0.0 + toml: ^3.0.0 + checksum: a2d87e0d6cc7f541f7c854270e740da3bb403ee0398414aa77ee17df157853b692072eaff6242d439c20bf416c80908fdf44096771e25bfefd30e3463dace5e7 + languageName: node + linkType: hard + +"remark-mdx@npm:^2.0.0, remark-mdx@npm:^2.3.0": + version: 2.3.0 + resolution: "remark-mdx@npm:2.3.0" dependencies: mdast-util-mdx: ^2.0.0 micromark-extension-mdxjs: ^1.0.0 - checksum: 31efbcdbfe3c143eca7872a41d285f1da8c91c222601f6669b36995ad158c30235109875773b58c0b3408eb75539cc14e166e303ac5fe37dc6b50473ce547ca5 + checksum: 98486986c5b6f6a8321eb2f3b13c70fcd5644821428c77b7bfeb5ee5d4605b9761b322b2f6b531e83883cd2d5bc7bc4623427149aee00e1eba012f538b3d5627 languageName: node linkType: hard "remark-parse@npm:^10.0.0, remark-parse@npm:^10.0.1": - version: 10.0.1 - resolution: "remark-parse@npm:10.0.1" + version: 10.0.2 + resolution: "remark-parse@npm:10.0.2" dependencies: "@types/mdast": ^3.0.0 mdast-util-from-markdown: ^1.0.0 unified: ^10.0.0 - checksum: 505088e564ab53ff054433368adbb7b551f69240c7d9768975529837a86f1d0f085e72d6211929c5c42db315273df4afc94f3d3a8662ffdb69468534c6643d29 + checksum: 5041b4b44725f377e69986e02f8f072ae2222db5e7d3b6c80829756b842e811343ffc2069cae1f958a96bfa36104ab91a57d7d7e2f0cef521e210ab8c614d5c7 languageName: node linkType: hard @@ -17448,23 +22070,44 @@ __metadata: languageName: node linkType: hard -"remark-rehype@npm:^8.1.0": - version: 8.1.0 - resolution: "remark-rehype@npm:8.1.0" +"remark-rehype@npm:^9.0.0": + version: 9.1.0 + resolution: "remark-rehype@npm:9.1.0" + dependencies: + "@types/hast": ^2.0.0 + "@types/mdast": ^3.0.0 + mdast-util-to-hast: ^11.0.0 + unified: ^10.0.0 + checksum: 01d8177ce1a9138ead8779ec73cfef8d06669c4ebe7c4e94e804a1ddba12dca874131330f22e3979a4e0a4132239142dc93e7cfbd5d18b9250b4cc770557aff1 + languageName: node + linkType: hard + +"remark-slug@npm:^6.0.0": + version: 6.1.0 + resolution: "remark-slug@npm:6.1.0" dependencies: - mdast-util-to-hast: ^10.2.0 - checksum: e1152464cfa83c14b570b1cb85eb9b3667795b5bed2f6b16d1c6e96c369816b07945a3c04eb0e1fd57a19cc1837969527d0056d5b6d179f1290688db2a7e2c5f + github-slugger: ^1.0.0 + mdast-util-to-string: ^1.0.0 + unist-util-visit: ^2.0.0 + checksum: 81fff0dcfaf6d6117ef1293bb1d26c3e25483d99c65c22434298eed93583a89ea5d7b94063d9a7f47c0647a708ce84f00ff62d274503f248feec03c344cabb20 languageName: node linkType: hard -"remark-smartypants@npm:^2.0.0": - version: 2.0.0 - resolution: "remark-smartypants@npm:2.0.0" +"remark-stringify@npm:^10.0.2": + version: 10.0.3 + resolution: "remark-stringify@npm:10.0.3" dependencies: - retext: ^8.1.0 - retext-smartypants: ^5.1.0 - unist-util-visit: ^4.1.0 - checksum: dd2f82a72a664995b6f4e83d14b5ad7f0c1c6ce1bed9127cb1bcf474a978ad0bdb8ee75778b645102cddf8e2115eb68a309bac75a1aca2cd79525a8a193bd8ef + "@types/mdast": ^3.0.0 + mdast-util-to-markdown: ^1.0.0 + unified: ^10.0.0 + checksum: 6004e204fba672ee322c3cf0bef090e95802feedf7ef875f88b120c5e6208f1eb09c014486d5ca42a1e199c0a17ce0ed165fb248c66608458afed4bdca51dd3a + languageName: node + linkType: hard + +"repeat-string@npm:^1.6.1": + version: 1.6.1 + resolution: "repeat-string@npm:1.6.1" + checksum: 1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 languageName: node linkType: hard @@ -17510,6 +22153,13 @@ __metadata: languageName: node linkType: hard +"require-like@npm:>= 0.1.1": + version: 0.1.2 + resolution: "require-like@npm:0.1.2" + checksum: edb8331f05fd807381a75b76f6cca9f0ce8acaa2e910b7e116541799aa970bfbc64fde5fd6adb3a6917dba346f8386ebbddb81614c24e8dad1b4290c7af9535e + languageName: node + linkType: hard + "require-main-filename@npm:^2.0.0": version: 2.0.0 resolution: "require-main-filename@npm:2.0.0" @@ -17517,7 +22167,7 @@ __metadata: languageName: node linkType: hard -"requireindex@npm:~1.2.0": +"requireindex@npm:^1.1.0, requireindex@npm:~1.2.0": version: 1.2.0 resolution: "requireindex@npm:1.2.0" checksum: 50d8b10a1ff1fdf6aea7a1870bc7bd238b0fb1917d8d7ca17fd03afc38a65dcd7a8a4eddd031f89128b5f0065833d5c92c4fef67f2c04e8624057fe626c9cf94 @@ -17525,11 +22175,11 @@ __metadata: linkType: hard "requizzle@npm:^0.2.3": - version: 0.2.3 - resolution: "requizzle@npm:0.2.3" + version: 0.2.4 + resolution: "requizzle@npm:0.2.4" dependencies: - lodash: ^4.17.14 - checksum: b1b27c6ad16a2621d4cdb57cd44f01d302974df60f84f94b4d9d313dfe1d375e5b1a12f46010929fe508e83c40696a2105d38c1d1906c228500ac72b23a0d0c6 + lodash: ^4.17.21 + checksum: fceaa448b235f9ed111aa58360129225a3cec1a897a23293dc08d2a00f001756c042a62df0a9d4d1e2669ace52dec960aea73437f407b30c51bfba2e9da208b7 languageName: node linkType: hard @@ -17540,6 +22190,13 @@ __metadata: languageName: node linkType: hard +"resolve-alpn@npm:^1.0.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: f558071fcb2c60b04054c99aebd572a2af97ef64128d59bef7ab73bd50d896a222a056de40ffc545b633d99b304c259ea9d0c06830d5c867c34f0bfa60b8eae0 + languageName: node + linkType: hard + "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -17572,27 +22229,40 @@ __metadata: languageName: node linkType: hard -"resolve.exports@npm:^1.1.0": - version: 1.1.0 - resolution: "resolve.exports@npm:1.1.0" - checksum: 52865af8edb088f6c7759a328584a5de6b226754f004b742523adcfe398cfbc4559515104bc2ae87b8e78b1e4de46c9baec400b3fb1f7d517b86d2d48a098a2d +"resolve-url-loader@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-url-loader@npm:5.0.0" + dependencies: + adjust-sourcemap-loader: ^4.0.0 + convert-source-map: ^1.7.0 + loader-utils: ^2.0.0 + postcss: ^8.2.14 + source-map: 0.6.1 + checksum: 6d483733a4c26f75ce930a61943113bf730b5ba33a7186791cf1ae9c2ca02c3e94610bc6484ca008a372ee9e31750eccea74856a89daf1a29b8437ff564d27f2 + languageName: node + linkType: hard + +"resolve.exports@npm:^2.0.0": + version: 2.0.2 + resolution: "resolve.exports@npm:2.0.2" + checksum: 1c7778ca1b86a94f8ab4055d196c7d87d1874b96df4d7c3e67bbf793140f0717fd506dcafd62785b079cd6086b9264424ad634fb904409764c3509c3df1653f2 languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.3.2": - version: 1.22.1 - resolution: "resolve@npm:1.22.1" +"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.3.2, resolve@npm:~1.22.1": + version: 1.22.3 + resolution: "resolve@npm:1.22.3" dependencies: - is-core-module: ^2.9.0 + is-core-module: ^2.12.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: 07af5fc1e81aa1d866cbc9e9460fbb67318a10fa3c4deadc35c3ad8a898ee9a71a86a65e4755ac3195e0ea0cfbe201eb323ebe655ce90526fd61917313a34e4e + checksum: fb834b81348428cb545ff1b828a72ea28feb5a97c026a1cf40aa1008352c72811ff4d4e71f2035273dc536dcfcae20c13604ba6283c612d70fa0b6e44519c374 languageName: node linkType: hard -"resolve@npm:^2.0.0-next.3": +"resolve@npm:^2.0.0-next.4": version: 2.0.0-next.4 resolution: "resolve@npm:2.0.0-next.4" dependencies: @@ -17605,15 +22275,6 @@ __metadata: languageName: node linkType: hard -"resolve@npm:~1.17.0": - version: 1.17.0 - resolution: "resolve@npm:1.17.0" - dependencies: - path-parse: ^1.0.6 - checksum: 9ceaf83b3429f2d7ff5d0281b8d8f18a1f05b6ca86efea7633e76b8f76547f33800799dfdd24434942dec4fbd9e651ed3aef577d9a6b5ec87ad89c1060e24759 - languageName: node - linkType: hard - "resolve@npm:~1.19.0": version: 1.19.0 resolution: "resolve@npm:1.19.0" @@ -17624,124 +22285,58 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.3.2#~builtin": - version: 1.22.1 - resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b" - dependencies: - is-core-module: ^2.9.0 - path-parse: ^1.0.7 - supports-preserve-symlinks-flag: ^1.0.0 - bin: - resolve: bin/resolve - checksum: 5656f4d0bedcf8eb52685c1abdf8fbe73a1603bb1160a24d716e27a57f6cecbe2432ff9c89c2bd57542c3a7b9d14b1882b73bfe2e9d7849c9a4c0b8b39f02b8b - languageName: node - linkType: hard - -"resolve@patch:resolve@^2.0.0-next.3#~builtin": - version: 2.0.0-next.4 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=07638b" +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.3.2#~builtin, resolve@patch:resolve@~1.22.1#~builtin": + version: 1.22.3 + resolution: "resolve@patch:resolve@npm%3A1.22.3#~builtin::version=1.22.3&hash=c3c19d" dependencies: - is-core-module: ^2.9.0 + is-core-module: ^2.12.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: 4bf9f4f8a458607af90518ff73c67a4bc1a38b5a23fef2bb0ccbd45e8be89820a1639b637b0ba377eb2be9eedfb1739a84cde24fe4cd670c8207d8fea922b011 - languageName: node - linkType: hard - -"resolve@patch:resolve@~1.17.0#~builtin": - version: 1.17.0 - resolution: "resolve@patch:resolve@npm%3A1.17.0#~builtin::version=1.17.0&hash=07638b" - dependencies: - path-parse: ^1.0.6 - checksum: 6fd799f282ddf078c4bc20ce863e3af01fa8cb218f0658d9162c57161a2dbafe092b13015b9a4c58d0e1e801cf7aa7a4f13115fea9db98c3f9a0c43e429bad6f - languageName: node - linkType: hard - -"resolve@patch:resolve@~1.19.0#~builtin": - version: 1.19.0 - resolution: "resolve@patch:resolve@npm%3A1.19.0#~builtin::version=1.19.0&hash=07638b" - dependencies: - is-core-module: ^2.1.0 - path-parse: ^1.0.6 - checksum: 2443b94d347e6946c87c85faf13071f605e609e0b54784829b0ed2b917d050bfc1cbaf4ecc6453f224cfa7d0c5dcd97cbb273454cd210bee68e4af15c1a5abc9 - languageName: node - linkType: hard - -"responselike@npm:^1.0.2": - version: 1.0.2 - resolution: "responselike@npm:1.0.2" - dependencies: - lowercase-keys: ^1.0.0 - checksum: 2e9e70f1dcca3da621a80ce71f2f9a9cad12c047145c6ece20df22f0743f051cf7c73505e109814915f23f9e34fb0d358e22827723ee3d56b623533cab8eafcd - languageName: node - linkType: hard - -"restore-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "restore-cursor@npm:3.1.0" - dependencies: - onetime: ^5.1.0 - signal-exit: ^3.0.2 - checksum: f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 - languageName: node - linkType: hard - -"restore-cursor@npm:^4.0.0": - version: 4.0.0 - resolution: "restore-cursor@npm:4.0.0" - dependencies: - onetime: ^5.1.0 - signal-exit: ^3.0.2 - checksum: 5b675c5a59763bf26e604289eab35711525f11388d77f409453904e1e69c0d37ae5889295706b2c81d23bd780165084d040f9b68fffc32cc921519031c4fa4af + checksum: ad59734723b596d0891321c951592ed9015a77ce84907f89c9d9307dd0c06e11a67906a3e628c4cae143d3e44898603478af0ddeb2bba3f229a9373efe342665 languageName: node linkType: hard -"retext-latin@npm:^3.0.0": - version: 3.1.0 - resolution: "retext-latin@npm:3.1.0" +"resolve@patch:resolve@^2.0.0-next.4#~builtin": + version: 2.0.0-next.4 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=c3c19d" dependencies: - "@types/nlcst": ^1.0.0 - parse-latin: ^5.0.0 - unherit: ^3.0.0 - unified: ^10.0.0 - checksum: 1c0eb7430b143b9ac91af44ed6e349df2a691004a4056d77256fc6b2dde2b06688e5b6a3474d43eb606541e39dc84c79e1704a1c768c503671fc6cdc43fd6f95 + is-core-module: ^2.9.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 4bf9f4f8a458607af90518ff73c67a4bc1a38b5a23fef2bb0ccbd45e8be89820a1639b637b0ba377eb2be9eedfb1739a84cde24fe4cd670c8207d8fea922b011 languageName: node linkType: hard -"retext-smartypants@npm:^5.1.0": - version: 5.2.0 - resolution: "retext-smartypants@npm:5.2.0" +"resolve@patch:resolve@~1.19.0#~builtin": + version: 1.19.0 + resolution: "resolve@patch:resolve@npm%3A1.19.0#~builtin::version=1.19.0&hash=c3c19d" dependencies: - "@types/nlcst": ^1.0.0 - nlcst-to-string: ^3.0.0 - unified: ^10.0.0 - unist-util-visit: ^4.0.0 - checksum: 873924b0619f02e9c1b44734a2f6702e057ca6e50de32302fb8dc5499507460d4fe42e74606243bd31ca5529ee0f7d2b442bd068c3297fe4aec6c9ba7f429c13 + is-core-module: ^2.1.0 + path-parse: ^1.0.6 + checksum: 2443b94d347e6946c87c85faf13071f605e609e0b54784829b0ed2b917d050bfc1cbaf4ecc6453f224cfa7d0c5dcd97cbb273454cd210bee68e4af15c1a5abc9 languageName: node linkType: hard -"retext-stringify@npm:^3.0.0": - version: 3.1.0 - resolution: "retext-stringify@npm:3.1.0" +"responselike@npm:^2.0.0": + version: 2.0.1 + resolution: "responselike@npm:2.0.1" dependencies: - "@types/nlcst": ^1.0.0 - nlcst-to-string: ^3.0.0 - unified: ^10.0.0 - checksum: f408b550db14dcae7d120dd5e5769d9eaf9586f1b328f77f19d4acc9e6636a25f30f6a87fd32cc2d68a79d06571a55c15b0ebf3ed581398cc280fa51fd709d3c + lowercase-keys: ^2.0.0 + checksum: b122535466e9c97b55e69c7f18e2be0ce3823c5d47ee8de0d9c0b114aa55741c6db8bfbfce3766a94d1272e61bfb1ebf0a15e9310ac5629fbb7446a861b4fd3a languageName: node linkType: hard -"retext@npm:^8.1.0": - version: 8.1.0 - resolution: "retext@npm:8.1.0" +"restore-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "restore-cursor@npm:3.1.0" dependencies: - "@types/nlcst": ^1.0.0 - retext-latin: ^3.0.0 - retext-stringify: ^3.0.0 - unified: ^10.0.0 - checksum: feea4fa8ae257133adbecaa60f9dc0e8f0496fc90c8587e4925a5e27f91fd4366068cbde71ab2aec12191135ff98d55fa671fda75ff1a5a86deeed4d85cadf49 + onetime: ^5.1.0 + signal-exit: ^3.0.2 + checksum: f877dd8741796b909f2a82454ec111afb84eb45890eb49ac947d87991379406b3b83ff9673a46012fca0d7844bb989f45cc5b788254cf1a39b6b5a9659de0630 languageName: node linkType: hard @@ -17766,7 +22361,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:2": +"rimraf@npm:2, rimraf@npm:^2.6.1": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: @@ -17788,46 +22383,27 @@ __metadata: languageName: node linkType: hard -"roarr@npm:^2.15.3": - version: 2.15.4 - resolution: "roarr@npm:2.15.4" - dependencies: - boolean: ^3.0.1 - detect-node: ^2.0.4 - globalthis: ^1.0.1 - json-stringify-safe: ^5.0.1 - semver-compare: ^1.0.0 - sprintf-js: ^1.1.2 - checksum: 682e28d5491e3ae99728a35ba188f4f0ccb6347dbd492f95dc9f4bfdfe8ee63d8203ad234766ee2db88c8d7a300714304976eb095ce5c9366fe586c03a21586c - languageName: node - linkType: hard - -"rollup-pluginutils@npm:^2.8.2": - version: 2.8.2 - resolution: "rollup-pluginutils@npm:2.8.2" +"rimraf@npm:~2.6.2": + version: 2.6.3 + resolution: "rimraf@npm:2.6.3" dependencies: - estree-walker: ^0.6.1 - checksum: 339fdf866d8f4ff6e408fa274c0525412f7edb01dc46b5ccda51f575b7e0d20ad72965773376fb5db95a77a7fcfcab97bf841ec08dbadf5d6b08af02b7a2cf5e + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: 3ea587b981a19016297edb96d1ffe48af7e6af69660e3b371dbfc73722a73a0b0e9be5c88089fbeeb866c389c1098e07f64929c7414290504b855f54f901ab10 languageName: node linkType: hard -"rollup@npm:^2.74.1": - version: 2.79.1 - resolution: "rollup@npm:2.79.1" - dependencies: - fsevents: ~2.3.2 - dependenciesMeta: - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 6a2bf167b3587d4df709b37d149ad0300692cc5deb510f89ac7bdc77c8738c9546ae3de9322b0968e1ed2b0e984571f5f55aae28fa7de4cfcb1bc5402a4e2be6 +"robots-parser@npm:^3.0.0": + version: 3.0.1 + resolution: "robots-parser@npm:3.0.1" + checksum: fa85e44937da98da053cea78ab97d46a434a9efcac67045f8608ffc57dfff9f8cfb1e06224738c5d0a0aca32a3f9941a357ec561f39465edfc8b54548ef16f22 languageName: node linkType: hard -"rollup@npm:~2.78.0": - version: 2.78.1 - resolution: "rollup@npm:2.78.1" +"rollup@npm:^2.25.0 || ^3.3.0, rollup@npm:^3.2.5, rollup@npm:^3.21.0": + version: 3.23.0 + resolution: "rollup@npm:3.23.0" dependencies: fsevents: ~2.3.2 dependenciesMeta: @@ -17835,16 +22411,16 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 9034814383ca5bdb4bea6d499270aeb31cdb0bb884f81b0c6a1d19c63cc973f040e6ee09b7af8a7169dd231c090f4b44ef8b99c4bfdf884aceeb3dcefb8cfa14 + checksum: 0721065cf725c5611815be61d2b01f20b4d0027e17035f6e76384d38396b56cf6ed21a3db78eb004d9db4d24c8a6a19da4563b4ff96b5dd36f0a0f7a3baf85e8 languageName: node linkType: hard "rtl-css-js@npm:^1.14.0": - version: 1.16.0 - resolution: "rtl-css-js@npm:1.16.0" + version: 1.16.1 + resolution: "rtl-css-js@npm:1.16.1" dependencies: "@babel/runtime": ^7.1.2 - checksum: 51756329f691cacd3e1b48f0f9d04a69338a90013f2d2942ca1ae3b069c952f70055f5fd76c66921e9a5cb956276252376a847c3294bd0ee54be9ceb32ea868c + checksum: 7d9ab942098eee565784ccf957f6b7dfa78ea1eec7c6bffedc6641575d274189e90752537c7bdba1f43ae6534648144f467fd6d581527455ba626a4300e62c7a languageName: node linkType: hard @@ -17857,6 +22433,13 @@ __metadata: languageName: node linkType: hard +"run-async@npm:^2.4.0": + version: 2.4.1 + resolution: "run-async@npm:2.4.1" + checksum: a2c88aa15df176f091a2878eb840e68d0bdee319d8d97bbb89112223259cebecb94bc0defd735662b83c2f7a30bed8cddb7d1674eb48ae7322dc602b22d03797 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -17883,19 +22466,12 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.0.0, rxjs@npm:^7.5.5": - version: 7.5.7 - resolution: "rxjs@npm:7.5.7" +"rxjs@npm:^7.5.5, rxjs@npm:^7.8.0": + version: 7.8.1 + resolution: "rxjs@npm:7.8.1" dependencies: tslib: ^2.1.0 - checksum: edabcdb73b0f7e0f5f6e05c2077aff8c52222ac939069729704357d6406438acca831c24210db320aba269e86dbe1a400f3769c89101791885121a342fb15d9c - languageName: node - linkType: hard - -"s.color@npm:0.0.15": - version: 0.0.15 - resolution: "s.color@npm:0.0.15" - checksum: 28fc4896e446acc4a32c4146196493bc393b50990b5c17397cbb04b44e027db600ce5d1b241ba5f4619446f8523951cba22ae5abe19ce0b7e70e1533cde1f122 + checksum: de4b53db1063e618ec2eca0f7965d9137cabe98cf6be9272efe6c86b47c17b987383df8574861bcced18ebd590764125a901d5506082be84a8b8e364bf05f119 languageName: node linkType: hard @@ -17908,20 +22484,27 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 +"safe-buffer@npm:5.1.1": + version: 5.1.1 + resolution: "safe-buffer@npm:5.1.1" + checksum: 7f117b604554c9daca713be76cecc6c52932ed1dd6303638274f21319038bfd760fbfd353e526cc83f11894935bc4beb71f5b7b9478c11bf9718c0e0d94c51cb languageName: node linkType: hard -"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": +"safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": version: 5.1.2 resolution: "safe-buffer@npm:5.1.2" checksum: f2f1f7943ca44a594893a852894055cf619c1fbcb611237fc39e461ae751187e7baf4dc391a72125e0ac4fb2d8c5c0b3c71529622e6a58f46b960211e704903c languageName: node linkType: hard +"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 + languageName: node + linkType: hard + "safe-regex-test@npm:^1.0.0": version: 1.0.0 resolution: "safe-regex-test@npm:1.0.0" @@ -17949,36 +22532,45 @@ __metadata: languageName: node linkType: hard -"sass-formatter@npm:^0.7.5": - version: 0.7.5 - resolution: "sass-formatter@npm:0.7.5" +"sass-loader@npm:^13.2.2": + version: 13.3.0 + resolution: "sass-loader@npm:13.3.0" dependencies: - suf-log: ^2.5.3 - checksum: 967d789635359cf829f029595789d5e095dd0bb3e57b62d2e3ba7e013c68a89587f8c843ffcdaba0302859c4d69f0a3258f6d2131caf661775dd31868e8ae830 + klona: ^2.0.6 + neo-async: ^2.6.2 + peerDependencies: + fibers: ">= 3.1.0" + node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + sass: ^1.3.0 + sass-embedded: "*" + webpack: ^5.0.0 + peerDependenciesMeta: + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + sass-embedded: + optional: true + checksum: a3b57eaf09ae853fa95298bd7a42d64409f3f3b97f46ec4c61178763ffb61edddd5f89cc03940ef963aa328b4f6dcd4f1153e810e5eb29fb07ac02ddc121749c languageName: node linkType: hard -"satori@npm:0.0.42": - version: 0.0.42 - resolution: "satori@npm:0.0.42" +"satori@npm:0.7.2": + version: 0.7.2 + resolution: "satori@npm:0.7.2" dependencies: "@shuding/opentype.js": 1.4.0-beta.0 css-background-parser: ^0.1.0 css-box-shadow: 1.0.0-3 css-to-react-native: ^3.0.0 + emoji-regex: ^10.2.1 + linebreak: ^1.1.0 + parse-css-color: ^0.2.1 postcss-value-parser: ^4.2.0 - yoga-layout-prebuilt: ^1.10.0 - checksum: 31287c9f9991f9a61de2d67e2d777db9188e6bea3eee02bd6d6f3018d27b200831183afb4e4113659275370b80b281667dc61f87a8e3ea50d6729479b9b6f863 - languageName: node - linkType: hard - -"scheduler@npm:^0.20.2": - version: 0.20.2 - resolution: "scheduler@npm:0.20.2" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - checksum: c4b35cf967c8f0d3e65753252d0f260271f81a81e427241295c5a7b783abf4ea9e905f22f815ab66676f5313be0a25f47be582254db8f9241b259213e999b8fc + yoga-wasm-web: ^0.3.3 + checksum: bb624f7b3257a66d17a6ea096866eb52605c6c7b1861a8decf96c032140cc2d0afc3462373072263e83f8a4a844184340b767fdf85601a9a3b78811e3ff70023 languageName: node linkType: hard @@ -18008,34 +22600,18 @@ __metadata: languageName: node linkType: hard -"semver-compare@npm:^1.0.0": - version: 1.0.0 - resolution: "semver-compare@npm:1.0.0" - checksum: dd1d7e2909744cf2cf71864ac718efc990297f9de2913b68e41a214319e70174b1d1793ac16e31183b128c2b9812541300cb324db8168e6cf6b570703b171c68 - languageName: node - linkType: hard - -"semver-diff@npm:^3.1.1": - version: 3.1.1 - resolution: "semver-diff@npm:3.1.1" - dependencies: - semver: ^6.3.0 - checksum: 8bbe5a5d7add2d5e51b72314a9215cd294d71f41cdc2bf6bd59ee76411f3610b576172896f1d191d0d7294cb9f2f847438d2ee158adacc0c224dca79052812fe - languageName: node - linkType: hard - -"semver@npm:2 >=2.2.1 || 3.x || 4 || 5 || 7, semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.6, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:~7.3.0": - version: 7.3.8 - resolution: "semver@npm:7.3.8" +"semver@npm:2 >=2.2.1 || 3.x || 4 || 5 || 7, semver@npm:^7.0.0, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.6, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.0": + version: 7.5.1 + resolution: "semver@npm:7.5.1" dependencies: lru-cache: ^6.0.0 bin: semver: bin/semver.js - checksum: ba9c7cbbf2b7884696523450a61fee1a09930d888b7a8d7579025ad93d459b2d1949ee5bbfeb188b2be5f4ac163544c5e98491ad6152df34154feebc2cc337c1 + checksum: d16dbedad53c65b086f79524b9ef766bf38670b2395bdad5c957f824dcc566b624988013564f4812bcace3f9d405355c3635e2007396a39d1bffc71cfec4a2fc languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0": +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0, semver@npm:^5.6.0": version: 5.7.1 resolution: "semver@npm:5.7.1" bin: @@ -18053,14 +22629,25 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.3.7": - version: 7.3.7 - resolution: "semver@npm:7.3.7" +"semver@npm:7.3.8, semver@npm:~7.3.0": + version: 7.3.8 + resolution: "semver@npm:7.3.8" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: ba9c7cbbf2b7884696523450a61fee1a09930d888b7a8d7579025ad93d459b2d1949ee5bbfeb188b2be5f4ac163544c5e98491ad6152df34154feebc2cc337c1 + languageName: node + linkType: hard + +"semver@npm:7.5.0": + version: 7.5.0 + resolution: "semver@npm:7.5.0" dependencies: lru-cache: ^6.0.0 bin: semver: bin/semver.js - checksum: 2fa3e877568cd6ce769c75c211beaed1f9fce80b28338cadd9d0b6c40f2e2862bafd62c19a6cff42f3d54292b7c623277bcab8816a2b5521cf15210d43e75232 + checksum: 2d266937756689a76f124ffb4c1ea3e1bbb2b263219f90ada8a11aebebe1280b13bb76cca2ca96bdee3dbc554cbc0b24752eb895b2a51577aa644427e9229f2b languageName: node linkType: hard @@ -18073,6 +22660,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:~7.0.0": + version: 7.0.0 + resolution: "semver@npm:7.0.0" + bin: + semver: bin/semver.js + checksum: 272c11bf8d083274ef79fe40a81c55c184dff84dd58e3c325299d0927ba48cece1f020793d138382b85f89bab5002a35a5ba59a3a68a7eebbb597eb733838778 + languageName: node + linkType: hard + "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -18094,12 +22690,16 @@ __metadata: languageName: node linkType: hard -"serialize-error@npm:^7.0.1": - version: 7.0.1 - resolution: "serialize-error@npm:7.0.1" +"serve-favicon@npm:^2.5.0": + version: 2.5.0 + resolution: "serve-favicon@npm:2.5.0" dependencies: - type-fest: ^0.13.1 - checksum: e0aba4dca2fc9fe74ae1baf38dbd99190e1945445a241ba646290f2176cdb2032281a76443b02ccf0caf30da5657d510746506368889a593b9835a497fc0732e + etag: ~1.8.1 + fresh: 0.5.2 + ms: 2.1.1 + parseurl: ~1.3.2 + safe-buffer: 5.1.1 + checksum: f4dd0fbee3b7e18d0a27ba6ba01d2f585f23f533010c9e8c74aad74615b19b12d8fbe714f14cb3579803f0bacecd67cdc858714cb56c6e28f8dd07ccc997aea4 languageName: node linkType: hard @@ -18115,6 +22715,13 @@ __metadata: languageName: node linkType: hard +"server-only@npm:^0.0.1": + version: 0.0.1 + resolution: "server-only@npm:0.0.1" + checksum: c432348956641ea3f460af8dc3765f3a1bdbcf7a1e0205b0756d868e6e6fe8934cdee6bff68401a1dd49ba4a831c75916517a877446d54b334f7de36fa273e53 + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0, set-blocking@npm:~2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -18122,6 +22729,13 @@ __metadata: languageName: node linkType: hard +"set-cookie-parser@npm:^2.4.8": + version: 2.6.0 + resolution: "set-cookie-parser@npm:2.6.0" + checksum: bf11ebc594c53d84588f1b4c04f1b8ce14e0498b1c011b3d76b5c6d5aac481bbc3f7c5260ec4ce99bdc1d9aed19f9fc315e73166a36ca74d0f12349a73f6bdc9 + languageName: node + linkType: hard + "set-harmonic-interval@npm:^1.0.1": version: 1.0.1 resolution: "set-harmonic-interval@npm:1.0.1" @@ -18136,20 +22750,29 @@ __metadata: languageName: node linkType: hard -"sharp@npm:0.31.1, sharp@npm:^0.31.1": - version: 0.31.1 - resolution: "sharp@npm:0.31.1" +"shallow-clone@npm:^3.0.0": + version: 3.0.1 + resolution: "shallow-clone@npm:3.0.1" + dependencies: + kind-of: ^6.0.2 + checksum: 39b3dd9630a774aba288a680e7d2901f5c0eae7b8387fc5c8ea559918b29b3da144b7bdb990d7ccd9e11be05508ac9e459ce51d01fd65e583282f6ffafcba2e7 + languageName: node + linkType: hard + +"sharp@npm:^0.32.1": + version: 0.32.1 + resolution: "sharp@npm:0.32.1" dependencies: color: ^4.2.3 detect-libc: ^2.0.1 - node-addon-api: ^5.0.0 + node-addon-api: ^6.1.0 node-gyp: latest prebuild-install: ^7.1.1 - semver: ^7.3.7 + semver: ^7.5.0 simple-get: ^4.0.1 tar-fs: ^2.1.1 tunnel-agent: ^0.6.0 - checksum: 42d00c9c6c61e5cf752c29583253782b3d821ee15fc2648c1f59892b94e9bc170a47ee9d138aa0a61c1c2ee9b7573ee54444c857fff887908701c4208710480d + checksum: 99f50df380442aa8f3f952dd6f2e27634f9cab249cce47aa7f1a97c468334979ea94d71555f782aae5f5016e44b7832799f1c5ea1cb3ca975c089acd00e62e2e languageName: node linkType: hard @@ -18169,10 +22792,23 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.7.3": - version: 1.7.3 - resolution: "shell-quote@npm:1.7.3" - checksum: aca58e73a3a5d933d02e0bdddedc53ee14f7c2ec264f97ac915b9d4482d077a38e422aa664631d60a672cd3cdb4054eb2e6c0303f54882453dacb6483e482d34 +"shell-quote@npm:^1.8.0": + version: 1.8.1 + resolution: "shell-quote@npm:1.8.1" + checksum: 5f01201f4ef504d4c6a9d0d283fa17075f6770bfbe4c5850b074974c68062f37929ca61700d95ad2ac8822e14e8c4b990ca0e6e9272e64befd74ce5e19f0736b + languageName: node + linkType: hard + +"shelljs@npm:^0.8.3, shelljs@npm:^0.8.5": + version: 0.8.5 + resolution: "shelljs@npm:0.8.5" + dependencies: + glob: ^7.0.0 + interpret: ^1.0.0 + rechoir: ^0.6.2 + bin: + shjs: bin/shjs + checksum: 7babc46f732a98f4c054ec1f048b55b9149b98aa2da32f6cf9844c434b43c6251efebd6eec120937bd0999e13811ebd45efe17410edb3ca938f82f9381302748 languageName: node linkType: hard @@ -18187,14 +22823,15 @@ __metadata: languageName: node linkType: hard -"shiki@npm:^0.11.1": - version: 0.11.1 - resolution: "shiki@npm:0.11.1" +"shiki@npm:^0.14.1": + version: 0.14.2 + resolution: "shiki@npm:0.14.2" dependencies: - jsonc-parser: ^3.0.0 - vscode-oniguruma: ^1.6.1 - vscode-textmate: ^6.0.0 - checksum: 2a4ebc3b466816263fc244ae4f67a4ff96aa74d863b9c5e7e4affc50f37fd6d1a781405de0dbf763b777bc33e49a0d441de7ff3fededb8b01e3b8dbb37e2927d + ansi-sequence-parser: ^1.1.0 + jsonc-parser: ^3.2.0 + vscode-oniguruma: ^1.7.0 + vscode-textmate: ^8.0.0 + checksum: f2a14302b1803617e3ff1b751a5c87b4af4ad15214dc00e9215402e42940a84a0b956cf55d628f25dbf1296b18e277b8529571cd9359b971ac599a0ab11303e7 languageName: node linkType: hard @@ -18209,6 +22846,13 @@ __metadata: languageName: node linkType: hard +"siginfo@npm:^2.0.0": + version: 2.0.0 + resolution: "siginfo@npm:2.0.0" + checksum: 8aa5a98640ca09fe00d74416eca97551b3e42991614a3d1b824b115fc1401543650914f651ab1311518177e4d297e80b953f4cd4cd7ea1eabe824e8f2091de01 + languageName: node + linkType: hard + "signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -18216,6 +22860,13 @@ __metadata: languageName: node linkType: hard +"signal-exit@npm:^4.0.1": + version: 4.0.2 + resolution: "signal-exit@npm:4.0.2" + checksum: 41f5928431cc6e91087bf0343db786a6313dd7c6fd7e551dbc141c95bb5fb26663444fd9df8ea47c5d7fc202f60aa7468c3162a9365cbb0615fc5e1b1328fe31 + languageName: node + linkType: hard + "simple-concat@npm:^1.0.0": version: 1.0.1 resolution: "simple-concat@npm:1.0.1" @@ -18243,14 +22894,34 @@ __metadata: languageName: node linkType: hard -"sirv@npm:^2.0.2": - version: 2.0.2 - resolution: "sirv@npm:2.0.2" +"simple-update-notifier@npm:^1.0.0": + version: 1.1.0 + resolution: "simple-update-notifier@npm:1.1.0" + dependencies: + semver: ~7.0.0 + checksum: 1012e9b6c504e559a948078177b3eedbb9d7e4d15878e2bda56314d08db609ca5da485be4ac9f838759faae8057935ee0246fcdf63f1233c86bd9fecb2a5544b + languageName: node + linkType: hard + +"sirv@npm:^1.0.7": + version: 1.0.19 + resolution: "sirv@npm:1.0.19" + dependencies: + "@polka/url": ^1.0.0-next.20 + mrmime: ^1.0.0 + totalist: ^1.0.0 + checksum: c943cfc61baf85f05f125451796212ec35d4377af4da90ae8ec1fa23e6d7b0b4d9c74a8fbf65af83c94e669e88a09dc6451ba99154235eead4393c10dda5b07c + languageName: node + linkType: hard + +"sirv@npm:^2.0.3": + version: 2.0.3 + resolution: "sirv@npm:2.0.3" dependencies: "@polka/url": ^1.0.0-next.20 mrmime: ^1.0.0 totalist: ^3.0.0 - checksum: 6982f8ecee9392d246d7eeea8144e50334fe1b46a4fa942995a844ea88c2d518b17cce781bb09926c9a5692a7002a207d18dfd67af2aa538a15e733dc2042298 + checksum: e2dfd4c97735a6ad6d842d0eec2cd9e3919ff0e46f0d228248c5753ad4b70b832711e77e1259c031c439cdb08303cc54d923685c92b0e890145cc733af7c5568 languageName: node linkType: hard @@ -18321,6 +22992,55 @@ __metadata: languageName: node linkType: hard +"snyk-config@npm:^5.0.0": + version: 5.1.0 + resolution: "snyk-config@npm:5.1.0" + dependencies: + async: ^3.2.0 + debug: ^4.1.1 + lodash.merge: ^4.6.2 + minimist: ^1.2.5 + checksum: 41b4e6faf76a8f5ad7565889bb4a41067ff06640fa2042c1f9726b99a28ab510cf6d56fdc985c4c0e321f8e2e4487f73b86e631653b8c4b2ff8866f628003a02 + languageName: node + linkType: hard + +"snyk-nodejs-lockfile-parser@npm:^1.49.0": + version: 1.51.0 + resolution: "snyk-nodejs-lockfile-parser@npm:1.51.0" + dependencies: + "@snyk/dep-graph": ^2.3.0 + "@snyk/graphlib": 2.1.9-patch.3 + "@yarnpkg/core": ^2.4.0 + "@yarnpkg/lockfile": ^1.1.0 + event-loop-spinner: ^2.0.0 + js-yaml: ^4.1.0 + lodash.clonedeep: ^4.5.0 + lodash.flatmap: ^4.5.0 + lodash.isempty: ^4.4.0 + lodash.topairs: ^4.3.0 + micromatch: ^4.0.5 + p-map: ^4.0.0 + semver: ^7.3.5 + snyk-config: ^5.0.0 + tslib: ^1.9.3 + uuid: ^8.3.0 + bin: + parse-nodejs-lockfile: bin/index.js + checksum: 3fd033479ba3f3d2aec27d5aaf1d1bccdb0523591b8ad9499f6d32d5dda06813b5338f5a1b10cbea356bc8db6f3cf162f5d950a088a7745331a4a8a56719461d + languageName: node + linkType: hard + +"socks-proxy-agent@npm:5, socks-proxy-agent@npm:^5.0.0": + version: 5.0.1 + resolution: "socks-proxy-agent@npm:5.0.1" + dependencies: + agent-base: ^6.0.2 + debug: 4 + socks: ^2.3.3 + checksum: 1b60c4977b2fef783f0fc4dc619cd2758aafdb43f3cf679f1e3627cb6c6e752811cee5513ebb4157ad26786033d2f85029440f197d321e8293b38cc5aab01e06 + languageName: node + linkType: hard + "socks-proxy-agent@npm:^7.0.0": version: 7.0.0 resolution: "socks-proxy-agent@npm:7.0.0" @@ -18332,7 +23052,7 @@ __metadata: languageName: node linkType: hard -"socks@npm:^2.6.2": +"socks@npm:^2.3.3, socks@npm:^2.6.2": version: 2.7.1 resolution: "socks@npm:2.7.1" dependencies: @@ -18342,7 +23062,7 @@ __metadata: languageName: node linkType: hard -"sort-array@npm:^4.1.4": +"sort-array@npm:^4.1.5": version: 4.1.5 resolution: "sort-array@npm:4.1.5" dependencies: @@ -18352,6 +23072,29 @@ __metadata: languageName: node linkType: hard +"sort-object-keys@npm:^1.1.3": + version: 1.1.3 + resolution: "sort-object-keys@npm:1.1.3" + checksum: abea944d6722a1710a1aa6e4f9509da085d93d5fc0db23947cb411eedc7731f80022ce8fa68ed83a53dd2ac7441fcf72a3f38c09b3d9bbc4ff80546aa2e151ad + languageName: node + linkType: hard + +"sort-package-json@npm:^1.55.0": + version: 1.57.0 + resolution: "sort-package-json@npm:1.57.0" + dependencies: + detect-indent: ^6.0.0 + detect-newline: 3.1.0 + git-hooks-list: 1.0.3 + globby: 10.0.0 + is-plain-obj: 2.1.0 + sort-object-keys: ^1.1.3 + bin: + sort-package-json: cli.js + checksum: 15758ba6b1033ae136863eabd4b8c8a28e79dd68b71327f6803c2ea740dc149dc9ad708b006d07ee9de56b6dc7cadb7c697801ad50c01348aa91022c6ff6e21d + languageName: node + linkType: hard + "source-map-js@npm:^1.0.1, source-map-js@npm:^1.0.2": version: 1.0.2 resolution: "source-map-js@npm:1.0.2" @@ -18369,7 +23112,7 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:^0.5.17, source-map-support@npm:~0.5.20": +"source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -18386,6 +23129,13 @@ __metadata: languageName: node linkType: hard +"source-map@npm:0.6.1, source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 + languageName: node + linkType: hard + "source-map@npm:0.8.0-beta.0": version: 0.8.0-beta.0 resolution: "source-map@npm:0.8.0-beta.0" @@ -18395,13 +23145,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": - version: 0.6.1 - resolution: "source-map@npm:0.6.1" - checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 - languageName: node - linkType: hard - "source-map@npm:^0.7.0, source-map@npm:^0.7.3": version: 0.7.4 resolution: "source-map@npm:0.7.4" @@ -18424,26 +23167,26 @@ __metadata: linkType: hard "space-separated-tokens@npm:^2.0.0": - version: 2.0.1 - resolution: "space-separated-tokens@npm:2.0.1" - checksum: 66e30a6382d6e3ab0a6573d510235a198202071d4ebfef8c198f10433166f0cdced4dbf0946cad3c4b2ecc336896a11f98b2ec93047e140fe7aef6fd3a21365b + version: 2.0.2 + resolution: "space-separated-tokens@npm:2.0.2" + checksum: 202e97d7ca1ba0758a0aa4fe226ff98142073bcceeff2da3aad037968878552c3bbce3b3231970025375bbba5aee00c5b8206eda408da837ab2dc9c0f26be990 languageName: node linkType: hard -"spawn-command@npm:^0.0.2-1": - version: 0.0.2 - resolution: "spawn-command@npm:0.0.2" - checksum: e35c5d28177b4d461d33c88cc11f6f3a5079e2b132c11e1746453bbb7a0c0b8a634f07541a2a234fa4758239d88203b758def509161b651e81958894c0b4b64b +"spawn-command@npm:0.0.2-1": + version: 0.0.2-1 + resolution: "spawn-command@npm:0.0.2-1" + checksum: 2cac8519332193d1ed37d57298c4a1f73095e9edd20440fbab4aa47f531da83831734f2b51c44bb42b2747bf3485dec3fa2b0a1003f74c67561f2636622e328b languageName: node linkType: hard "spdx-correct@npm:^3.0.0": - version: 3.1.1 - resolution: "spdx-correct@npm:3.1.1" + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" dependencies: spdx-expression-parse: ^3.0.0 spdx-license-ids: ^3.0.0 - checksum: 77ce438344a34f9930feffa61be0eddcda5b55fc592906ef75621d4b52c07400a97084d8701557b13f7d2aae0cb64f808431f469e566ef3fe0a3a131dcb775a6 + checksum: e9ae98d22f69c88e7aff5b8778dc01c361ef635580e82d29e5c60a6533cc8f4d820803e67d7432581af0cc4fb49973125076ee3b90df191d153e223c004193b2 languageName: node linkType: hard @@ -18465,16 +23208,20 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.12 - resolution: "spdx-license-ids@npm:3.0.12" - checksum: 92a4dddce62ce1db6fe54a7a839cf85e06abc308fc83b776a55b44e4f1906f02e7ebd506120847039e976bbbad359ea8bdfafb7925eae5cd7e73255f02e0b7d6 + version: 3.0.13 + resolution: "spdx-license-ids@npm:3.0.13" + checksum: 3469d85c65f3245a279fa11afc250c3dca96e9e847f2f79d57f466940c5bb8495da08a542646086d499b7f24a74b8d0b42f3fc0f95d50ff99af1f599f6360ad7 languageName: node linkType: hard -"split-on-first@npm:^1.0.0": - version: 1.1.0 - resolution: "split-on-first@npm:1.1.0" - checksum: 16ff85b54ddcf17f9147210a4022529b343edbcbea4ce977c8f30e38408b8d6e0f25f92cd35b86a524d4797f455e29ab89eb8db787f3c10708e0b47ebf528d30 +"speedline-core@npm:^1.4.3": + version: 1.4.3 + resolution: "speedline-core@npm:1.4.3" + dependencies: + "@types/node": "*" + image-ssim: ^0.2.0 + jpeg-js: ^0.4.1 + checksum: dbbdc6d869b5214cd29e9c558a12002323195b70f7f641502493d0d93de990fbb846bf0da949bee78ee360153a2f449e07812cb22d8cf99aaa1f2ed5b1198f91 languageName: node linkType: hard @@ -18496,13 +23243,6 @@ __metadata: languageName: node linkType: hard -"sprintf-js@npm:^1.1.2": - version: 1.1.2 - resolution: "sprintf-js@npm:1.1.2" - checksum: d4bb46464632b335e5faed381bd331157e0af64915a98ede833452663bc672823db49d7531c32d58798e85236581fb7342fd0270531ffc8f914e186187bf1c90 - languageName: node - linkType: hard - "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -18531,7 +23271,16 @@ __metadata: languageName: node linkType: hard -"ssri@npm:^8.0.0": +"ssri@npm:^10.0.0": + version: 10.0.4 + resolution: "ssri@npm:10.0.4" + dependencies: + minipass: ^5.0.0 + checksum: fb14da9f8a72b04eab163eb13a9dda11d5962cd2317f85457c4e0b575e9a6e0e3a6a87b5bf122c75cb36565830cd5f263fb457571bf6f1587eb5f95d095d6165 + languageName: node + linkType: hard + +"ssri@npm:^8.0.0, ssri@npm:^8.0.1": version: 8.0.1 resolution: "ssri@npm:8.0.1" dependencies: @@ -18549,13 +23298,6 @@ __metadata: languageName: node linkType: hard -"stable@npm:^0.1.8": - version: 0.1.8 - resolution: "stable@npm:0.1.8" - checksum: 2ff482bb100285d16dd75cd8f7c60ab652570e8952c0bfa91828a2b5f646a0ff533f14596ea4eabd48bb7f4aeea408dce8f8515812b975d958a4cc4fa6b9dfeb - languageName: node - linkType: hard - "stack-generator@npm:^2.0.5": version: 2.0.10 resolution: "stack-generator@npm:2.0.10" @@ -18566,11 +23308,18 @@ __metadata: linkType: hard "stack-utils@npm:^2.0.3": - version: 2.0.5 - resolution: "stack-utils@npm:2.0.5" + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" dependencies: escape-string-regexp: ^2.0.0 - checksum: 76b69da0f5b48a34a0f93c98ee2a96544d2c4ca2557f7eef5ddb961d3bdc33870b46f498a84a7c4f4ffb781df639840e7ebf6639164ed4da5e1aeb659615b9c7 + checksum: 052bf4d25bbf5f78e06c1d5e67de2e088b06871fa04107ca8d3f0e9d9263326e2942c8bedee3545795fc77d787d443a538345eef74db2f8e35db3558c6f91ff7 + languageName: node + linkType: hard + +"stackback@npm:0.0.2": + version: 0.0.2 + resolution: "stackback@npm:0.0.2" + checksum: 2d4dc4e64e2db796de4a3c856d5943daccdfa3dd092e452a1ce059c81e9a9c29e0b9badba91b43ef0d5ff5c04ee62feb3bcc559a804e16faf447bac2d883aa99 languageName: node linkType: hard @@ -18602,17 +23351,59 @@ __metadata: languageName: node linkType: hard -"standard-as-callback@npm:^2.1.0": - version: 2.1.0 - resolution: "standard-as-callback@npm:2.1.0" - checksum: 88bec83ee220687c72d94fd86a98d5272c91d37ec64b66d830dbc0d79b62bfa6e47f53b71646011835fc9ce7fae62739545d13124262b53be4fbb3e2ebad551c +"standard-as-callback@npm:^2.1.0": + version: 2.1.0 + resolution: "standard-as-callback@npm:2.1.0" + checksum: 88bec83ee220687c72d94fd86a98d5272c91d37ec64b66d830dbc0d79b62bfa6e47f53b71646011835fc9ce7fae62739545d13124262b53be4fbb3e2ebad551c + languageName: node + linkType: hard + +"statuses@npm:2.0.1": + version: 2.0.1 + resolution: "statuses@npm:2.0.1" + checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb + languageName: node + linkType: hard + +"std-env@npm:^3.3.2": + version: 3.3.3 + resolution: "std-env@npm:3.3.3" + checksum: 6665f6d8bd63aae432d3eb9abbd7322847ad0d902603e6dce1e8051b4f42ceeb4f7f96a4faf70bb05ce65ceee2dc982502b701575c8a58b1bfad29f3dbb19f81 + languageName: node + linkType: hard + +"stop-iteration-iterator@npm:^1.0.0": + version: 1.0.0 + resolution: "stop-iteration-iterator@npm:1.0.0" + dependencies: + internal-slot: ^1.0.4 + checksum: d04173690b2efa40e24ab70e5e51a3ff31d56d699550cfad084104ab3381390daccb36652b25755e420245f3b0737de66c1879eaa2a8d4fc0a78f9bf892fcb42 + languageName: node + linkType: hard + +"store2@npm:^2.14.2": + version: 2.14.2 + resolution: "store2@npm:2.14.2" + checksum: 6f270fc5bab99b63f45fcc7bd8b99c2714b4adf880f557ed7ffb5ed3987131251165bccde425a00928aaf044870aee79ddeef548576d093c68703ed2edec45d7 languageName: node linkType: hard -"statuses@npm:2.0.1": - version: 2.0.1 - resolution: "statuses@npm:2.0.1" - checksum: 18c7623fdb8f646fb213ca4051be4df7efb3484d4ab662937ca6fbef7ced9b9e12842709872eb3020cc3504b93bde88935c9f6417489627a7786f24f8031cbcb +"storybook@npm:^7.0.15": + version: 7.0.15 + resolution: "storybook@npm:7.0.15" + dependencies: + "@storybook/cli": 7.0.15 + bin: + sb: index.js + storybook: index.js + checksum: b6022ecec549c3ebaf811381c67da55e9d82ef0c0ab67339949cdea453a6fe2e9596f9ecc07abdd79c0bf9dd70ec17ce775e42f151e0bd4c8321283bfec293f7 + languageName: node + linkType: hard + +"stream-buffers@npm:^3.0.2": + version: 3.0.2 + resolution: "stream-buffers@npm:3.0.2" + checksum: b09fdeea606e3113ebd0e07010ed0cf038608fa396130add9e45deaff5cc3ba845dc25c31ad24f8341f85907846344cb7c85f75ea52c6572e2ac646e9b6072d0 languageName: node linkType: hard @@ -18625,6 +23416,33 @@ __metadata: languageName: node linkType: hard +"stream-shift@npm:^1.0.0": + version: 1.0.1 + resolution: "stream-shift@npm:1.0.1" + checksum: 59b82b44b29ec3699b5519a49b3cedcc6db58c72fb40c04e005525dfdcab1c75c4e0c180b923c380f204bed78211b9bad8faecc7b93dece4d004c3f6ec75737b + languageName: node + linkType: hard + +"stream-to-array@npm:~2.3.0": + version: 2.3.0 + resolution: "stream-to-array@npm:2.3.0" + dependencies: + any-promise: ^1.1.0 + checksum: 7feaf63b38399b850615e6ffcaa951e96e4c8f46745dbce4b553a94c5dc43966933813747014935a3ff97793e7f30a65270bde19f82b2932871a1879229a77cf + languageName: node + linkType: hard + +"stream-to-promise@npm:^2.2.0": + version: 2.2.0 + resolution: "stream-to-promise@npm:2.2.0" + dependencies: + any-promise: ~1.3.0 + end-of-stream: ~1.1.0 + stream-to-array: ~2.3.0 + checksum: 2c9ddb69c34d10ad27eb06197abc93fd1b1cd5f9597ead28ade4d6c57f4110d948a2ef14530f2f7b3b967f74f3554b57c38a4501b72a13b27fc8745bd7190d1d + languageName: node + linkType: hard + "stream-via@npm:^1.0.4": version: 1.0.4 resolution: "stream-via@npm:1.0.4" @@ -18639,17 +23457,17 @@ __metadata: languageName: node linkType: hard -"strict-uri-encode@npm:^2.0.0": - version: 2.0.0 - resolution: "strict-uri-encode@npm:2.0.0" - checksum: eaac4cf978b6fbd480f1092cab8b233c9b949bcabfc9b598dd79a758f7243c28765ef7639c876fa72940dac687181b35486ea01ff7df3e65ce3848c64822c581 +"string-argv@npm:^0.3.1, string-argv@npm:~0.3.1": + version: 0.3.2 + resolution: "string-argv@npm:0.3.2" + checksum: 8703ad3f3db0b2641ed2adbb15cf24d3945070d9a751f9e74a924966db9f325ac755169007233e8985a39a6a292f14d4fee20482989b89b96e473c4221508a0f languageName: node linkType: hard -"string-argv@npm:^0.3.1, string-argv@npm:~0.3.1": - version: 0.3.1 - resolution: "string-argv@npm:0.3.1" - checksum: efbd0289b599bee808ce80820dfe49c9635610715429c6b7cc50750f0437e3c2f697c81e5c390208c13b5d5d12d904a1546172a88579f6ee5cbaaaa4dc9ec5cf +"string-hash@npm:^1.1.1": + version: 1.1.3 + resolution: "string-hash@npm:1.1.3" + checksum: 104b8667a5e0dc71bfcd29fee09cb88c6102e27bfb07c55f95535d90587d016731d52299380052e514266f4028a7a5172e0d9ac58e2f8f5001be61dc77c0754d languageName: node linkType: hard @@ -18663,6 +23481,17 @@ __metadata: languageName: node linkType: hard +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: ^8.0.0 + is-fullwidth-code-point: ^3.0.0 + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + "string-width@npm:^1.0.1": version: 1.0.2 resolution: "string-width@npm:1.0.2" @@ -18674,17 +23503,6 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" - dependencies: - emoji-regex: ^8.0.0 - is-fullwidth-code-point: ^3.0.0 - strip-ansi: ^6.0.1 - checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb - languageName: node - linkType: hard - "string-width@npm:^5.0.0, string-width@npm:^5.0.1, string-width@npm:^5.1.2": version: 5.1.2 resolution: "string-width@npm:5.1.2" @@ -18703,41 +23521,52 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.7": - version: 4.0.7 - resolution: "string.prototype.matchall@npm:4.0.7" +"string.prototype.matchall@npm:^4.0.8": + version: 4.0.8 + resolution: "string.prototype.matchall@npm:4.0.8" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - es-abstract: ^1.19.1 - get-intrinsic: ^1.1.1 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + get-intrinsic: ^1.1.3 has-symbols: ^1.0.3 internal-slot: ^1.0.3 - regexp.prototype.flags: ^1.4.1 + regexp.prototype.flags: ^1.4.3 side-channel: ^1.0.4 - checksum: fc09f3ccbfb325de0472bcc87a6be0598a7499e0b4a31db5789676155b15754a4cc4bb83924f15fc9ed48934dac7366ee52c8b9bd160bed6fd072c93b489e75c + checksum: 952da3a818de42ad1c10b576140a5e05b4de7b34b8d9dbf00c3ac8c1293e9c0f533613a39c5cda53e0a8221f2e710bc2150e730b1c2278d60004a8a35726efb6 languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimend@npm:1.0.5" +"string.prototype.trim@npm:^1.2.7": + version: 1.2.7 + resolution: "string.prototype.trim@npm:1.2.7" dependencies: call-bind: ^1.0.2 define-properties: ^1.1.4 - es-abstract: ^1.19.5 - checksum: d44f543833112f57224e79182debadc9f4f3bf9d48a0414d6f0cbd2a86f2b3e8c0ca1f95c3f8e5b32ae83e91554d79d932fc746b411895f03f93d89ed3dfb6bc + es-abstract: ^1.20.4 + checksum: 05b7b2d6af63648e70e44c4a8d10d8cc457536df78b55b9d6230918bde75c5987f6b8604438c4c8652eb55e4fc9725d2912789eb4ec457d6995f3495af190c09 languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.5": - version: 1.0.5 - resolution: "string.prototype.trimstart@npm:1.0.5" +"string.prototype.trimend@npm:^1.0.6": + version: 1.0.6 + resolution: "string.prototype.trimend@npm:1.0.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + checksum: 0fdc34645a639bd35179b5a08227a353b88dc089adf438f46be8a7c197fc3f22f8514c1c9be4629b3cd29c281582730a8cbbad6466c60f76b5f99cf2addb132e + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.6": + version: 1.0.6 + resolution: "string.prototype.trimstart@npm:1.0.6" dependencies: call-bind: ^1.0.2 define-properties: ^1.1.4 - es-abstract: ^1.19.5 - checksum: a4857c5399ad709d159a77371eeaa8f9cc284469a0b5e1bfe405de16f1fd4166a8ea6f4180e55032f348d1b679b1599fd4301fbc7a8b72bdb3e795e43f7b1048 + es-abstract: ^1.20.4 + checksum: 89080feef416621e6ef1279588994305477a7a91648d9436490d56010a1f7adc39167cddac7ce0b9884b8cdbef086987c4dcb2960209f2af8bac0d23ceff4f41 languageName: node linkType: hard @@ -18750,6 +23579,13 @@ __metadata: languageName: node linkType: hard +"string_decoder@npm:~0.10.x": + version: 0.10.31 + resolution: "string_decoder@npm:0.10.31" + checksum: fe00f8e303647e5db919948ccb5ce0da7dea209ab54702894dd0c664edd98e5d4df4b80d6fabf7b9e92b237359d21136c95bf068b2f7760b772ca974ba970202 + languageName: node + linkType: hard + "string_decoder@npm:~1.1.1": version: 1.1.1 resolution: "string_decoder@npm:1.1.1" @@ -18759,7 +23595,7 @@ __metadata: languageName: node linkType: hard -"stringify-entities@npm:^4.0.0, stringify-entities@npm:^4.0.2": +"stringify-entities@npm:^4.0.0": version: 4.0.3 resolution: "stringify-entities@npm:4.0.3" dependencies: @@ -18769,6 +23605,15 @@ __metadata: languageName: node linkType: hard +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + "strip-ansi@npm:^3.0.0, strip-ansi@npm:^3.0.1": version: 3.0.1 resolution: "strip-ansi@npm:3.0.1" @@ -18778,15 +23623,6 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: ^5.0.1 - checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c - languageName: node - linkType: hard - "strip-ansi@npm:^7.0.1": version: 7.0.1 resolution: "strip-ansi@npm:7.0.1" @@ -18817,13 +23653,6 @@ __metadata: languageName: node linkType: hard -"strip-eof@npm:^1.0.0": - version: 1.0.0 - resolution: "strip-eof@npm:1.0.0" - checksum: 40bc8ddd7e072f8ba0c2d6d05267b4e0a4800898c3435b5fb5f5a21e6e47dfaff18467e7aa0d1844bb5d6274c3097246595841fbfeb317e541974ee992cac506 - languageName: node - linkType: hard - "strip-final-newline@npm:^2.0.0": version: 2.0.0 resolution: "strip-final-newline@npm:2.0.0" @@ -18847,6 +23676,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-indent@npm:4.0.0" + dependencies: + min-indent: ^1.0.1 + checksum: 06cbcd93da721c46bc13caeb1c00af93a9b18146a1c95927672d2decab6a25ad83662772417cea9317a2507fb143253ecc23c4415b64f5828cef9b638a744598 + languageName: node + linkType: hard + "strip-json-comments@npm:^2.0.1, strip-json-comments@npm:~2.0.1": version: 2.0.1 resolution: "strip-json-comments@npm:2.0.1" @@ -18854,19 +23692,19 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 languageName: node linkType: hard -"strip-literal@npm:^0.4.2": - version: 0.4.2 - resolution: "strip-literal@npm:0.4.2" +"strip-literal@npm:^1.0.1": + version: 1.0.1 + resolution: "strip-literal@npm:1.0.1" dependencies: - acorn: ^8.8.0 - checksum: 831cdcaba61bc82c14ef5ca423a64bb8044b3b128abd15dff454d3fd05b0dbc7b4403760a7a636923d3c2e71a8e65174cef28ee9aef61f9a66819f865da4fdda + acorn: ^8.8.2 + checksum: ab40496820f02220390d95cdd620a997168efb69d5bd7d180bc4ef83ca562a95447843d8c7c88b8284879a29cf4eedc89d8001d1e098c1a1e23d12a9c755dff4 languageName: node linkType: hard @@ -18880,18 +23718,29 @@ __metadata: languageName: node linkType: hard -"style-to-object@npm:^0.3.0": - version: 0.3.0 - resolution: "style-to-object@npm:0.3.0" +"style-loader@npm:^3.3.2": + version: 3.3.3 + resolution: "style-loader@npm:3.3.3" + peerDependencies: + webpack: ^5.0.0 + checksum: f59c953f56f6a935bd6a1dfa409f1128fed2b66b48ce4a7a75b85862a7156e5e90ab163878962762f528ec4d510903d828da645e143fbffd26f055dc1c094078 + languageName: node + linkType: hard + +"style-to-object@npm:^0.4.1": + version: 0.4.1 + resolution: "style-to-object@npm:0.4.1" dependencies: inline-style-parser: 0.1.1 - checksum: 4d7084015207f2a606dfc10c29cb5ba569f2fe8005551df7396110dd694d6ff650f2debafa95bd5d147dfb4ca50f57868e2a7f91bf5d11ef734fe7ccbd7abf59 + checksum: 2ea213e98eed21764ae1d1dc9359231a9f2d480d6ba55344c4c15eb275f0809f1845786e66d4caf62414a5cc8f112ce9425a58d251c77224060373e0db48f8c2 languageName: node linkType: hard -"styled-jsx@npm:5.0.7": - version: 5.0.7 - resolution: "styled-jsx@npm:5.0.7" +"styled-jsx@npm:5.1.1": + version: 5.1.1 + resolution: "styled-jsx@npm:5.1.1" + dependencies: + client-only: 0.0.1 peerDependencies: react: ">= 16.8.0 || 17.x.x || ^18.0.0-0" peerDependenciesMeta: @@ -18899,21 +23748,22 @@ __metadata: optional: true babel-plugin-macros: optional: true - checksum: 61959993915f4b1662a682dbbefb3512de9399cf6901969bcadd26ba5441d2b5ca5c1021b233bbd573da2541b41efb45d56c6f618dbc8d88a381ebc62461fefe + checksum: 523a33b38603492547e861b98e29c873939b04e15fbe5ef16132c6f1e15958126647983c7d4675325038b428a5e91183d996e90141b18bdd1bbadf6e2c45b2fa languageName: node linkType: hard "stylis@npm:^4.0.6": - version: 4.1.2 - resolution: "stylis@npm:4.1.2" - checksum: de5771526216ca156f7ccdece70d0e2b4d5611a2a64f34d0165707b06bd8b6ba7913f2eb9b7998c0f9145077079f46d5084b6a60c97ec10b8d776bef293e9f8c + version: 4.2.0 + resolution: "stylis@npm:4.2.0" + checksum: 0eb6cc1b866dc17a6037d0a82ac7fa877eba6a757443e79e7c4f35bacedbf6421fadcab4363b39667b43355cbaaa570a3cde850f776498e5450f32ed2f9b7584 languageName: node linkType: hard "sucrase@npm:^3.20.3": - version: 3.28.0 - resolution: "sucrase@npm:3.28.0" + version: 3.32.0 + resolution: "sucrase@npm:3.32.0" dependencies: + "@jridgewell/gen-mapping": ^0.3.2 commander: ^4.0.0 glob: 7.1.6 lines-and-columns: ^1.1.6 @@ -18923,45 +23773,35 @@ __metadata: bin: sucrase: bin/sucrase sucrase-node: bin/sucrase-node - checksum: 6a2369c140cee674988ebcf83538f38b11270e47ebaffc811baabe1db3fc586f1a357d4bbc66388a6b99054ba06a08f31b44b764e777abbd457b9e29332b12d0 - languageName: node - linkType: hard - -"suf-log@npm:^2.5.3": - version: 2.5.3 - resolution: "suf-log@npm:2.5.3" - dependencies: - s.color: 0.0.15 - checksum: 0545466dda882c6410857346640b0af46cb876951d4a5a5a2ff4be1910abf5bba73fb5d6bf72f72f2c7a0b8a96b1f2275553f2bcfefd25b98981549d492965ee + checksum: 79f760aef513adcf22b882d43100296a8afa7f307acef3e8803304b763484cf138a3e2cebc498a6791110ab20c7b8deba097f6ce82f812ca8f1723e3440e5c95 languageName: node linkType: hard -"superagent@npm:^8.0.0": - version: 8.0.0 - resolution: "superagent@npm:8.0.0" +"superagent@npm:^8.0.5": + version: 8.0.9 + resolution: "superagent@npm:8.0.9" dependencies: component-emitter: ^1.3.0 - cookiejar: ^2.1.3 + cookiejar: ^2.1.4 debug: ^4.3.4 fast-safe-stringify: ^2.1.1 form-data: ^4.0.0 - formidable: ^2.0.1 + formidable: ^2.1.2 methods: ^1.1.2 mime: 2.6.0 - qs: ^6.10.3 - readable-stream: ^3.6.0 - semver: ^7.3.7 - checksum: 14343e59327eafd85fa230acb876017079d5efcecc72a56566abc0f965220bb460af2e070dddecd9e2856410b2d2b318d81d9cc1d342aa5922da93c29a295dd7 + qs: ^6.11.0 + semver: ^7.3.8 + checksum: 5d00cdc7ceb5570663da80604965750e6b1b8d7d7442b7791e285c62bcd8d578a8ead0242a2426432b59a255fb42eb3a196d636157538a1392e7b6c5f1624810 languageName: node linkType: hard -"supertest@npm:^6.3.0": - version: 6.3.0 - resolution: "supertest@npm:6.3.0" +"supertest@npm:^6.3.3": + version: 6.3.3 + resolution: "supertest@npm:6.3.3" dependencies: methods: ^1.1.2 - superagent: ^8.0.0 - checksum: 95062161af3a16669231dcde0375f89a8c57339ca8e5820b483959dd77c88a89c9d63241cad000f6178822666ae818fd2e158b44a10d865366809e173737720e + superagent: ^8.0.5 + checksum: 38239e517f7ba62b7a139a79c5c48d55f8d67b5ff4b6e51d5b07732ca8bbc4a28ffa1b10916fbb403dd013a054dbf028edc5850057d9a43aecbff439d494673e languageName: node linkType: hard @@ -18990,7 +23830,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^8.0.0, supports-color@npm:^8.1.0": +"supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": version: 8.1.1 resolution: "supports-color@npm:8.1.1" dependencies: @@ -18999,12 +23839,10 @@ __metadata: languageName: node linkType: hard -"supports-esm@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-esm@npm:1.0.0" - dependencies: - has-package-exports: ^1.1.0 - checksum: 3497a5886d3d9cd498ecec7679b7028e312c2c0fb897582eb06ba46caf1562aebc9b915103efb1d9e79b1bd6f0e2e2efe9d14dd4906255ceac9b79f53b91cb84 +"supports-color@npm:^9.0.0": + version: 9.3.1 + resolution: "supports-color@npm:9.3.1" + checksum: 00c4d1082a7ba0ee21cba1d4e4a466642635412e40476777b530aa5110d035e99a420cd048e1fb6811f2254c0946095fbb87a1eccf1af1d1ca45ab0a4535db93 languageName: node linkType: hard @@ -19025,69 +23863,31 @@ __metadata: languageName: node linkType: hard -"svgo@npm:2.8.0": - version: 2.8.0 - resolution: "svgo@npm:2.8.0" +"swr@npm:^2.1.5": + version: 2.1.5 + resolution: "swr@npm:2.1.5" dependencies: - "@trysound/sax": 0.2.0 - commander: ^7.2.0 - css-select: ^4.1.3 - css-tree: ^1.1.3 - csso: ^4.2.0 - picocolors: ^1.0.0 - stable: ^0.1.8 - bin: - svgo: bin/svgo - checksum: b92f71a8541468ffd0b81b8cdb36b1e242eea320bf3c1a9b2c8809945853e9d8c80c19744267eb91cabf06ae9d5fff3592d677df85a31be4ed59ff78534fa420 - languageName: node - linkType: hard - -"swr@npm:^1.3.0": - version: 1.3.0 - resolution: "swr@npm:1.3.0" + use-sync-external-store: ^1.2.0 peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 - checksum: e7a184f0d560e9c8be85c023cc8e65e56a88a6ed46f9394b301b07f838edca23d2e303685319a4fcd620b81d447a7bcb489c7fa0a752c259f91764903c690cdb - languageName: node - linkType: hard - -"sync-request@npm:^6.1.0": - version: 6.1.0 - resolution: "sync-request@npm:6.1.0" - dependencies: - http-response-object: ^3.0.1 - sync-rpc: ^1.2.1 - then-request: ^6.0.0 - checksum: cc8438a6749f62fb501d022fae0e3af3ac4a9983f889f929c8721b328a1c3408b98ca218aad886785a02be2c34bd75eb1a5a2608bd1fcee3c8c099391ff53a11 - languageName: node - linkType: hard - -"sync-rpc@npm:^1.2.1": - version: 1.3.6 - resolution: "sync-rpc@npm:1.3.6" - dependencies: - get-port: ^3.1.0 - checksum: 4340974fb5641c2cadb9df18d6b791ed2327f28cf6d8a00c99ebc2278e37391e3f5e237596da2ff83d14d2147594c6f5b3b98a93b9327644db425d239dea172f + checksum: f2ef9b83ec4b2ebf4d520578ab847307700db01ffcab64b3aec6ea94feaf96ca10e38e8b08bc8adfab8eaa6ec1bdfd64f82b6f5c14cc4cb5cf11e6fd22b405a4 languageName: node linkType: hard -"synckit@npm:^0.7.0": - version: 0.7.3 - resolution: "synckit@npm:0.7.3" - dependencies: - "@pkgr/utils": ^2.3.0 - tslib: ^2.4.0 - checksum: 15b1841c16e80e84e4eb7b43680f37ad94377a032cd9f5f6fd1c9cbd32bb1b7d1cf1c32111821d4f1b5477dffb599aeda7f0c1e70c7333fbedd80951d41bf5e8 +"synchronous-promise@npm:^2.0.15": + version: 2.0.17 + resolution: "synchronous-promise@npm:2.0.17" + checksum: 7b1342c93741f3f92ebde1edf5d6ce8dde2278de948d84e9bd85e232c16c0d77c90c4940f9975be3effcb20f047cfb0f16fa311c3b4e092c22f3bf2889fb0fb4 languageName: node linkType: hard -"synckit@npm:^0.8.0, synckit@npm:^0.8.4": - version: 0.8.4 - resolution: "synckit@npm:0.8.4" +"synckit@npm:^0.8.0, synckit@npm:^0.8.5": + version: 0.8.5 + resolution: "synckit@npm:0.8.5" dependencies: "@pkgr/utils": ^2.3.1 - tslib: ^2.4.0 - checksum: 83e054fe4494dab42114fc4ed36a11b85e18742d304ade3f40d3afb4ba4145d76183adba1f29e2c36e9a0a453b93a83e2387505f96a0efd901f562927a968c44 + tslib: ^2.5.0 + checksum: 8a9560e5d8f3d94dc3cf5f7b9c83490ffa30d320093560a37b88f59483040771fd1750e76b9939abfbb1b5a23fd6dfbae77f6b338abffe7cae7329cd9b9bb86b languageName: node linkType: hard @@ -19104,14 +23904,14 @@ __metadata: languageName: node linkType: hard -"taffydb@npm:2.6.2": - version: 2.6.2 - resolution: "taffydb@npm:2.6.2" - checksum: 8fea9cdff71735a40320c4beeb80cb98837076cb89614bc55ac5d67561f35ebae158cfc07a193a1099b5e32746433b2c086b0cd6d56f29aa7c7678e74968335b +"tapable@npm:^2.2.0": + version: 2.2.1 + resolution: "tapable@npm:2.2.1" + checksum: 3b7a1b4d86fa940aad46d9e73d1e8739335efd4c48322cb37d073eb6f80f5281889bf0320c6d8ffcfa1a0dd5bfdbd0f9d037e252ef972aca595330538aac4d51 languageName: node linkType: hard -"tar-fs@npm:^2.0.0, tar-fs@npm:^2.1.1": +"tar-fs@npm:2.1.1, tar-fs@npm:^2.0.0, tar-fs@npm:^2.1.1": version: 2.1.1 resolution: "tar-fs@npm:2.1.1" dependencies: @@ -19123,7 +23923,7 @@ __metadata: languageName: node linkType: hard -"tar-stream@npm:^2.1.4": +"tar-stream@npm:^2.0.1, tar-stream@npm:^2.1.4": version: 2.2.0 resolution: "tar-stream@npm:2.2.0" dependencies: @@ -19136,17 +23936,26 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.1.11 - resolution: "tar@npm:6.1.11" +"tar@npm:^6.0.2, tar@npm:^6.1.11, tar@npm:^6.1.13, tar@npm:^6.1.2": + version: 6.1.15 + resolution: "tar@npm:6.1.15" dependencies: chownr: ^2.0.0 fs-minipass: ^2.0.0 - minipass: ^3.0.0 + minipass: ^5.0.0 minizlib: ^2.1.1 mkdirp: ^1.0.3 yallist: ^4.0.0 - checksum: a04c07bb9e2d8f46776517d4618f2406fb977a74d914ad98b264fc3db0fe8224da5bec11e5f8902c5b9bcb8ace22d95fbe3c7b36b8593b7dfc8391a25898f32f + checksum: f23832fceeba7578bf31907aac744ae21e74a66f4a17a9e94507acf460e48f6db598c7023882db33bab75b80e027c21f276d405e4a0322d58f51c7088d428268 + languageName: node + linkType: hard + +"telejson@npm:^7.0.3": + version: 7.1.0 + resolution: "telejson@npm:7.1.0" + dependencies: + memoizerific: ^1.11.3 + checksum: 8000e43dc862a87ab1ca342a2635641923d55c2585f85ea8c7c60293681d6f920e8b9570cc12d90ecef286f065c176da5f769f42f4828ba18a626627bed1ac07 languageName: node linkType: hard @@ -19164,6 +23973,15 @@ __metadata: languageName: node linkType: hard +"temp@npm:^0.8.4": + version: 0.8.4 + resolution: "temp@npm:0.8.4" + dependencies: + rimraf: ~2.6.2 + checksum: f35bed78565355dfdf95f730b7b489728bd6b7e35071bcc6497af7c827fb6c111fbe9063afc7b8cbc19522a072c278679f9a0ee81e684aa2c8617cc0f2e9c191 + languageName: node + linkType: hard + "tempfile@npm:^3.0.0": version: 3.0.0 resolution: "tempfile@npm:3.0.0" @@ -19174,17 +23992,16 @@ __metadata: languageName: node linkType: hard -"terser@npm:5.15.1, terser@npm:^5.14.2": - version: 5.15.1 - resolution: "terser@npm:5.15.1" +"tempy@npm:^1.0.1": + version: 1.0.1 + resolution: "tempy@npm:1.0.1" dependencies: - "@jridgewell/source-map": ^0.3.2 - acorn: ^8.5.0 - commander: ^2.20.0 - source-map-support: ~0.5.20 - bin: - terser: bin/terser - checksum: 9880a1e0956983a1ce5de204ea35121c0009fa41d582a6904ae850e1953a1a2cc021168439565280c5a8eee67c85a874175627e24989b046c7a72589b81c3979 + del: ^6.0.0 + is-stream: ^2.0.0 + temp-dir: ^2.0.0 + type-fest: ^0.16.0 + unique-string: ^2.0.0 + checksum: e77ca4440af18e42dc64d8903b7ed0be673455b76680ff94a7d7c6ee7c16f7604bdcdee3c39436342b1082c23eda010dbe48f6094e836e0bd53c8b1aa63e5b95 languageName: node linkType: hard @@ -19243,25 +24060,6 @@ __metadata: languageName: node linkType: hard -"then-request@npm:^6.0.0": - version: 6.0.2 - resolution: "then-request@npm:6.0.2" - dependencies: - "@types/concat-stream": ^1.6.0 - "@types/form-data": 0.0.33 - "@types/node": ^8.0.0 - "@types/qs": ^6.2.31 - caseless: ~0.12.0 - concat-stream: ^1.6.0 - form-data: ^2.2.0 - http-basic: ^8.1.1 - http-response-object: ^3.0.1 - promise: ^8.0.0 - qs: ^6.4.0 - checksum: a24a4fc95dd8591966bf3752f024f5cd4d53c2b2c29b23b4e40c3322df6a432d939bc17b589d8e9d760b90e92ab860f6f361a4dfcfe3542019e1615fb51afccc - languageName: node - linkType: hard - "thenify-all@npm:^1.0.0": version: 1.6.0 resolution: "thenify-all@npm:1.6.0" @@ -19280,6 +24078,13 @@ __metadata: languageName: node linkType: hard +"third-party-web@npm:^0.20.2": + version: 0.20.2 + resolution: "third-party-web@npm:0.20.2" + checksum: 591cd651374081f895628eefb8f2aa6616e26428a4256f503e98136b7c4b14b64d01494d3149248330b7a3cfcb40d21485aeb52d173a3e9d17d8f9ccc88a9e30 + languageName: node + linkType: hard + "throttle-debounce@npm:^3.0.1": version: 3.0.1 resolution: "throttle-debounce@npm:3.0.1" @@ -19287,14 +24092,7 @@ __metadata: languageName: node linkType: hard -"throttles@npm:^1.0.1": - version: 1.0.1 - resolution: "throttles@npm:1.0.1" - checksum: 0f3b36b8fcba720df7ab283f40f4e4d6b1b31939dba7fafac6e4e8bc1743eeaff546916a66344be7af1d7a2d014d799e7924009a15118887aef0cfc5292559a1 - languageName: node - linkType: hard - -"through2@npm:^2.0.0": +"through2@npm:^2.0.0, through2@npm:^2.0.3": version: 2.0.5 resolution: "through2@npm:2.0.5" dependencies: @@ -19313,7 +24111,7 @@ __metadata: languageName: node linkType: hard -"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.8": +"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.6, through@npm:^2.3.8": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd @@ -19329,41 +24127,54 @@ __metadata: languageName: node linkType: hard -"tiny-glob@npm:^0.2.9": - version: 0.2.9 - resolution: "tiny-glob@npm:0.2.9" - dependencies: - globalyzer: 0.1.0 - globrex: ^0.1.2 - checksum: aea5801eb6663ddf77ebb74900b8f8bd9dfcfc9b6a1cc8018cb7421590c00bf446109ff45e4b64a98e6c95ddb1255a337a5d488fb6311930e2a95334151ec9c6 +"time-zone@npm:^1.0.0": + version: 1.0.0 + resolution: "time-zone@npm:1.0.0" + checksum: e46f5a69b8c236dcd8e91e29d40d4e7a3495ed4f59888c3f84ce1d9678e20461421a6ba41233509d47dd94bc18f1a4377764838b21b584663f942b3426dcbce8 languageName: node linkType: hard -"tinybench@npm:^2.3.0": - version: 2.3.0 - resolution: "tinybench@npm:2.3.0" - checksum: 6556e42b3b7700795caca07f5bbc2c78e33261ffe5db4c434d54bcfa1cd5c64863357c5b7fff53e031ee236d098313dac78938e12f8f1a9b47f1d7ad55417ce8 +"tiny-inflate@npm:^1.0.0": + version: 1.0.3 + resolution: "tiny-inflate@npm:1.0.3" + checksum: 4086a1f8938dafa4a20c63b099aeb47bf8fef5aca991bf4ea4b35dd2684fa52363b2c19b3e76660311e7613cb7c4f063bc48751b9bdf9555e498d997c30bc2d6 languageName: node linkType: hard -"tinypool@npm:^0.3.0": - version: 0.3.0 - resolution: "tinypool@npm:0.3.0" - checksum: 92291c309ed8d004c1ee1ef7f610cd90352383f12c52b0ec16abd9ebc665c03626e7afbc9993df97f63e67fea002b5cc18ba5e8f90260643867cbcac278a183c +"tinybench@npm:^2.5.0": + version: 2.5.0 + resolution: "tinybench@npm:2.5.0" + checksum: 284bb9428f197ec8b869c543181315e65e41ccfdad3c4b6c916bb1fdae1b5c6785661b0d90cf135b48d833b03cb84dc5357b2d33ec65a1f5971fae0ab2023821 languageName: node linkType: hard -"tinyspy@npm:^1.0.2": - version: 1.0.2 - resolution: "tinyspy@npm:1.0.2" - checksum: 32096121aa8d52bb625ad62c9314b3e4daba4ab9ac428217b12b1e1dfe9860e3c94d54a7affa279cc70dc6f10d88c6ba46b51de68896b318a06d02f05e87dcc3 +"tinypool@npm:^0.5.0": + version: 0.5.0 + resolution: "tinypool@npm:0.5.0" + checksum: 4e0dfd8f28666d541c1d92304222edc4613f05d74fe2243c8520d466a2cc6596011a7072c1c41a7de7522351b82fda07e8038198e8f43673d8d69401c5903f8c languageName: node linkType: hard -"titleize@npm:^1.0.0": - version: 1.0.1 - resolution: "titleize@npm:1.0.1" - checksum: 686ec747309423d820e1ca549dfa421cc196368affad30e2998d5b952af9c2b62b77dd36b2a822f069c83d3e4135d45d883563769829e9c639f37b078c556c95 +"tinyspy@npm:^2.1.0": + version: 2.1.0 + resolution: "tinyspy@npm:2.1.0" + checksum: cb83c1f74a79dd5934018bad94f60a304a29d98a2d909ea45fc367f7b80b21b0a7d8135a2ce588deb2b3ba56c7c607258b2a03e6001d89e4d564f9a95cc6a81f + languageName: node + linkType: hard + +"titleize@npm:^3.0.0": + version: 3.0.0 + resolution: "titleize@npm:3.0.0" + checksum: 71fbbeabbfb36ccd840559f67f21e356e1d03da2915b32d2ae1a60ddcc13a124be2739f696d2feb884983441d159a18649e8d956648d591bdad35c430a6b6d28 + languageName: node + linkType: hard + +"tmp@npm:^0.0.33": + version: 0.0.33 + resolution: "tmp@npm:0.0.33" + dependencies: + os-tmpdir: ~1.0.2 + checksum: 902d7aceb74453ea02abbf58c203f4a8fc1cead89b60b31e354f74ed5b3fb09ea817f94fb310f884a5d16987dd9fa5a735412a7c2dd088dd3d415aa819ae3a28 languageName: node linkType: hard @@ -19406,13 +24217,6 @@ __metadata: languageName: node linkType: hard -"to-readable-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "to-readable-stream@npm:1.0.0" - checksum: 2bd7778490b6214a2c40276065dd88949f4cf7037ce3964c76838b8cb212893aeb9cceaaf4352a4c486e3336214c350270f3263e1ce7a0c38863a715a4d9aeb5 - languageName: node - linkType: hard - "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -19431,6 +24235,16 @@ __metadata: languageName: node linkType: hard +"to-vfile@npm:^7.0.0": + version: 7.2.4 + resolution: "to-vfile@npm:7.2.4" + dependencies: + is-buffer: ^2.0.0 + vfile: ^5.1.0 + checksum: 5fa9bd6c3b0dae6abc65a882bef4d899940305237449740ee803c5ef87c1df56425290009abde7d215884f481c3254d78d19120f38109217c6c066676f2e7609 + languageName: node + linkType: hard + "toggle-selection@npm:^1.0.6": version: 1.0.6 resolution: "toggle-selection@npm:1.0.6" @@ -19455,10 +24269,24 @@ __metadata: languageName: node linkType: hard -"totalist@npm:^3.0.0": +"toml@npm:^3.0.0": version: 3.0.0 - resolution: "totalist@npm:3.0.0" - checksum: ec499bddfc73d5b6c73f8ff68afd7bed286705797f928a11177fee5d1ee80e9052ffcb434638437702e16864bd5490f437a54f79bfea9564e875d34ed3254bca + resolution: "toml@npm:3.0.0" + checksum: 5d7f1d8413ad7780e9bdecce8ea4c3f5130dd53b0a4f2e90b93340979a137739879d7b9ce2ce05c938b8cc828897fe9e95085197342a1377dd8850bf5125f15f + languageName: node + linkType: hard + +"totalist@npm:^1.0.0": + version: 1.1.0 + resolution: "totalist@npm:1.1.0" + checksum: dfab80c7104a1d170adc8c18782d6c04b7df08352dec452191208c66395f7ef2af7537ddfa2cf1decbdcfab1a47afbbf0dec6543ea191da98c1c6e1599f86adc + languageName: node + linkType: hard + +"totalist@npm:^3.0.0": + version: 3.0.1 + resolution: "totalist@npm:3.0.1" + checksum: 5132d562cf88ff93fd710770a92f31dbe67cc19b5c6ccae2efc0da327f0954d211bbfd9456389655d726c624f284b4a23112f56d1da931ca7cfabbe1f45e778a languageName: node linkType: hard @@ -19497,6 +24325,13 @@ __metadata: languageName: node linkType: hard +"treeify@npm:^1.1.0": + version: 1.1.0 + resolution: "treeify@npm:1.1.0" + checksum: aa00dded220c1dd052573bd6fc2c52862f09870851a284f0d3650d72bf913ba9b4f6b824f4f1ab81899bae29375f4266b07fe47cbf82343a1efa13cc09ce87af + languageName: node + linkType: hard + "trim-lines@npm:^3.0.0": version: 3.0.1 resolution: "trim-lines@npm:3.0.1" @@ -19511,10 +24346,10 @@ __metadata: languageName: node linkType: hard -"trough@npm:^1.0.0": - version: 1.0.5 - resolution: "trough@npm:1.0.5" - checksum: d6c8564903ed00e5258bab92134b020724dbbe83148dc72e4bf6306c03ed8843efa1bcc773fa62410dd89161ecb067432dd5916501793508a9506cacbc408e25 +"trim-newlines@npm:^4.0.2": + version: 4.1.1 + resolution: "trim-newlines@npm:4.1.1" + checksum: 5b09f8e329e8f33c1111ef26906332ba7ba7248cde3e26fc054bb3d69f2858bf5feedca9559c572ff91f33e52977c28e0d41c387df6a02a633cbb8c2d8238627 languageName: node linkType: hard @@ -19525,6 +24360,13 @@ __metadata: languageName: node linkType: hard +"ts-dedent@npm:^2.0.0, ts-dedent@npm:^2.2.0": + version: 2.2.0 + resolution: "ts-dedent@npm:2.2.0" + checksum: 93ed8f7878b6d5ed3c08d99b740010eede6bccfe64bce61c5a4da06a2c17d6ddbb80a8c49c2d15251de7594a4f93ffa21dd10e7be75ef66a4dc9951b4a94e2af + languageName: node + linkType: hard + "ts-easing@npm:^0.2.0": version: 0.2.0 resolution: "ts-easing@npm:0.2.0" @@ -19539,10 +24381,10 @@ __metadata: languageName: node linkType: hard -"ts-mixer@npm:^6.0.1": - version: 6.0.1 - resolution: "ts-mixer@npm:6.0.1" - checksum: 7050f6e85a24155d18cecdcc0a098d1038991cc498317fcffa9d7a8654c776d417fb97e65de1ce8e7ed54ef4814abd8057d0efb9c3b24e9cc78ac3c0f48bbf53 +"ts-mixer@npm:^6.0.3": + version: 6.0.3 + resolution: "ts-mixer@npm:6.0.3" + checksum: 7fbaba0a413bf817835a6a23d46bccf4192dd4d7345b6bae9d594c88acffac35bf4995ef3cce753090c8abcdf2afd16dba8899365584a1f960ccc2a15bf2e2d6 languageName: node linkType: hard @@ -19550,43 +24392,23 @@ __metadata: version: 12.0.0 resolution: "ts-morph@npm:12.0.0" dependencies: - "@ts-morph/common": ~0.11.0 - code-block-writer: ^10.1.1 - checksum: c033708c76448625380daa3b8c2eeea1306300fa4367804029635f0d911a3723e4315a6e0824e6dfb256df0b99aac0ea0478cb3f14ed6fae2339d43ec882a427 - languageName: node - linkType: hard - -"ts-morph@npm:^16.0.0": - version: 16.0.0 - resolution: "ts-morph@npm:16.0.0" - dependencies: - "@ts-morph/common": ~0.17.0 - code-block-writer: ^11.0.3 - checksum: a45ee1a2da09b06ac45a468c1cb9b00cc1b335224afddb22c30e4ad8a747b71c8a7c6cea29a6309ebf68d69f5dc8d3650d381891b77da5e2ad3e301dc3de40d5 - languageName: node - linkType: hard - -"ts-node@npm:8.9.1": - version: 8.9.1 - resolution: "ts-node@npm:8.9.1" - dependencies: - arg: ^4.1.0 - diff: ^4.0.1 - make-error: ^1.1.1 - source-map-support: ^0.5.17 - yn: 3.1.1 - peerDependencies: - typescript: ">=2.7" - bin: - ts-node: dist/bin.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 59997e32cfb84323317f9fd33ff62d025b467ff36c296c3ad1ee54f08fd355c58fab37e096e2a63fd01fced929384b16b9d74bf324713a21844e527ddd5f6c17 + "@ts-morph/common": ~0.11.0 + code-block-writer: ^10.1.1 + checksum: c033708c76448625380daa3b8c2eeea1306300fa4367804029635f0d911a3723e4315a6e0824e6dfb256df0b99aac0ea0478cb3f14ed6fae2339d43ec882a427 + languageName: node + linkType: hard + +"ts-morph@npm:18.0.0": + version: 18.0.0 + resolution: "ts-morph@npm:18.0.0" + dependencies: + "@ts-morph/common": ~0.19.0 + code-block-writer: ^12.0.0 + checksum: e3d3099b9a632dfcea2ddc75f00e0d0866b4f6d27b73f9e0ff96cf64fe24ce8074098d6709873afce9edb852c2127c40ad4013f54fdf68dafe0231f1a71827c8 languageName: node linkType: hard -"ts-node@npm:^10.8.1": +"ts-node@npm:10.9.1, ts-node@npm:^10.8.1": version: 10.9.1 resolution: "ts-node@npm:10.9.1" dependencies: @@ -19624,6 +24446,13 @@ __metadata: languageName: node linkType: hard +"ts-pattern@npm:^4.2.2": + version: 4.3.0 + resolution: "ts-pattern@npm:4.3.0" + checksum: f5167f6f721212c1e22f8590bb1fc21e27fd591d6fc5af0e467778f8e5b2dc1ae490cf5c633c83a3021a61283a671a53faf250b081c17c0f025e73eb775e5fe3 + languageName: node + linkType: hard + "ts-toolbelt@npm:^6.15.5": version: 6.15.5 resolution: "ts-toolbelt@npm:6.15.5" @@ -19632,43 +24461,30 @@ __metadata: linkType: hard "tsconfig-paths@npm:^4.0.0": - version: 4.1.0 - resolution: "tsconfig-paths@npm:4.1.0" + version: 4.2.0 + resolution: "tsconfig-paths@npm:4.2.0" dependencies: - json5: ^2.2.1 + json5: ^2.2.2 minimist: ^1.2.6 strip-bom: ^3.0.0 - checksum: e4b101f81b2abd95499d8145e0aa73144e857c2c359191058486cef101b7accae22a69114e5d5814a13d5ab3b0bae70dd0c85bcdb7e829bbe1bfda5c9067c9b1 - languageName: node - linkType: hard - -"tsconfig-resolver@npm:^3.0.1": - version: 3.0.1 - resolution: "tsconfig-resolver@npm:3.0.1" - dependencies: - "@types/json5": ^0.0.30 - "@types/resolve": ^1.17.0 - json5: ^2.1.3 - resolve: ^1.17.0 - strip-bom: ^4.0.0 - type-fest: ^0.13.1 - checksum: c37b2b6e605f4e912e377161d1dc7986448dc5682c81de8ad9d233ec6bdb26d27e483df084a0252611122bab29f21ce06e167a3d1d861b89cbffc3828e03b9a7 + checksum: 28c5f7bbbcabc9dabd4117e8fdc61483f6872a1c6b02a4b1c4d68c5b79d06896c3cc9547610c4c3ba64658531caa2de13ead1ea1bf321c7b53e969c4752b98c7 languageName: node linkType: hard -"tsd@npm:^0.24.1": - version: 0.24.1 - resolution: "tsd@npm:0.24.1" +"tsd@npm:^0.28.1": + version: 0.28.1 + resolution: "tsd@npm:0.28.1" dependencies: - "@tsd/typescript": ~4.8.3 + "@tsd/typescript": ~5.0.2 eslint-formatter-pretty: ^4.1.0 globby: ^11.0.1 + jest-diff: ^29.0.3 meow: ^9.0.0 path-exists: ^4.0.0 read-pkg-up: ^7.0.0 bin: tsd: dist/cli.js - checksum: 9c0cabcfb3d5bce468e8566f849d6ba9d483a4d4a86ac9f1a34d238dee90756d3b21d52d07afca878685773efd99dab93988e4a9e0c5d836616ce12c109382be + checksum: ca0f0d2ba3063a252ac3ecf5799c6dc8c4c35726f0d0683e6577992a9916cfe3e476f9fdbb67bf57ce8e46ef9cd0189bb847d336d1c01679232f1b91828b0fa6 languageName: node linkType: hard @@ -19679,10 +24495,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 +"tslib@npm:^2, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.4.1, tslib@npm:^2.5.0, tslib@npm:^2.5.2": + version: 2.5.2 + resolution: "tslib@npm:2.5.2" + checksum: 4d3c1e238b94127ed0e88aa0380db3c2ddae581dc0f4bae5a982345e9f50ee5eda90835b8bfba99b02df10a5734470be197158c36f9129ac49fdc14a6a9da222 languageName: node linkType: hard @@ -19736,39 +24552,64 @@ __metadata: languageName: node linkType: hard -"tsm@npm:^2.1.4": - version: 2.2.2 - resolution: "tsm@npm:2.2.2" +"tsup@npm:6.7.0": + version: 6.7.0 + resolution: "tsup@npm:6.7.0" dependencies: - esbuild: ^0.14.0 + bundle-require: ^4.0.0 + cac: ^6.7.12 + chokidar: ^3.5.1 + debug: ^4.3.1 + esbuild: ^0.17.6 + execa: ^5.0.0 + globby: ^11.0.3 + joycon: ^3.0.1 + postcss-load-config: ^3.0.1 + resolve-from: ^5.0.0 + rollup: ^3.2.5 + source-map: 0.8.0-beta.0 + sucrase: ^3.20.3 + tree-kill: ^1.2.2 + peerDependencies: + "@swc/core": ^1 + postcss: ^8.4.12 + typescript: ">=4.1.0" + peerDependenciesMeta: + "@swc/core": + optional: true + postcss: + optional: true + typescript: + optional: true bin: - tsm: bin.js - checksum: 5908f7e5167c0552b180e04f950430a5f890d95b9ac4b7f2016cbe566df2515f4b7c4f3519fa6f6edc2bf47f4b8fe38b301407d613f8b3c491b51339c098573b + tsup: dist/cli-default.js + tsup-node: dist/cli-node.js + checksum: 91ff179f0b9828a6880b6decaa8603fd7af0311f46a38d3a93647a2497298750d676810aeff533a335443a01a7b340dbba7c76523bcd7a87d7b05b7677742901 languageName: node linkType: hard -"tsup@npm:^6.3.0": - version: 6.3.0 - resolution: "tsup@npm:6.3.0" +"tsup@patch:tsup@npm%3A6.7.0#./.yarn/patches/tsup-npm-6.7.0-5093540b93.patch::locator=%40discordjs%2Fdiscord.js%40workspace%3A.": + version: 6.7.0 + resolution: "tsup@patch:tsup@npm%3A6.7.0#./.yarn/patches/tsup-npm-6.7.0-5093540b93.patch::version=6.7.0&hash=73ff1a&locator=%40discordjs%2Fdiscord.js%40workspace%3A." dependencies: - bundle-require: ^3.1.0 + bundle-require: ^4.0.0 cac: ^6.7.12 chokidar: ^3.5.1 debug: ^4.3.1 - esbuild: ^0.15.1 + esbuild: ^0.17.6 execa: ^5.0.0 globby: ^11.0.3 joycon: ^3.0.1 postcss-load-config: ^3.0.1 resolve-from: ^5.0.0 - rollup: ^2.74.1 + rollup: ^3.2.5 source-map: 0.8.0-beta.0 sucrase: ^3.20.3 tree-kill: ^1.2.2 peerDependencies: "@swc/core": ^1 postcss: ^8.4.12 - typescript: ^4.1.0 + typescript: ">=4.1.0" peerDependenciesMeta: "@swc/core": optional: true @@ -19779,23 +24620,23 @@ __metadata: bin: tsup: dist/cli-default.js tsup-node: dist/cli-node.js - checksum: f1fccd555a77ff82b3b3d4ce28188f5703695af5e9d593a4edcfc3807cbebb5b04e619ad9ae0b0c92830cbbcbf6d76356365a8986ebe82d7389151a4f66a6c49 + checksum: 7c0a4c50725dd359f2841f0f499bc6155c350a4d8292c26ca65910be90273c19a3d644d9b7e29463400012bf9f2cd74c714b3677765fcaca64bd63b11c11e578 languageName: node linkType: hard "tsutils-etc@npm:^1.4.1": - version: 1.4.1 - resolution: "tsutils-etc@npm:1.4.1" + version: 1.4.2 + resolution: "tsutils-etc@npm:1.4.2" dependencies: "@types/yargs": ^17.0.0 yargs: ^17.0.0 peerDependencies: tsutils: ^3.0.0 - typescript: ^4.0.0 + typescript: ">=4.0.0" bin: ts-flags: bin/ts-flags ts-kind: bin/ts-kind - checksum: e44f0fd4229f9e4f00190e6f10cd03f06fa7c11c9f9339c328ebc80a19925582b6a9b32da442359bf63751b7737152e0d8e732c681f7646c2253dffa49f97b32 + checksum: 3ced18d72701973e63b8c0c80ba184a95c335936da9ccc47706d435581d2726aba15eae975ea8335b083a9a02cd6c029f6c0ef9ad1d50395728148ef18f31bc9 languageName: node linkType: hard @@ -19837,58 +24678,58 @@ __metadata: languageName: node linkType: hard -"turbo-darwin-64@npm:1.5.6": - version: 1.5.6 - resolution: "turbo-darwin-64@npm:1.5.6" +"turbo-darwin-64@npm:1.9.8": + version: 1.9.8 + resolution: "turbo-darwin-64@npm:1.9.8" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"turbo-darwin-arm64@npm:1.5.6": - version: 1.5.6 - resolution: "turbo-darwin-arm64@npm:1.5.6" +"turbo-darwin-arm64@npm:1.9.8": + version: 1.9.8 + resolution: "turbo-darwin-arm64@npm:1.9.8" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"turbo-linux-64@npm:1.5.6": - version: 1.5.6 - resolution: "turbo-linux-64@npm:1.5.6" +"turbo-linux-64@npm:1.9.8": + version: 1.9.8 + resolution: "turbo-linux-64@npm:1.9.8" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"turbo-linux-arm64@npm:1.5.6": - version: 1.5.6 - resolution: "turbo-linux-arm64@npm:1.5.6" +"turbo-linux-arm64@npm:1.9.8": + version: 1.9.8 + resolution: "turbo-linux-arm64@npm:1.9.8" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"turbo-windows-64@npm:1.5.6": - version: 1.5.6 - resolution: "turbo-windows-64@npm:1.5.6" +"turbo-windows-64@npm:1.9.8": + version: 1.9.8 + resolution: "turbo-windows-64@npm:1.9.8" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"turbo-windows-arm64@npm:1.5.6": - version: 1.5.6 - resolution: "turbo-windows-arm64@npm:1.5.6" +"turbo-windows-arm64@npm:1.9.8": + version: 1.9.8 + resolution: "turbo-windows-arm64@npm:1.9.8" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"turbo@npm:^1.5.6": - version: 1.5.6 - resolution: "turbo@npm:1.5.6" +"turbo@npm:^1.9.8": + version: 1.9.8 + resolution: "turbo@npm:1.9.8" dependencies: - turbo-darwin-64: 1.5.6 - turbo-darwin-arm64: 1.5.6 - turbo-linux-64: 1.5.6 - turbo-linux-arm64: 1.5.6 - turbo-windows-64: 1.5.6 - turbo-windows-arm64: 1.5.6 + turbo-darwin-64: 1.9.8 + turbo-darwin-arm64: 1.9.8 + turbo-linux-64: 1.9.8 + turbo-linux-arm64: 1.9.8 + turbo-windows-64: 1.9.8 + turbo-windows-arm64: 1.9.8 dependenciesMeta: turbo-darwin-64: optional: true @@ -19904,7 +24745,7 @@ __metadata: optional: true bin: turbo: bin/turbo - checksum: 5a243f0113fb886c90e8d7b4e94b590acef9813b1cfb13330b3d62c2b09e89647b5aabbe3ecf80d5fe3d8c1ee74ad4eb81f25de30ef62eb1c8a15c23383bd943 + checksum: 3bf5f6093302c9a1b512c5662922bfba90bbf99b0b523777ce7c2282f587df74c0fdc115a1659adeef37fca0643f02b01869b2cacc01b94591587193cba6459e languageName: node linkType: hard @@ -19922,6 +24763,13 @@ __metadata: languageName: node linkType: hard +"typanion@npm:^3.12.1, typanion@npm:^3.8.0": + version: 3.12.1 + resolution: "typanion@npm:3.12.1" + checksum: a2e26fa216f8a1dbd2ffbaacb75b1e2dc042a0356e9702fba05a968cad95d9f661b24e37f6c6d8c3adad2c8582c99fca4826ff26a2d07cd2ae617ea87e6187eb + languageName: node + linkType: hard + "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" @@ -19931,6 +24779,15 @@ __metadata: languageName: node linkType: hard +"type-check@npm:~0.3.2": + version: 0.3.2 + resolution: "type-check@npm:0.3.2" + dependencies: + prelude-ls: ~1.1.2 + checksum: dd3b1495642731bc0e1fc40abe5e977e0263005551ac83342ecb6f4f89551d106b368ec32ad3fb2da19b3bd7b2d1f64330da2ea9176d8ddbfe389fb286eb5124 + languageName: node + linkType: hard + "type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.5": version: 4.0.8 resolution: "type-detect@npm:4.0.8" @@ -19938,10 +24795,10 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.13.1": - version: 0.13.1 - resolution: "type-fest@npm:0.13.1" - checksum: e6bf2e3c449f27d4ef5d56faf8b86feafbc3aec3025fc9a5fbe2db0a2587c44714521f9c30d8516a833c8c506d6263f5cc11267522b10c6ccdb6cc55b0a9d1c4 +"type-fest@npm:^0.16.0": + version: 0.16.0 + resolution: "type-fest@npm:0.16.0" + checksum: 1a4102c06dc109db00418c753062e206cab65befd469d000ece4452ee649bf2a9cf57686d96fb42326bc9d918d9a194d4452897b486dcc41989e5c99e4e87094 languageName: node linkType: hard @@ -19980,13 +24837,27 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^2.13.0, type-fest@npm:^2.5.0": +"type-fest@npm:^1.0.1, type-fest@npm:^1.2.1, type-fest@npm:^1.2.2": + version: 1.4.0 + resolution: "type-fest@npm:1.4.0" + checksum: b011c3388665b097ae6a109a437a04d6f61d81b7357f74cbcb02246f2f5bd72b888ae33631b99871388122ba0a87f4ff1c94078e7119ff22c70e52c0ff828201 + languageName: node + linkType: hard + +"type-fest@npm:^2.19.0": version: 2.19.0 resolution: "type-fest@npm:2.19.0" checksum: a4ef07ece297c9fba78fc1bd6d85dff4472fe043ede98bd4710d2615d15776902b595abf62bd78339ed6278f021235fb28a96361f8be86ed754f778973a0d278 languageName: node linkType: hard +"type-fest@npm:^3.7.1": + version: 3.11.0 + resolution: "type-fest@npm:3.11.0" + checksum: ebd7968301674d8022cd180aa34a685bda5962ad3c98da7280456f97468c1b12984f6a79d4eb4652f10e1f0ab42f7016121fd762068fd6255d4d0ccc069c2566 + languageName: node + linkType: hard + "type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -19997,6 +24868,17 @@ __metadata: languageName: node linkType: hard +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 + languageName: node + linkType: hard + "typedarray-to-buffer@npm:^3.1.5": version: 3.1.5 resolution: "typedarray-to-buffer@npm:3.1.5" @@ -20013,59 +24895,79 @@ __metadata: languageName: node linkType: hard -"typedoc@npm:^0.23.17": - version: 0.23.17 - resolution: "typedoc@npm:0.23.17" +"typedoc@npm:^0.24.7": + version: 0.24.7 + resolution: "typedoc@npm:0.24.7" dependencies: lunr: ^2.3.9 - marked: ^4.0.19 - minimatch: ^5.1.0 - shiki: ^0.11.1 + marked: ^4.3.0 + minimatch: ^9.0.0 + shiki: ^0.14.1 peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x bin: typedoc: bin/typedoc - checksum: 9bfcfa762205f42645a5c545cf75399346663209e1f91f3e630880a6f48a5676a2efab23305df7aca69c6fe19bd4b1c42470bf39b95a369811f6eb4d5a8549e8 + checksum: 9ae433566cb02b96deb9eb2a9f5b23d1b199f5aeb61ca8c7e2653ff5d339fbfb4d526e024febab4f3278332978814aaa0885f1d5925ba21a441d93a611510ac3 languageName: node linkType: hard -"typescript@npm:*, typescript@npm:^4.6.4, typescript@npm:^4.8.4, typescript@npm:~4.8.4": - version: 4.8.4 - resolution: "typescript@npm:4.8.4" +"typescript@npm:4.9.5, typescript@npm:^4.9.5": + version: 4.9.5 + resolution: "typescript@npm:4.9.5" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0 + checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db languageName: node linkType: hard -"typescript@npm:4.3.4": - version: 4.3.4 - resolution: "typescript@npm:4.3.4" +"typescript@npm:^4.6.4 || ^5.0.0, typescript@npm:^5.0.4, typescript@npm:~5.0.4": + version: 5.0.4 + resolution: "typescript@npm:5.0.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 75e1f2769c7ff38c718523d05eaf1c2611dbf92c0ab0f85f603ead9bb23416af2009a5dac46e76ef6a207a8508fa53f51b43a41f2a91b1241b53cd744c16128c + checksum: 82b94da3f4604a8946da585f7d6c3025fff8410779e5bde2855ab130d05e4fd08938b9e593b6ebed165bda6ad9292b230984f10952cf82f0a0ca07bbeaa08172 languageName: node linkType: hard -"typescript@patch:typescript@*#~builtin, typescript@patch:typescript@^4.6.4#~builtin, typescript@patch:typescript@^4.8.4#~builtin, typescript@patch:typescript@~4.8.4#~builtin": - version: 4.8.4 - resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin::version=4.8.4&hash=701156" +"typescript@npm:next": + version: 5.2.0-dev.20230523 + resolution: "typescript@npm:5.2.0-dev.20230523" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa + checksum: 2cf5f43f08a122db6af8a59e39fb7c923ef1583382cf5cad1a573830401c8e270aba535522291bb2f41aa0e5a515bb87cd48ec3a718b52f1b71c80ced226d2d3 languageName: node linkType: hard -"typescript@patch:typescript@4.3.4#~builtin": - version: 4.3.4 - resolution: "typescript@patch:typescript@npm%3A4.3.4#~builtin::version=4.3.4&hash=701156" +"typescript@patch:typescript@4.9.5#~builtin, typescript@patch:typescript@^4.9.5#~builtin": + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=289587" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68 + languageName: node + linkType: hard + +"typescript@patch:typescript@^4.6.4 || ^5.0.0#~builtin, typescript@patch:typescript@^5.0.4#~builtin, typescript@patch:typescript@~5.0.4#~builtin": + version: 5.0.4 + resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=b5f058" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: d26b6ba97b6d163c55dbdffd9bbb4c211667ebebc743accfeb2c8c0154aace7afd097b51165a72a5bad2cf65a4612259344ff60f8e642362aa1695c760d303ac + languageName: node + linkType: hard + +"typescript@patch:typescript@next#~builtin": + version: 5.2.0-dev.20230523 + resolution: "typescript@patch:typescript@npm%3A5.2.0-dev.20230523#~builtin::version=5.2.0-dev.20230523&hash=77c9e2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 6ccc2e1148e172da119ea4b72c66395a0c18a53884d21fb82bb4503a948a7169e9961defe24a359040a3d77bf5ff338945804296e0e27c87b5bd22ea1d25781b + checksum: 50cdfb1e23e6fdd780339166680bace42311800084e5fc1f20686155e42da531f9cb983f467010b8122d874437d3822ae4cce2bc5740b814d9be7f7ee2a4580b languageName: node linkType: hard @@ -20097,19 +24999,19 @@ __metadata: languageName: node linkType: hard -"ufo@npm:^0.8.6": - version: 0.8.6 - resolution: "ufo@npm:0.8.6" - checksum: 5d483576230c7bfa2c9c9e5d864995e18d6c08ee3955c2237cc1a0d4b35a52991a0f5d26fe8cbf11952109a925a88dc14d973e0d14159b5b96b0fe7393a52899 +"ufo@npm:^1.1.0, ufo@npm:^1.1.2": + version: 1.1.2 + resolution: "ufo@npm:1.1.2" + checksum: 83c940a6a23b6d4fc0cd116265bb5dcf88ab34a408ad9196e413270ca607a4781c09b547dc518f43caee128a096f20fe80b5a0e62b4bcc0a868619896106d048 languageName: node linkType: hard "uglify-js@npm:^3.1.4": - version: 3.17.3 - resolution: "uglify-js@npm:3.17.3" + version: 3.17.4 + resolution: "uglify-js@npm:3.17.4" bin: uglifyjs: bin/uglifyjs - checksum: 2650b2e0385fe6bf68bc0b7746028fd004bbe839447c28a59f8a9e458187e897a5057900cb715b3be4cf7cf3f1d10217198210c5c23c0bffcb20feca2de5bb17 + checksum: 7b3897df38b6fc7d7d9f4dcd658599d81aa2b1fb0d074829dd4e5290f7318dbca1f4af2f45acb833b95b1fe0ed4698662ab61b87e94328eb4c0a0d3435baf924 languageName: node linkType: hard @@ -20125,14 +25027,24 @@ __metadata: languageName: node linkType: hard -"unconfig@npm:^0.3.7": - version: 0.3.7 - resolution: "unconfig@npm:0.3.7" +"unbzip2-stream@npm:1.4.3": + version: 1.4.3 + resolution: "unbzip2-stream@npm:1.4.3" + dependencies: + buffer: ^5.2.1 + through: ^2.3.8 + checksum: 0e67c4a91f4fa0fc7b4045f8b914d3498c2fc2e8c39c359977708ec85ac6d6029840e97f508675fdbdf21fcb8d276ca502043406f3682b70f075e69aae626d1d + languageName: node + linkType: hard + +"unconfig@npm:^0.3.9": + version: 0.3.9 + resolution: "unconfig@npm:0.3.9" dependencies: - "@antfu/utils": ^0.5.2 - defu: ^6.1.0 - jiti: ^1.16.0 - checksum: d3bcd9a8d5d97418e525aa879f09d0ddc5c97be4d6237ddc8f40fb5f1feeced2163a8f8ddfa925e45d28499a4b05d86a4f2aedb3385604888225589fbc0e2367 + "@antfu/utils": ^0.7.2 + defu: ^6.1.2 + jiti: ^1.18.2 + checksum: d76b9a3a4ec9690273615a427703aad68fcb2de9a862f69db7c5b53dbb49c288a8ac00a4aee91b4e048e74c7fc0b9f2c4e214f98f51dfe8c96316f0f0b8d1f28 languageName: node linkType: hard @@ -20143,19 +25055,19 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.11.0": - version: 5.11.0 - resolution: "undici@npm:5.11.0" +"undici@npm:^5.22.1": + version: 5.22.1 + resolution: "undici@npm:5.22.1" dependencies: busboy: ^1.6.0 - checksum: 20669ef4023d24a75e81ed8142829f525f16af14d61f833b5f19cfc6bed7c706adde343a190d764dcceb227eba3211222d2b194010462a2ca221a7da0487f563 + checksum: 048a3365f622be44fb319316cedfaa241c59cf7f3368ae7667a12323447e1822e8cc3d00f6956c852d1478a6fde1cbbe753f49e05f2fdaed229693e716ebaf35 languageName: node linkType: hard -"unherit@npm:^3.0.0": - version: 3.0.0 - resolution: "unherit@npm:3.0.0" - checksum: e71c7c48aa1e47a4a489d0137d8698f9a795a880cea38c35e07b9caa1c7de7ac0764411b8726bb37897f8c55ad798b33465f6034bee252b2532801b3dd784af2 +"unfetch@npm:^4.2.0": + version: 4.2.0 + resolution: "unfetch@npm:4.2.0" + checksum: 6a4b2557e1d921eaa80c4425ce27a404945ec26491ed06e62598f333996a91a44c7908cb26dc7c2746d735762b13276cf4aa41829b4c8f438dde63add3045d7a languageName: node linkType: hard @@ -20176,10 +25088,10 @@ __metadata: languageName: node linkType: hard -"unicode-match-property-value-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.0.0" - checksum: 8fe6a09d9085a625cabcead5d95bdbc1a2d5d481712856092ce0347231e81a60b93a68f1b69e82b3076a07e415a72c708044efa2aa40ae23e2e7b5c99ed4a9ea +"unicode-match-property-value-ecmascript@npm:^2.1.0": + version: 2.1.0 + resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" + checksum: 8d6f5f586b9ce1ed0e84a37df6b42fdba1317a05b5df0c249962bd5da89528771e2d149837cad11aa26bcb84c35355cb9f58a10c3d41fa3b899181ece6c85220 languageName: node linkType: hard @@ -20190,7 +25102,47 @@ __metadata: languageName: node linkType: hard -"unified@npm:^10.0.0, unified@npm:^10.1.2, unified@npm:~10.1.2": +"unicode-trie@npm:^2.0.0": + version: 2.0.0 + resolution: "unicode-trie@npm:2.0.0" + dependencies: + pako: ^0.2.5 + tiny-inflate: ^1.0.0 + checksum: 19e637ce20953ec1fbfa9087abef4746a50352679b833be27924e4ba7ad753cc4073b74263747ccfccb5e38b30b17468cbb96f361eb49903ff8602396280b5a4 + languageName: node + linkType: hard + +"unified-engine@npm:^10.1.0": + version: 10.1.0 + resolution: "unified-engine@npm:10.1.0" + dependencies: + "@types/concat-stream": ^2.0.0 + "@types/debug": ^4.0.0 + "@types/is-empty": ^1.0.0 + "@types/node": ^18.0.0 + "@types/unist": ^2.0.0 + concat-stream: ^2.0.0 + debug: ^4.0.0 + fault: ^2.0.0 + glob: ^8.0.0 + ignore: ^5.0.0 + is-buffer: ^2.0.0 + is-empty: ^1.0.0 + is-plain-obj: ^4.0.0 + load-plugin: ^5.0.0 + parse-json: ^6.0.0 + to-vfile: ^7.0.0 + trough: ^2.0.0 + unist-util-inspect: ^7.0.0 + vfile-message: ^3.0.0 + vfile-reporter: ^7.0.0 + vfile-statistics: ^2.0.0 + yaml: ^2.0.0 + checksum: 27f4e5cd05c70a0f8a0ffa011f20257d97d62dc1b7ced0fa3c70516f23a4e8e9b676496e94a04726c85da2783153412f526724e512ec1dddcf5af82ce39b2fd2 + languageName: node + linkType: hard + +"unified@npm:^10.0.0, unified@npm:^10.1.2": version: 10.1.2 resolution: "unified@npm:10.1.2" dependencies: @@ -20205,17 +25157,12 @@ __metadata: languageName: node linkType: hard -"unified@npm:^9.2.2": - version: 9.2.2 - resolution: "unified@npm:9.2.2" +"unique-filename@npm:^1.1.1": + version: 1.1.1 + resolution: "unique-filename@npm:1.1.1" dependencies: - bail: ^1.0.0 - extend: ^3.0.0 - is-buffer: ^2.0.0 - is-plain-obj: ^2.0.0 - trough: ^1.0.0 - vfile: ^4.0.0 - checksum: 7c24461be7de4145939739ce50d18227c5fbdf9b3bc5a29dabb1ce26dd3e8bd4a1c385865f6f825f3b49230953ee8b591f23beab3bb3643e3e9dc37aa8a089d5 + unique-slug: ^2.0.0 + checksum: cf4998c9228cc7647ba7814e255dec51be43673903897b1786eff2ac2d670f54d4d733357eb08dea969aa5e6875d0e1bd391d668fbdb5a179744e7c7551a6f80 languageName: node linkType: hard @@ -20228,6 +25175,24 @@ __metadata: languageName: node linkType: hard +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: ^4.0.0 + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^2.0.0": + version: 2.0.2 + resolution: "unique-slug@npm:2.0.2" + dependencies: + imurmurhash: ^0.1.4 + checksum: 5b6876a645da08d505dedb970d1571f6cebdf87044cb6b740c8dbb24f0d6e1dc8bdbf46825fd09f994d7cf50760e6f6e063cfa197d51c5902c00a861702eb75a + languageName: node + linkType: hard + "unique-slug@npm:^3.0.0": version: 3.0.0 resolution: "unique-slug@npm:3.0.0" @@ -20237,6 +25202,15 @@ __metadata: languageName: node linkType: hard +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: ^0.1.4 + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 + languageName: node + linkType: hard + "unique-string@npm:^2.0.0": version: 2.0.0 resolution: "unique-string@npm:2.0.0" @@ -20246,33 +25220,28 @@ __metadata: languageName: node linkType: hard -"unist-builder@npm:^2.0.0": - version: 2.0.3 - resolution: "unist-builder@npm:2.0.3" - checksum: e946fdf77dbfc320feaece137ce4959ae2da6614abd1623bd39512dc741a9d5f313eb2ba79f8887d941365dccddec7fef4e953827475e392bf49b45336f597f6 - languageName: node - linkType: hard - "unist-builder@npm:^3.0.0": - version: 3.0.0 - resolution: "unist-builder@npm:3.0.0" + version: 3.0.1 + resolution: "unist-builder@npm:3.0.1" dependencies: "@types/unist": ^2.0.0 - checksum: 80459ee3c2ece90bbc4f4b4faeed524d144c1a09ee07ff3e9004648d9b71a652e80a3b3ef60311a1e92f6ab915caf27c6f08062b5f8c84fa725bc0d7c5759e84 + checksum: d8c42fe69aa55a3e9aed3c581007ec5371349bf9885bfa8b0b787634f8d12fa5081f066b205ded379b6d0aeaa884039bae9ebb65a3e71784005fb110aef30d0f languageName: node linkType: hard -"unist-util-generated@npm:^1.0.0": - version: 1.1.6 - resolution: "unist-util-generated@npm:1.1.6" - checksum: 86239ff88a08800d52198f2f0e15911f05bab2dad17cef95550f7c2728f15ebb0344694fcc3101d05762d88adaf86cb85aa7a3300fedabd0b6d7d00b41cdcb7f +"unist-util-generated@npm:^2.0.0": + version: 2.0.1 + resolution: "unist-util-generated@npm:2.0.1" + checksum: 6221ad0571dcc9c8964d6b054f39ef6571ed59cc0ce3e88ae97ea1c70afe76b46412a5ffaa91f96814644ac8477e23fb1b477d71f8d70e625728c5258f5c0d99 languageName: node linkType: hard -"unist-util-generated@npm:^2.0.0": - version: 2.0.0 - resolution: "unist-util-generated@npm:2.0.0" - checksum: 3a806793fa24a75190c217740ce706340d6cb0d51eff677134253d628f8e4355ebd8a243fe8045c583463f6bebfd50f902d653161da87c1359fcd1a14b99c8e0 +"unist-util-inspect@npm:^7.0.0": + version: 7.0.2 + resolution: "unist-util-inspect@npm:7.0.2" + dependencies: + "@types/unist": ^2.0.0 + checksum: e8f2a3836516e5ac973d56914832fad83c2391686143008a40fa8c852eb452f04bd5a42c30ce716c52217b202328ca2f365c7f0f13e67f838603d659c39b9720 languageName: node linkType: hard @@ -20284,62 +25253,39 @@ __metadata: linkType: hard "unist-util-is@npm:^5.0.0": - version: 5.1.1 - resolution: "unist-util-is@npm:5.1.1" - checksum: e8743a19a304d8a8f5684f3e5ddb5546f2655847b42123687277d76566a2aba89beb7b4a8a9e9ebc4d904cd1cecc285356d7923d973a43cfc19a1e10ff6bdee4 - languageName: node - linkType: hard - -"unist-util-map@npm:^3.1.1": - version: 3.1.2 - resolution: "unist-util-map@npm:3.1.2" + version: 5.2.1 + resolution: "unist-util-is@npm:5.2.1" dependencies: "@types/unist": ^2.0.0 - checksum: 8f197c59065fdf103bf4b9b6c38879d6345bcf316f8a45cb3057dcd38e44329b148d0f034a3de227b97d28dae23c8d6a4d0139f4651b0259d726f051ffe936fe - languageName: node - linkType: hard - -"unist-util-modify-children@npm:^2.0.0": - version: 2.0.0 - resolution: "unist-util-modify-children@npm:2.0.0" - dependencies: - array-iterate: ^1.0.0 - checksum: 7c8e11c320e2c8f8e0f7ab32a0d5a88317a8ed40c30ef0dca1038252eae9ca31db7e24f3c77799ae086bf1f73ee8cc34056e12334b05da304287e3a5b8700034 + checksum: ae76fdc3d35352cd92f1bedc3a0d407c3b9c42599a52ab9141fe89bdd786b51f0ec5a2ab68b93fb532e239457cae62f7e39eaa80229e1cb94875da2eafcbe5c4 languageName: node linkType: hard "unist-util-position-from-estree@npm:^1.0.0, unist-util-position-from-estree@npm:^1.1.0": - version: 1.1.1 - resolution: "unist-util-position-from-estree@npm:1.1.1" + version: 1.1.2 + resolution: "unist-util-position-from-estree@npm:1.1.2" dependencies: "@types/unist": ^2.0.0 - checksum: 63808bdcb8b49afa5231712d95b586fe877859ee03d23adb47485c30222007a5af55e95d103d4af51d1d16376aaa5a58fa985a08d63727c38b1515873df8b79b - languageName: node - linkType: hard - -"unist-util-position@npm:^3.0.0, unist-util-position@npm:^3.1.0": - version: 3.1.0 - resolution: "unist-util-position@npm:3.1.0" - checksum: 10b3952e32a1ffabbecad41c3946237f7059f5bb6436796da05531a285f50b97e4f37cfc2f7164676d041063f40fe1ad92fbb8ca38d3ae8747328ebe738d738f + checksum: e3f4060e2a9e894c6ed63489c5a7cb58ff282e5dae9497cbc2073033ca74d6e412af4d4d342c97aea08d997c908b8bce2fe43a2062aafc2bb3f266533016588b languageName: node linkType: hard "unist-util-position@npm:^4.0.0": - version: 4.0.3 - resolution: "unist-util-position@npm:4.0.3" + version: 4.0.4 + resolution: "unist-util-position@npm:4.0.4" dependencies: "@types/unist": ^2.0.0 - checksum: 0d89973628d40f19345cbcc50008f7f56d411afa54434bbe6c224b22d26aaf9d4500da2de363f1f01945acab1f1c31920c514253149eb546ff9b8bbc1ea94209 + checksum: e7487b6cec9365299695e3379ded270a1717074fa11fd2407c9b934fb08db6fe1d9077ddeaf877ecf1813665f8ccded5171693d3d9a7a01a125ec5cdd5e88691 languageName: node linkType: hard "unist-util-remove-position@npm:^4.0.0": - version: 4.0.1 - resolution: "unist-util-remove-position@npm:4.0.1" + version: 4.0.2 + resolution: "unist-util-remove-position@npm:4.0.2" dependencies: "@types/unist": ^2.0.0 unist-util-visit: ^4.0.0 - checksum: 7d2808662ac65f2b2f615822b78060419f738fb3b074b10cec77c596ea966b8f5c47553d2d322822a5975c49d2b21cdd64c198ae9fb02a9d54d1afa6342cdd6a + checksum: 989831da913d09a82a99ed9b47b78471b6409bde95942cde47e09da54b7736516f17e3c7e026af468684c1efcec5fb52df363381b2f9dc7fd96ce791c5a2fa4a languageName: node linkType: hard @@ -20353,18 +25299,11 @@ __metadata: linkType: hard "unist-util-stringify-position@npm:^3.0.0": - version: 3.0.2 - resolution: "unist-util-stringify-position@npm:3.0.2" + version: 3.0.3 + resolution: "unist-util-stringify-position@npm:3.0.3" dependencies: "@types/unist": ^2.0.0 - checksum: 2dfd7a0fb2a55e99cc319c3bf7f9f1f73ed652978fa70d19117faa7245d20f21738ec926ecc47f341705ca1bb157e87ced0b6bb5ecaa666bd2ae6b2510d6a671 - languageName: node - linkType: hard - -"unist-util-visit-children@npm:^1.0.0": - version: 1.1.4 - resolution: "unist-util-visit-children@npm:1.1.4" - checksum: df41bf79851781ea1b19de854e2cfc78c9a63098f0387b32eb74b7860eb1f59bb7d12cce7ef53536baf14eea055d201e8b8268176b849a681c5a678b4d2de293 + checksum: dbd66c15183607ca942a2b1b7a9f6a5996f91c0d30cf8966fb88955a02349d9eefd3974e9010ee67e71175d784c5a9fea915b0aa0b0df99dcb921b95c4c9e124 languageName: node linkType: hard @@ -20379,12 +25318,12 @@ __metadata: linkType: hard "unist-util-visit-parents@npm:^5.0.0, unist-util-visit-parents@npm:^5.1.1": - version: 5.1.1 - resolution: "unist-util-visit-parents@npm:5.1.1" + version: 5.1.3 + resolution: "unist-util-visit-parents@npm:5.1.3" dependencies: "@types/unist": ^2.0.0 unist-util-is: ^5.0.0 - checksum: c699d18f5b26461dee37612b84c243fd5457c98f4c0540d9ba8bee05062aece5f3b4fb1af6b07423ce6750d8926e8c01fc2b1a4de1e54925ef6795c177ed8e18 + checksum: 8ecada5978994f846b64658cf13b4092cd78dea39e1ba2f5090a5de842ba4852712c02351a8ae95250c64f864635e7b02aedf3b4a093552bb30cf1bd160efbaa languageName: node linkType: hard @@ -20399,14 +25338,14 @@ __metadata: languageName: node linkType: hard -"unist-util-visit@npm:^4.0.0, unist-util-visit@npm:^4.1.0, unist-util-visit@npm:~4.1.0": - version: 4.1.1 - resolution: "unist-util-visit@npm:4.1.1" +"unist-util-visit@npm:^4.0.0, unist-util-visit@npm:^4.1.2": + version: 4.1.2 + resolution: "unist-util-visit@npm:4.1.2" dependencies: "@types/unist": ^2.0.0 unist-util-is: ^5.0.0 unist-util-visit-parents: ^5.1.1 - checksum: c4a63734b0a5b439c62d20901bb472bdafdbbcd80c383e254aedeb98b23d0bae815a331e776ce7d63ea3c8018a54318abb8709d07cdf7dd094f79b2f07bb39f0 + checksum: 95a34e3f7b5b2d4b68fd722b6229972099eb97b6df18913eda44a5c11df8b1e27efe7206dd7b88c4ed244a48c474a5b2e2629ab79558ff9eb936840295549cee languageName: node linkType: hard @@ -20424,33 +25363,36 @@ __metadata: languageName: node linkType: hard -"unocss@npm:^0.45.30": - version: 0.45.30 - resolution: "unocss@npm:0.45.30" - dependencies: - "@unocss/astro": 0.45.30 - "@unocss/cli": 0.45.30 - "@unocss/core": 0.45.30 - "@unocss/preset-attributify": 0.45.30 - "@unocss/preset-icons": 0.45.30 - "@unocss/preset-mini": 0.45.30 - "@unocss/preset-tagify": 0.45.30 - "@unocss/preset-typography": 0.45.30 - "@unocss/preset-uno": 0.45.30 - "@unocss/preset-web-fonts": 0.45.30 - "@unocss/preset-wind": 0.45.30 - "@unocss/reset": 0.45.30 - "@unocss/transformer-attributify-jsx": 0.45.30 - "@unocss/transformer-compile-class": 0.45.30 - "@unocss/transformer-directives": 0.45.30 - "@unocss/transformer-variant-group": 0.45.30 - "@unocss/vite": 0.45.30 - peerDependencies: - "@unocss/webpack": 0.45.30 +"unocss@npm:^0.52.3": + version: 0.52.3 + resolution: "unocss@npm:0.52.3" + dependencies: + "@unocss/astro": 0.52.3 + "@unocss/cli": 0.52.3 + "@unocss/core": 0.52.3 + "@unocss/extractor-arbitrary-variants": 0.52.3 + "@unocss/postcss": 0.52.3 + "@unocss/preset-attributify": 0.52.3 + "@unocss/preset-icons": 0.52.3 + "@unocss/preset-mini": 0.52.3 + "@unocss/preset-tagify": 0.52.3 + "@unocss/preset-typography": 0.52.3 + "@unocss/preset-uno": 0.52.3 + "@unocss/preset-web-fonts": 0.52.3 + "@unocss/preset-wind": 0.52.3 + "@unocss/reset": 0.52.3 + "@unocss/transformer-attributify-jsx": 0.52.3 + "@unocss/transformer-attributify-jsx-babel": 0.52.3 + "@unocss/transformer-compile-class": 0.52.3 + "@unocss/transformer-directives": 0.52.3 + "@unocss/transformer-variant-group": 0.52.3 + "@unocss/vite": 0.52.3 + peerDependencies: + "@unocss/webpack": 0.52.3 peerDependenciesMeta: "@unocss/webpack": optional: true - checksum: 9c46d75f78fb4021bd4943ceca01f69986fdd5fa7ec1c0f6328ccb8a1f17670d04648a4319cb7a81f45581c56abb8ec800f1941d6a94039f39dd7c75760341c7 + checksum: 127c786f4b051bf73ca3300f05939ff0481f0bfb494aff897df0158e8ccdc9e14be4440410f2f75074f76888447ebb6b74e563c3dde28d0d63a9199f1a7090da languageName: node linkType: hard @@ -20461,6 +25403,18 @@ __metadata: languageName: node linkType: hard +"unplugin@npm:^0.10.2": + version: 0.10.2 + resolution: "unplugin@npm:0.10.2" + dependencies: + acorn: ^8.8.0 + chokidar: ^3.5.3 + webpack-sources: ^3.2.3 + webpack-virtual-modules: ^0.4.5 + checksum: 984199a8ecbceb7d7b37d14d5bea88dc6ae3e1fa6f1ec5b4a9263160424ee5b5ecf809ce667ff2ff819731650fc9bd42fcc7b2b33dd888a1eb047349eba63960 + languageName: node + linkType: hard + "untildify@npm:^4.0.0": version: 4.0.0 resolution: "untildify@npm:4.0.0" @@ -20468,39 +25422,17 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.9": - version: 1.0.10 - resolution: "update-browserslist-db@npm:1.0.10" +"update-browserslist-db@npm:^1.0.10": + version: 1.0.11 + resolution: "update-browserslist-db@npm:1.0.11" dependencies: escalade: ^3.1.1 picocolors: ^1.0.0 peerDependencies: browserslist: ">= 4.21.0" bin: - browserslist-lint: cli.js - checksum: 12db73b4f63029ac407b153732e7cd69a1ea8206c9100b482b7d12859cd3cd0bc59c602d7ae31e652706189f1acb90d42c53ab24a5ba563ed13aebdddc5561a0 - languageName: node - linkType: hard - -"update-notifier@npm:5.1.0": - version: 5.1.0 - resolution: "update-notifier@npm:5.1.0" - dependencies: - boxen: ^5.0.0 - chalk: ^4.1.0 - configstore: ^5.0.1 - has-yarn: ^2.1.0 - import-lazy: ^2.1.0 - is-ci: ^2.0.0 - is-installed-globally: ^0.4.0 - is-npm: ^5.0.0 - is-yarn-global: ^0.3.0 - latest-version: ^5.1.0 - pupa: ^2.1.1 - semver: ^7.3.4 - semver-diff: ^3.1.1 - xdg-basedir: ^4.0.0 - checksum: 461e5e5b002419296d3868ee2abe0f9ab3e1846d9db642936d0c46f838872ec56069eddfe662c45ce1af0a8d6d5026353728de2e0a95ab2e3546a22ea077caf1 + update-browserslist-db: cli.js + checksum: b98327518f9a345c7cad5437afae4d2ae7d865f9779554baf2a200fdf4bac4969076b679b1115434bd6557376bdd37ca7583d0f9b8f8e302d7d4cc1e91b5f231 languageName: node linkType: hard @@ -20513,15 +25445,6 @@ __metadata: languageName: node linkType: hard -"url-parse-lax@npm:^3.0.0": - version: 3.0.0 - resolution: "url-parse-lax@npm:3.0.0" - dependencies: - prepend-http: ^2.0.0 - checksum: 1040e357750451173132228036aff1fd04abbd43eac1fb3e4fca7495a078bcb8d33cb765fe71ad7e473d9c94d98fd67adca63bd2716c815a2da066198dd37217 - languageName: node - linkType: hard - "use-callback-ref@npm:^1.3.0": version: 1.3.0 resolution: "use-callback-ref@npm:1.3.0" @@ -20537,6 +25460,18 @@ __metadata: languageName: node linkType: hard +"use-resize-observer@npm:^9.1.0": + version: 9.1.0 + resolution: "use-resize-observer@npm:9.1.0" + dependencies: + "@juggle/resize-observer": ^3.3.1 + peerDependencies: + react: 16.8.0 - 18 + react-dom: 16.8.0 - 18 + checksum: 92be0ac34a3b3cf884cd55847c90792b5b44833dc258e96d650152815ad246afe45825aa223332203004d836535a927ab74f18dc0313229e2c7c69510eddf382 + languageName: node + linkType: hard + "use-sidecar@npm:^1.1.2": version: 1.1.2 resolution: "use-sidecar@npm:1.1.2" @@ -20553,7 +25488,7 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:1.2.0": +"use-sync-external-store@npm:^1.2.0": version: 1.2.0 resolution: "use-sync-external-store@npm:1.2.0" peerDependencies: @@ -20569,6 +25504,19 @@ __metadata: languageName: node linkType: hard +"util@npm:^0.12.0, util@npm:^0.12.4": + version: 0.12.5 + resolution: "util@npm:0.12.5" + dependencies: + inherits: ^2.0.3 + is-arguments: ^1.0.4 + is-generator-function: ^1.0.7 + is-typed-array: ^1.1.3 + which-typed-array: ^1.1.2 + checksum: 705e51f0de5b446f4edec10739752ac25856541e0254ea1e7e45e5b9f9b0cb105bc4bd415736a6210edc68245a7f903bf085ffb08dd7deb8a0e847f60538a38a + languageName: node + linkType: hard + "utils-merge@npm:1.0.1": version: 1.0.1 resolution: "utils-merge@npm:1.0.1" @@ -20585,7 +25533,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^8.3.2": +"uuid@npm:^8.3.0, uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" bin: @@ -20594,7 +25542,16 @@ __metadata: languageName: node linkType: hard -"uvu@npm:^0.5.0": +"uuid@npm:^9.0.0": + version: 9.0.0 + resolution: "uuid@npm:9.0.0" + bin: + uuid: dist/bin/uuid + checksum: 8dd2c83c43ddc7e1c71e36b60aea40030a6505139af6bee0f382ebcd1a56f6cd3028f7f06ffb07f8cf6ced320b76aea275284b224b002b289f89fe89c389b028 + languageName: node + linkType: hard + +"uvu@npm:^0.5.0, uvu@npm:^0.5.6": version: 0.5.6 resolution: "uvu@npm:0.5.6" dependencies: @@ -20616,13 +25573,13 @@ __metadata: linkType: hard "v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1": - version: 9.0.1 - resolution: "v8-to-istanbul@npm:9.0.1" + version: 9.1.0 + resolution: "v8-to-istanbul@npm:9.1.0" dependencies: "@jridgewell/trace-mapping": ^0.3.12 "@types/istanbul-lib-coverage": ^2.0.1 convert-source-map: ^1.6.0 - checksum: a49c34bf0a3af0c11041a3952a2600913904a983bd1bc87148b5c033bc5c1d02d5a13620fcdbfa2c60bc582a2e2970185780f0c844b4c3a220abf405f8af6311 + checksum: 2069d59ee46cf8d83b4adfd8a5c1a90834caffa9f675e4360f1157ffc8578ef0f763c8f32d128334424159bb6b01f3876acd39cd13297b2769405a9da241f8d1 languageName: node linkType: hard @@ -20645,19 +25602,19 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-name@npm:^4.0.0": - version: 4.0.0 - resolution: "validate-npm-package-name@npm:4.0.0" +"validate-npm-package-name@npm:^5.0.0": + version: 5.0.0 + resolution: "validate-npm-package-name@npm:5.0.0" dependencies: builtins: ^5.0.0 - checksum: a32fd537bad17fcb59cfd58ae95a414d443866020d448ec3b22e8d40550cb585026582a57efbe1f132b882eea4da8ac38ee35f7be0dd72988a3cb55d305a20c1 + checksum: 5342a994986199b3c28e53a8452a14b2bb5085727691ea7aa0d284a6606b127c371e0925ae99b3f1ef7cc7d2c9de75f52eb61a3d1cc45e39bca1e3a9444cbb4e languageName: node linkType: hard "validator@npm:^13.7.0": - version: 13.7.0 - resolution: "validator@npm:13.7.0" - checksum: 2b83283de1222ca549a7ef57f46e8d49c6669213348db78b7045bce36a3b5843ff1e9f709ebf74574e06223461ee1f264f8cc9a26a0060a79a27de079d8286ef + version: 13.9.0 + resolution: "validator@npm:13.9.0" + checksum: e2c936f041f61faa42bafd17c6faddf939498666cd82e88d733621c286893730b008959f4cb12ab3e236148a4f3805c30b85e3dcf5e0efd8b0cbcd36c02bfc0c languageName: node linkType: hard @@ -20668,25 +25625,24 @@ __metadata: languageName: node linkType: hard -"vercel@npm:^28.4.12": - version: 28.4.12 - resolution: "vercel@npm:28.4.12" +"vercel@npm:^29.4.0": + version: 29.4.0 + resolution: "vercel@npm:29.4.0" dependencies: - "@vercel/build-utils": 5.5.5 - "@vercel/go": 2.2.13 - "@vercel/hydrogen": 0.0.26 - "@vercel/next": 3.2.6 - "@vercel/node": 2.5.26 - "@vercel/python": 3.1.22 - "@vercel/redwood": 1.0.31 - "@vercel/remix": 1.0.32 - "@vercel/ruby": 1.3.39 - "@vercel/static-build": 1.0.32 - update-notifier: 5.1.0 + "@vercel/build-utils": 6.7.3 + "@vercel/go": 2.5.1 + "@vercel/hydrogen": 0.0.64 + "@vercel/next": 3.8.5 + "@vercel/node": 2.14.3 + "@vercel/python": 3.1.60 + "@vercel/redwood": 1.1.15 + "@vercel/remix-builder": 1.8.10 + "@vercel/ruby": 1.3.76 + "@vercel/static-build": 1.3.32 bin: vc: dist/index.js vercel: dist/index.js - checksum: fab0e2b954a1a739cb091a176739639fca6d9015f88e41b6298c676122299b7275c7159cdf36739ccac5a5c7dd7b5d0deb8881a48e58c6d2c2a1e2a5ae5c9c84 + checksum: ccff035b691208824a24e88991f2bbe7ccc3060ed8113586e0f1c23afc081b36f30b7c03858cfd6358a8c2477f1979b99111320d20f1e3a32e2ed75f7cb9c9b0 languageName: node linkType: hard @@ -20702,12 +25658,12 @@ __metadata: linkType: hard "vfile-location@npm:^4.0.0": - version: 4.0.1 - resolution: "vfile-location@npm:4.0.1" + version: 4.1.0 + resolution: "vfile-location@npm:4.1.0" dependencies: "@types/unist": ^2.0.0 vfile: ^5.0.0 - checksum: cc0df62075c741beee699e651374aeb56c4c1f4333398c0ba924281c2b51d4b7669c69c5b837ea395775626ad030d6f1bd27fd0a7eaf3f9f1bbd55393948ad6c + checksum: c894e8e5224170d1f85288f4a1d1ebcee0780823ea2b49d881648ab360ebf01b37ecb09b1c4439a75f9a51f31a9f9742cd045e987763e367c352a1ef7c50d446 languageName: node linkType: hard @@ -20722,166 +25678,230 @@ __metadata: languageName: node linkType: hard -"vfile-message@npm:^2.0.0": - version: 2.0.4 - resolution: "vfile-message@npm:2.0.4" +"vfile-message@npm:^3.0.0": + version: 3.1.4 + resolution: "vfile-message@npm:3.1.4" + dependencies: + "@types/unist": ^2.0.0 + unist-util-stringify-position: ^3.0.0 + checksum: d0ee7da1973ad76513c274e7912adbed4d08d180eaa34e6bd40bc82459f4b7bc50fcaff41556135e3339995575eac5f6f709aba9332b80f775618ea4880a1367 + languageName: node + linkType: hard + +"vfile-reporter@npm:^7.0.0": + version: 7.0.5 + resolution: "vfile-reporter@npm:7.0.5" + dependencies: + "@types/supports-color": ^8.0.0 + string-width: ^5.0.0 + supports-color: ^9.0.0 + unist-util-stringify-position: ^3.0.0 + vfile: ^5.0.0 + vfile-message: ^3.0.0 + vfile-sort: ^3.0.0 + vfile-statistics: ^2.0.0 + checksum: 0d66370c6c821fbc850c898bfc48c73f19fb320792c532a3af0456bd0f3d395590b365009e60ca4c08ab09a0dabdd43311297bb5c6fbd0abb90bb5abce98264e + languageName: node + linkType: hard + +"vfile-sort@npm:^3.0.0": + version: 3.0.1 + resolution: "vfile-sort@npm:3.0.1" + dependencies: + vfile: ^5.0.0 + vfile-message: ^3.0.0 + checksum: 6a29e0513c03b3468c628cc27d1511e2f955c3095cd65eeddcb8f601b0972c0cb1f2dc008a7c760e217cf97a44e04e0331b00929b83adc6661b46043b03b5a24 + languageName: node + linkType: hard + +"vfile-statistics@npm:^2.0.0": + version: 2.0.1 + resolution: "vfile-statistics@npm:2.0.1" dependencies: - "@types/unist": ^2.0.0 - unist-util-stringify-position: ^2.0.0 - checksum: 1bade499790f46ca5aba04bdce07a1e37c2636a8872e05cf32c26becc912826710b7eb063d30c5754fdfaeedc8a7658e78df10b3bc535c844890ec8a184f5643 + vfile: ^5.0.0 + vfile-message: ^3.0.0 + checksum: e3f731bcf992c61c1231a0793785b1288e0a004be9e18ff147e3ead901ae2d21723358609bfe0565881ffe202af68cb171b49753fc8b4bd7a30337aaef256266 languageName: node linkType: hard -"vfile-message@npm:^3.0.0": - version: 3.1.2 - resolution: "vfile-message@npm:3.1.2" +"vfile@npm:^5.0.0, vfile@npm:^5.1.0, vfile@npm:^5.3.0, vfile@npm:^5.3.2, vfile@npm:^5.3.7": + version: 5.3.7 + resolution: "vfile@npm:5.3.7" dependencies: "@types/unist": ^2.0.0 + is-buffer: ^2.0.0 unist-util-stringify-position: ^3.0.0 - checksum: 96fbd9e9b5e0babb5ee61e3a716dc7a6a8c28f2c8c711837d95c88b782161b31549ad16059a78990d7b836d0f4d3b4d8c9ffde44370d48d9cac991fc1e3e17c5 + vfile-message: ^3.0.0 + checksum: 642cce703afc186dbe7cabf698dc954c70146e853491086f5da39e1ce850676fc96b169fcf7898aa3ff245e9313aeec40da93acd1e1fcc0c146dc4f6308b4ef9 languageName: node linkType: hard -"vfile@npm:^4.0.0": - version: 4.2.1 - resolution: "vfile@npm:4.2.1" +"vite-node@npm:0.31.1": + version: 0.31.1 + resolution: "vite-node@npm:0.31.1" dependencies: - "@types/unist": ^2.0.0 - is-buffer: ^2.0.0 - unist-util-stringify-position: ^2.0.0 - vfile-message: ^2.0.0 - checksum: ee5726e10d170472cde778fc22e0f7499caa096eb85babea5d0ce0941455b721037ee1c9e6ae506ca2803250acd313d0f464328ead0b55cfe7cb6315f1b462d6 + cac: ^6.7.14 + debug: ^4.3.4 + mlly: ^1.2.0 + pathe: ^1.1.0 + picocolors: ^1.0.0 + vite: ^3.0.0 || ^4.0.0 + bin: + vite-node: vite-node.mjs + checksum: f70ffa3f6dcb4937cdc99f59bf360d42de83c556ba9a19eb1c3504ef20db4c1d1afa644d9a8e63240e851c0c95773b64c526bdb3eb4794b5e941ddcd57124aa9 languageName: node linkType: hard -"vfile@npm:^5.0.0, vfile@npm:^5.3.0, vfile@npm:^5.3.2": - version: 5.3.5 - resolution: "vfile@npm:5.3.5" +"vite-node@npm:^0.28.5": + version: 0.28.5 + resolution: "vite-node@npm:0.28.5" dependencies: - "@types/unist": ^2.0.0 - is-buffer: ^2.0.0 - unist-util-stringify-position: ^3.0.0 - vfile-message: ^3.0.0 - checksum: 14a9ea19d1801bb99fc9a451d220d2ee84d891bae52094db660f9bf637c1cada0c45a3e00962ff3e901da16dd5051367e25a4a214e40db57ae40f57363796b45 + cac: ^6.7.14 + debug: ^4.3.4 + mlly: ^1.1.0 + pathe: ^1.1.0 + picocolors: ^1.0.0 + source-map: ^0.6.1 + source-map-support: ^0.5.21 + vite: ^3.0.0 || ^4.0.0 + bin: + vite-node: vite-node.mjs + checksum: b3813b784f551613e561bf85e64ceb8e869d760d34f135dc3351b093618c6fc3c64f23839ac530ddc49724beb83c3f70ee6392e62676c78141ed04c7ab1e0aa0 languageName: node linkType: hard -"vite-plugin-dts@npm:^1.6.6": - version: 1.6.6 - resolution: "vite-plugin-dts@npm:1.6.6" +"vite-plugin-dts@npm:^2.3.0": + version: 2.3.0 + resolution: "vite-plugin-dts@npm:2.3.0" dependencies: - "@microsoft/api-extractor": ^7.33.1 - "@rushstack/node-core-library": ^3.53.2 + "@babel/parser": ^7.21.4 + "@microsoft/api-extractor": ^7.34.4 + "@rollup/pluginutils": ^5.0.2 + "@rushstack/node-core-library": ^3.55.2 debug: ^4.3.4 fast-glob: ^3.2.12 fs-extra: ^10.1.0 - kolorist: ^1.6.0 - ts-morph: ^16.0.0 + kolorist: ^1.7.0 + magic-string: ^0.29.0 + ts-morph: 18.0.0 peerDependencies: vite: ">=2.9.0" - checksum: 718096a98c3fb8e3e793590fd215101dfa8fe7c18c8abe9f255314db6ae4d75ef71d0846bc8dc77a547657a1ccf5467da9dbd28c711dfec2003c6c556cfc379b - languageName: node - linkType: hard - -"vite-tsconfig-paths@npm:^3.5.0": - version: 3.5.1 - resolution: "vite-tsconfig-paths@npm:3.5.1" - dependencies: - debug: ^4.1.1 - globrex: ^0.1.2 - recrawl-sync: ^2.0.3 - tsconfig-paths: ^4.0.0 - peerDependencies: - vite: ">2.0.0-0" - checksum: 99755d754ceda2c49b862947e991bb0d6e3ca10221bd0edb0441f2c0b6c973d970601f2baada13647330d4d22d5a682c9558c746fda8db00413ee2a82d2ef28e + checksum: b4247d9f7800bd72addd62fb07fbd3f5a1535a6de771420e4ed896fb5db156335b2abf810091ecd998ac05d6ebbd857a186ec3d468216f0bc6e54064c4886b31 languageName: node linkType: hard -"vite@npm:^3.0.0, vite@npm:^3.0.9, vite@npm:~3.1.3": - version: 3.1.7 - resolution: "vite@npm:3.1.7" +"vite@npm:^3.0.0 || ^4.0.0, vite@npm:^4.1.4": + version: 4.3.8 + resolution: "vite@npm:4.3.8" dependencies: - esbuild: ^0.15.9 + esbuild: ^0.17.5 fsevents: ~2.3.2 - postcss: ^8.4.16 - resolve: ^1.22.1 - rollup: ~2.78.0 + postcss: ^8.4.23 + rollup: ^3.21.0 peerDependencies: + "@types/node": ">= 14" less: "*" sass: "*" stylus: "*" + sugarss: "*" terser: ^5.4.0 dependenciesMeta: fsevents: optional: true peerDependenciesMeta: + "@types/node": + optional: true less: optional: true sass: optional: true stylus: optional: true + sugarss: + optional: true terser: optional: true bin: vite: bin/vite.js - checksum: cd0a0bb11777d9006f408a67ef1063c1771baaf091f9e4f102f0fdaec77559784b76788e80a398ac8fe2fc90027e83712ae860ed51510b81c4153d8c5ca5fb37 + checksum: 454a7c0c1bd1fd5611c9df28c62e3adbe75f48e87fc787179c5af60c4ab9a87aa0eda44be446d898851a135766d36f65f8e7d56317556aa807d30e561de369c4 languageName: node linkType: hard -"vite@npm:^3.1.8": - version: 3.1.8 - resolution: "vite@npm:3.1.8" +"vite@npm:^4.3.9": + version: 4.3.9 + resolution: "vite@npm:4.3.9" dependencies: - esbuild: ^0.15.9 + esbuild: ^0.17.5 fsevents: ~2.3.2 - postcss: ^8.4.16 - resolve: ^1.22.1 - rollup: ~2.78.0 + postcss: ^8.4.23 + rollup: ^3.21.0 peerDependencies: + "@types/node": ">= 14" less: "*" sass: "*" stylus: "*" + sugarss: "*" terser: ^5.4.0 dependenciesMeta: fsevents: optional: true peerDependenciesMeta: + "@types/node": + optional: true less: optional: true sass: optional: true stylus: optional: true + sugarss: + optional: true terser: optional: true bin: vite: bin/vite.js - checksum: 982696ad134577dd9915c4c3548ad36ddcf5dc6d341058548a670a13d860e4cdaaf2b320a59221f178018df089d148b9980e9a344316bef12b698a1c1abc7390 + checksum: 8c45a516278d1e0425fac00c0877336790f71484a851a318346a70e0d2aef9f3b9651deb2f9f002c791ceb920eda7d6a3cda753bdefd657321c99f448b02dd25 languageName: node linkType: hard -"vitest@npm:0.24.3, vitest@npm:^0.24.3": - version: 0.24.3 - resolution: "vitest@npm:0.24.3" +"vitest@npm:^0.31.1": + version: 0.31.1 + resolution: "vitest@npm:0.31.1" dependencies: - "@types/chai": ^4.3.3 + "@types/chai": ^4.3.5 "@types/chai-subset": ^1.3.3 "@types/node": "*" - chai: ^4.3.6 + "@vitest/expect": 0.31.1 + "@vitest/runner": 0.31.1 + "@vitest/snapshot": 0.31.1 + "@vitest/spy": 0.31.1 + "@vitest/utils": 0.31.1 + acorn: ^8.8.2 + acorn-walk: ^8.2.0 + cac: ^6.7.14 + chai: ^4.3.7 + concordance: ^5.0.4 debug: ^4.3.4 - local-pkg: ^0.4.2 - strip-literal: ^0.4.2 - tinybench: ^2.3.0 - tinypool: ^0.3.0 - tinyspy: ^1.0.2 - vite: ^3.0.0 + local-pkg: ^0.4.3 + magic-string: ^0.30.0 + pathe: ^1.1.0 + picocolors: ^1.0.0 + std-env: ^3.3.2 + strip-literal: ^1.0.1 + tinybench: ^2.5.0 + tinypool: ^0.5.0 + vite: ^3.0.0 || ^4.0.0 + vite-node: 0.31.1 + why-is-node-running: ^2.2.2 peerDependencies: "@edge-runtime/vm": "*" "@vitest/browser": "*" "@vitest/ui": "*" happy-dom: "*" jsdom: "*" + playwright: "*" + safaridriver: "*" + webdriverio: "*" peerDependenciesMeta: "@edge-runtime/vm": optional: true @@ -20893,89 +25913,34 @@ __metadata: optional: true jsdom: optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true bin: vitest: vitest.mjs - checksum: dd954f57396b81df466dd4346aa6c95709a1b3c2409d5526d3172fa34ec684f756a855f885778929a6b903a22b2517ff79d22f936fb3e4d7d54ff24e8e577459 - languageName: node - linkType: hard - -"vscode-css-languageservice@npm:^6.0.1": - version: 6.1.1 - resolution: "vscode-css-languageservice@npm:6.1.1" - dependencies: - vscode-languageserver-textdocument: ^1.0.7 - vscode-languageserver-types: ^3.17.2 - vscode-nls: ^5.2.0 - vscode-uri: ^3.0.4 - checksum: 483cfd9959e5803880149e74c6341f455d2d58ed5b189cf53b8e58ab705aabaa58f8e373316c05cd482db04dca9171b8c47ae247dc8e6005ecdad2b73f463992 - languageName: node - linkType: hard - -"vscode-html-languageservice@npm:^5.0.0": - version: 5.0.2 - resolution: "vscode-html-languageservice@npm:5.0.2" - dependencies: - vscode-languageserver-textdocument: ^1.0.7 - vscode-languageserver-types: ^3.17.2 - vscode-nls: ^5.2.0 - vscode-uri: ^3.0.4 - checksum: 11fa393f2115c1ecc9ff90502cd17c60268e2908ab0b794275d09d51587c9281d2d04897e2e6bd127d2d2b04bd229ed3211f3966eea3cdc5529999a9a1fcd1fb - languageName: node - linkType: hard - -"vscode-jsonrpc@npm:8.0.2": - version: 8.0.2 - resolution: "vscode-jsonrpc@npm:8.0.2" - checksum: 9d055fd4c87ef1093b0eecb5370bfaf3402179b6639149b6d0f7e0bde60cf580091c7e07b0caff868f10f90331b17e7383c087217c077fdd1b5ae7bc23b72f77 - languageName: node - linkType: hard - -"vscode-languageserver-protocol@npm:3.17.2, vscode-languageserver-protocol@npm:^3.17.1": - version: 3.17.2 - resolution: "vscode-languageserver-protocol@npm:3.17.2" - dependencies: - vscode-jsonrpc: 8.0.2 - vscode-languageserver-types: 3.17.2 - checksum: f4a05d3a631af315a32a3700953c2117fa4e5c44bc03764154c6605da9cbbcb50a1b01b46f11b2f6948916d01b4948bebf1a84c135fc73b27fa839c58d0847ab - languageName: node - linkType: hard - -"vscode-languageserver-textdocument@npm:^1.0.1, vscode-languageserver-textdocument@npm:^1.0.4, vscode-languageserver-textdocument@npm:^1.0.7": - version: 1.0.7 - resolution: "vscode-languageserver-textdocument@npm:1.0.7" - checksum: 6018a8b2c87aeb6441419431909e9161e9659d214814193b029ca2b30d8b097d23538e4930942ef78f1440f52c57a93f7597144736b79ba1abd9f1a53c2ffbc0 - languageName: node - linkType: hard - -"vscode-languageserver-types@npm:3.17.2, vscode-languageserver-types@npm:^3.15.1, vscode-languageserver-types@npm:^3.17.1, vscode-languageserver-types@npm:^3.17.2": - version: 3.17.2 - resolution: "vscode-languageserver-types@npm:3.17.2" - checksum: ef2d862d22f622b64de0f428773d50a5928ec6cdd485960a7564ebe4fd4a3c8bcd956f29eb15bc45a0f353846e62f39f6c764d2ab85ce774b8724411ba84342f + checksum: b3f64a36102edc5b8594c085da648c838c0d275c620bd3b780624f936903b9c06579d6ef137fe9859e468f16deb8f154a50f009093119f9adb8b60ff1b7597ee languageName: node linkType: hard -"vscode-languageserver@npm:^8.0.1": - version: 8.0.2 - resolution: "vscode-languageserver@npm:8.0.2" +"vm2@npm:^3.9.17": + version: 3.9.19 + resolution: "vm2@npm:3.9.19" dependencies: - vscode-languageserver-protocol: 3.17.2 + acorn: ^8.7.0 + acorn-walk: ^8.2.0 bin: - installServerIntoExtension: bin/installServerIntoExtension - checksum: f564417bf08f5400e8381b6d0defb4e7242a04525696b1728b05524b89932047af625fac07715b4d36307e1de599cbef54d240c15101fe831aaface431f21e1b - languageName: node - linkType: hard - -"vscode-nls@npm:^5.0.0, vscode-nls@npm:^5.2.0": - version: 5.2.0 - resolution: "vscode-nls@npm:5.2.0" - checksum: c9f43c0f85000b3008fc4a3a8fc122e580f4f0402a77186c6c0f3219ca8ac258f4893c7a563d66f097a6da09951d7f5a7e6295d3e21dcbaec707937c9089b5a8 + vm2: bin/vm2 + checksum: fc6cf553134145cd7bb5246985bf242b056e3fb5ea71e2eef6710b2a5d6c6119cc6bc960435ff62480ee82efb43369be8f4db07b6690916ae7d3b2e714f395d8 languageName: node linkType: hard -"vscode-oniguruma@npm:^1.6.1": - version: 1.6.2 - resolution: "vscode-oniguruma@npm:1.6.2" - checksum: 6b754acdafd5b68242ea5938bb00a32effc16c77f471d4f0f337d879d0e8e592622998e2441f42d9a7ff799c1593f31c11f26ca8d9bf9917e3ca881d3c1f3e19 +"vscode-oniguruma@npm:^1.6.1, vscode-oniguruma@npm:^1.7.0": + version: 1.7.0 + resolution: "vscode-oniguruma@npm:1.7.0" + checksum: 53519d91d90593e6fb080260892e87d447e9b200c4964d766772b5053f5699066539d92100f77f1302c91e8fc5d9c772fbe40fe4c90f3d411a96d5a9b1e63f42 languageName: node linkType: hard @@ -20986,30 +25951,16 @@ __metadata: languageName: node linkType: hard -"vscode-textmate@npm:^6.0.0": - version: 6.0.0 - resolution: "vscode-textmate@npm:6.0.0" - checksum: ff6f17a406c2906586afc14ef01cb122e33acd35312e815abb5c924347a777c6783ce3fe7db8b83f1760ebf843c669843b9390f905b69c433b3395af28e4b483 - languageName: node - linkType: hard - -"vscode-uri@npm:^2.1.2": - version: 2.1.2 - resolution: "vscode-uri@npm:2.1.2" - checksum: 58c2d21018b86825b5a7f65f8879f837828a367bbf31d07ed59268fb2b56c9621a6996547d5e8f966d6ac05f0f921a7005f4541927007f788c2e4c6e5d6735e0 - languageName: node - linkType: hard - -"vscode-uri@npm:^3.0.3, vscode-uri@npm:^3.0.4": - version: 3.0.6 - resolution: "vscode-uri@npm:3.0.6" - checksum: 8b6a36553d089309c09f7aa2ca8dae321a1cb7ff5dcab35f0914d5155d3110722bdb6de67dcb727df15fecd83221d11bb4ab1274a9116b9ccc05b86cefe60dfc +"vscode-textmate@npm:^8.0.0": + version: 8.0.0 + resolution: "vscode-textmate@npm:8.0.0" + checksum: 127780dfea89559d70b8326df6ec344cfd701312dd7f3f591a718693812b7852c30b6715e3cfc8b3200a4e2515b4c96f0843c0eacc0a3020969b5de262c2a4bb languageName: node linkType: hard -"vue-eslint-parser@npm:^9.0.1, vue-eslint-parser@npm:^9.1.0": - version: 9.1.0 - resolution: "vue-eslint-parser@npm:9.1.0" +"vue-eslint-parser@npm:^9.2.1, vue-eslint-parser@npm:^9.3.0": + version: 9.3.0 + resolution: "vue-eslint-parser@npm:9.3.0" dependencies: debug: ^4.3.4 eslint-scope: ^7.1.1 @@ -21020,7 +25971,7 @@ __metadata: semver: ^7.3.6 peerDependencies: eslint: ">=6.0.0" - checksum: e2e6b05989294c4439d91283a78a0cb444cfba30f2715a5be1950d7815cadb5c8f449d9362a92bdd163cb8944abaac73bb076ce3c27b27586eaa4560002e6dfd + checksum: 9bdf375655c405f49a6e46e20127e42e2cb03ec63e811baf9798da7b881769653bb56aba7007d7e6584b8b22c14f0ffbdaf8fa3a902bd52ce9ff947b78e55188 languageName: node linkType: hard @@ -21038,6 +25989,13 @@ __metadata: languageName: node linkType: hard +"walk-up-path@npm:^3.0.1": + version: 3.0.1 + resolution: "walk-up-path@npm:3.0.1" + checksum: 9ffca02fe30fb65f6db531260582988c5e766f4c739cf86a6109380a7f791236b5d0b92b1dce37a6f73e22dca6bc9d93bf3700413e16251b2bd6bbd1ca2be316 + languageName: node + linkType: hard + "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -21047,6 +26005,16 @@ __metadata: languageName: node linkType: hard +"watchpack@npm:^2.2.0": + version: 2.4.0 + resolution: "watchpack@npm:2.4.0" + dependencies: + glob-to-regexp: ^0.4.1 + graceful-fs: ^4.1.2 + checksum: 23d4bc58634dbe13b86093e01c6a68d8096028b664ab7139d58f0c37d962d549a940e98f2f201cecdabd6f9c340338dc73ef8bf094a2249ef582f35183d1a131 + languageName: node + linkType: hard + "wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -21070,6 +26038,13 @@ __metadata: languageName: node linkType: hard +"web-vitals@npm:0.2.4": + version: 0.2.4 + resolution: "web-vitals@npm:0.2.4" + checksum: 128a4e87730b0a02fb6af3eef7d31f9a79b4646e83cfe4465aa8ce6054fe16f7b1f4125a384f1b4f039091bd9513cb54b4e559c0b10ae953c01900786a16b1c2 + languageName: node + linkType: hard + "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" @@ -21091,6 +26066,46 @@ __metadata: languageName: node linkType: hard +"webpack-bundle-analyzer@npm:4.7.0": + version: 4.7.0 + resolution: "webpack-bundle-analyzer@npm:4.7.0" + dependencies: + acorn: ^8.0.4 + acorn-walk: ^8.0.0 + chalk: ^4.1.0 + commander: ^7.2.0 + gzip-size: ^6.0.0 + lodash: ^4.17.20 + opener: ^1.5.2 + sirv: ^1.0.7 + ws: ^7.3.1 + bin: + webpack-bundle-analyzer: lib/bin/analyzer.js + checksum: 4ce3b379c61ce16b2219756843407cc99f2b82cd191f653043f1b705a3e32b3af03834af0dfded98ab852313a892a148bed1a8effaacd6440f028c19f41581f3 + languageName: node + linkType: hard + +"webpack-sources@npm:^3.2.3": + version: 3.2.3 + resolution: "webpack-sources@npm:3.2.3" + checksum: 989e401b9fe3536529e2a99dac8c1bdc50e3a0a2c8669cbafad31271eadd994bc9405f88a3039cd2e29db5e6d9d0926ceb7a1a4e7409ece021fe79c37d9c4607 + languageName: node + linkType: hard + +"webpack-virtual-modules@npm:^0.4.5": + version: 0.4.6 + resolution: "webpack-virtual-modules@npm:0.4.6" + checksum: cb056ba8c50b35436ae43149554b051b80065b0cf79f2d528ca692ddf344a422ac71c415adb9da83dc3acc6e7e58f518388cc1cd11cb4fa29dc04f2c4494afe3 + languageName: node + linkType: hard + +"well-known-symbols@npm:^2.0.0": + version: 2.0.0 + resolution: "well-known-symbols@npm:2.0.0" + checksum: 4f54bbc3012371cb4d228f436891b8e7536d34ac61a57541890257e96788608e096231e0121ac24d08ef2f908b3eb2dc0adba35023eaeb2a7df655da91415402 + languageName: node + linkType: hard + "whatwg-encoding@npm:^2.0.0": version: 2.0.0 resolution: "whatwg-encoding@npm:2.0.0" @@ -21141,38 +26156,36 @@ __metadata: languageName: node linkType: hard -"which-module@npm:^2.0.0": - version: 2.0.0 - resolution: "which-module@npm:2.0.0" - checksum: 809f7fd3dfcb2cdbe0180b60d68100c88785084f8f9492b0998c051d7a8efe56784492609d3f09ac161635b78ea29219eb1418a98c15ce87d085bce905705c9c - languageName: node - linkType: hard - -"which-pm-runs@npm:^1.1.0": - version: 1.1.0 - resolution: "which-pm-runs@npm:1.1.0" - checksum: 39a56ee50886fb33ec710e3b36dc9fe3d0096cac44850d9ca0c6186c4cb824d6c8125f013e0562e7c94744e1e8e4a6ab695592cdb12555777c7a4368143d822c +"which-collection@npm:^1.0.1": + version: 1.0.1 + resolution: "which-collection@npm:1.0.1" + dependencies: + is-map: ^2.0.1 + is-set: ^2.0.1 + is-weakmap: ^2.0.1 + is-weakset: ^2.0.1 + checksum: c815bbd163107ef9cb84f135e6f34453eaf4cca994e7ba85ddb0d27cea724c623fae2a473ceccfd5549c53cc65a5d82692de418166df3f858e1e5dc60818581c languageName: node linkType: hard -"which-pm@npm:2.0.0": - version: 2.0.0 - resolution: "which-pm@npm:2.0.0" - dependencies: - load-yaml-file: ^0.2.0 - path-exists: ^4.0.0 - checksum: e556635eaf237b3a101043a21c2890af045db40eac4df3575161d4fb834c2aa65456f81c60d8ea4db2d51fe5ac549d989eeabd17278767c2e4179361338ac5ce +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be languageName: node linkType: hard -"which@npm:^1.2.8": - version: 1.3.1 - resolution: "which@npm:1.3.1" +"which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": + version: 1.1.9 + resolution: "which-typed-array@npm:1.1.9" dependencies: - isexe: ^2.0.0 - bin: - which: ./bin/which - checksum: f2e185c6242244b8426c9df1510e86629192d93c1a986a7d2a591f2c24869e7ffd03d6dac07ca863b2e4c06f59a4cc9916c585b72ee9fa1aa609d0124df15e04 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.0 + is-typed-array: ^1.1.10 + checksum: fe0178ca44c57699ca2c0e657b64eaa8d2db2372a4e2851184f568f98c478ae3dc3fdb5f7e46c384487046b0cf9e23241423242b277e03e8ba3dabc7c84c98ef languageName: node linkType: hard @@ -21187,6 +26200,18 @@ __metadata: languageName: node linkType: hard +"why-is-node-running@npm:^2.2.2": + version: 2.2.2 + resolution: "why-is-node-running@npm:2.2.2" + dependencies: + siginfo: ^2.0.0 + stackback: 0.0.2 + bin: + why-is-node-running: cli.js + checksum: 50820428f6a82dfc3cbce661570bcae9b658723217359b6037b67e495255409b4c8bc7931745f5c175df71210450464517cab32b2f7458ac9c40b4925065200a + languageName: node + linkType: hard + "wide-align@npm:^1.1.0, wide-align@npm:^1.1.2, wide-align@npm:^1.1.5": version: 1.1.5 resolution: "wide-align@npm:1.1.5" @@ -21205,16 +26230,7 @@ __metadata: languageName: node linkType: hard -"widest-line@npm:^4.0.1": - version: 4.0.1 - resolution: "widest-line@npm:4.0.1" - dependencies: - string-width: ^5.0.1 - checksum: 64c48cf27171221be5f86fc54b94dd29879165bdff1a7aa92dde723d9a8c99fb108312768a5d62c8c2b80b701fa27bbd36a1ddc58367585cd45c0db7920a0cba - languageName: node - linkType: hard - -"word-wrap@npm:^1.2.3": +"word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3": version: 1.2.3 resolution: "word-wrap@npm:1.2.3" checksum: 30b48f91fcf12106ed3186ae4fa86a6a1842416df425be7b60485de14bec665a54a68e4b5156647dec3a70f25e84d270ca8bc8cd23182ed095f5c7206a938c1f @@ -21238,36 +26254,36 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^6.2.0": - version: 6.2.0 - resolution: "wrap-ansi@npm:6.2.0" +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" dependencies: ansi-styles: ^4.0.0 string-width: ^4.1.0 strip-ansi: ^6.0.0 - checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b languageName: node linkType: hard -"wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" dependencies: ansi-styles: ^4.0.0 string-width: ^4.1.0 strip-ansi: ^6.0.0 - checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a languageName: node linkType: hard -"wrap-ansi@npm:^8.0.1": - version: 8.0.1 - resolution: "wrap-ansi@npm:8.0.1" +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" dependencies: ansi-styles: ^6.1.0 string-width: ^5.0.1 strip-ansi: ^7.0.1 - checksum: 5d7816e64f75544e466d58a736cb96ca47abad4ad57f48765b9735ba5601221013a37f436662340ca159208b011121e4e030de5a17180c76202e35157195a71e + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 languageName: node linkType: hard @@ -21278,6 +26294,17 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^2.3.0": + version: 2.4.3 + resolution: "write-file-atomic@npm:2.4.3" + dependencies: + graceful-fs: ^4.1.11 + imurmurhash: ^0.1.4 + signal-exit: ^3.0.2 + checksum: 2db81f92ae974fd87ab4a5e7932feacaca626679a7c98fcc73ad8fcea5a1950eab32fa831f79e9391ac99b562ca091ad49be37a79045bd65f595efbb8f4596ae + languageName: node + linkType: hard + "write-file-atomic@npm:^3.0.0": version: 3.0.3 resolution: "write-file-atomic@npm:3.0.3" @@ -21290,7 +26317,7 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^4.0.1": +"write-file-atomic@npm:^4.0.2": version: 4.0.2 resolution: "write-file-atomic@npm:4.0.2" dependencies: @@ -21300,9 +26327,33 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.9.0": - version: 8.9.0 - resolution: "ws@npm:8.9.0" +"ws@npm:8.13.0, ws@npm:^8.13.0, ws@npm:^8.2.3": + version: 8.13.0 + resolution: "ws@npm:8.13.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 53e991bbf928faf5dc6efac9b8eb9ab6497c69feeb94f963d648b7a3530a720b19ec2e0ec037344257e05a4f35bd9ad04d9de6f289615ffb133282031b18c61c + languageName: node + linkType: hard + +"ws@npm:^6.1.0": + version: 6.2.2 + resolution: "ws@npm:6.2.2" + dependencies: + async-limiter: ~1.0.0 + checksum: aec3154ec51477c094ac2cb5946a156e17561a581fa27005cbf22c53ac57f8d4e5f791dd4bbba6a488602cb28778c8ab7df06251d590507c3c550fd8ebeee949 + languageName: node + linkType: hard + +"ws@npm:^7.0.0, ws@npm:^7.3.1, ws@npm:^7.4.5": + version: 7.5.9 + resolution: "ws@npm:7.5.9" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -21311,7 +26362,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 23aa0f021b2eb65c108ec4c3e08c0d81ba01f82b500432dfe327fd6be36079c1d81fdb0eac6464d2a0eb49904d34a9ab8c59619d673fa07b8346f83aeb0cbf12 + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 languageName: node linkType: hard @@ -21322,13 +26373,36 @@ __metadata: languageName: node linkType: hard -"xdg-default-browser@npm:^2.1.0": +"xdm@npm:^2.0.0": version: 2.1.0 - resolution: "xdg-default-browser@npm:2.1.0" + resolution: "xdm@npm:2.1.0" dependencies: - execa: ^0.2.2 - titleize: ^1.0.0 - checksum: c17752ba5662fa601acc8ae49f2aac20fd27e6aa1615caadab4ca8075a24e32183d120d92a4050a6dac745762d8ab60788ce87d696f14274a0e60b9b2e9b9269 + "@rollup/pluginutils": ^4.0.0 + "@types/estree-jsx": ^0.0.1 + astring: ^1.6.0 + deasync: ^0.1.0 + estree-util-build-jsx: ^2.0.0 + estree-util-is-identifier-name: ^2.0.0 + estree-walker: ^3.0.0 + got: ^11.0.0 + hast-util-to-estree: ^2.0.0 + loader-utils: ^2.0.0 + markdown-extensions: ^1.0.0 + mdast-util-mdx: ^1.0.0 + micromark-extension-mdxjs: ^1.0.0 + periscopic: ^3.0.0 + remark-parse: ^10.0.0 + remark-rehype: ^9.0.0 + source-map: ^0.7.0 + unified: ^10.0.0 + unist-util-position-from-estree: ^1.0.0 + unist-util-stringify-position: ^3.0.0 + unist-util-visit: ^4.0.0 + vfile: ^5.0.0 + dependenciesMeta: + deasync: + optional: true + checksum: 5a3f2434a5390aaebc66aa7d1a90d582de29c2256c94e542df7476cd5ffac6c160ebcb4f75a1a0593dfd8c6d0e650e1ad18f023a57262e0b3abc89c3e1f5c86e languageName: node linkType: hard @@ -21346,7 +26420,14 @@ __metadata: languageName: node linkType: hard -"xtend@npm:^4.0.0, xtend@npm:~4.0.1": +"xregexp@npm:2.0.0": + version: 2.0.0 + resolution: "xregexp@npm:2.0.0" + checksum: de62d1f01c9f1a67c80cafe48a3dc081b324249a0e88e65dc9acae9cce6d8e63c9d91c0f97e2ad2d8c5351c856c139c04dc55ebd941e59b7d1d5c1169e164cff + languageName: node + linkType: hard + +"xtend@npm:~4.0.1": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a @@ -21367,10 +26448,10 @@ __metadata: languageName: node linkType: hard -"yallist@npm:^2.1.2": - version: 2.1.2 - resolution: "yallist@npm:2.1.2" - checksum: 9ba99409209f485b6fcb970330908a6d41fa1c933f75e08250316cce19383179a6b70a7e0721b89672ebb6199cc377bf3e432f55100da6a7d6e11902b0a642cb +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 48f7bb00dc19fc635a13a39fe547f527b10c9290e7b3e836b9a8f1ca04d4d342e85714416b3c2ab74949c9c66f9cebb0473e6bc353b79035356103b47641285d languageName: node linkType: hard @@ -21381,17 +26462,24 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^1.10.0, yaml@npm:^1.10.2": - version: 1.10.2 - resolution: "yaml@npm:1.10.2" - checksum: ce4ada136e8a78a0b08dc10b4b900936912d15de59905b2bf415b4d33c63df1d555d23acb2a41b23cf9fb5da41c256441afca3d6509de7247daa062fd2c5ea5f +"yaml@npm:2.2.2": + version: 2.2.2 + resolution: "yaml@npm:2.2.2" + checksum: d90c235e099e30094dcff61ba3350437aef53325db4a6bcd04ca96e1bfe7e348b191f6a7a52b5211e2dbc4eeedb22a00b291527da030de7c189728ef3f2b4eb3 languageName: node linkType: hard -"yaml@npm:^2.1.1, yaml@npm:^2.1.3": - version: 2.1.3 - resolution: "yaml@npm:2.1.3" - checksum: 91316062324a93f9cb547469092392e7d004ff8f70c40fecb420f042a4870b2181557350da56c92f07bd44b8f7a252b0be26e6ade1f548e1f4351bdd01c9d3c7 +"yaml@npm:2.3.0, yaml@npm:^2.0.0": + version: 2.3.0 + resolution: "yaml@npm:2.3.0" + checksum: 9c3d16c226472041fbdc9fb55e1645786d3a3e8d4fde67a502ed7bfbd9067b811e466679db590a0731b4405d4a3bef1f35d098fb650d2cf4bc24732fc829b961 + languageName: node + linkType: hard + +"yaml@patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch::locator=%40discordjs%2Fdiscord.js%40workspace%3A.": + version: 2.2.2 + resolution: "yaml@patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch::version=2.2.2&hash=2af928&locator=%40discordjs%2Fdiscord.js%40workspace%3A." + checksum: 3ef8fd54fae7a810ea323a9d183b37698aaf7c0ab03334a4740a919489361ef7014c8ffefe561f21086cd697ec7c3643cb0551c9f729f24ce9d1c2904a213727 languageName: node linkType: hard @@ -21412,13 +26500,28 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.0.1": +"yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c languageName: node linkType: hard +"yargs@npm:17.7.1": + version: 17.7.1 + resolution: "yargs@npm:17.7.1" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 3d8a43c336a4942bc68080768664aca85c7bd406f018bad362fd255c41c8f4e650277f42fd65d543fce99e084124ddafee7bbfc1a5c6a8fda4cec78609dcf8d4 + languageName: node + linkType: hard + "yargs@npm:^15.1.0, yargs@npm:^15.3.1": version: 15.4.1 resolution: "yargs@npm:15.4.1" @@ -21453,9 +26556,9 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.0.0, yargs@npm:^17.3.1": - version: 17.6.0 - resolution: "yargs@npm:17.6.0" +"yargs@npm:^17.0.0, yargs@npm:^17.3.1, yargs@npm:^17.7.1, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" dependencies: cliui: ^8.0.1 escalade: ^3.1.1 @@ -21463,8 +26566,18 @@ __metadata: require-directory: ^2.1.1 string-width: ^4.2.3 y18n: ^5.0.5 - yargs-parser: ^21.0.0 - checksum: 604bdb4a6395a870540d2f3fea083c8e28441f12da8fd05b172b1e68480f00ed73d76be4a05fac19de9bf55ec7729b41e81cf555cccaed700aa192e4fff64872 + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + languageName: node + linkType: hard + +"yauzl@npm:^2.10.0": + version: 2.10.0 + resolution: "yauzl@npm:2.10.0" + dependencies: + buffer-crc32: ~0.2.3 + fd-slicer: ~1.1.0 + checksum: 7f21fe0bbad6e2cb130044a5d1d0d5a0e5bf3d8d4f8c4e6ee12163ce798fee3de7388d22a7a0907f563ac5f9d40f8699a223d3d5c1718da90b0156da6904022b languageName: node linkType: hard @@ -21482,27 +26595,25 @@ __metadata: languageName: node linkType: hard -"yoga-layout-prebuilt@npm:^1.10.0": - version: 1.10.0 - resolution: "yoga-layout-prebuilt@npm:1.10.0" - dependencies: - "@types/yoga-layout": 1.9.2 - checksum: 6954c7c7b04c585a1c974391bea4734611adb85702b5e9131549a1d3dc5b94e69bcfea34121cdaeb5e702663bf290fcce5374910128e54d1031503a57c062865 +"yocto-queue@npm:^1.0.0": + version: 1.0.0 + resolution: "yocto-queue@npm:1.0.0" + checksum: 2cac84540f65c64ccc1683c267edce396b26b1e931aa429660aefac8fbe0188167b7aee815a3c22fa59a28a58d898d1a2b1825048f834d8d629f4c2a5d443801 languageName: node linkType: hard -"yoga-wasm-web@npm:0.1.2": - version: 0.1.2 - resolution: "yoga-wasm-web@npm:0.1.2" - checksum: 0e7fa70efe1cf50888e950a43104545b15df7267e66a3b7b072092d04dec78815966f4ab685db5de83a026318f93a3bd5404d866c42a6b7457f9fdc8533593ef +"yoga-wasm-web@npm:0.3.3, yoga-wasm-web@npm:^0.3.3": + version: 0.3.3 + resolution: "yoga-wasm-web@npm:0.3.3" + checksum: ff65192a832975ff531a1b6eae160c2da859c250feaa58b6389b684f9b48f53fda849a7ea49d12d241198309e671e6bd230a44e7155af9573d7843ac48831c98 languageName: node linkType: hard "z-schema@npm:~5.0.2": - version: 5.0.4 - resolution: "z-schema@npm:5.0.4" + version: 5.0.5 + resolution: "z-schema@npm:5.0.5" dependencies: - commander: ^2.20.3 + commander: ^9.4.1 lodash.get: ^4.4.2 lodash.isequal: ^4.5.0 validator: ^13.7.0 @@ -21511,37 +26622,30 @@ __metadata: optional: true bin: z-schema: bin/z-schema - checksum: afa4e0039a104a53eeb6977bf754ef44e32042aecbf3b5eb18b82649763abd5c2608e47d6d6902291359b41e76130594d7f2b6132316d819c3529f17d4d3464d + checksum: 8a1d66817ae4384dc3f63311f0cccaadd95cc9640eaade5fd3fbf91aa80d6bb82fb95d9b9171fa82ac371a0155b32b7f5f77bbe84dabaca611b66f74c628f0b8 languageName: node linkType: hard -"zlib-sync@npm:^0.1.7": - version: 0.1.7 - resolution: "zlib-sync@npm:0.1.7" +"zlib-sync@npm:^0.1.8": + version: 0.1.8 + resolution: "zlib-sync@npm:0.1.8" dependencies: - nan: ^2.14.0 + nan: ^2.17.0 node-gyp: latest - checksum: 8f6ef7bf5726b41fefffa4509f5679872b425ef47227a59d8c787b32518db6220961262f78b0f6eb1dcd9b52cd71bc8213d4f061b8b56a9b7e82c345a548e6f4 - languageName: node - linkType: hard - -"zod@npm:^3.17.3": - version: 3.19.1 - resolution: "zod@npm:3.19.1" - checksum: 56e420ea5845912324a8fc61833714a2aec84954e418b52660d76502183c6e62fef9447cbfa64349640c5ce190cf2c24267e006bb80f066183e2f3fa9fe11864 + checksum: 3ee774339f50b49de764312b74d6ef090e85a9a2d6401e89f6eb1bd33dd59d644d2831c6811e01aa8a51d0ecf51d5f435bd7f551d68d40d3c360a8eebb555b6f languageName: node linkType: hard -"zwitch@npm:^1.0.0": - version: 1.0.5 - resolution: "zwitch@npm:1.0.5" - checksum: 28a1bebacab3bc60150b6b0a2ba1db2ad033f068e81f05e4892ec0ea13ae63f5d140a1d692062ac0657840c8da076f35b94433b5f1c329d7803b247de80f064a +"zod@npm:3.21.4, zod@npm:^3.21.4": + version: 3.21.4 + resolution: "zod@npm:3.21.4" + checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f languageName: node linkType: hard -"zwitch@npm:^2.0.0": - version: 2.0.2 - resolution: "zwitch@npm:2.0.2" - checksum: 8edd7af8375f12f64d8dbef815af32cd77bd9237d0b013210ba4e3aef25fdc460fe264cd0a19deabe9f86ef0c607240ebac1a336bf4a70bf06ef53e0652de116 +"zwitch@npm:^2.0.0, zwitch@npm:^2.0.4": + version: 2.0.4 + resolution: "zwitch@npm:2.0.4" + checksum: f22ec5fc2d5f02c423c93d35cdfa83573a3a3bd98c66b927c368ea4d0e7252a500df2a90a6b45522be536a96a73404393c958e945fdba95e6832c200791702b6 languageName: node linkType: hard