immosquare-cleaner 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/node_modules/@eslint/eslintrc/README.md +15 -4
- data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +57 -18
- data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -1
- data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +60 -34
- data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -1
- data/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +3 -16
- data/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +63 -18
- data/node_modules/@eslint/eslintrc/package.json +4 -4
- data/node_modules/@eslint/js/package.json +2 -2
- data/node_modules/@eslint/js/src/configs/eslint-all.js +9 -1
- data/node_modules/@eslint/js/src/configs/eslint-recommended.js +12 -5
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +201 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md +105 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +384 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +27 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +65 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js +315 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json +74 -0
- data/node_modules/@humanwhocodes/config-array/api.js +114 -16
- data/node_modules/@humanwhocodes/config-array/package.json +5 -3
- data/node_modules/@humanwhocodes/object-schema/CHANGELOG.md +7 -0
- data/node_modules/@humanwhocodes/object-schema/package.json +6 -1
- data/node_modules/@humanwhocodes/retry/LICENSE +201 -0
- data/node_modules/@humanwhocodes/retry/README.md +122 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.cjs +267 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.d.ts +24 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.js +265 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.min.js +1 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.mjs +265 -0
- data/node_modules/@humanwhocodes/retry/package.json +74 -0
- data/node_modules/@types/semver-utils/LICENSE +21 -0
- data/node_modules/@types/semver-utils/README.md +34 -0
- data/node_modules/@types/semver-utils/index.d.ts +15 -0
- data/node_modules/@types/semver-utils/package.json +25 -0
- data/node_modules/acorn/CHANGELOG.md +36 -0
- data/node_modules/acorn/README.md +8 -3
- data/node_modules/acorn/dist/acorn.d.mts +857 -26
- data/node_modules/acorn/dist/acorn.d.ts +833 -268
- data/node_modules/acorn/dist/acorn.js +33 -21
- data/node_modules/acorn/dist/acorn.mjs +33 -21
- data/node_modules/acorn/package.json +1 -1
- data/node_modules/cacheable-request/node_modules/keyv/README.md +429 -0
- data/node_modules/cacheable-request/node_modules/keyv/package.json +57 -0
- data/node_modules/cacheable-request/node_modules/keyv/src/index.d.ts +112 -0
- data/node_modules/cacheable-request/node_modules/keyv/src/index.js +264 -0
- data/node_modules/doctrine/CHANGELOG.md +0 -7
- data/node_modules/doctrine/lib/doctrine.js +1 -0
- data/node_modules/doctrine/package.json +8 -9
- data/node_modules/eslint/README.md +31 -28
- data/node_modules/eslint/bin/eslint.js +4 -3
- data/node_modules/eslint/conf/ecma-version.js +16 -0
- data/node_modules/eslint/conf/globals.js +1 -0
- data/node_modules/eslint/conf/rule-type-list.json +3 -1
- data/node_modules/eslint/lib/api.js +7 -11
- data/node_modules/eslint/lib/cli-engine/cli-engine.js +14 -3
- data/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +1 -29
- data/node_modules/eslint/lib/cli-engine/lint-result-cache.js +2 -2
- data/node_modules/eslint/lib/cli.js +115 -36
- data/node_modules/eslint/lib/config/default-config.js +3 -0
- data/node_modules/eslint/lib/config/flat-config-array.js +110 -24
- data/node_modules/eslint/lib/config/flat-config-helpers.js +41 -20
- data/node_modules/eslint/lib/config/flat-config-schema.js +1 -7
- data/node_modules/eslint/lib/config/rule-validator.js +42 -6
- data/node_modules/eslint/lib/eslint/eslint-helpers.js +116 -58
- data/node_modules/eslint/lib/eslint/eslint.js +892 -377
- data/node_modules/eslint/lib/eslint/index.js +2 -2
- data/node_modules/eslint/lib/eslint/legacy-eslint.js +728 -0
- data/node_modules/eslint/lib/linter/apply-disable-directives.js +59 -31
- data/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -1
- data/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +32 -30
- data/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +1 -1
- data/node_modules/eslint/lib/linter/config-comment-parser.js +8 -11
- data/node_modules/eslint/lib/linter/index.js +1 -3
- data/node_modules/eslint/lib/linter/interpolate.js +24 -2
- data/node_modules/eslint/lib/linter/linter.js +428 -207
- data/node_modules/eslint/lib/linter/report-translator.js +3 -3
- data/node_modules/eslint/lib/linter/rules.js +6 -15
- data/node_modules/eslint/lib/linter/source-code-fixer.js +1 -1
- data/node_modules/eslint/lib/linter/timing.js +16 -8
- data/node_modules/eslint/lib/options.js +35 -3
- data/node_modules/eslint/lib/rule-tester/index.js +3 -1
- data/node_modules/eslint/lib/rule-tester/rule-tester.js +424 -347
- data/node_modules/eslint/lib/rules/array-bracket-newline.js +1 -1
- data/node_modules/eslint/lib/rules/array-bracket-spacing.js +1 -1
- data/node_modules/eslint/lib/rules/block-scoped-var.js +1 -1
- data/node_modules/eslint/lib/rules/callback-return.js +2 -2
- data/node_modules/eslint/lib/rules/camelcase.js +3 -5
- data/node_modules/eslint/lib/rules/capitalized-comments.js +10 -7
- data/node_modules/eslint/lib/rules/comma-dangle.js +1 -1
- data/node_modules/eslint/lib/rules/comma-style.js +2 -2
- data/node_modules/eslint/lib/rules/complexity.js +14 -1
- data/node_modules/eslint/lib/rules/constructor-super.js +99 -100
- data/node_modules/eslint/lib/rules/default-case.js +1 -1
- data/node_modules/eslint/lib/rules/eol-last.js +2 -2
- data/node_modules/eslint/lib/rules/function-paren-newline.js +2 -2
- data/node_modules/eslint/lib/rules/indent-legacy.js +5 -5
- data/node_modules/eslint/lib/rules/indent.js +5 -5
- data/node_modules/eslint/lib/rules/index.js +1 -2
- data/node_modules/eslint/lib/rules/key-spacing.js +2 -2
- data/node_modules/eslint/lib/rules/line-comment-position.js +1 -1
- data/node_modules/eslint/lib/rules/lines-around-directive.js +2 -2
- data/node_modules/eslint/lib/rules/max-depth.js +1 -1
- data/node_modules/eslint/lib/rules/max-len.js +3 -3
- data/node_modules/eslint/lib/rules/max-lines.js +3 -3
- data/node_modules/eslint/lib/rules/max-nested-callbacks.js +1 -1
- data/node_modules/eslint/lib/rules/max-params.js +1 -1
- data/node_modules/eslint/lib/rules/max-statements.js +1 -1
- data/node_modules/eslint/lib/rules/multiline-comment-style.js +7 -7
- data/node_modules/eslint/lib/rules/new-cap.js +1 -1
- data/node_modules/eslint/lib/rules/newline-after-var.js +1 -1
- data/node_modules/eslint/lib/rules/newline-before-return.js +1 -1
- data/node_modules/eslint/lib/rules/no-case-declarations.js +13 -1
- data/node_modules/eslint/lib/rules/no-constant-binary-expression.js +7 -8
- data/node_modules/eslint/lib/rules/no-constant-condition.js +18 -7
- data/node_modules/eslint/lib/rules/no-constructor-return.js +2 -2
- data/node_modules/eslint/lib/rules/no-dupe-class-members.js +2 -2
- data/node_modules/eslint/lib/rules/no-else-return.js +1 -1
- data/node_modules/eslint/lib/rules/no-empty-function.js +2 -2
- data/node_modules/eslint/lib/rules/no-empty-static-block.js +1 -1
- data/node_modules/eslint/lib/rules/no-extend-native.js +1 -2
- data/node_modules/eslint/lib/rules/no-extra-semi.js +1 -1
- data/node_modules/eslint/lib/rules/no-fallthrough.js +41 -16
- data/node_modules/eslint/lib/rules/no-implicit-coercion.js +66 -24
- data/node_modules/eslint/lib/rules/no-inner-declarations.js +23 -2
- data/node_modules/eslint/lib/rules/no-invalid-regexp.js +1 -1
- data/node_modules/eslint/lib/rules/no-invalid-this.js +1 -1
- data/node_modules/eslint/lib/rules/no-lone-blocks.js +3 -3
- data/node_modules/eslint/lib/rules/no-loss-of-precision.js +1 -1
- data/node_modules/eslint/lib/rules/no-misleading-character-class.js +225 -69
- data/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +1 -1
- data/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +1 -1
- data/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +1 -1
- data/node_modules/eslint/lib/rules/no-new-symbol.js +8 -1
- data/node_modules/eslint/lib/rules/no-restricted-globals.js +1 -1
- data/node_modules/eslint/lib/rules/no-restricted-imports.js +186 -40
- data/node_modules/eslint/lib/rules/no-restricted-modules.js +2 -2
- data/node_modules/eslint/lib/rules/no-return-await.js +1 -1
- data/node_modules/eslint/lib/rules/no-sequences.js +1 -0
- data/node_modules/eslint/lib/rules/no-this-before-super.js +45 -13
- data/node_modules/eslint/lib/rules/no-trailing-spaces.js +2 -3
- data/node_modules/eslint/lib/rules/no-unneeded-ternary.js +1 -1
- data/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +1 -1
- data/node_modules/eslint/lib/rules/no-unused-private-class-members.js +1 -1
- data/node_modules/eslint/lib/rules/no-unused-vars.js +197 -36
- data/node_modules/eslint/lib/rules/no-useless-assignment.js +566 -0
- data/node_modules/eslint/lib/rules/no-useless-backreference.js +1 -1
- data/node_modules/eslint/lib/rules/no-useless-computed-key.js +2 -2
- data/node_modules/eslint/lib/rules/no-useless-return.js +7 -2
- data/node_modules/eslint/lib/rules/object-curly-spacing.js +3 -3
- data/node_modules/eslint/lib/rules/object-property-newline.js +1 -1
- data/node_modules/eslint/lib/rules/one-var.js +5 -5
- data/node_modules/eslint/lib/rules/padded-blocks.js +7 -7
- data/node_modules/eslint/lib/rules/prefer-arrow-callback.js +3 -3
- data/node_modules/eslint/lib/rules/prefer-reflect.js +1 -1
- data/node_modules/eslint/lib/rules/prefer-regex-literals.js +1 -1
- data/node_modules/eslint/lib/rules/prefer-template.js +1 -1
- data/node_modules/eslint/lib/rules/radix.js +2 -2
- data/node_modules/eslint/lib/rules/semi-style.js +1 -1
- data/node_modules/eslint/lib/rules/sort-imports.js +1 -1
- data/node_modules/eslint/lib/rules/sort-keys.js +1 -1
- data/node_modules/eslint/lib/rules/sort-vars.js +1 -1
- data/node_modules/eslint/lib/rules/space-unary-ops.js +1 -1
- data/node_modules/eslint/lib/rules/strict.js +1 -1
- data/node_modules/eslint/lib/rules/use-isnan.js +101 -7
- data/node_modules/eslint/lib/rules/utils/ast-utils.js +16 -7
- data/node_modules/eslint/lib/rules/utils/char-source.js +240 -0
- data/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +1 -1
- data/node_modules/eslint/lib/rules/utils/unicode/index.js +9 -4
- data/node_modules/eslint/lib/rules/yield-star-spacing.js +1 -1
- data/node_modules/eslint/lib/shared/runtime-info.js +1 -0
- data/node_modules/eslint/lib/shared/serialization.js +55 -0
- data/node_modules/eslint/lib/shared/stats.js +30 -0
- data/node_modules/eslint/lib/shared/string-utils.js +9 -11
- data/node_modules/eslint/lib/shared/types.js +35 -1
- data/node_modules/eslint/lib/source-code/index.js +3 -1
- data/node_modules/eslint/lib/source-code/source-code.js +299 -85
- data/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/cursors.js +4 -2
- data/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/index.js +2 -2
- data/node_modules/eslint/lib/unsupported-api.js +3 -5
- data/node_modules/eslint/messages/no-config-found.js +1 -1
- data/node_modules/eslint/messages/plugin-conflict.js +1 -1
- data/node_modules/eslint/messages/plugin-invalid.js +1 -1
- data/node_modules/eslint/messages/plugin-missing.js +1 -1
- data/node_modules/eslint/package.json +32 -29
- data/node_modules/eslint-scope/README.md +23 -2
- data/node_modules/eslint-scope/dist/eslint-scope.cjs +84 -58
- data/node_modules/eslint-scope/lib/index.js +0 -3
- data/node_modules/eslint-scope/lib/pattern-visitor.js +4 -3
- data/node_modules/eslint-scope/lib/referencer.js +13 -11
- data/node_modules/eslint-scope/lib/scope-manager.js +2 -8
- data/node_modules/eslint-scope/lib/scope.js +64 -43
- data/node_modules/eslint-scope/lib/version.js +1 -1
- data/node_modules/eslint-scope/package.json +21 -19
- data/node_modules/eslint-visitor-keys/README.md +1 -1
- data/node_modules/eslint-visitor-keys/package.json +2 -2
- data/node_modules/espree/README.md +1 -1
- data/node_modules/espree/dist/espree.cjs +1 -1
- data/node_modules/espree/lib/version.js +1 -1
- data/node_modules/espree/package.json +18 -20
- data/node_modules/file-entry-cache/LICENSE +1 -1
- data/node_modules/file-entry-cache/README.md +6 -3
- data/node_modules/file-entry-cache/package.json +19 -43
- data/node_modules/flat-cache/README.md +8 -6
- data/node_modules/flat-cache/changelog.md +155 -205
- data/node_modules/flat-cache/package.json +16 -39
- data/node_modules/flat-cache/src/cache.js +22 -26
- data/node_modules/flat-cache/src/del.js +28 -11
- data/node_modules/flat-cache/src/utils.js +39 -41
- data/node_modules/globals/globals.json +25 -0
- data/node_modules/globals/index.d.ts +2074 -3
- data/node_modules/globals/package.json +10 -7
- data/node_modules/globals/readme.md +2 -14
- data/node_modules/keyv/package.json +4 -4
- data/node_modules/keyv/src/index.js +6 -11
- data/node_modules/npm-check-updates/build/cli.js +22 -21
- data/node_modules/npm-check-updates/build/cli.js.map +1 -1
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js +66 -0
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js.map +1 -0
- data/node_modules/npm-check-updates/build/index-BmUFwMVL.js +6 -0
- data/node_modules/npm-check-updates/build/index-BmUFwMVL.js.map +1 -0
- data/node_modules/npm-check-updates/build/index.d.ts +5 -2
- data/node_modules/npm-check-updates/build/index.js +560 -1
- data/node_modules/npm-check-updates/build/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/package.json +4 -3
- data/node_modules/npm-check-updates/build/src/index.js +1 -1
- data/node_modules/npm-check-updates/build/src/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js +2 -2
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js +0 -6
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js.map +1 -1
- data/node_modules/npm-check-updates/package.json +4 -3
- data/node_modules/type-fest/index.d.ts +95 -2
- data/node_modules/type-fest/package.json +12 -18
- data/node_modules/type-fest/readme.md +299 -52
- data/node_modules/type-fest/source/async-return-type.d.ts +4 -2
- data/node_modules/type-fest/source/asyncify.d.ts +5 -3
- data/node_modules/type-fest/source/basic.d.ts +21 -43
- data/node_modules/type-fest/{ts41 → source}/camel-case.d.ts +18 -17
- data/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
- data/node_modules/type-fest/source/camel-cased-properties.d.ts +36 -0
- data/node_modules/type-fest/source/conditional-except.d.ts +6 -4
- data/node_modules/type-fest/source/conditional-keys.d.ts +5 -1
- data/node_modules/type-fest/source/conditional-pick.d.ts +5 -3
- data/node_modules/type-fest/{ts41 → source}/delimiter-case.d.ts +16 -8
- data/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +60 -0
- data/node_modules/type-fest/source/delimiter-cased-properties.d.ts +37 -0
- data/node_modules/type-fest/source/entries.d.ts +8 -3
- data/node_modules/type-fest/source/entry.d.ts +8 -3
- data/node_modules/type-fest/source/exact.d.ts +73 -0
- data/node_modules/type-fest/source/except.d.ts +38 -3
- data/node_modules/type-fest/source/fixed-length-array.d.ts +6 -1
- data/node_modules/type-fest/source/get.d.ts +184 -0
- data/node_modules/type-fest/source/has-optional-keys.d.ts +21 -0
- data/node_modules/type-fest/source/has-required-keys.d.ts +59 -0
- data/node_modules/type-fest/source/includes.d.ts +22 -0
- data/node_modules/type-fest/source/internal.d.ts +59 -0
- data/node_modules/type-fest/source/invariant-of.d.ts +76 -0
- data/node_modules/type-fest/source/iterable-element.d.ts +8 -0
- data/node_modules/type-fest/source/join.d.ts +30 -0
- data/node_modules/type-fest/source/jsonify.d.ts +90 -0
- data/node_modules/type-fest/{ts41 → source}/kebab-case.d.ts +7 -5
- data/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
- data/node_modules/type-fest/source/kebab-cased-properties.d.ts +30 -0
- data/node_modules/type-fest/source/last-array-element.d.ts +28 -0
- data/node_modules/type-fest/source/literal-to-primitive.d.ts +36 -0
- data/node_modules/type-fest/source/literal-union.d.ts +7 -5
- data/node_modules/type-fest/source/merge-exclusive.d.ts +3 -1
- data/node_modules/type-fest/source/merge.d.ts +8 -3
- data/node_modules/type-fest/source/multidimensional-array.d.ts +43 -0
- data/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +47 -0
- data/node_modules/type-fest/source/mutable.d.ts +4 -21
- data/node_modules/type-fest/source/numeric.d.ts +170 -0
- data/node_modules/type-fest/source/observable-like.d.ts +62 -0
- data/node_modules/type-fest/source/opaque.d.ts +45 -3
- data/node_modules/type-fest/source/optional-keys-of.d.ts +38 -0
- data/node_modules/type-fest/source/package-json.d.ts +64 -12
- data/node_modules/type-fest/source/partial-deep.d.ts +57 -16
- data/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +70 -0
- data/node_modules/type-fest/{ts41 → source}/pascal-case.d.ts +6 -4
- data/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +54 -0
- data/node_modules/type-fest/source/pascal-cased-properties.d.ts +34 -0
- data/node_modules/type-fest/source/primitive.d.ts +13 -0
- data/node_modules/type-fest/source/promisable.d.ts +5 -3
- data/node_modules/type-fest/source/promise-value.d.ts +9 -7
- data/node_modules/type-fest/source/readonly-deep.d.ts +33 -7
- data/node_modules/type-fest/source/readonly-tuple.d.ts +41 -0
- data/node_modules/type-fest/source/remove-index-signature.d.ts +104 -0
- data/node_modules/type-fest/source/replace.d.ts +67 -0
- data/node_modules/type-fest/source/require-all-or-none.d.ts +36 -0
- data/node_modules/type-fest/source/require-at-least-one.d.ts +5 -3
- data/node_modules/type-fest/source/require-exactly-one.d.ts +4 -5
- data/node_modules/type-fest/source/required-keys-of.d.ts +29 -0
- data/node_modules/type-fest/source/schema.d.ts +72 -0
- data/node_modules/type-fest/source/screaming-snake-case.d.ts +33 -0
- data/node_modules/type-fest/source/set-non-nullable.d.ts +35 -0
- data/node_modules/type-fest/source/set-optional.d.ts +12 -11
- data/node_modules/type-fest/source/set-required.d.ts +12 -11
- data/node_modules/type-fest/source/set-return-type.d.ts +3 -1
- data/node_modules/type-fest/source/simplify.d.ts +83 -0
- data/node_modules/type-fest/{ts41 → source}/snake-case.d.ts +7 -4
- data/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
- data/node_modules/type-fest/source/snake-cased-properties.d.ts +30 -0
- data/node_modules/type-fest/source/split.d.ts +29 -0
- data/node_modules/type-fest/source/spread.d.ts +85 -0
- data/node_modules/type-fest/source/string-key-of.d.ts +25 -0
- data/node_modules/type-fest/source/stringified.d.ts +3 -1
- data/node_modules/type-fest/source/trim.d.ts +25 -0
- data/node_modules/type-fest/source/tsconfig-json.d.ts +316 -14
- data/node_modules/type-fest/source/typed-array.d.ts +17 -0
- data/node_modules/type-fest/source/union-to-intersection.d.ts +4 -2
- data/node_modules/type-fest/source/value-of.d.ts +3 -1
- data/node_modules/type-fest/source/writable.d.ts +40 -0
- data/package.json +2 -2
- metadata +86 -63
- data/linters/rubocop-2.7.6.yml +0 -86
- data/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js +0 -66
- data/node_modules/@humanwhocodes/object-schema/tests/object-schema.js +0 -659
- data/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js +0 -186
- data/node_modules/eslint/conf/config-schema.js +0 -93
- data/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js +0 -60
- data/node_modules/eslint/lib/cli-engine/formatters/compact.js +0 -60
- data/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js +0 -41
- data/node_modules/eslint/lib/cli-engine/formatters/junit.js +0 -82
- data/node_modules/eslint/lib/cli-engine/formatters/tap.js +0 -95
- data/node_modules/eslint/lib/cli-engine/formatters/unix.js +0 -58
- data/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js +0 -63
- data/node_modules/eslint/lib/cli-engine/xml-escape.js +0 -34
- data/node_modules/eslint/lib/eslint/flat-eslint.js +0 -1155
- data/node_modules/eslint/lib/rule-tester/flat-rule-tester.js +0 -1131
- data/node_modules/eslint/lib/rules/require-jsdoc.js +0 -122
- data/node_modules/eslint/lib/rules/utils/patterns/letters.js +0 -36
- data/node_modules/eslint/lib/rules/valid-jsdoc.js +0 -516
- data/node_modules/eslint/lib/shared/config-validator.js +0 -347
- data/node_modules/eslint/lib/shared/deprecation-warnings.js +0 -58
- data/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -50
- data/node_modules/file-entry-cache/changelog.md +0 -163
- data/node_modules/flat-cache/node_modules/rimraf/CHANGELOG.md +0 -65
- data/node_modules/flat-cache/node_modules/rimraf/LICENSE +0 -15
- data/node_modules/flat-cache/node_modules/rimraf/README.md +0 -101
- data/node_modules/flat-cache/node_modules/rimraf/bin.js +0 -68
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/LICENSE +0 -21
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/README.md +0 -378
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/common.js +0 -238
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/glob.js +0 -790
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -230
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +0 -33
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/package.json +0 -55
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/sync.js +0 -486
- data/node_modules/flat-cache/node_modules/rimraf/package.json +0 -32
- data/node_modules/flat-cache/node_modules/rimraf/rimraf.js +0 -360
- data/node_modules/npm-check-updates/build/index-CI_x-D21.js +0 -593
- data/node_modules/npm-check-updates/build/index-CI_x-D21.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js +0 -6
- data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-DgVn3Gax.js +0 -36
- data/node_modules/npm-check-updates/build/index-DgVn3Gax.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js.map +0 -1
- data/node_modules/type-fest/base.d.ts +0 -38
- data/node_modules/type-fest/license +0 -9
- data/node_modules/type-fest/source/utilities.d.ts +0 -3
- data/node_modules/type-fest/ts41/index.d.ts +0 -9
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "globals",
|
3
|
-
"version": "
|
3
|
+
"version": "14.0.0",
|
4
4
|
"description": "Global identifiers from different JavaScript environments",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": "sindresorhus/globals",
|
@@ -10,11 +10,15 @@
|
|
10
10
|
"email": "sindresorhus@gmail.com",
|
11
11
|
"url": "https://sindresorhus.com"
|
12
12
|
},
|
13
|
+
"sideEffects": false,
|
13
14
|
"engines": {
|
14
|
-
"node": ">=
|
15
|
+
"node": ">=18"
|
15
16
|
},
|
16
17
|
"scripts": {
|
17
|
-
"test": "xo && ava"
|
18
|
+
"test": "xo && ava && tsd",
|
19
|
+
"prepare": "npm run --silent update-types",
|
20
|
+
"update-builtin-globals": "node scripts/get-builtin-globals.mjs",
|
21
|
+
"update-types": "node scripts/generate-types.mjs > index.d.ts"
|
18
22
|
},
|
19
23
|
"files": [
|
20
24
|
"index.js",
|
@@ -31,12 +35,11 @@
|
|
31
35
|
"eslint",
|
32
36
|
"environments"
|
33
37
|
],
|
34
|
-
"dependencies": {
|
35
|
-
"type-fest": "^0.20.2"
|
36
|
-
},
|
37
38
|
"devDependencies": {
|
38
39
|
"ava": "^2.4.0",
|
39
|
-
"
|
40
|
+
"cheerio": "^1.0.0-rc.12",
|
41
|
+
"tsd": "^0.30.4",
|
42
|
+
"type-fest": "^4.10.2",
|
40
43
|
"xo": "^0.36.1"
|
41
44
|
},
|
42
45
|
"xo": {
|
@@ -10,8 +10,8 @@ This package is used by ESLint.
|
|
10
10
|
|
11
11
|
## Install
|
12
12
|
|
13
|
-
```
|
14
|
-
|
13
|
+
```sh
|
14
|
+
npm install globals
|
15
15
|
```
|
16
16
|
|
17
17
|
## Usage
|
@@ -42,15 +42,3 @@ For Node.js this package provides two sets of globals:
|
|
42
42
|
See: https://nodejs.org/api/modules.html#modules_the_module_scope
|
43
43
|
|
44
44
|
When analyzing code that is known to run outside of a CommonJS wrapper, for example, JavaScript modules, `nodeBuiltin` can find accidental CommonJS references.
|
45
|
-
|
46
|
-
---
|
47
|
-
|
48
|
-
<div align="center">
|
49
|
-
<b>
|
50
|
-
<a href="https://tidelift.com/subscription/pkg/npm-globals?utm_source=npm-globals&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
51
|
-
</b>
|
52
|
-
<br>
|
53
|
-
<sub>
|
54
|
-
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
55
|
-
</sub>
|
56
|
-
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "keyv",
|
3
|
-
"version": "4.5.
|
3
|
+
"version": "4.5.4",
|
4
4
|
"description": "Simple key-value storage with support for multiple backends",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"scripts": {
|
@@ -41,11 +41,11 @@
|
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
43
|
"@keyv/test-suite": "*",
|
44
|
-
"eslint": "^8.
|
44
|
+
"eslint": "^8.51.0",
|
45
45
|
"eslint-plugin-promise": "^6.1.1",
|
46
46
|
"pify": "^5.0.0",
|
47
|
-
"timekeeper": "^2.
|
48
|
-
"tsd": "^0.
|
47
|
+
"timekeeper": "^2.3.1",
|
48
|
+
"tsd": "^0.29.0"
|
49
49
|
},
|
50
50
|
"tsd": {
|
51
51
|
"directory": "test"
|
@@ -153,27 +153,22 @@ class Keyv extends EventEmitter {
|
|
153
153
|
}
|
154
154
|
|
155
155
|
if (isArray) {
|
156
|
-
|
157
|
-
|
158
|
-
for (let row of data) {
|
156
|
+
return data.map((row, index) => {
|
159
157
|
if ((typeof row === 'string')) {
|
160
158
|
row = this.opts.deserialize(row);
|
161
159
|
}
|
162
160
|
|
163
161
|
if (row === undefined || row === null) {
|
164
|
-
|
165
|
-
continue;
|
162
|
+
return undefined;
|
166
163
|
}
|
167
164
|
|
168
165
|
if (typeof row.expires === 'number' && Date.now() > row.expires) {
|
169
|
-
this.delete(key).then(() => undefined);
|
170
|
-
|
171
|
-
} else {
|
172
|
-
result.push((options && options.raw) ? row : row.value);
|
166
|
+
this.delete(key[index]).then(() => undefined);
|
167
|
+
return undefined;
|
173
168
|
}
|
174
|
-
}
|
175
169
|
|
176
|
-
|
170
|
+
return (options && options.raw) ? row : row.value;
|
171
|
+
});
|
177
172
|
}
|
178
173
|
|
179
174
|
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
@@ -1,28 +1,29 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
"use strict";const
|
3
|
-
`).replace(/^/gm," ".repeat(
|
4
|
-
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,i
|
2
|
+
"use strict";const _e=require("node:events"),be=require("node:child_process"),Oe=require("node:path"),Ae=require("node:fs"),$e=require("node:process"),c=require("./index.js");var w={},j={},V={};let ie=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},Ce=class extends ie{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};V.CommanderError=ie;V.InvalidArgumentError=Ce;const{InvalidArgumentError:ye}=V;let ve=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new ye(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function we(s){const e=s.name()+(s.variadic===!0?"...":"");return s.required?"<"+e+">":"["+e+"]"}j.Argument=ve;j.humanReadableArgName=we;var re={},W={};const{humanReadableArgName:Ee}=j;let xe=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,r)=>i.name().localeCompare(r.name())),t}compareOptions(e,t){const n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){const t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){const i=n.short&&e._findOption(n.short),r=n.long&&e._findOption(n.long);!i&&!r?t.push(n):n.long&&!r?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const i=n.options.filter(r=>!r.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){const t=e.registeredArguments.map(n=>Ee(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t),i=t.helpWidth||80,r=2,o=2;function l(d,O){if(O){const b=`${d.padEnd(n+o)}${O}`;return t.wrap(b,i-r,n+o)}return d}function a(d){return d.join(`
|
3
|
+
`).replace(/^/gm," ".repeat(r))}let u=[`Usage: ${t.commandUsage(e)}`,""];const h=t.commandDescription(e);h.length>0&&(u=u.concat([t.wrap(h,i,0),""]));const f=t.visibleArguments(e).map(d=>l(t.argumentTerm(d),t.argumentDescription(d)));f.length>0&&(u=u.concat(["Arguments:",a(f),""]));const _=t.visibleOptions(e).map(d=>l(t.optionTerm(d),t.optionDescription(d)));if(_.length>0&&(u=u.concat(["Options:",a(_),""])),this.showGlobalOptions){const d=t.visibleGlobalOptions(e).map(O=>l(t.optionTerm(O),t.optionDescription(O)));d.length>0&&(u=u.concat(["Global Options:",a(d),""]))}const $=t.visibleCommands(e).map(d=>l(t.subcommandTerm(d),t.subcommandDescription(d)));return $.length>0&&(u=u.concat(["Commands:",a($),""])),u.join(`
|
4
|
+
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){const r=" \\f\\t\\v - \uFEFF",o=new RegExp(`[\\n][${r}]+`);if(e.match(o))return e;const l=t-n;if(l<i)return e;const a=e.slice(0,n),u=e.slice(n).replace(`\r
|
5
5
|
`,`
|
6
|
-
`),h=" ".repeat(
|
7
|
-
|.{1,${
|
8
|
-
`?"":(
|
9
|
-
`)}};
|
10
|
-
(Did you mean one of ${
|
11
|
-
(Did you mean ${
|
12
|
-
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new
|
13
|
-
Expecting one of '${
|
14
|
-
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const t=
|
6
|
+
`),h=" ".repeat(n),_="\\s",$=new RegExp(`
|
7
|
+
|.{1,${l-1}}([${_}]|$)|[^${_}]+?([${_}]|$)`,"g"),d=u.match($)||[];return a+d.map((O,b)=>O===`
|
8
|
+
`?"":(b>0?h:"")+O.trimEnd()).join(`
|
9
|
+
`)}};W.Help=xe;var P={};const{InvalidArgumentError:Se}=V;let Te=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=je(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Se(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Ve(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},He=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const i=this.negativeOptions.get(n).presetArg,r=i!==void 0?i:!1;return t.negate===(r===e)}};function Ve(s){return s.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function je(s){let e,t;const n=s.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}P.Option=Te;P.DualOptions=He;var se={};const oe=3;function ke(s,e){if(Math.abs(s.length-e.length)>oe)return Math.max(s.length,e.length);const t=[];for(let n=0;n<=s.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=s.length;i++){let r=1;s[i-1]===e[n-1]?r=0:r=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+r),i>1&&n>1&&s[i-1]===e[n-2]&&s[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[s.length][e.length]}function Ie(s,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));const t=s.startsWith("--");t&&(s=s.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=oe;const r=.4;return e.forEach(o=>{if(o.length<=1)return;const l=ke(s,o),a=Math.max(s.length,o.length);(a-l)/a>r&&(l<i?(i=l,n=[o]):l===i&&n.push(o))}),n.sort((o,l)=>o.localeCompare(l)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
|
10
|
+
(Did you mean one of ${n.join(", ")}?)`:n.length===1?`
|
11
|
+
(Did you mean ${n[0]}?)`:""}se.suggestSimilar=Ie;const Pe=_e.EventEmitter,N=be,x=Oe,M=Ae,g=$e,{Argument:Fe,humanReadableArgName:De}=j,{CommanderError:U}=V,{Help:Ne}=W,{Option:L,DualOptions:Me}=P,{suggestSimilar:R}=se;let Ue=class ae extends Pe{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>g.stdout.write(t),writeErr:t=>g.stderr.write(t),getOutHelpWidth:()=>g.stdout.isTTY?g.stdout.columns:void 0,getErrHelpWidth:()=>g.stderr.isTTY?g.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,r=n;typeof i=="object"&&i!==null&&(r=i,i=null),r=r||{};const[,o,l]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=!0),r.isDefault&&(this._defaultCommandName=a._name),a._hidden=!!(r.noHelp||r.hidden),a._executableFile=r.executableFile||null,l&&a.arguments(l),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new ae(e)}createHelp(){return Object.assign(new Ne,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
12
|
+
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Fe(e,t)}argument(e,t,n,i){const r=this.createArgument(e,t);return typeof n=="function"?r.default(i).argParser(n):r.default(n),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";const[,n,i]=e.match(/([^ ]+) *(.*)/),r=t??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),r&&o.description(r),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
13
|
+
Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new U(e,t,n)),g.exit(e)}action(e){const t=n=>{const i=this.registeredArguments.length,r=n.slice(0,i);return this._storeOptionsAsProperties?r[i]=this:r[i]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new L(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(r){if(r.code==="commander.invalidArgument"){const o=`${i} ${r.message}`;this.error(o,{exitCode:r.exitCode,code:r.code})}throw r}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
14
|
+
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const t=i=>[i.name()].concat(i.aliases()),n=t(e).find(i=>this._findCommand(i));if(n){const i=t(this._findCommand(n)).join("|"),r=t(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),n=e.attributeName();if(e.negate){const r=e.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");const i=(r,o,l)=>{r==null&&e.presetArg!==void 0&&(r=e.presetArg);const a=this.getOptionValue(n);r!==null&&e.parseArg?r=this._callParseArg(e,r,a,o):r!==null&&e.variadic&&(r=e._concatValue(r,a)),r==null&&(e.negate?r=!1:e.isBoolean()||e.optional?r=!0:r=""),this.setOptionValueWithSource(n,r,l)};return this.on("option:"+t,r=>{const o=`error: option '${e.flags}' argument '${r}' is invalid.`;i(r,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,r=>{const o=`error: option '${e.flags}' value '${r}' from env '${e.envVar}' is invalid.`;i(r,o,"env")}),this}_optionEx(e,t,n,i,r){if(typeof t=="object"&&t instanceof L)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(r).argParser(i);else if(i instanceof RegExp){const l=i;i=(a,u)=>{const h=l.exec(a);return h?h[0]:u},o.default(r).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");t=t||{},e===void 0&&(e=g.argv,g.versions&&g.versions.electron&&(t.from="electron")),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":g.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1;const i=[".js",".ts",".tsx",".mjs",".cjs"];function r(h,f){const _=x.resolve(h,f);if(M.existsSync(_))return _;if(i.includes(x.extname(f)))return;const $=i.find(d=>M.existsSync(`${_}${d}`));if($)return`${_}${$}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let h;try{h=M.realpathSync(this._scriptPath)}catch{h=this._scriptPath}l=x.resolve(x.dirname(h),l)}if(l){let h=r(l,o);if(!h&&!e._executableFile&&this._scriptPath){const f=x.basename(this._scriptPath,x.extname(this._scriptPath));f!==this._name&&(h=r(l,`${f}-${e._name}`))}o=h||o}n=i.includes(x.extname(o));let a;g.platform!=="win32"?n?(t.unshift(o),t=G(g.execArgv).concat(t),a=N.spawn(g.argv[0],t,{stdio:"inherit"})):a=N.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=G(g.execArgv).concat(t),a=N.spawn(g.execPath,t,{stdio:"inherit"})),a.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{g.on(f,()=>{a.killed===!1&&a.exitCode===null&&a.kill(f)})});const u=this._exitCallback;a.on("close",(h,f)=>{h=h??1,u?u(new U(h,"commander.executeSubCommandAsync","(close)")):g.exit(h)}),a.on("error",h=>{if(h.code==="ENOENT"){const f=l?`searched for local subcommand relative to directory '${l}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",_=`'${o}' does not exist
|
15
15
|
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
16
16
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
17
|
-
- ${
|
17
|
+
- ${f}`;throw new Error(_)}else if(h.code==="EACCES")throw new Error(`'${o}' not executable`);if(!u)g.exit(1);else{const f=new U(1,"commander.executeSubCommandAsync","(error)");f.nestedError=h,u(f)}}),this.runningCommand=a}_dispatchSubcommand(e,t,n){const i=this._findCommand(e);i||this.help({error:!0});let r;return r=this._chainOrCallSubCommandHook(r,i,"preSubcommand"),r=this._chainOrCall(r,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),r}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(n,i,r)=>{let o=i;if(i!==null&&n.parseArg){const l=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,r,l)}return o};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach((n,i)=>{let r=n.defaultValue;n.variadic?i<this.args.length?(r=this.args.slice(i),n.parseArg&&(r=r.reduce((o,l)=>e(n,l,o),n.defaultValue))):r===void 0&&(r=[]):i<this.args.length&&(r=this.args[i],n.parseArg&&(r=e(n,r,n.defaultValue))),t[i]=r}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e;const i=[];return this._getCommandAndAncestors().reverse().filter(r=>r._lifeCycleHooks[t]!==void 0).forEach(r=>{r._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:r,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(r=>{n=this._chainOrCall(n,()=>r.callback(r.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(r=>{i=this._chainOrCall(i,()=>r(this,t))}),i}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(r,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(r))i(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){const e=this.options.filter(n=>{const i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{const i=e.find(r=>n.conflictsWith.includes(r.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){const t=[],n=[];let i=t;const r=e.slice();function o(a){return a.length>1&&a[0]==="-"}let l=null;for(;r.length;){const a=r.shift();if(a==="--"){i===n&&i.push(a),i.push(...r);break}if(l&&!o(a)){this.emit(`option:${l.name()}`,a);continue}if(l=null,o(a)){const u=this._findOption(a);if(u){if(u.required){const h=r.shift();h===void 0&&this.optionMissingArgument(u),this.emit(`option:${u.name()}`,h)}else if(u.optional){let h=null;r.length>0&&!o(r[0])&&(h=r.shift()),this.emit(`option:${u.name()}`,h)}else this.emit(`option:${u.name()}`);l=u.variadic?u:null;continue}}if(a.length>2&&a[0]==="-"&&a[1]!=="-"){const u=this._findOption(`-${a[1]}`);if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${u.name()}`,a.slice(2)):(this.emit(`option:${u.name()}`),r.unshift(`-${a.slice(2)}`));continue}}if(/^--[^=]+=/.test(a)){const u=a.indexOf("="),h=this._findOption(a.slice(0,u));if(h&&(h.required||h.optional)){this.emit(`option:${h.name()}`,a.slice(u+1));continue}}if(o(a)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(a)){t.push(a),r.length>0&&n.push(...r);break}else if(this._getHelpCommand()&&a===this._getHelpCommand().name()){t.push(a),r.length>0&&t.push(...r);break}else if(this._defaultCommandName){n.push(a),r.length>0&&n.push(...r);break}}if(this._passThroughOptions){i.push(a),r.length>0&&i.push(...r);break}i.push(a)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
|
18
18
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
19
19
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
20
|
-
`),this.outputHelp({error:!0}));const
|
21
|
-
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const
|
22
|
-
Expecting one of '${
|
23
|
-
`)}),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find(
|
24
|
-
Run ${
|
25
|
-
${
|
26
|
-
`):
|
27
|
-
|
20
|
+
`),this.outputHelp({error:!0}));const n=t||{},i=n.exitCode||1,r=n.code||"commander.error";this._exit(i,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in g.env){const t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,g.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){const e=new Me(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=o=>{const l=o.attributeName(),a=this.getOptionValue(l),u=this.options.find(f=>f.negate&&l===f.attributeName()),h=this.options.find(f=>!f.negate&&l===f.attributeName());return u&&(u.presetArg===void 0&&a===!1||u.presetArg!==void 0&&a===u.presetArg)?u:h||o},i=o=>{const l=n(o),a=l.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${l.envVar}'`:`option '${l.flags}'`},r=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],r=this;do{const o=r.createHelp().visibleOptions(r).filter(l=>l.long).map(l=>l.long);i=i.concat(o),r=r.parent}while(r&&!r._enablePositionalOptions);t=R(e,i)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,n=t===1?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const i=[];this.createHelp().visibleCommands(this).forEach(r=>{i.push(r.name()),r.alias()&&i.push(r.alias())}),t=R(e,i)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
21
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const n=this.parent?._findCommand(e);if(n){const i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;const t=this.registeredArguments.map(n=>De(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=x.basename(e,x.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);const n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(r=>r.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(r=>r.emit("afterAllHelp",n))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=g.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
22
|
+
Expecting one of '${n.join("', '")}'`);const i=`${e}Help`;return this.on(i,r=>{let o;typeof t=="function"?o=t({error:r.error,command:r.command}):o=t,o&&r.write(`${o}
|
23
|
+
`)}),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function G(s){return s.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",r;return(r=e.match(/^(--inspect(-brk)?)$/))!==null?t=r[1]:(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=r[1],/^\d+$/.test(r[3])?i=r[3]:n=r[3]):(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=r[1],n=r[3],i=r[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}re.Command=Ue;const{Argument:le}=j,{Command:q}=re,{CommanderError:We,InvalidArgumentError:ue}=V,{Help:qe}=W,{Option:ce}=P;w.program=new q;w.createCommand=s=>new q(s);w.createOption=(s,e)=>new ce(s,e);w.createArgument=(s,e)=>new le(s,e);w.Command=q;w.Option=ce;w.Argument=le;w.Help=qe;w.CommanderError=We;w.InvalidArgumentError=ue;w.InvalidOptionArgumentError=ue;const{program:v,createCommand:Hi,createArgument:Vi,createOption:ji,CommanderError:ki,InvalidArgumentError:Ii,InvalidOptionArgumentError:Pi,Command:Fi,Argument:Di,Option:K,Help:Be}=w;var Le=c._assignValue,Re=c._baseAssignValue;function Ge(s,e,t,n){var i=!t;t||(t={});for(var r=-1,o=e.length;++r<o;){var l=e[r],a=n?n(t[l],s[l],l,t,s):void 0;a===void 0&&(a=s[l]),i?Re(t,l,a):Le(t,l,a)}return t}var F=Ge,Ke=F,Je=c.keys_1;function Ye(s,e){return s&&Ke(e,Je(e),s)}var Qe=Ye,Xe=F,Ze=c.keysIn_1;function ze(s,e){return s&&Xe(e,Ze(e),s)}var et=ze,I={exports:{}};I.exports;(function(s,e){var t=c._root,n=e&&!e.nodeType&&e,i=n&&!0&&s&&!s.nodeType&&s,r=i&&i.exports===n,o=r?t.Buffer:void 0,l=o?o.allocUnsafe:void 0;function a(u,h){if(h)return u.slice();var f=u.length,_=l?l(f):new u.constructor(f);return u.copy(_),_}s.exports=a})(I,I.exports);var tt=I.exports,nt=F,it=c._getSymbols;function rt(s,e){return nt(s,it(s),e)}var st=rt,ot=F,at=c._getSymbolsIn;function lt(s,e){return ot(s,at(s),e)}var ut=lt,ct=Object.prototype,ht=ct.hasOwnProperty;function pt(s){var e=s.length,t=new s.constructor(e);return e&&typeof s[0]=="string"&&ht.call(s,"index")&&(t.index=s.index,t.input=s.input),t}var ft=pt,J=c._Uint8Array;function dt(s){var e=new s.constructor(s.byteLength);return new J(e).set(new J(s)),e}var B=dt,mt=B;function gt(s,e){var t=e?mt(s.buffer):s.buffer;return new s.constructor(t,s.byteOffset,s.byteLength)}var _t=gt,bt=/\w*$/;function Ot(s){var e=new s.constructor(s.source,bt.exec(s));return e.lastIndex=s.lastIndex,e}var At=Ot,Y=c._Symbol,Q=Y?Y.prototype:void 0,X=Q?Q.valueOf:void 0;function $t(s){return X?Object(X.call(s)):{}}var Ct=$t,yt=B;function vt(s,e){var t=e?yt(s.buffer):s.buffer;return new s.constructor(t,s.byteOffset,s.length)}var wt=vt,Et=B,xt=_t,St=At,Tt=Ct,Ht=wt,Vt="[object Boolean]",jt="[object Date]",kt="[object Map]",It="[object Number]",Pt="[object RegExp]",Ft="[object Set]",Dt="[object String]",Nt="[object Symbol]",Mt="[object ArrayBuffer]",Ut="[object DataView]",Wt="[object Float32Array]",qt="[object Float64Array]",Bt="[object Int8Array]",Lt="[object Int16Array]",Rt="[object Int32Array]",Gt="[object Uint8Array]",Kt="[object Uint8ClampedArray]",Jt="[object Uint16Array]",Yt="[object Uint32Array]";function Qt(s,e,t){var n=s.constructor;switch(e){case Mt:return Et(s);case Vt:case jt:return new n(+s);case Ut:return xt(s,t);case Wt:case qt:case Bt:case Lt:case Rt:case Gt:case Kt:case Jt:case Yt:return Ht(s,t);case kt:return new n;case It:case Dt:return new n(s);case Pt:return St(s);case Ft:return new n;case Nt:return Tt(s)}}var Xt=Qt,Zt=c._baseCreate,zt=c._getPrototype,en=c._isPrototype;function tn(s){return typeof s.constructor=="function"&&!en(s)?Zt(zt(s)):{}}var nn=tn,rn=c._getTag,sn=c.isObjectLike_1,on="[object Map]";function an(s){return sn(s)&&rn(s)==on}var ln=an,un=ln,cn=c._baseUnary,Z=c._nodeUtilExports,z=Z&&Z.isMap,hn=z?cn(z):un,pn=hn,fn=c._getTag,dn=c.isObjectLike_1,mn="[object Set]";function gn(s){return dn(s)&&fn(s)==mn}var _n=gn,bn=_n,On=c._baseUnary,ee=c._nodeUtilExports,te=ee&&ee.isSet,An=te?On(te):bn,$n=An,Cn=c._Stack,yn=c._arrayEach,vn=c._assignValue,wn=Qe,En=et,xn=tt,Sn=c._copyArray,Tn=st,Hn=ut,Vn=c._getAllKeys,jn=c._getAllKeysIn,kn=c._getTag,In=ft,Pn=Xt,Fn=nn,Dn=c.isArray_1,Nn=c.isBufferExports,Mn=pn,Un=c.isObject_1,Wn=$n,qn=c.keys_1,Bn=c.keysIn_1,Ln=1,Rn=2,Gn=4,he="[object Arguments]",Kn="[object Array]",Jn="[object Boolean]",Yn="[object Date]",Qn="[object Error]",pe="[object Function]",Xn="[object GeneratorFunction]",Zn="[object Map]",zn="[object Number]",fe="[object Object]",ei="[object RegExp]",ti="[object Set]",ni="[object String]",ii="[object Symbol]",ri="[object WeakMap]",si="[object ArrayBuffer]",oi="[object DataView]",ai="[object Float32Array]",li="[object Float64Array]",ui="[object Int8Array]",ci="[object Int16Array]",hi="[object Int32Array]",pi="[object Uint8Array]",fi="[object Uint8ClampedArray]",di="[object Uint16Array]",mi="[object Uint32Array]",m={};m[he]=m[Kn]=m[si]=m[oi]=m[Jn]=m[Yn]=m[ai]=m[li]=m[ui]=m[ci]=m[hi]=m[Zn]=m[zn]=m[fe]=m[ei]=m[ti]=m[ni]=m[ii]=m[pi]=m[fi]=m[di]=m[mi]=!0;m[Qn]=m[pe]=m[ri]=!1;function k(s,e,t,n,i,r){var o,l=e&Ln,a=e&Rn,u=e&Gn;if(t&&(o=i?t(s,n,i,r):t(s)),o!==void 0)return o;if(!Un(s))return s;var h=Dn(s);if(h){if(o=In(s),!l)return Sn(s,o)}else{var f=kn(s),_=f==pe||f==Xn;if(Nn(s))return xn(s,l);if(f==fe||f==he||_&&!i){if(o=a||_?{}:Fn(s),!l)return a?Hn(s,En(o,s)):Tn(s,wn(o,s))}else{if(!m[f])return i?s:{};o=Pn(s,f,l)}}r||(r=new Cn);var $=r.get(s);if($)return $;r.set(s,o),Wn(s)?s.forEach(function(b){o.add(k(b,e,t,b,s,r))}):Mn(s)&&s.forEach(function(b,C){o.set(C,k(b,e,t,C,s,r))});var d=u?a?jn:Vn:a?Bn:qn,O=h?void 0:d(s);return yn(O||s,function(b,C){O&&(C=b,b=s[C]),vn(o,C,k(b,e,t,C,s,r))}),o}var gi=k,_i=gi,bi=1,Oi=4;function Ai(s){return _i(s,bi|Oi)}var $i=Ai;const Ci=c.getDefaultExportFromCjs($i),ne="Output the version number of npm-check-updates.",yi=s=>s.replace(/`/g,"");(async()=>{const{default:s}=await Promise.resolve().then(()=>require("./index-5sFb3Tvv.js")),e=s({pkg:c.pkg});if(e.update&&e.update.latest!==c.pkg.version){const{default:p}=await Promise.resolve().then(()=>require("./index-BmUFwMVL.js")),y=c.semver.parse(e.update.current)?.major,A=c.semver.parse(e.update.latest)?.major,T=(y&&A&&A>=y?new Array(A-y).fill(0).map((H,D)=>y+D+1):[]).map(H=>`${c.pkg.homepage??""}/releases/tag/v${H}.0.0`),S=`${c.pkg.homepage??""}/compare/v${e.update.current}...v${e.update.latest}`;e.notify({defer:!1,isGlobal:!0,message:`Update available ${p.dim("{currentVersion}")}${p.reset(" → ")}${e.update.type==="major"?p.red("{latestVersion}"):e.update.type==="minor"?p.yellow("{latestVersion}"):p.green("{latestVersion}")}
|
24
|
+
Run ${p.cyan("{updateCommand}")} to update
|
25
|
+
${p.dim.underline(e.update.type==="major"?T.map(H=>p.dim.underline(H)).join(`
|
26
|
+
`):S)}`})}const t=process.argv.slice(2),n=t.findIndex(p=>p==="--help"||p==="-h");if(n!==-1&&t[n+1]){const p=t[n+1].replace(/^-*/,"");p==="help"||p==="h"?console.info("Would you like some help with your help?"):(await c.chalkInit(),[...t.slice(0,n),...t.slice(n+1)].forEach(A=>{const E=A.replace(/^-*/,""),T=c.cliOptionsSorted.find(S=>E===S.long||E===S.short||E===`no-${S.long}`&&S.type==="boolean");console.info(T?c.renderExtendedHelp(T)+`
|
27
|
+
`:E==="version"||E==="v"||E==="V"?c.renderExtendedHelp({long:"version",short:"v",description:ne,type:"string"})+`
|
28
|
+
`:`Unknown option: ${A}`)})),process.exit(0)}const i=new Set(c.cliOptionsSorted.filter(p=>p.cli===!1).map(p=>`--${p.long}`));v.description("[filter] is a list or regex of package names to check (all others will be ignored).").usage("[options] [filter]").configureHelp({optionTerm:p=>p.long&&i.has(p.long)?p.long.replace("--","")+"*":p.long==="--version"?"-v, -V, --version":p.flags.replace("[bool]",""),optionDescription:p=>p.long==="--version"?ne:p.long==="--help"?`You're lookin' at it. Run "ncu --help <option>" for a specific option.`:Be.prototype.optionDescription(p)}).addOption(new K("-v, --versionAlias").hideHelp()).on("option:versionAlias",()=>{console.info(c.pkg.version),process.exit(0)}),c.cliOptionsSorted.forEach(({long:p,short:y,arg:A,description:E,default:T,help:S,parse:H,type:D})=>{const me=`${y?`-${y}, `:""}--${p}${A?` <${A}>`:""}`,ge=`${yi(E)}${S?` Run "ncu --help ${p}" for details.`:""}`;v.option(me,ge,H||T,H?T:void 0),D==="boolean"&&v.addOption(new K(`--no-${p}`).default(!1).hideHelp())}),v.version(c.pkg.version);const r=Ci(v._optionValues);v.parse(process.argv);const o=v.opts(),l=process.argv.slice(2),{color:a,configFileName:u,configFilePath:h,global:f,packageFile:_,mergeConfig:$}=o;await c.chalkInit(a);const d=!process.env.NCU_TESTS||h||$?await c.getNcuRc({configFileName:u,configFilePath:h,global:f,packageFile:_,options:{...o,cli:!0}}):null,O=(d?.args||[]).filter((p,y,A)=>(typeof p!="string"||!p.startsWith("-")||!l.includes(p))&&(typeof A[y-1]!="string"||!A[y-1].startsWith("-")||!l.includes(A[y-1]))),b=[...process.argv.slice(0,2),...O,...l];v._optionValues=r,v.parse(b);const C=v.opts(),de={...d&&Object.keys(d.config).length>0?{rcConfigPath:d.filePath}:null,...c.pickBy(v.opts(),p=>p!==void 0),args:v.args,...C.filter?{filter:C.filter}:null,...C.reject?{reject:C.reject}:null};c.run(de,{cli:!0})})();
|
28
29
|
//# sourceMappingURL=cli.js.map
|