From ebef2a6acda48ae6676b2625d4ac6a5873a6c2aa Mon Sep 17 00:00:00 2001 From: Gregor Anders Date: Fri, 25 Feb 2022 21:12:08 +0100 Subject: [PATCH] Refactor build configuration (#203) * chore(release): prepare next release * npm: bump @typescript-eslint/eslint-plugin from 3.4.0 to 3.5.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.5.0/packages/eslint-plugin) Signed-off-by: dependabot[bot] * npm: bump @typescript-eslint/parser from 3.4.0 to 3.5.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.5.0/packages/parser) Signed-off-by: dependabot[bot] * npm: bump typescript from 3.9.5 to 3.9.6 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.5 to 3.9.6. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot[bot] * npm: bump eslint from 7.3.1 to 7.4.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.3.1 to 7.4.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.3.1...v7.4.0) Signed-off-by: dependabot[bot] * npm: bump eslint-plugin-jest from 23.17.1 to 23.18.0 Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.17.1 to 23.18.0. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.17.1...v23.18.0) Signed-off-by: dependabot[bot] * npm: bump @typescript-eslint/parser from 3.5.0 to 3.6.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.0/packages/parser) Signed-off-by: dependabot[bot] * npm: bump @types/jest from 26.0.3 to 26.0.4 Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.3 to 26.0.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot[bot] * npm: bump @types/node from 14.0.14 to 14.0.18 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.14 to 14.0.18. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] * npm: bump @typescript-eslint/eslint-plugin from 3.5.0 to 3.6.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.0/packages/eslint-plugin) Signed-off-by: dependabot[bot] * npm: bump @types/node from 14.0.18 to 14.0.19 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.18 to 14.0.19. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] * npm: bump @types/node from 14.0.19 to 14.0.20 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.19 to 14.0.20. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] * refactor(build): use correct env variable * refactor(dependencies): dependencies check weekly * npm: bump @types/node from 14.0.20 to 14.0.23 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.20 to 14.0.23. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot[bot] * npm: bump @typescript-eslint/parser from 3.6.0 to 3.6.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.1/packages/parser) Signed-off-by: dependabot[bot] * npm: bump @typescript-eslint/eslint-plugin from 3.6.0 to 3.6.1 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.6.1/packages/eslint-plugin) Signed-off-by: dependabot[bot] * npm: bump typescript from 3.9.6 to 3.9.7 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.6 to 3.9.7. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.6...v3.9.7) Signed-off-by: dependabot[bot] * npm: bump ts-jest from 26.1.1 to 26.1.3 Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.1.1 to 26.1.3. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.1.1...v26.1.3) Signed-off-by: dependabot[bot] * chore(dependencies): update dependencies * chore(quality): add codacy config * chore(quality): add code climate * refactor(vscode): refactor visual code config * refactor(docs): refactor documentation * refactor(build): refactor Github CI * chore(git): add test path to ignored files * chore(release): 0.0.8 Release * docs(CHANGELOG): update changelog * docs(README): add codacy badge * chore(quality): add codacy CI task * chore(release): 0.0.9 * docs(CHANGELOG): update changelog * refactor(docs): remove email * chore(release): 0.0.10 * docs(CHANGELOG): update * refactor(quality): fix unicorn issue * chore(dependencies): update dependencies * chore(dependencies): update dev dependencies * chore(dependencies): update dev dependencies * chore(dependencies): update dependnencies * chore(dependencies): update dev dependencies * bug(build): exclude build from ignored files * chore(release): bump version * chore(CHANGELOG): update changelog * chore(dependencies): update dependnencies * chore(codequality): renamed variables * chore(dist): updated dist * chore(release): prepare next release * chore(docs): updated CHANGELOG * chore(docs): update SECURITY * chore(docs): update README * chore(docs): update CHANGELOG * chore(release): dump version * fix(vscode): :wrench: Removes extension Removes brackets extension as it is now provided by code itself * chore(vscode): :wrench: Adds vscode scope * chore(dependencies): :arrow_up: Updates dependencies Updates dependencies and adjusts code accordingly * chore(vscode): :wrench: Adds vscode scope * chore(dependencies): :package: Updates action * fix(dependencies): :bug: Downgrades @types/node * fix(ci): :green_heart: Fixes windows ci build * fix(ci): :green_heart: Fixes windows ci build * fix(ci): :green_heart: Fixes windows ci build * fix(ci): :green_heart: Fixes windows ci build * fix(ci): :green_heart: Fixes windows ci build * revert(dependencies): :arrow_down: Reverts dependencies update Revert dependencies update to fix build * chore(dependencies): :arrow_up: Updates dependencies * chore(dependencies): :arrow_up: Updates ncc dependency Replaces @zeit/ncc with @vercel/ncc and updates to latest version * chore(dependencies): :arrow_up: Updates eslint dependencies * revert(dependencies): :arrow_up: Reverts eslint dependencies Reverts eslint dependencies update due to CI build error on windows * chore(dependencies): :arrow_up: Updates husky dependency * revert(dependencies): :rewind: Revert husky dependency * chore(dependencies): :arrow_up: Updates jest dependencies * chore(dependencies): :heavy_minus_sign: Removes ts-node dependency * chore(dependencies): :heavy_minus_sign: Removes ts-node dependency * chore(dependencies): :arrow_up: Updates typescript dependency * chore(dependencies): :arrow_up: Updates prettier dependency * chore(dependencies): :arrow_up: Updates lint-staged dependency * chore(dependencies): :arrow_up: Updates husky dependency * chore(dependencies): :arrow_up: Updates eslint dependencies * chore(vscode): :wrench: Adds scopes * ci(workflows): :construction_worker: Uses NodeJS 16 Updates actions used in workflow and updates used NodeJS to 16.x * chore(dependencies): :heavy_minus_sign: Removes @types dependencies Refactors scripts * refactor(action): :arrow_up: Action runs with NodeJS 16 * docs(docs): :memo: Updates codeclimat related documentation * chore(action): :package: Updates action * ci(workflows): :bug: Fixes build Removes caching due to missing of package-lock.json * ci(workflows): ::arrow_up: Updates main workflow * style: :technologist: adds conventional commit integration * refactor(action): :fire: removes semver typing Replaces semver typing with provided one * docs(docs): :memo: updates docs * ci(workflows): :construction_worker: updates GitHub workflows * ci(workflows): :construction_worker: adds CodeQL workflow * ci(workflows): :construction_worker: adds feature branch workflow * chore(action): :chart_with_upwards_trend: fixes codacy issue * docs(docs): :bookmark: 0.0.13 release * chore: :bookmark: bumps version to 0.0.14 Prepare next release * build: :bug: adds commitlink config * build: :technologist: run checks in pre push hook * build(dev dependencies): :arrow_up: update dev dependencies * build(dependencies): :wrench: refactor build configuration Removes Codacy integration, adds markdownlint an remark. * docs(docs): :memo: update docs Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .codacy.yml | 22 --- .codeclimate.yml | 23 +-- .conventionalCommit.json | 51 +++++++ .dictionary | 11 ++ .eslintignore | 7 + .eslintrc-cc.json | 6 +- .eslintrc.json | 22 ++- .github/workflows/development.yml | 6 - .github/workflows/feature.yml | 6 - .github/workflows/master.yml | 6 - .github/workflows/release.yml | 68 +++++++++ .husky/pre-commit | 4 +- .husky/pre-push | 9 ++ .markdownlintignore | 3 + .mdlrc | 238 ++++++++++++++++++++++++++++++ .npmignore | 7 + .nvmrc | 1 + .prettierrc.json | 5 +- .remarkignore | 3 + .remarkrc | 45 ++++++ .remarkrc-full.mjs | 166 +++++++++++++++++++++ .vscode/extensions.json | 2 + .vscode/settings.json | 10 +- CODE_OF_CONDUCT.md | 68 ++++++--- CONTRIBUTING.md | 22 ++- LICENSE | 2 +- README.md | 40 +++-- SECURITY.md | 5 +- commitlint.config.js | 18 +++ dist/index.js | 2 +- docs/{index.md => codeclimate.md} | 35 +++-- package.json | 77 +++++++--- src/action.ts | 2 +- src/fixtures/test-utils.ts | 2 +- 34 files changed, 841 insertions(+), 153 deletions(-) delete mode 100644 .codacy.yml create mode 100644 .conventionalCommit.json create mode 100644 .dictionary create mode 100644 .eslintignore create mode 100644 .github/workflows/release.yml create mode 100755 .husky/pre-push create mode 100644 .markdownlintignore create mode 100644 .mdlrc create mode 100644 .npmignore create mode 100644 .nvmrc create mode 100644 .remarkignore create mode 100644 .remarkrc create mode 100644 .remarkrc-full.mjs create mode 100644 commitlint.config.js rename docs/{index.md => codeclimate.md} (55%) diff --git a/.codacy.yml b/.codacy.yml deleted file mode 100644 index 19899ce..0000000 --- a/.codacy.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -engines: - duplication: - exclude_paths: - - config/engines.yml - metric: - exclude_paths: - - config/engines.yml - remark-int: - exclude_paths: - - config/engines.yml - coverage: - exclude_paths: - - config/engines.yml -exclude_paths: - - '.circleci/**' - - '.github/**' - - '.vscode/**' - - '**.json' - - '**.yml' - - '**.md' - - 'dist/index.js' diff --git a/.codeclimate.yml b/.codeclimate.yml index 5b2e869..df9c6cb 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,26 +1,31 @@ version: '2' plugins: + duplication: + enabled: true editorconfig: enabled: true - tslint: - enabled: false eslint: enabled: true + channel: "eslint-7" config: config: .eslintrc-cc.json + extensions: + - .ts + - .js + - .mjs fixme: enabled: true git-legal: enabled: true + markdownlint: + enabled: true + structure: + enabled: true exclude_patterns: - '**/.github' - - '**/.circleci' + - '**/.husky' - '**/.vscode' + - '**/fixtures' - '**/dist' - - '**/temp' - '**/test' - - '**/docs' - - '**/node_modules/' - - '**/fixtures' - - '**/.husky' - - '**/commitlint.config.js' + - '**/node_modules' diff --git a/.conventionalCommit.json b/.conventionalCommit.json new file mode 100644 index 0000000..a23f240 --- /dev/null +++ b/.conventionalCommit.json @@ -0,0 +1,51 @@ +{ + "types": { + "build": { + "description": "Changes which affect CI configuration files and scripts" + }, + "chore": { + "description": "Changes which aren't user-facing" + }, + "enh": { + "description": "Changes which improve a feature" + }, + "docs": { + "description": "Changes which affect documentation" + }, + "feat": { + "description": "Changes which introduce a new feature" + }, + "fix": { + "description": "Changes which patch a bug" + }, + "perf": { + "description": "Changes which improve performance." + }, + "refactor": { + "description": "Changes which neither fix a bug nor add a feature" + }, + "revert": { + "description": "Changes which revert a previous commit" + }, + "style": { + "description": "Changes which don't affect code logic, such as white-spaces, formatting, missing semi-colons" + }, + "test": { + "description": "Changes which add missing tests or correct existing tests" + } + }, + "scopes": { + "codeclimate": { + "description": "Changes which affect Code Climate integration" + }, + "github": { + "description": "Changes which affect GitHub integration" + }, + "release": { + "description": "Changes which affect a release" + }, + "vscode": { + "description": "Changes which affect VisualStudio Code integration" + } + } +} diff --git a/.dictionary b/.dictionary new file mode 100644 index 0000000..20f2a39 --- /dev/null +++ b/.dictionary @@ -0,0 +1,11 @@ +CLI +conventional-changelog-cli +defaultProps +displayName +gregoranders +localhost +npm +markdownlint +propTypes +sexualized +socio-economic diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..e1da46b --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +docs/ +CODE_OF_CONDUCT.md +README.md +SECURITY.md +CHANGELOG.md +LICENSE +commitlint.config.js diff --git a/.eslintrc-cc.json b/.eslintrc-cc.json index 15a9dfd..c41fe9d 100644 --- a/.eslintrc-cc.json +++ b/.eslintrc-cc.json @@ -1,10 +1,9 @@ { "root": true, "parser": "@typescript-eslint/parser", - "plugins": ["prettier", "jest", "unicorn", "@typescript-eslint"], + "plugins": ["prettier", "jest", "@typescript-eslint"], "extends": [ "plugin:jest/recommended", - "plugin:unicorn/recommended", "plugin:prettier/recommended" ], "parserOptions": { @@ -19,6 +18,9 @@ "jest": true }, "rules": { + "quotes": [ + 2, "single", { "avoidEscape": true } + ], "@typescript-eslint/explicit-module-boundary-types": "off" }, "settings": {} diff --git a/.eslintrc.json b/.eslintrc.json index d94a90b..52f74e6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,24 +1,29 @@ { "root": true, "parser": "@typescript-eslint/parser", - "plugins": ["prettier", "jest", "unicorn", "@typescript-eslint"], + "plugins": ["@typescript-eslint", "jest", "prettier", "unicorn"], "extends": [ + "plugin:@typescript-eslint/recommended", "plugin:jest/recommended", - "plugin:unicorn/recommended", - "plugin:prettier/recommended" + "plugin:prettier/recommended", + "plugin:unicorn/recommended" ], "parserOptions": { - "ecmaVersion": 2020, + "ecmaVersion": "latest", "sourceType": "module", - "ecmaFeatures": {} + "ecmaFeatures": { + } }, "env": { - "es2020": true, - "es6": true, + "es2022": true, "browser": false, + "node": true, "jest": true }, "rules": { + "quotes": [ + 2, "single", { "avoidEscape": true } + ], "@typescript-eslint/explicit-module-boundary-types": "off", "sort-imports": [ "error", @@ -30,5 +35,6 @@ } ] }, - "settings": {} + "settings": { + } } diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 90a3525..dde42df 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -56,12 +56,6 @@ jobs: coverageCommand: npm test coverageLocations: | ./test/coverage/lcov.info:lcov - - name: run codacy-coverage-reporter - if: matrix.os == 'ubuntu-latest' - uses: codacy/codacy-coverage-reporter-action@master - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: ./test/coverage/lcov.info - name: Publish Unit Test Results uses: EnricoMi/publish-unit-test-result-action/composite@v1 with: diff --git a/.github/workflows/feature.yml b/.github/workflows/feature.yml index d79ad3f..4dac562 100644 --- a/.github/workflows/feature.yml +++ b/.github/workflows/feature.yml @@ -56,12 +56,6 @@ jobs: coverageCommand: npm test coverageLocations: | ./test/coverage/lcov.info:lcov - - name: run codacy-coverage-reporter - if: matrix.os == 'ubuntu-latest' - uses: codacy/codacy-coverage-reporter-action@master - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: ./test/coverage/lcov.info - name: Publish Unit Test Results uses: EnricoMi/publish-unit-test-result-action/composite@v1 with: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 44502eb..9c9f61b 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -56,12 +56,6 @@ jobs: coverageCommand: npm test coverageLocations: | ./test/coverage/lcov.info:lcov - - name: run codacy-coverage-reporter - if: matrix.os == 'ubuntu-latest' - uses: codacy/codacy-coverage-reporter-action@master - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: ./test/coverage/lcov.info - name: Publish Unit Test Results uses: EnricoMi/publish-unit-test-result-action/composite@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4087fe9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,68 @@ +name: Release CI + +on: + release: + types: + - edited + +env: + CI: true + GITHUB_BRANCH: ${{ github.ref }} + GITHUB_HEAD_REF: ${{ github.head_ref }} + GITHUB_BASE_REF: ${{ github.base_ref }} + GITHUB_COMMIT: ${{ github.sha }} + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [16.x] + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org/' + - name: nodejs project information + id: projectinfo + uses: gregoranders/nodejs-project-info@master + - name: npm install + run: | + npm install + - name: npm test + run: | + npm test + - name: npm run build + run: | + npm run build + - uses: actions/setup-node@v2 + with: + registry-url: 'https://npm.pkg.github.com' + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: upload index.js + id: uploadmain + uses: gregoranders/nodejs-upload-asset@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + id: ${{ steps.createrelease.outputs.id }} + path: dist/index.js + name: index.js + - name: upload index.d.ts + id: uploadtype + uses: gregoranders/nodejs-upload-asset@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + id: ${{ steps.createrelease.outputs.id }} + path: dist/index.d.ts + name: index.d.ts diff --git a/.husky/pre-commit b/.husky/pre-commit index ad4c2cf..7bb4135 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,6 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -lint-staged && npm test && npm run build +lint-staged +npm test +npm run build diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..3ced962 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,9 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run clear +npm install +npm test +npm run build +npm run lint +npm run codeclimate diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..66163c9 --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1,3 @@ +node_modules/** +CHANGELOG.md +LICENSE diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..af18905 --- /dev/null +++ b/.mdlrc @@ -0,0 +1,238 @@ +# Example markdownlint YAML configuration with all properties set to their default value + +# Default state for all rules +default: true + +# Path to configuration file to extend +extends: null + +# MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time +MD001: true + +# MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading +MD002: + # Heading level + level: 1 + +# MD003/heading-style/header-style - Heading style +MD003: + # Heading style + style: "consistent" + +# MD004/ul-style - Unordered list style +MD004: + # List style + style: "consistent" + +# MD005/list-indent - Inconsistent indentation for list items at the same level +MD005: true + +# MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line +MD006: true + +# MD007/ul-indent - Unordered list indentation +MD007: + # Spaces for indent + indent: 2 + # Whether to indent the first level of the list + start_indented: false + # Spaces for first level indent (when start_indented is set) + start_indent: 2 + +# MD009/no-trailing-spaces - Trailing spaces +MD009: + # Spaces for line break + br_spaces: 2 + # Allow spaces for empty lines in list items + list_item_empty_lines: false + # Include unnecessary breaks + strict: false + +# MD010/no-hard-tabs - Hard tabs +MD010: + # Include code blocks + code_blocks: true + # Number of spaces for each hard tab + spaces_per_tab: 1 + +# MD011/no-reversed-links - Reversed link syntax +MD011: true + +# MD012/no-multiple-blanks - Multiple consecutive blank lines +MD012: + # Consecutive blank lines + maximum: 1 + +# MD013/line-length - Line length +MD013: + # Number of characters + line_length: 120 + # Number of characters for headings + heading_line_length: 120 + # Number of characters for code blocks + code_block_line_length: 120 + # Include code blocks + code_blocks: true + # Include tables + tables: false + # Include headings + headings: true + # Include headings + headers: true + # Strict length checking + strict: false + # Stern length checking + stern: false + +# MD014/commands-show-output - Dollar signs used before commands without showing output +MD014: true + +# MD018/no-missing-space-atx - No space after hash on atx style heading +MD018: true + +# MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading +MD019: true + +# MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading +MD020: true + +# MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading +MD021: true + +# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines +MD022: + # Blank lines above heading + lines_above: 1 + # Blank lines below heading + lines_below: 1 + +# MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line +MD023: true + +# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content +MD024: + # Only check sibling headings + allow_different_nesting: false + # Only check sibling headings + siblings_only: false + +# MD025/single-title/single-h1 - Multiple top-level headings in the same document +MD025: + # Heading level + level: 1 + # RegExp for matching title in front matter + front_matter_title: "^\\s*title\\s*[:=]" + +# MD026/no-trailing-punctuation - Trailing punctuation in heading +MD026: + # Punctuation characters + punctuation: ".,;:!。,;:!" + +# MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol +MD027: true + +# MD028/no-blanks-blockquote - Blank line inside blockquote +MD028: true + +# MD029/ol-prefix - Ordered list item prefix +MD029: + # List style + style: "one_or_ordered" + +# MD030/list-marker-space - Spaces after list markers +MD030: + # Spaces for single-line unordered list items + ul_single: 1 + # Spaces for single-line ordered list items + ol_single: 1 + # Spaces for multi-line unordered list items + ul_multi: 1 + # Spaces for multi-line ordered list items + ol_multi: 1 + +# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines +MD031: + # Include list items + list_items: true + +# MD032/blanks-around-lists - Lists should be surrounded by blank lines +MD032: true + +# MD033/no-inline-html - Inline HTML +MD033: + # Allowed elements + allowed_elements: [ + "code", + "img" + ] + +# MD034/no-bare-urls - Bare URL used +MD034: true + +# MD035/hr-style - Horizontal rule style +MD035: + # Horizontal rule style + style: "consistent" + +# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading +MD036: + # Punctuation characters + punctuation: ".,;:!?。,;:!?" + +# MD037/no-space-in-emphasis - Spaces inside emphasis markers +MD037: true + +# MD038/no-space-in-code - Spaces inside code span elements +MD038: true + +# MD039/no-space-in-links - Spaces inside link text +MD039: true + +# MD040/fenced-code-language - Fenced code blocks should have a language specified +MD040: true + +# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading +MD041: + # Heading level + level: 1 + # RegExp for matching title in front matter + front_matter_title: "^\\s*title\\s*[:=]" + +# MD042/no-empty-links - No empty links +MD042: true + +# MD043/required-headings/required-headers - Required heading structure +MD043: false + +# MD044/proper-names - Proper names should have the correct capitalization +MD044: + # List of proper names + names: [] + # Include code blocks + code_blocks: true + +# MD045/no-alt-text - Images should have alternate text (alt text) +MD045: true + +# MD046/code-block-style - Code block style +MD046: + # Block style + style: "consistent" + +# MD047/single-trailing-newline - Files should end with a single newline character +MD047: true + +# MD048/code-fence-style - Code fence style +MD048: + # Code fence style + style: "consistent" + +# MD049/emphasis-style - Emphasis style should be consistent +MD049: + # Emphasis style should be consistent + style: "consistent" + +# MD050/strong-style - Strong style should be consistent +MD050: + # Strong style should be consistent + style: "consistent" diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..cd7f545 --- /dev/null +++ b/.npmignore @@ -0,0 +1,7 @@ +!dist/ +!docs/ +!action.yml +!CHANGELOG.md +!SECURITY.md +!README.md +!LICENSE diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..832d385 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +16.14.0 diff --git a/.prettierrc.json b/.prettierrc.json index 0c67073..456cca2 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -3,5 +3,8 @@ "trailingComma": "all", "singleQuote": true, "printWidth": 120, - "tabWidth": 2 + "tabWidth": 2, + "bracketSpacing": true, + "useTabs": false, + "endOfLine": "auto" } diff --git a/.remarkignore b/.remarkignore new file mode 100644 index 0000000..f5ca3f2 --- /dev/null +++ b/.remarkignore @@ -0,0 +1,3 @@ +node-modules/ +docs/ +CHANGELOG.md diff --git a/.remarkrc b/.remarkrc new file mode 100644 index 0000000..e482b72 --- /dev/null +++ b/.remarkrc @@ -0,0 +1,45 @@ +{ + "settings": { + "commonmark": true, + "emphasis": "_", + "strong": "*", + "bullet": "-", + "listItemIndent": "space", + "incrementListMarker": true + }, + "plugins": [ + "remark-preset-lint-consistent", + "remark-preset-lint-recommended", + "remark-preset-lint-markdown-style-guide", + "remark-lint-no-duplicate-headings", + ["remark-lint-no-dead-urls", { + "skipOffline": true + }], + "remark-lint-heading-whitespace", + ["remark-lint-maximum-line-length", 120], + ["remark-lint-maximum-heading-length", 120], + ["remark-lint-list-item-indent", "space"], + ["remark-lint-list-item-spacing", false], + ["remark-lint-strong-marker", "*"], + ["remark-lint-emphasis-marker", "_"], + ["remark-lint-unordered-list-marker-style", "-"], + ["remark-lint-ordered-list-marker-style", "."], + ["remark-lint-ordered-list-marker-value", "ordered"], + ["remark-lint-write-good", [ + "warn", + { + "passive": false, + "illusion": true, + "so": true, + "thereIs": true, + "weasel": true, + "adverb": true, + "tooWordy": true, + "cliches": true, + "eprime": false + } + ]], + "remark-validate-links", + "remark-frontmatter" + ] +} diff --git a/.remarkrc-full.mjs b/.remarkrc-full.mjs new file mode 100644 index 0000000..ac6e102 --- /dev/null +++ b/.remarkrc-full.mjs @@ -0,0 +1,166 @@ +import remarkPresetLintConsistent from 'remark-preset-lint-consistent'; +import remarkPresetLintRecommended from 'remark-preset-lint-recommended'; +import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'; +import remarkLintNoDuplicateHeadings from 'remark-lint-no-duplicate-headings'; +import remarkLintNoDeadUrls from 'remark-lint-no-dead-urls'; +import remarkLintHeadingWhitespace from 'remark-lint-heading-whitespace'; +import remarkLintMaximumLineLength from 'remark-lint-maximum-line-length'; +import remarkLintMaximumHeadingLength from 'remark-lint-maximum-heading-length'; +import remarkLintListItemIndent from 'remark-lint-list-item-indent'; +import remarkLintListItemSpacing from 'remark-lint-list-item-spacing'; +import remarkLintStrongMarker from 'remark-lint-strong-marker'; +import remarkLintEmphasisMarker from 'remark-lint-emphasis-marker'; +import remarkLintUnorderedListMarkerStyle from 'remark-lint-unordered-list-marker-style'; +import remarkLintOrderedListMarkerStyle from 'remark-lint-ordered-list-marker-style'; +import remarkLintOrderedListMarkerValue from 'remark-lint-ordered-list-marker-value'; +import remarkLintWriteGood from 'remark-lint-write-good'; +import remarkValidateLinks from 'remark-validate-links'; +import remarkFrontmatter from 'remark-frontmatter'; +import remarkRetext from 'remark-retext'; +import { unified } from 'unified'; + +import retextEnglish from 'retext-english'; +import retextSyntaxUrls from 'retext-syntax-urls'; +import retextSpell from 'retext-spell'; +import dictionaryEn from 'dictionary-en'; +import retextSentenceSpacing from 'retext-sentence-spacing'; +import retextRepeatedWords from 'retext-repeated-words'; +import retextUsage from 'retext-usage'; +import retextIndefiniteArticle from 'retext-indefinite-article'; +import retextRedundantAcronyms from 'retext-redundant-acronyms'; +import retextContractions from 'retext-contractions'; +import retextDiacritics from 'retext-diacritics'; +import retextQuotes from 'retext-quotes'; +import retextEquality from 'retext-equality'; +import retextPassive from 'retext-passive'; +import retextProfanities from 'retext-profanities'; +import retextReadability from 'retext-readability'; + +import { existsSync, readFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; + +const personalDictionaryPath = join(dirname('.'), '.dictionary'); +const personalDictionary = existsSync(personalDictionaryPath) + ? { + personal: readFileSync(personalDictionaryPath, 'utf8'), + } + : {}; + +const remarkConfig = { + settings: { + commonmark: true, + emphasis: '_', + strong: '*', + bullet: '-', + listItemIndent: 'tab', + incrementListMarker: true, + }, + plugins: [ + remarkPresetLintConsistent, + remarkPresetLintRecommended, + remarkPresetLintMarkdownStyleGuide, + remarkLintNoDuplicateHeadings, + [remarkLintNoDeadUrls, { skipOffline: true }], + remarkLintHeadingWhitespace, + [remarkLintMaximumLineLength, 120], + [remarkLintMaximumHeadingLength, 120], + [remarkLintListItemIndent, 'space'], + [remarkLintListItemSpacing, false], + [remarkLintStrongMarker, '*'], + [remarkLintEmphasisMarker, '_'], + [remarkLintUnorderedListMarkerStyle, '-'], + [remarkLintOrderedListMarkerStyle, '.'], + [remarkLintOrderedListMarkerValue, 'ordered'], + [ + remarkLintWriteGood, + [ + 'warn', + { + passive: false, + illusion: true, + so: true, + thereIs: true, + weasel: true, + adverb: true, + tooWordy: true, + cliches: true, + eprime: false, + }, + ], + ], + remarkValidateLinks, + remarkFrontmatter, + [ + remarkRetext, + unified().use({ + plugins: [ + retextEnglish, + retextSyntaxUrls, + [ + retextSpell, + { + ignoreLiteral: true, + dictionary: dictionaryEn, + ...personalDictionary, + }, + ], + [ + retextSentenceSpacing, + { + preferred: 1, + }, + ], + retextRepeatedWords, + retextUsage, + retextIndefiniteArticle, + retextRedundantAcronyms, + [ + retextContractions, + { + straight: true, + allowLiteral: true, + }, + ], + retextDiacritics, + [ + retextQuotes, + { + preferred: 'straight', + }, + ], + [ + retextEquality, + { + ignore: [ + 'master', + 'easy' + ] + } + ], + retextPassive, + [ + retextProfanities, + { + ignore: [ + 'executes', + 'faith', + 'reject', + 'sexual', + 'attacks', + 'sex' + ] + } + ], + [ + retextReadability, + { + age: 30, + }, + ], + ], + }), + ], + ], +}; + +export default remarkConfig; diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b512c77..b388fbe 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,7 @@ { "recommendations": [ + "davidanson.vscode-markdownlint", + "vivaxy.vscode-conventional-commits", "editorconfig.editorconfig", "dbaeumer.vscode-eslint", "orta.vscode-jest", diff --git a/.vscode/settings.json b/.vscode/settings.json index 6db3d34..d8d8eb9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,13 +9,5 @@ }, "[typescript]": { "editor.formatOnSave": false - }, - "conventionalCommits.scopes": [ - "vscode", - "dependencies", - "workflows", - "tests", - "action", - "docs" - ] + } } diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d2912e7..bd0ff38 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,57 +1,81 @@ + # Contributor Covenant Code of Conduct ## Our Pledge -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free -experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic -status, nationality, personal appearance, race, religion, or sexual identity and orientation. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. ## Our Standards -Examples of behavior that contributes to creating a positive environment include: +Examples of behavior that contributes to creating a positive environment +include: - Using welcoming and inclusive language - Being respectful of differing viewpoints and experiences + - Gracefully accepting constructive criticism + - Focusing on what is best for the community - Showing empathy towards other community members Examples of unacceptable behavior by participants include: -- The use of sexualized language or imagery and unwelcome sexual attention or advances +- The use of sexualized language or imagery and unwelcome sexual attention or + advances - Trolling, insulting/derogatory comments, and personal or political attacks - Public or private harassment -- Publishing others' private information, such as a physical or electronic address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a professional setting +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ## Our Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances -of unacceptable behavior. +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this -Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. ## Scope -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or -community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. -Representation of a project may be further defined and clarified by project maintainers. +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result -in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's -leadership. +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][code-of-conduct] For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +[https://www.contributor-covenant.org/faq][faq] + +[homepage]: https://www.contributor-covenant.org +[faq]: https://www.contributor-covenant.org/faq +[code-of-conduct]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dee1a60..ac8a075 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,9 @@ # Contributing Guide + Contributing to `nodejs-project-info` is fairly easy. This document shows you how to get the project, run all provided tests and generate a production-ready build. + It also covers provided tasks that help you develop with `nodejs-project-info`. @@ -44,9 +46,11 @@ This command installs everything which is required for building and testing the `npm run watch` executes the build in watch mode. -## Ensure code quality [`docker required`](docs/index.md) +## Ensure code quality `docker required` -`npm run codeclimate` executes the code quality checks +`npm run lint` executes [markdownlint][markdownlint-url] and [remark][remark-url] checks + +`npm run codeclimate` executes the [Code Climate](docs/codeclimate.md) checks ## Contributing/Submitting changes @@ -65,18 +69,22 @@ This command installs everything which is required for building and testing the - Use one branch per fix/feature - Make your changes - - Make sure to provide a spec for unit tests. + - Make sure to provide a [spec for unit tests][jest-url]. - Run your tests with npm test. - - Save integration time and run code quality checks locally with npm run codeclimate + - Save integration time and run code quality checks locally with `npm run codeclimate` - When all tests pass, everything's fine. - Commit your changes - - Please provide a git message that explains what you've done following the [conventional commits][commit-url] pattern. - - nodejs-project-info uses [generate-changelog](https://www.npmjs.com/package/generate-changelog), so please make sure your commits follow the [conventional commit][commit-url] pattern. + - Please provide a git message that explains what you've done + following the [conventional commits][commit-url] pattern. + - `nodejs-project-info` uses [conventional-changelog-cli](https://www.npmjs.com/package/conventional-changelog-cli). - Commit to the forked repository. - - Sign your commit. + - [Sign][sign-url] your commit. - Make a pull request - Make sure you send the PR to the development branch. - CI is watching you! [jest-url]: https://jestjs.io/ +[markdownlint-url]: https://www.npmjs.com/package/markdownlint +[remark-url]: https://remark.js.org/ [commit-url]: https://www.conventionalcommits.org +[sign-url]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits diff --git a/LICENSE b/LICENSE index c934907..e7d8822 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Gregor Anders +Copyright (c) 2022 - present Gregor Anders Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 22d3937..1bf1d87 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,47 @@ -# NodeJS Project Information +# Node.JS Project Information -## [GitHub Action](https://github.com/features/actions) written in [TypeScript](http://www.typescriptlang.org/) +## [GitHub Action][github-actions-url] written in [TypeScript][typescript-url] ### Provide package.json - [GitHub Action](https://github.com/features/actions) -This action provides the _name_ and _version_ and the content of **package.json**, so your workflow can access it. +This action provides the _name_, _version_ and the content of **package.json**, so your workflow can access it. [![License][license-image]][license-url] [![Issues][issues-image]][issues-url] -[![Codacy Badge][codacy-imge]][codacy-url][![Code maintainability][code-maintainability-image]][code-maintainability-url] [![Code issues][code-issues-image]][code-issues-url] [![Code Technical Debt][code-tech-debt-image]][code-tech-debt-url] +[![Code maintainability][code-maintainability-image]][code-maintainability-url] +[![Code issues][code-issues-image]][code-issues-url] +[![Code Technical Debt][code-tech-debt-image]][code-tech-debt-url] -[![Main Language][language-image]][code-metric-url] [![Languages][languages-image]][code-metric-url] [![Code Size][code-size-image]][code-metric-url] [![Repo-Size][repo-size-image]][code-metric-url] +[![Main Language][language-image]][code-metric-url] +[![Languages][languages-image]][code-metric-url] +[![Code Size][code-size-image]][code-metric-url] +[![Repository Size][repo-size-image]][code-metric-url] -| | | [![Release][release-image]][release-url] | +## Features + +- [TypeScript][typescript-url] +- [Jest][jest-url] Unit Tests with Code Coverage +- GitHub CI Integration (feature, development, master, release) +- Code Quality via [Code Climate](./docs/codeclimate.md) + + +| GitHub | Coveralls | | | ---------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| [![Release Build][release-build-image]][release-url] | | [![Release Version][release-image]][release-url] | | [![Master Build][master-build-image]][master-url] | [![Master Coverage][master-coveralls-image]][master-coveralls-url] | [![Master Version][master-version-image]][master-version-url] | | [![Development Build][development-build-image]][development-url] | [![Test Coverage][development-coveralls-image]][development-coveralls-url] | [![Development Version][development-version-image]][development-version-url] | - + ## Usage ```YML ... - name: nodejs project information id: projectinfo - uses: gregoranders/nodejs-project-info@v0.0.13 + uses: gregoranders/nodejs-project-info@v0.0.14 - name: create release action id: createrelease - uses: gregoranders/nodejs-create-release@v0.0.13 + uses: gregoranders/nodejs-create-release@v0.0.14 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }} @@ -58,10 +72,7 @@ outputs: [release-url]: https://github.com/gregoranders/nodejs-project-info/releases [master-url]: https://github.com/gregoranders/nodejs-project-info/tree/master [development-url]: https://github.com/gregoranders/nodejs-project-info/tree/development -[repository-url]: https://github.com/gregoranders/nodejs-project-info [code-metric-url]: https://github.com/gregoranders/nodejs-project-info/search?l=TypeScript -[travis-url]: https://travis-ci.org/gregoranders/nodejs-project-info -[travis-image]: https://travis-ci.org/gregoranders/nodejs-project-info.svg?branch=master [license-url]: https://github.com/gregoranders/nodejs-project-info/blob/master/LICENSE [license-image]: https://img.shields.io/github/license/gregoranders/nodejs-project-info.svg [master-version-url]: https://github.com/gregoranders/nodejs-project-info/blob/master/package.json @@ -88,5 +99,6 @@ outputs: [languages-image]: https://img.shields.io/github/languages/count/gregoranders/nodejs-project-info [code-size-image]: https://img.shields.io/github/languages/code-size/gregoranders/nodejs-project-info [repo-size-image]: https://img.shields.io/github/repo-size/gregoranders/nodejs-project-info -[codacy-imge]: https://app.codacy.com/project/badge/Grade/ade2dc1495e942019cda4408f84ef8db -[codacy-url]: https://www.codacy.com/manual/gregoranders/nodejs-project-info +[typescript-url]: http://www.typescriptlang.org/ +[jest-url]: https://jestjs.io/ +[github-actions-url]: https://github.com/features/actions diff --git a/SECURITY.md b/SECURITY.md index 9ee3eff..c4645a4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -3,8 +3,9 @@ ## Supported Versions | Version | Supported | -| ------- | ------------------ | -| 0.0.13 | :white_check_mark: | +| :------ | :----------------: | +| 0.0.14 | :white_check_mark: | +| 0.0.13 | :x: | | 0.0.12 | :x: | | 0.0.11 | :x: | | 0.0.10 | :x: | diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..89d9d35 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,18 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable unicorn/prefer-module */ +const conventionalCommit = require('./.conventionalCommit.json'); + +const typesEnum = Object.keys(conventionalCommit.types); +const scopesEnum = Object.keys(conventionalCommit.scopes); + +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [2, 'always', typesEnum], + 'scope-case': [2, 'always', ['camel-case']], + 'scope-enum': [1, 'always', scopesEnum], + 'subject-empty': [2, 'never'], + 'subject-case': [2, 'always', ['lower-case']], + 'header-max-length': [2, 'always', 72], + }, +}; diff --git a/dist/index.js b/dist/index.js index 8e47b4a..51ef881 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -(()=>{var e={7351:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const i=o(r(2037));const a=r(5278);function issueCommand(e,t,r){const s=new Command(e,t,r);process.stdout.write(s.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};var i=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const l=r(717);const u=r(5278);const c=o(r(2037));const p=o(r(1017));const h=r(8041);var f;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(f=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=u.toCommandValue(t);process.env[e]=r;const s=process.env["GITHUB_ENV"]||"";if(s){const t="_GitHubActionsFileCommandDelimeter_";const s=`${e}<<${t}${c.EOL}${r}${c.EOL}${t}`;l.issueCommand("ENV",s)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){l.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${p.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const s=["false","False","FALSE"];const n=getInput(e,t);if(r.includes(n))return true;if(s.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(c.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=f.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+c.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return i(this,void 0,void 0,(function*(){return yield h.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken},717:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const i=o(r(7147));const a=o(r(2037));const l=r(5278);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${l.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},8041:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=r(9925);const o=r(3702);const i=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const s=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const n=(t=s.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}i.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);i.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},3702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3685);const n=r(5687);const o=r(6443);let i;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=o.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const c=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const p=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const f=10;const d=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,s){return this.request(e,t,r,s)}async getJson(e,t={}){t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,u.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let s=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,u.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,u.ApplicationJson);let n=await this.post(e,s,r);return this._processResponse(n,this.requestOptions)}async putJson(e,t,r={}){let s=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,u.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,u.ApplicationJson);let n=await this.put(e,s,r);return this._processResponse(n,this.requestOptions)}async patchJson(e,t,r={}){let s=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,u.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,u.ApplicationJson);let n=await this.patch(e,s,r);return this._processResponse(n,this.requestOptions)}async request(e,t,r,s){if(this._disposed){throw new Error("Client has already been disposed.")}let n=new URL(t);let o=this._prepareRequest(e,n,s);let i=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let u;while(l0){const i=u.message.headers["location"];if(!i){break}let a=new URL(i);if(n.protocol=="https:"&&n.protocol!=a.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await u.readBody();if(a.hostname!==n.hostname){for(let e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}o=this._prepareRequest(e,a,s);u=await this.requestRaw(o,r);t--}if(p.indexOf(u.message.statusCode)==-1){return u}l+=1;if(l{let callbackForResult=function(e,t){if(e){s(e)}r(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,r){let s;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let n=false;let handleResult=(e,t)=>{if(!n){n=true;r(e,t)}};let o=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));o.on("socket",(e=>{s=e}));o.setTimeout(this._socketTimeout||3*6e4,(()=>{if(s){s.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));o.on("error",(function(e){handleResult(e,null)}));if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){o.end()}));t.pipe(o)}else{o.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const o={};o.parsedUrl=t;const i=o.parsedUrl.protocol==="https:";o.httpModule=i?n:s;const a=i?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):a;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(o.options)}))}return o}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||r}_getAgent(e){let t;let a=o.getProxyUrl(e);let l=a&&a.hostname;if(this._keepAlive&&l){t=this._proxyAgent}if(this._keepAlive&&!l){t=this._agent}if(!!t){return t}const u=e.protocol==="https:";let c=100;if(!!this.requestOptions){c=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(l){if(!i){i=r(4294)}const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{...(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`},host:a.hostname,port:a.port}};let s;const n=a.protocol==="https:";if(u){s=n?i.httpsOverHttps:i.httpsOverHttp}else{s=n?i.httpOverHttps:i.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=u?new n.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=u?n.globalAgent:s.globalAgent}if(u&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(f,e);const t=d*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise((async(r,s)=>{const n=e.message.statusCode;const o={statusCode:n,result:null,headers:{}};if(n==a.NotFound){r(o)}let i;let l;try{l=await e.readBody();if(l&&l.length>0){if(t&&t.deserializeDates){i=JSON.parse(l,HttpClient.dateTimeDeserializer)}else{i=JSON.parse(l)}o.result=i}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(i&&i.message){e=i.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+n+")"}let t=new HttpClientError(e,n);t.result=o.result;s(t)}else{r(o)}}))}}t.HttpClient=HttpClient},6443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let s;if(t){s=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{s=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(s){r=new URL(s)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let s=[e.hostname.toUpperCase()];if(typeof r==="number"){s.push(`${s[0]}:${r}`)}for(let e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(s.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},7129:(e,t,r)=>{"use strict";const s=r(665);const n=Symbol("max");const o=Symbol("length");const i=Symbol("lengthCalculator");const a=Symbol("allowStale");const l=Symbol("maxAge");const u=Symbol("dispose");const c=Symbol("noDisposeOnSet");const p=Symbol("lruList");const h=Symbol("cache");const f=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[i]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0;this[u]=e.dispose;this[c]=e.noDisposeOnSet||false;this[f]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[l]=e;trim(this)}get maxAge(){return this[l]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[i]){this[i]=e;this[o]=0;this[p].forEach((e=>{e.length=this[i](e.value,e.key);this[o]+=e.length}))}trim(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let r=this[p].tail;r!==null;){const s=r.prev;forEachStep(this,e,r,t);r=s}}forEach(e,t){t=t||this;for(let r=this[p].head;r!==null;){const s=r.next;forEachStep(this,e,r,t);r=s}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){if(this[u]&&this[p]&&this[p].length){this[p].forEach((e=>this[u](e.key,e.value)))}this[h]=new Map;this[p]=new s;this[o]=0}dump(){return this[p].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,r){r=r||this[l];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0;const a=this[i](t,e);if(this[h].has(e)){if(a>this[n]){del(this,this[h].get(e));return false}const i=this[h].get(e);const l=i.value;if(this[u]){if(!this[c])this[u](e,l.value)}l.now=s;l.maxAge=r;l.value=t;this[o]+=a-l.length;l.length=a;this.get(e);trim(this);return true}const f=new Entry(e,t,a,s,r);if(f.length>this[n]){if(this[u])this[u](e,t);return false}this[o]+=f.length;this[p].unshift(f);this[h].set(e,this[p].head);trim(this);return true}has(e){if(!this[h].has(e))return false;const t=this[h].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[p].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const e=n-t;if(e>0){this.set(s.k,s.v,e)}}}}prune(){this[h].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const s=e[h].get(t);if(s){const t=s.value;if(isStale(e,t)){del(e,s);if(!e[a])return undefined}else{if(r){if(e[f])s.value.now=Date.now();e[p].unshiftNode(s)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[l])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]};const trim=e=>{if(e[o]>e[n]){for(let t=e[p].tail;e[o]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[u])e[u](r.key,r.value);e[o]-=r.length;e[h].delete(r.key);e[p].removeNode(t)}};class Entry{constructor(e,t,r,s,n){this.key=e;this.value=t;this.length=r;this.now=s;this.maxAge=n||0}}const forEachStep=(e,t,r,s)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[a])n=undefined}if(n)t.call(s,n.value,n.key,e)};e.exports=LRUCache},1532:(e,t,r)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}l("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(e){const t=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=s}else{this.semver=new u(r[2],this.options.loose)}}toString(){return this.value}test(e){l("Comparator.test",e,this.options.loose);if(this.semver===s||e===s){return true}if(typeof e==="string"){try{e=new u(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new c(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new c(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const i=a(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const l=a(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||s||n&&o||i||l}}e.exports=Comparator;const n=r(785);const{re:o,t:i}=r(9523);const a=r(5098);const l=r(427);const u=r(8088);const c=r(9828)},9828:(e,t,r)=>{class Range{constructor(e,t){t=o(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof i){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0)this.set=[e];else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const s=n.get(r);if(s)return s;const o=this.options.loose;const l=o?u[c.HYPHENRANGELOOSE]:u[c.HYPHENRANGE];e=e.replace(l,hyphenReplace(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(u[c.COMPARATORTRIM],p);a("comparator trim",e,u[c.COMPARATORTRIM]);e=e.replace(u[c.TILDETRIM],h);e=e.replace(u[c.CARETTRIM],f);e=e.split(/\s+/).join(" ");const d=o?u[c.COMPARATORLOOSE]:u[c.COMPARATOR];const m=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options))).filter(this.options.loose?e=>!!e.match(d):()=>true).map((e=>new i(e,this.options)));const v=m.length;const E=new Map;for(const e of m){if(isNullSet(e))return[e];E.set(e.value,e)}if(E.size>1&&E.has(""))E.delete("");const g=[...E.values()];n.set(r,g);return g}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const s=e.slice();let n=s.pop();while(r&&s.length){r=s.every((e=>n.intersects(e,t)));n=s.pop()}return r};const parseComparator=(e,t)=>{a("comp",e,t);e=replaceCarets(e,t);a("caret",e);e=replaceTildes(e,t);a("tildes",e);e=replaceXRanges(e,t);a("xrange",e);e=replaceStars(e,t);a("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?u[c.TILDELOOSE]:u[c.TILDE];return e.replace(r,((t,r,s,n,o)=>{a("tilde",e,t,r,s,n,o);let i;if(isX(r)){i=""}else if(isX(s)){i=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){i=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`}else if(o){a("replaceTilde pr",o);i=`>=${r}.${s}.${n}-${o} <${r}.${+s+1}.0-0`}else{i=`>=${r}.${s}.${n} <${r}.${+s+1}.0-0`}a("tilde return",i);return i}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{a("caret",e,t);const r=t.loose?u[c.CARETLOOSE]:u[c.CARET];const s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,o,i)=>{a("caret",e,t,r,n,o,i);let l;if(isX(r)){l=""}else if(isX(n)){l=`>=${r}.0.0${s} <${+r+1}.0.0-0`}else if(isX(o)){if(r==="0"){l=`>=${r}.${n}.0${s} <${r}.${+n+1}.0-0`}else{l=`>=${r}.${n}.0${s} <${+r+1}.0.0-0`}}else if(i){a("replaceCaret pr",i);if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${o}-${i} <${r}.${n}.${+o+1}-0`}else{l=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${o}-${i} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${o}${s} <${r}.${n}.${+o+1}-0`}else{l=`>=${r}.${n}.${o}${s} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${o} <${+r+1}.0.0-0`}}a("caret return",l);return l}))};const replaceXRanges=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?u[c.XRANGELOOSE]:u[c.XRANGE];return e.replace(r,((r,s,n,o,i,l)=>{a("xRange",e,r,s,n,o,i,l);const u=isX(n);const c=u||isX(o);const p=c||isX(i);const h=p;if(s==="="&&h){s=""}l=t.includePrerelease?"-0":"";if(u){if(s===">"||s==="<"){r="<0.0.0-0"}else{r="*"}}else if(s&&h){if(c){o=0}i=0;if(s===">"){s=">=";if(c){n=+n+1;o=0;i=0}else{o=+o+1;i=0}}else if(s==="<="){s="<";if(c){n=+n+1}else{o=+o+1}}if(s==="<")l="-0";r=`${s+n}.${o}.${i}${l}`}else if(c){r=`>=${n}.0.0${l} <${+n+1}.0.0-0`}else if(p){r=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`}a("xRange return",r);return r}))};const replaceStars=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(u[c.STAR],"")};const replaceGTE0=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(u[t.includePrerelease?c.GTE0PRE:c.GTE0],"")};const hyphenReplace=e=>(t,r,s,n,o,i,a,l,u,c,p,h,f)=>{if(isX(s)){r=""}else if(isX(n)){r=`>=${s}.0.0${e?"-0":""}`}else if(isX(o)){r=`>=${s}.${n}.0${e?"-0":""}`}else if(i){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(u)){l=""}else if(isX(c)){l=`<${+u+1}.0.0-0`}else if(isX(p)){l=`<${u}.${+c+1}.0-0`}else if(h){l=`<=${u}.${c}.${p}-${h}`}else if(e){l=`<${u}.${c}.${+p+1}-0`}else{l=`<=${l}`}return`${r} ${l}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}},8088:(e,t,r)=>{const s=r(427);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=r(2293);const{re:i,t:a}=r(9523);const l=r(785);const{compareIdentifiers:u}=r(2463);class SemVer{constructor(e,t){t=l(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[a.LOOSE]:i[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},8848:(e,t,r)=>{const s=r(5925);const clean=(e,t)=>{const r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},5098:(e,t,r)=>{const s=r(1898);const n=r(6017);const o=r(4123);const i=r(5522);const a=r(194);const l=r(7520);const cmp=(e,t,r,u)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return n(e,r,u);case">":return o(e,r,u);case">=":return i(e,r,u);case"<":return a(e,r,u);case"<=":return l(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},3466:(e,t,r)=>{const s=r(8088);const n=r(5925);const{re:o,t:i}=r(9523);const coerce=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(o[i.COERCE])}else{let t;while((t=o[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}o[i.COERCERTL].lastIndex=-1}if(r===null)return null;return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},2156:(e,t,r)=>{const s=r(8088);const compareBuild=(e,t,r)=>{const n=new s(e,r);const o=new s(t,r);return n.compare(o)||n.compareBuild(o)};e.exports=compareBuild},2804:(e,t,r)=>{const s=r(4309);const compareLoose=(e,t)=>s(e,t,true);e.exports=compareLoose},4309:(e,t,r)=>{const s=r(8088);const compare=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=compare},4297:(e,t,r)=>{const s=r(5925);const n=r(1898);const diff=(e,t)=>{if(n(e,t)){return null}else{const r=s(e);const n=s(t);const o=r.prerelease.length||n.prerelease.length;const i=o?"pre":"";const a=o?"prerelease":"";for(const e in r){if(e==="major"||e==="minor"||e==="patch"){if(r[e]!==n[e]){return i+e}}}return a}};e.exports=diff},1898:(e,t,r)=>{const s=r(4309);const eq=(e,t,r)=>s(e,t,r)===0;e.exports=eq},4123:(e,t,r)=>{const s=r(4309);const gt=(e,t,r)=>s(e,t,r)>0;e.exports=gt},5522:(e,t,r)=>{const s=r(4309);const gte=(e,t,r)=>s(e,t,r)>=0;e.exports=gte},900:(e,t,r)=>{const s=r(8088);const inc=(e,t,r,n)=>{if(typeof r==="string"){n=r;r=undefined}try{return new s(e,r).inc(t,n).version}catch(e){return null}};e.exports=inc},194:(e,t,r)=>{const s=r(4309);const lt=(e,t,r)=>s(e,t,r)<0;e.exports=lt},7520:(e,t,r)=>{const s=r(4309);const lte=(e,t,r)=>s(e,t,r)<=0;e.exports=lte},6688:(e,t,r)=>{const s=r(8088);const major=(e,t)=>new s(e,t).major;e.exports=major},8447:(e,t,r)=>{const s=r(8088);const minor=(e,t)=>new s(e,t).minor;e.exports=minor},6017:(e,t,r)=>{const s=r(4309);const neq=(e,t,r)=>s(e,t,r)!==0;e.exports=neq},5925:(e,t,r)=>{const{MAX_LENGTH:s}=r(2293);const{re:n,t:o}=r(9523);const i=r(8088);const a=r(785);const parse=(e,t)=>{t=a(t);if(e instanceof i){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[o.LOOSE]:n[o.FULL];if(!r.test(e)){return null}try{return new i(e,t)}catch(e){return null}};e.exports=parse},2866:(e,t,r)=>{const s=r(8088);const patch=(e,t)=>new s(e,t).patch;e.exports=patch},4016:(e,t,r)=>{const s=r(5925);const prerelease=(e,t)=>{const r=s(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},6417:(e,t,r)=>{const s=r(4309);const rcompare=(e,t,r)=>s(t,e,r);e.exports=rcompare},8701:(e,t,r)=>{const s=r(2156);const rsort=(e,t)=>e.sort(((e,r)=>s(r,e,t)));e.exports=rsort},6055:(e,t,r)=>{const s=r(9828);const satisfies=(e,t,r)=>{try{t=new s(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},1426:(e,t,r)=>{const s=r(2156);const sort=(e,t)=>e.sort(((e,r)=>s(e,r,t)));e.exports=sort},9601:(e,t,r)=>{const s=r(5925);const valid=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=valid},1383:(e,t,r)=>{const s=r(9523);e.exports={re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:r(2293).SEMVER_SPEC_VERSION,SemVer:r(8088),compareIdentifiers:r(2463).compareIdentifiers,rcompareIdentifiers:r(2463).rcompareIdentifiers,parse:r(5925),valid:r(9601),clean:r(8848),inc:r(900),diff:r(4297),major:r(6688),minor:r(8447),patch:r(2866),prerelease:r(4016),compare:r(4309),rcompare:r(6417),compareLoose:r(2804),compareBuild:r(2156),sort:r(1426),rsort:r(8701),gt:r(4123),lt:r(194),eq:r(1898),neq:r(6017),gte:r(5522),lte:r(7520),cmp:r(5098),coerce:r(3466),Comparator:r(1532),Range:r(9828),satisfies:r(6055),toComparators:r(2706),maxSatisfying:r(579),minSatisfying:r(832),minVersion:r(4179),validRange:r(2098),outside:r(420),gtr:r(9380),ltr:r(3323),intersects:r(7008),simplifyRange:r(5297),subset:r(7863)}},2293:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},427:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},2463:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},785:e=>{const t=["includePrerelease","loose","rtl"];const parseOptions=e=>!e?{}:typeof e!=="object"?{loose:true}:t.filter((t=>e[t])).reduce(((e,t)=>{e[t]=true;return e}),{});e.exports=parseOptions},9523:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s}=r(2293);const n=r(427);t=e.exports={};const o=t.re=[];const i=t.src=[];const a=t.t={};let l=0;const createToken=(e,t,r)=>{const s=l++;n(s,t);a[e]=s;i[s]=t;o[s]=new RegExp(t,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`);createToken("FULL",`^${i[a.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`);createToken("LOOSE",`^${i[a.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",i[a.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0.0.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},9380:(e,t,r)=>{const s=r(420);const gtr=(e,t,r)=>s(e,t,">",r);e.exports=gtr},7008:(e,t,r)=>{const s=r(9828);const intersects=(e,t,r)=>{e=new s(e,r);t=new s(t,r);return e.intersects(t)};e.exports=intersects},3323:(e,t,r)=>{const s=r(420);const ltr=(e,t,r)=>s(e,t,"<",r);e.exports=ltr},579:(e,t,r)=>{const s=r(8088);const n=r(9828);const maxSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===-1){o=e;i=new s(o,r)}}}));return o};e.exports=maxSatisfying},832:(e,t,r)=>{const s=r(8088);const n=r(9828);const minSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===1){o=e;i=new s(o,r)}}}));return o};e.exports=minSatisfying},4179:(e,t,r)=>{const s=r(8088);const n=r(9828);const o=r(4123);const minVersion=(e,t)=>{e=new n(e,t);let r=new s("0.0.0");if(e.test(r)){return r}r=new s("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new s(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!i||o(t,i)){i=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(i&&(!r||o(r,i)))r=i}if(r&&e.test(r)){return r}return null};e.exports=minVersion},420:(e,t,r)=>{const s=r(8088);const n=r(1532);const{ANY:o}=n;const i=r(9828);const a=r(6055);const l=r(4123);const u=r(194);const c=r(7520);const p=r(5522);const outside=(e,t,r,h)=>{e=new s(e,h);t=new i(t,h);let f,d,m,v,E;switch(r){case">":f=l;d=c;m=u;v=">";E=">=";break;case"<":f=u;d=p;m=l;v="<";E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h)){return false}for(let r=0;r{if(e.semver===o){e=new n(">=0.0.0")}i=i||e;a=a||e;if(f(e.semver,i.semver,h)){i=e}else if(m(e.semver,a.semver,h)){a=e}}));if(i.operator===v||i.operator===E){return false}if((!a.operator||a.operator===v)&&d(e,a.semver)){return false}else if(a.operator===E&&m(e,a.semver)){return false}}return true};e.exports=outside},5297:(e,t,r)=>{const s=r(6055);const n=r(4309);e.exports=(e,t,r)=>{const o=[];let i=null;let a=null;const l=e.sort(((e,t)=>n(e,t,r)));for(const e of l){const n=s(e,t,r);if(n){a=e;if(!i)i=e}else{if(a){o.push([i,a])}a=null;i=null}}if(i)o.push([i,null]);const u=[];for(const[e,t]of o){if(e===t)u.push(e);else if(!t&&e===l[0])u.push("*");else if(!t)u.push(`>=${e}`);else if(e===l[0])u.push(`<=${t}`);else u.push(`${e} - ${t}`)}const c=u.join(" || ");const p=typeof t.raw==="string"?t.raw:String(t);return c.length{const s=r(9828);const n=r(1532);const{ANY:o}=n;const i=r(6055);const a=r(4309);const subset=(e,t,r={})=>{if(e===t)return true;e=new s(e,r);t=new s(t,r);let n=false;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);n=n||t!==null;if(t)continue e}if(n)return false}return true};const simpleSubset=(e,t,r)=>{if(e===t)return true;if(e.length===1&&e[0].semver===o){if(t.length===1&&t[0].semver===o)return true;else if(r.includePrerelease)e=[new n(">=0.0.0-0")];else e=[new n(">=0.0.0")]}if(t.length===1&&t[0].semver===o){if(r.includePrerelease)return true;else t=[new n(">=0.0.0")]}const s=new Set;let l,u;for(const t of e){if(t.operator===">"||t.operator===">=")l=higherGT(l,t,r);else if(t.operator==="<"||t.operator==="<=")u=lowerLT(u,t,r);else s.add(t.semver)}if(s.size>1)return null;let c;if(l&&u){c=a(l.semver,u.semver,r);if(c>0)return null;else if(c===0&&(l.operator!==">="||u.operator!=="<="))return null}for(const e of s){if(l&&!i(e,String(l),r))return null;if(u&&!i(e,String(u),r))return null;for(const s of t){if(!i(e,String(s),r))return false}return true}let p,h;let f,d;let m=u&&!r.includePrerelease&&u.semver.prerelease.length?u.semver:false;let v=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:false;if(m&&m.prerelease.length===1&&u.operator==="<"&&m.prerelease[0]===0){m=false}for(const e of t){d=d||e.operator===">"||e.operator===">=";f=f||e.operator==="<"||e.operator==="<=";if(l){if(v){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch){v=false}}if(e.operator===">"||e.operator===">="){p=higherGT(l,e,r);if(p===e&&p!==l)return false}else if(l.operator===">="&&!i(l.semver,String(e),r))return false}if(u){if(m){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch){m=false}}if(e.operator==="<"||e.operator==="<="){h=lowerLT(u,e,r);if(h===e&&h!==u)return false}else if(u.operator==="<="&&!i(u.semver,String(e),r))return false}if(!e.operator&&(u||l)&&c!==0)return false}if(l&&f&&!u&&c!==0)return false;if(u&&d&&!l&&c!==0)return false;if(v||m)return false;return true};const higherGT=(e,t,r)=>{if(!e)return t;const s=a(e.semver,t.semver,r);return s>0?e:s<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e)return t;const s=a(e.semver,t.semver,r);return s<0?e:s>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},2706:(e,t,r)=>{const s=r(9828);const toComparators=(e,t)=>new s(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},2098:(e,t,r)=>{const s=r(9828);const validRange=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}};e.exports=validRange},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var s=r(1808);var n=r(4404);var o=r(3685);var i=r(5687);var a=r(2361);var l=r(9491);var u=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,s,n){var o=toOptions(r,s,n);for(var i=0,a=t.requests.length;i=this.maxSockets){n.requests.push(o);return}n.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,o)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var s={};r.sockets.push(s);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}c("making CONNECT request");var o=r.request(n);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,i,a){o.removeAllListeners();i.removeAllListeners();if(n.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",n.statusCode);i.destroy();var l=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(s);return}if(a.length>0){c("got illegal response body from proxy");i.destroy();var l=new Error("got illegal response body from proxy");l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(s);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(s)]=i;return t(i)}function onError(t){o.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(s){var o=e.request.getHeader("host");var i=mergeOptions({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):e.host});var a=n.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},665:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,s=arguments.length;r1){r=t}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){r=e(r,s.value,n);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var s=this.tail;if(arguments.length>1){r=t}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){r=e(r,s.value,n);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var s=0,n=this.head;n!==null&&sthis.length){t=this.length}for(var s=this.length,n=this.tail;n!==null&&s>t;s--){n=n.prev}for(;n!==null&&s>e;s--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,n=this.head;n!==null&&si(void 0,void 0,void 0,(function*(){return new Promise(((t,r)=>{(0,l.readFile)(e,((e,s)=>{if(e){r(e)}else{t(s.toString())}}))}))}));const resolvePath=e=>new Promise(((t,r)=>{(0,l.realpath)(e,((e,s)=>{if(e){r(e)}else{t(s)}}))}));const run=()=>i(void 0,void 0,void 0,(function*(){const e=a.getInput("path",{required:false})||"./package.json";try{const t=yield resolvePath(e);const r=yield readfile(t);const s=JSON.parse(r);if(!s.version){throw new Error(`Missing version`)}if(!(0,u.valid)(s.version)){throw new Error(`Invalid version ${s.version}`)}a.setOutput("name",s.name);a.setOutput("version",s.version);a.setOutput("context",r)}catch(e){a.setFailed(e)}}));t.run=run},9491:e=>{"use strict";e.exports=require("assert")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},7561:e=>{"use strict";e.exports=require("node:fs")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(7672);(0,t.run)()})();module.exports=r})(); \ No newline at end of file +(()=>{var e={7351:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const i=o(r(2037));const a=r(5278);function issueCommand(e,t,r){const s=new Command(e,t,r);process.stdout.write(s.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};var i=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const l=r(717);const u=r(5278);const c=o(r(2037));const p=o(r(1017));const h=r(8041);var f;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(f=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=u.toCommandValue(t);process.env[e]=r;const s=process.env["GITHUB_ENV"]||"";if(s){const t="_GitHubActionsFileCommandDelimeter_";const s=`${e}<<${t}${c.EOL}${r}${c.EOL}${t}`;l.issueCommand("ENV",s)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){l.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${p.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const s=["false","False","FALSE"];const n=getInput(e,t);if(r.includes(n))return true;if(s.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(c.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=f.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+c.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return i(this,void 0,void 0,(function*(){return yield h.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken},717:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const i=o(r(7147));const a=o(r(2037));const l=r(5278);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${l.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},8041:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=r(9925);const o=r(3702);const i=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const s=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const n=(t=s.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}i.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);i.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},3702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(3685);const n=r(5687);const o=r(6443);let i;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=o.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const c=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const p=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const f=10;const d=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,s){return this.request(e,t,r,s)}async getJson(e,t={}){t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,u.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let s=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,u.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,u.ApplicationJson);let n=await this.post(e,s,r);return this._processResponse(n,this.requestOptions)}async putJson(e,t,r={}){let s=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,u.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,u.ApplicationJson);let n=await this.put(e,s,r);return this._processResponse(n,this.requestOptions)}async patchJson(e,t,r={}){let s=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,u.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,u.ApplicationJson);let n=await this.patch(e,s,r);return this._processResponse(n,this.requestOptions)}async request(e,t,r,s){if(this._disposed){throw new Error("Client has already been disposed.")}let n=new URL(t);let o=this._prepareRequest(e,n,s);let i=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let u;while(l0){const i=u.message.headers["location"];if(!i){break}let a=new URL(i);if(n.protocol=="https:"&&n.protocol!=a.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await u.readBody();if(a.hostname!==n.hostname){for(let e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}o=this._prepareRequest(e,a,s);u=await this.requestRaw(o,r);t--}if(p.indexOf(u.message.statusCode)==-1){return u}l+=1;if(l{let callbackForResult=function(e,t){if(e){s(e)}r(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,r){let s;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let n=false;let handleResult=(e,t)=>{if(!n){n=true;r(e,t)}};let o=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));o.on("socket",(e=>{s=e}));o.setTimeout(this._socketTimeout||3*6e4,(()=>{if(s){s.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));o.on("error",(function(e){handleResult(e,null)}));if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){o.end()}));t.pipe(o)}else{o.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const o={};o.parsedUrl=t;const i=o.parsedUrl.protocol==="https:";o.httpModule=i?n:s;const a=i?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):a;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(o.options)}))}return o}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||r}_getAgent(e){let t;let a=o.getProxyUrl(e);let l=a&&a.hostname;if(this._keepAlive&&l){t=this._proxyAgent}if(this._keepAlive&&!l){t=this._agent}if(!!t){return t}const u=e.protocol==="https:";let c=100;if(!!this.requestOptions){c=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(l){if(!i){i=r(4294)}const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{...(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`},host:a.hostname,port:a.port}};let s;const n=a.protocol==="https:";if(u){s=n?i.httpsOverHttps:i.httpsOverHttp}else{s=n?i.httpOverHttps:i.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=u?new n.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=u?n.globalAgent:s.globalAgent}if(u&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(f,e);const t=d*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise((async(r,s)=>{const n=e.message.statusCode;const o={statusCode:n,result:null,headers:{}};if(n==a.NotFound){r(o)}let i;let l;try{l=await e.readBody();if(l&&l.length>0){if(t&&t.deserializeDates){i=JSON.parse(l,HttpClient.dateTimeDeserializer)}else{i=JSON.parse(l)}o.result=i}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(i&&i.message){e=i.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+n+")"}let t=new HttpClientError(e,n);t.result=o.result;s(t)}else{r(o)}}))}}t.HttpClient=HttpClient},6443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let s;if(t){s=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{s=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(s){r=new URL(s)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let s=[e.hostname.toUpperCase()];if(typeof r==="number"){s.push(`${s[0]}:${r}`)}for(let e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(s.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},7129:(e,t,r)=>{"use strict";const s=r(665);const n=Symbol("max");const o=Symbol("length");const i=Symbol("lengthCalculator");const a=Symbol("allowStale");const l=Symbol("maxAge");const u=Symbol("dispose");const c=Symbol("noDisposeOnSet");const p=Symbol("lruList");const h=Symbol("cache");const f=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[i]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0;this[u]=e.dispose;this[c]=e.noDisposeOnSet||false;this[f]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[l]=e;trim(this)}get maxAge(){return this[l]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[i]){this[i]=e;this[o]=0;this[p].forEach((e=>{e.length=this[i](e.value,e.key);this[o]+=e.length}))}trim(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let r=this[p].tail;r!==null;){const s=r.prev;forEachStep(this,e,r,t);r=s}}forEach(e,t){t=t||this;for(let r=this[p].head;r!==null;){const s=r.next;forEachStep(this,e,r,t);r=s}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){if(this[u]&&this[p]&&this[p].length){this[p].forEach((e=>this[u](e.key,e.value)))}this[h]=new Map;this[p]=new s;this[o]=0}dump(){return this[p].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,r){r=r||this[l];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0;const a=this[i](t,e);if(this[h].has(e)){if(a>this[n]){del(this,this[h].get(e));return false}const i=this[h].get(e);const l=i.value;if(this[u]){if(!this[c])this[u](e,l.value)}l.now=s;l.maxAge=r;l.value=t;this[o]+=a-l.length;l.length=a;this.get(e);trim(this);return true}const f=new Entry(e,t,a,s,r);if(f.length>this[n]){if(this[u])this[u](e,t);return false}this[o]+=f.length;this[p].unshift(f);this[h].set(e,this[p].head);trim(this);return true}has(e){if(!this[h].has(e))return false;const t=this[h].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[p].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const e=n-t;if(e>0){this.set(s.k,s.v,e)}}}}prune(){this[h].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const s=e[h].get(t);if(s){const t=s.value;if(isStale(e,t)){del(e,s);if(!e[a])return undefined}else{if(r){if(e[f])s.value.now=Date.now();e[p].unshiftNode(s)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[l])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]};const trim=e=>{if(e[o]>e[n]){for(let t=e[p].tail;e[o]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[u])e[u](r.key,r.value);e[o]-=r.length;e[h].delete(r.key);e[p].removeNode(t)}};class Entry{constructor(e,t,r,s,n){this.key=e;this.value=t;this.length=r;this.now=s;this.maxAge=n||0}}const forEachStep=(e,t,r,s)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[a])n=undefined}if(n)t.call(s,n.value,n.key,e)};e.exports=LRUCache},1532:(e,t,r)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}l("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(e){const t=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=s}else{this.semver=new u(r[2],this.options.loose)}}toString(){return this.value}test(e){l("Comparator.test",e,this.options.loose);if(this.semver===s||e===s){return true}if(typeof e==="string"){try{e=new u(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new c(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new c(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const n=this.semver.version===e.semver.version;const o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const i=a(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const l=a(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||s||n&&o||i||l}}e.exports=Comparator;const n=r(785);const{re:o,t:i}=r(9523);const a=r(5098);const l=r(427);const u=r(8088);const c=r(9828)},9828:(e,t,r)=>{class Range{constructor(e,t){t=o(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof i){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0)this.set=[e];else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const s=n.get(r);if(s)return s;const o=this.options.loose;const l=o?u[c.HYPHENRANGELOOSE]:u[c.HYPHENRANGE];e=e.replace(l,hyphenReplace(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(u[c.COMPARATORTRIM],p);a("comparator trim",e,u[c.COMPARATORTRIM]);e=e.replace(u[c.TILDETRIM],h);e=e.replace(u[c.CARETTRIM],f);e=e.split(/\s+/).join(" ");const d=o?u[c.COMPARATORLOOSE]:u[c.COMPARATOR];const m=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options))).filter(this.options.loose?e=>!!e.match(d):()=>true).map((e=>new i(e,this.options)));const v=m.length;const E=new Map;for(const e of m){if(isNullSet(e))return[e];E.set(e.value,e)}if(E.size>1&&E.has(""))E.delete("");const g=[...E.values()];n.set(r,g);return g}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const s=e.slice();let n=s.pop();while(r&&s.length){r=s.every((e=>n.intersects(e,t)));n=s.pop()}return r};const parseComparator=(e,t)=>{a("comp",e,t);e=replaceCarets(e,t);a("caret",e);e=replaceTildes(e,t);a("tildes",e);e=replaceXRanges(e,t);a("xrange",e);e=replaceStars(e,t);a("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?u[c.TILDELOOSE]:u[c.TILDE];return e.replace(r,((t,r,s,n,o)=>{a("tilde",e,t,r,s,n,o);let i;if(isX(r)){i=""}else if(isX(s)){i=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){i=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`}else if(o){a("replaceTilde pr",o);i=`>=${r}.${s}.${n}-${o} <${r}.${+s+1}.0-0`}else{i=`>=${r}.${s}.${n} <${r}.${+s+1}.0-0`}a("tilde return",i);return i}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{a("caret",e,t);const r=t.loose?u[c.CARETLOOSE]:u[c.CARET];const s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,o,i)=>{a("caret",e,t,r,n,o,i);let l;if(isX(r)){l=""}else if(isX(n)){l=`>=${r}.0.0${s} <${+r+1}.0.0-0`}else if(isX(o)){if(r==="0"){l=`>=${r}.${n}.0${s} <${r}.${+n+1}.0-0`}else{l=`>=${r}.${n}.0${s} <${+r+1}.0.0-0`}}else if(i){a("replaceCaret pr",i);if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${o}-${i} <${r}.${n}.${+o+1}-0`}else{l=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${o}-${i} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(n==="0"){l=`>=${r}.${n}.${o}${s} <${r}.${n}.${+o+1}-0`}else{l=`>=${r}.${n}.${o}${s} <${r}.${+n+1}.0-0`}}else{l=`>=${r}.${n}.${o} <${+r+1}.0.0-0`}}a("caret return",l);return l}))};const replaceXRanges=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?u[c.XRANGELOOSE]:u[c.XRANGE];return e.replace(r,((r,s,n,o,i,l)=>{a("xRange",e,r,s,n,o,i,l);const u=isX(n);const c=u||isX(o);const p=c||isX(i);const h=p;if(s==="="&&h){s=""}l=t.includePrerelease?"-0":"";if(u){if(s===">"||s==="<"){r="<0.0.0-0"}else{r="*"}}else if(s&&h){if(c){o=0}i=0;if(s===">"){s=">=";if(c){n=+n+1;o=0;i=0}else{o=+o+1;i=0}}else if(s==="<="){s="<";if(c){n=+n+1}else{o=+o+1}}if(s==="<")l="-0";r=`${s+n}.${o}.${i}${l}`}else if(c){r=`>=${n}.0.0${l} <${+n+1}.0.0-0`}else if(p){r=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`}a("xRange return",r);return r}))};const replaceStars=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(u[c.STAR],"")};const replaceGTE0=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(u[t.includePrerelease?c.GTE0PRE:c.GTE0],"")};const hyphenReplace=e=>(t,r,s,n,o,i,a,l,u,c,p,h,f)=>{if(isX(s)){r=""}else if(isX(n)){r=`>=${s}.0.0${e?"-0":""}`}else if(isX(o)){r=`>=${s}.${n}.0${e?"-0":""}`}else if(i){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(u)){l=""}else if(isX(c)){l=`<${+u+1}.0.0-0`}else if(isX(p)){l=`<${u}.${+c+1}.0-0`}else if(h){l=`<=${u}.${c}.${p}-${h}`}else if(e){l=`<${u}.${c}.${+p+1}-0`}else{l=`<=${l}`}return`${r} ${l}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}},8088:(e,t,r)=>{const s=r(427);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=r(2293);const{re:i,t:a}=r(9523);const l=r(785);const{compareIdentifiers:u}=r(2463);class SemVer{constructor(e,t){t=l(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid Version: ${e}`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[a.LOOSE]:i[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},8848:(e,t,r)=>{const s=r(5925);const clean=(e,t)=>{const r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},5098:(e,t,r)=>{const s=r(1898);const n=r(6017);const o=r(4123);const i=r(5522);const a=r(194);const l=r(7520);const cmp=(e,t,r,u)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return n(e,r,u);case">":return o(e,r,u);case">=":return i(e,r,u);case"<":return a(e,r,u);case"<=":return l(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},3466:(e,t,r)=>{const s=r(8088);const n=r(5925);const{re:o,t:i}=r(9523);const coerce=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(o[i.COERCE])}else{let t;while((t=o[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}o[i.COERCERTL].lastIndex=-1}if(r===null)return null;return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},2156:(e,t,r)=>{const s=r(8088);const compareBuild=(e,t,r)=>{const n=new s(e,r);const o=new s(t,r);return n.compare(o)||n.compareBuild(o)};e.exports=compareBuild},2804:(e,t,r)=>{const s=r(4309);const compareLoose=(e,t)=>s(e,t,true);e.exports=compareLoose},4309:(e,t,r)=>{const s=r(8088);const compare=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=compare},4297:(e,t,r)=>{const s=r(5925);const n=r(1898);const diff=(e,t)=>{if(n(e,t)){return null}else{const r=s(e);const n=s(t);const o=r.prerelease.length||n.prerelease.length;const i=o?"pre":"";const a=o?"prerelease":"";for(const e in r){if(e==="major"||e==="minor"||e==="patch"){if(r[e]!==n[e]){return i+e}}}return a}};e.exports=diff},1898:(e,t,r)=>{const s=r(4309);const eq=(e,t,r)=>s(e,t,r)===0;e.exports=eq},4123:(e,t,r)=>{const s=r(4309);const gt=(e,t,r)=>s(e,t,r)>0;e.exports=gt},5522:(e,t,r)=>{const s=r(4309);const gte=(e,t,r)=>s(e,t,r)>=0;e.exports=gte},900:(e,t,r)=>{const s=r(8088);const inc=(e,t,r,n)=>{if(typeof r==="string"){n=r;r=undefined}try{return new s(e,r).inc(t,n).version}catch(e){return null}};e.exports=inc},194:(e,t,r)=>{const s=r(4309);const lt=(e,t,r)=>s(e,t,r)<0;e.exports=lt},7520:(e,t,r)=>{const s=r(4309);const lte=(e,t,r)=>s(e,t,r)<=0;e.exports=lte},6688:(e,t,r)=>{const s=r(8088);const major=(e,t)=>new s(e,t).major;e.exports=major},8447:(e,t,r)=>{const s=r(8088);const minor=(e,t)=>new s(e,t).minor;e.exports=minor},6017:(e,t,r)=>{const s=r(4309);const neq=(e,t,r)=>s(e,t,r)!==0;e.exports=neq},5925:(e,t,r)=>{const{MAX_LENGTH:s}=r(2293);const{re:n,t:o}=r(9523);const i=r(8088);const a=r(785);const parse=(e,t)=>{t=a(t);if(e instanceof i){return e}if(typeof e!=="string"){return null}if(e.length>s){return null}const r=t.loose?n[o.LOOSE]:n[o.FULL];if(!r.test(e)){return null}try{return new i(e,t)}catch(e){return null}};e.exports=parse},2866:(e,t,r)=>{const s=r(8088);const patch=(e,t)=>new s(e,t).patch;e.exports=patch},4016:(e,t,r)=>{const s=r(5925);const prerelease=(e,t)=>{const r=s(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},6417:(e,t,r)=>{const s=r(4309);const rcompare=(e,t,r)=>s(t,e,r);e.exports=rcompare},8701:(e,t,r)=>{const s=r(2156);const rsort=(e,t)=>e.sort(((e,r)=>s(r,e,t)));e.exports=rsort},6055:(e,t,r)=>{const s=r(9828);const satisfies=(e,t,r)=>{try{t=new s(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},1426:(e,t,r)=>{const s=r(2156);const sort=(e,t)=>e.sort(((e,r)=>s(e,r,t)));e.exports=sort},9601:(e,t,r)=>{const s=r(5925);const valid=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=valid},1383:(e,t,r)=>{const s=r(9523);e.exports={re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:r(2293).SEMVER_SPEC_VERSION,SemVer:r(8088),compareIdentifiers:r(2463).compareIdentifiers,rcompareIdentifiers:r(2463).rcompareIdentifiers,parse:r(5925),valid:r(9601),clean:r(8848),inc:r(900),diff:r(4297),major:r(6688),minor:r(8447),patch:r(2866),prerelease:r(4016),compare:r(4309),rcompare:r(6417),compareLoose:r(2804),compareBuild:r(2156),sort:r(1426),rsort:r(8701),gt:r(4123),lt:r(194),eq:r(1898),neq:r(6017),gte:r(5522),lte:r(7520),cmp:r(5098),coerce:r(3466),Comparator:r(1532),Range:r(9828),satisfies:r(6055),toComparators:r(2706),maxSatisfying:r(579),minSatisfying:r(832),minVersion:r(4179),validRange:r(2098),outside:r(420),gtr:r(9380),ltr:r(3323),intersects:r(7008),simplifyRange:r(5297),subset:r(7863)}},2293:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:s,MAX_SAFE_COMPONENT_LENGTH:n}},427:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},2463:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},785:e=>{const t=["includePrerelease","loose","rtl"];const parseOptions=e=>!e?{}:typeof e!=="object"?{loose:true}:t.filter((t=>e[t])).reduce(((e,t)=>{e[t]=true;return e}),{});e.exports=parseOptions},9523:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s}=r(2293);const n=r(427);t=e.exports={};const o=t.re=[];const i=t.src=[];const a=t.t={};let l=0;const createToken=(e,t,r)=>{const s=l++;n(s,t);a[e]=s;i[s]=t;o[s]=new RegExp(t,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})\\.`+`(${i[a.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${i[a.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`);createToken("FULL",`^${i[a.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`);createToken("LOOSE",`^${i[a.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:\\.(${i[a.XRANGEIDENTIFIER]})`+`(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",i[a.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${i[a.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0.0.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},9380:(e,t,r)=>{const s=r(420);const gtr=(e,t,r)=>s(e,t,">",r);e.exports=gtr},7008:(e,t,r)=>{const s=r(9828);const intersects=(e,t,r)=>{e=new s(e,r);t=new s(t,r);return e.intersects(t)};e.exports=intersects},3323:(e,t,r)=>{const s=r(420);const ltr=(e,t,r)=>s(e,t,"<",r);e.exports=ltr},579:(e,t,r)=>{const s=r(8088);const n=r(9828);const maxSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===-1){o=e;i=new s(o,r)}}}));return o};e.exports=maxSatisfying},832:(e,t,r)=>{const s=r(8088);const n=r(9828);const minSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===1){o=e;i=new s(o,r)}}}));return o};e.exports=minSatisfying},4179:(e,t,r)=>{const s=r(8088);const n=r(9828);const o=r(4123);const minVersion=(e,t)=>{e=new n(e,t);let r=new s("0.0.0");if(e.test(r)){return r}r=new s("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new s(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!i||o(t,i)){i=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(i&&(!r||o(r,i)))r=i}if(r&&e.test(r)){return r}return null};e.exports=minVersion},420:(e,t,r)=>{const s=r(8088);const n=r(1532);const{ANY:o}=n;const i=r(9828);const a=r(6055);const l=r(4123);const u=r(194);const c=r(7520);const p=r(5522);const outside=(e,t,r,h)=>{e=new s(e,h);t=new i(t,h);let f,d,m,v,E;switch(r){case">":f=l;d=c;m=u;v=">";E=">=";break;case"<":f=u;d=p;m=l;v="<";E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h)){return false}for(let r=0;r{if(e.semver===o){e=new n(">=0.0.0")}i=i||e;a=a||e;if(f(e.semver,i.semver,h)){i=e}else if(m(e.semver,a.semver,h)){a=e}}));if(i.operator===v||i.operator===E){return false}if((!a.operator||a.operator===v)&&d(e,a.semver)){return false}else if(a.operator===E&&m(e,a.semver)){return false}}return true};e.exports=outside},5297:(e,t,r)=>{const s=r(6055);const n=r(4309);e.exports=(e,t,r)=>{const o=[];let i=null;let a=null;const l=e.sort(((e,t)=>n(e,t,r)));for(const e of l){const n=s(e,t,r);if(n){a=e;if(!i)i=e}else{if(a){o.push([i,a])}a=null;i=null}}if(i)o.push([i,null]);const u=[];for(const[e,t]of o){if(e===t)u.push(e);else if(!t&&e===l[0])u.push("*");else if(!t)u.push(`>=${e}`);else if(e===l[0])u.push(`<=${t}`);else u.push(`${e} - ${t}`)}const c=u.join(" || ");const p=typeof t.raw==="string"?t.raw:String(t);return c.length{const s=r(9828);const n=r(1532);const{ANY:o}=n;const i=r(6055);const a=r(4309);const subset=(e,t,r={})=>{if(e===t)return true;e=new s(e,r);t=new s(t,r);let n=false;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);n=n||t!==null;if(t)continue e}if(n)return false}return true};const simpleSubset=(e,t,r)=>{if(e===t)return true;if(e.length===1&&e[0].semver===o){if(t.length===1&&t[0].semver===o)return true;else if(r.includePrerelease)e=[new n(">=0.0.0-0")];else e=[new n(">=0.0.0")]}if(t.length===1&&t[0].semver===o){if(r.includePrerelease)return true;else t=[new n(">=0.0.0")]}const s=new Set;let l,u;for(const t of e){if(t.operator===">"||t.operator===">=")l=higherGT(l,t,r);else if(t.operator==="<"||t.operator==="<=")u=lowerLT(u,t,r);else s.add(t.semver)}if(s.size>1)return null;let c;if(l&&u){c=a(l.semver,u.semver,r);if(c>0)return null;else if(c===0&&(l.operator!==">="||u.operator!=="<="))return null}for(const e of s){if(l&&!i(e,String(l),r))return null;if(u&&!i(e,String(u),r))return null;for(const s of t){if(!i(e,String(s),r))return false}return true}let p,h;let f,d;let m=u&&!r.includePrerelease&&u.semver.prerelease.length?u.semver:false;let v=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:false;if(m&&m.prerelease.length===1&&u.operator==="<"&&m.prerelease[0]===0){m=false}for(const e of t){d=d||e.operator===">"||e.operator===">=";f=f||e.operator==="<"||e.operator==="<=";if(l){if(v){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch){v=false}}if(e.operator===">"||e.operator===">="){p=higherGT(l,e,r);if(p===e&&p!==l)return false}else if(l.operator===">="&&!i(l.semver,String(e),r))return false}if(u){if(m){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch){m=false}}if(e.operator==="<"||e.operator==="<="){h=lowerLT(u,e,r);if(h===e&&h!==u)return false}else if(u.operator==="<="&&!i(u.semver,String(e),r))return false}if(!e.operator&&(u||l)&&c!==0)return false}if(l&&f&&!u&&c!==0)return false;if(u&&d&&!l&&c!==0)return false;if(v||m)return false;return true};const higherGT=(e,t,r)=>{if(!e)return t;const s=a(e.semver,t.semver,r);return s>0?e:s<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e)return t;const s=a(e.semver,t.semver,r);return s<0?e:s>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},2706:(e,t,r)=>{const s=r(9828);const toComparators=(e,t)=>new s(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},2098:(e,t,r)=>{const s=r(9828);const validRange=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}};e.exports=validRange},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var s=r(1808);var n=r(4404);var o=r(3685);var i=r(5687);var a=r(2361);var l=r(9491);var u=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,s,n){var o=toOptions(r,s,n);for(var i=0,a=t.requests.length;i=this.maxSockets){n.requests.push(o);return}n.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,o)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var s={};r.sockets.push(s);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}c("making CONNECT request");var o=r.request(n);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,i,a){o.removeAllListeners();i.removeAllListeners();if(n.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",n.statusCode);i.destroy();var l=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(s);return}if(a.length>0){c("got illegal response body from proxy");i.destroy();var l=new Error("got illegal response body from proxy");l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(s);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(s)]=i;return t(i)}function onError(t){o.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(s){var o=e.request.getHeader("host");var i=mergeOptions({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):e.host});var a=n.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},665:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,s=arguments.length;r1){r=t}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){r=e(r,s.value,n);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var s=this.tail;if(arguments.length>1){r=t}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){r=e(r,s.value,n);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var s=0,n=this.head;n!==null&&sthis.length){t=this.length}for(var s=this.length,n=this.tail;n!==null&&s>t;s--){n=n.prev}for(;n!==null&&s>e;s--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,n=this.head;n!==null&&si(void 0,void 0,void 0,(function*(){return new Promise(((t,r)=>{(0,l.readFile)(e,((e,s)=>{if(e){r(e)}else{t(s.toString())}}))}))}));const resolvePath=e=>new Promise(((t,r)=>{(0,l.realpath)(e,((e,s)=>{if(e){r(e)}else{t(s)}}))}));const run=()=>i(void 0,void 0,void 0,(function*(){const e=a.getInput("path",{required:false})||"./package.json";try{const t=yield resolvePath(e);const r=yield readfile(t);const s=JSON.parse(r);if(!s.version){throw new Error("Missing version")}if(!(0,u.valid)(s.version)){throw new Error(`Invalid version ${s.version}`)}a.setOutput("name",s.name);a.setOutput("version",s.version);a.setOutput("context",r)}catch(e){a.setFailed(e)}}));t.run=run},9491:e=>{"use strict";e.exports=require("assert")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},7561:e=>{"use strict";e.exports=require("node:fs")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(7672);(0,t.run)()})();module.exports=r})(); \ No newline at end of file diff --git a/docs/index.md b/docs/codeclimate.md similarity index 55% rename from docs/index.md rename to docs/codeclimate.md index c59011b..fc32d65 100644 --- a/docs/index.md +++ b/docs/codeclimate.md @@ -2,17 +2,18 @@ [Home](../README.md) -## Docker image sizes - -```sh -codeclimate/codeclimate 102MB -codeclimate/codeclimate-eslint 495MB -codeclimate/codeclimate-structure 5.63GB -codeclimate/codeclimate-duplication 5.63GB -codeclimate/codeclimate-editorconfig 74.1MB -codeclimate/codeclimate-fixme 58.8MB -codeclimate/codeclimate-git-legal 373MB -``` +## Docker images + +| Image | Size | +| :----------------------------------- | -----: | +| codeclimate/codeclimate | 102MB | +| codeclimate/codeclimate-duplication | 5.63GB | +| codeclimate/codeclimate-editorconfig | 74.1MB | +| codeclimate/codeclimate-eslint | 1.4GB | +| codeclimate/codeclimate-fixme | 58.8MB | +| codeclimate/codeclimate-git-legal | 373MB | +| codeclimate/codeclimate-markdownlint | 392MB | +| codeclimate/codeclimate-structure | 5.63GB | ### Initial docker images @@ -34,7 +35,9 @@ docker pull codeclimate/codeclimate CODE_DIRECTORY=$(pwd) docker run \ - --interactive --tty --rm \ + --interactive \ + --tty \ + --rm \ --env CODECLIMATE_CODE="${CODE_DIRECTORY}" \ --volume "${CODE_DIRECTORY}":/code \ --volume /var/run/docker.sock:/var/run/docker.sock \ @@ -46,24 +49,26 @@ docker run \ ### CLI for code climate + ```sh docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"./\" --volume \"./\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze ``` + ### Install engines ```sh - [script above] engines:install duplication structure eslint nodesecurity requiresafe +[script above] engines:install duplication structure eslint nodesecurity requiresafe ``` ### Analyze code ```sh - [script above] analyze +[script above] analyze ``` or ```sh - npm run codeclimate +npm run codeclimate ``` diff --git a/package.json b/package.json index e4b6e96..87eb328 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,29 @@ { "name": "nodejs-project-info", - "version": "0.0.13", + "version": "0.0.14", "description": "NodeJS Project Information", "main": "./dist/index.js", "scripts": { - "clear": "rimraf ./node_modules ./dist ./test ./package-lock.json", + "clear": "rimraf ./node_modules ./package-lock.json", "prestart": "npm run build", "start": "node ./dist/index.js", - "prebuild": "eslint ./src/**/*.ts --quiet --fix && tsc --noEmit --project ./", - "build": "ncc build ./src/index.ts -m -o ./dist/", - "pretest": "rimraf ./test", + "prebuild": "eslint ./src/**/*.ts && tsc --noEmit --project ./", + "build": "cross-env NODE_ENV=production ncc build ./src/index.ts -m -o ./dist/", + "lint": "markdownlint --config .mdlrc . && remark --frail --rc-path .remarkrc-full.mjs .", + "pretest": "rimraf ./test/*", "test": "jest", "watch": "tsc -w --project ./", "prepare": "husky install", - "codeclimate": "docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze", - "changelog": "changelog" + "changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s", + "codeclimate": "docker run --interactive --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze" }, "repository": { "type": "git", "url": "git+https://github.com/gregoranders/nodejs-project-info.git" }, "keywords": [ + "github", + "action", "jest", "eslint", "typescript" @@ -28,6 +31,9 @@ "lint-staged": { "*.ts": [ "eslint --ext .ts ./src" + ], + "*.md": [ + "markdownlint --config .mdlrc" ] }, "jest-html-reporter": { @@ -89,26 +95,59 @@ "semver": "7.3.5" }, "devDependencies": { - "@commitlint/cli": "16.1.0", - "@commitlint/config-conventional": "16.0.0", + "@commitlint/cli": "16.2.1", + "@commitlint/config-conventional": "16.2.1", "@types/semver": "7.3.9", - "@typescript-eslint/eslint-plugin": "5.10.2", - "@typescript-eslint/parser": "5.10.2", - "@vercel/ncc": "0.33.1", - "eslint": "8.8.0", - "eslint-config-prettier": "8.3.0", - "eslint-plugin-jest": "26.0.0", + "@typescript-eslint/eslint-plugin": "5.12.1", + "@typescript-eslint/parser": "5.12.1", + "@vercel/ncc": "0.33.3", + "conventional-changelog-cli": "2.2.2", + "cross-env": "7.0.3", + "dictionary-en": "3.1.0", + "eslint": "8.9.0", + "eslint-config-prettier": "8.4.0", + "eslint-plugin-jest": "26.1.1", "eslint-plugin-prettier": "4.0.0", - "eslint-plugin-unicorn": "40.1.0", + "eslint-plugin-unicorn": "41.0.0", "generate-changelog": "1.8.0", "husky": "7.0.4", - "jest": "27.4.7", - "jest-cli": "27.4.7", + "jest": "27.5.1", + "jest-cli": "27.5.1", "jest-html-reporter": "3.4.2", "jest-junit": "13.0.0", "jest-spec-reporter": "1.0.17", - "lint-staged": "12.3.3", + "lint-staged": "12.3.4", + "markdownlint": "0.25.1", + "markdownlint-cli": "0.31.1", "prettier": "2.5.1", + "remark-cli": "10.0.1", + "remark-frontmatter": "4.0.1", + "remark-lint": "9.1.1", + "remark-lint-heading-whitespace": "1.0.0", + "remark-lint-list-item-indent": "3.1.1", + "remark-lint-no-dead-urls": "1.1.0", + "remark-lint-no-duplicate-headings": "3.1.1", + "remark-lint-write-good": "1.2.0", + "remark-preset-lint-consistent": "5.1.1", + "remark-preset-lint-markdown-style-guide": "5.1.2", + "remark-preset-lint-recommended": "6.1.2", + "remark-retext": "5.0.1", + "remark-validate-links": "11.0.2", + "retext-contractions": "5.2.0", + "retext-diacritics": "4.2.0", + "retext-english": "4.1.0", + "retext-equality": "6.6.0", + "retext-indefinite-article": "4.1.0", + "retext-passive": "4.2.0", + "retext-profanities": "7.2.0", + "retext-quotes": "5.2.0", + "retext-readability": "7.2.0", + "retext-redundant-acronyms": "4.3.0", + "retext-repeated-words": "4.2.0", + "retext-sentence-spacing": "5.2.0", + "retext-spell": "5.1.0", + "retext-syntax-urls": "3.1.2", + "retext-usage": "0.5.0", "rimraf": "3.0.2", "ts-jest": "27.1.3", "typescript": "4.5.5" diff --git a/src/action.ts b/src/action.ts index ffa2e08..b6bd0ca 100644 --- a/src/action.ts +++ b/src/action.ts @@ -41,7 +41,7 @@ export const run = async () => { const package_ = JSON.parse(buffer) as PackageJSON; if (!package_.version) { - throw new Error(`Missing version`); + throw new Error('Missing version'); } if (!valid(package_.version)) { diff --git a/src/fixtures/test-utils.ts b/src/fixtures/test-utils.ts index 7a8f1ab..bbdda88 100644 --- a/src/fixtures/test-utils.ts +++ b/src/fixtures/test-utils.ts @@ -2,7 +2,7 @@ declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { // tslint:disable-next-line: interface-name - interface Matchers { + interface Matchers { toHaveCoreError(message: RegExp): R; toHaveCoreOutput(key: string, value: string): R; }