@node-core/utils 7.2.0 → 7.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ci/build-types/normal_build.js +1 -1
- package/lib/ci/build-types/pr_build.js +11 -1
- package/lib/ci/build-types/test_build.js +3 -3
- package/lib/ci/build-types/test_run.js +1 -1
- package/lib/ci/failure_aggregator.js +2 -2
- package/lib/ci/run_ci.js +3 -2
- package/lib/cli.js +9 -12
- package/lib/figures.js +6 -6
- package/lib/links.js +27 -15
- package/lib/pr_checker.js +45 -34
- package/lib/queries/PR.gql +1 -0
- package/lib/update-v8/backport.js +3 -4
- package/lib/verbosity.js +2 -4
- package/node_modules/@listr2/prompt-adapter-inquirer/README.md +15 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.d.mts +21 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.mjs +46 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/LICENSE +22 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.d.ts +2 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.js +2 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.d.ts +35 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.d.ts +34 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.js +2 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/package.json +88 -0
- package/node_modules/@listr2/prompt-adapter-inquirer/package.json +85 -0
- package/node_modules/ansi-escapes/base.d.ts +307 -0
- package/node_modules/ansi-escapes/base.js +202 -0
- package/node_modules/ansi-escapes/package.json +70 -0
- package/node_modules/ansi-escapes/readme.md +296 -0
- package/node_modules/ansi-regex/index.js +9 -4
- package/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/ansi-regex/readme.md +6 -0
- package/node_modules/ansi-styles/index.d.ts +12 -12
- package/node_modules/ansi-styles/index.js +3 -3
- package/node_modules/ansi-styles/package.json +4 -4
- package/node_modules/cli-truncate/index.d.ts +3 -3
- package/node_modules/cli-truncate/index.js +40 -14
- package/node_modules/cli-truncate/node_modules/string-width/index.js +133 -15
- package/node_modules/cli-truncate/node_modules/string-width/package.json +4 -4
- package/node_modules/cli-truncate/node_modules/string-width/readme.md +1 -1
- package/node_modules/cli-truncate/package.json +7 -7
- package/node_modules/cli-truncate/readme.md +2 -3
- package/node_modules/ghauth/.github/dependabot.yml +11 -3
- package/node_modules/ghauth/.github/workflows/depsound.yml +33 -0
- package/node_modules/ghauth/.github/workflows/test-and-release.yml +4 -4
- package/node_modules/ghauth/CHANGELOG.md +60 -0
- package/node_modules/ghauth/package.json +30 -6
- package/node_modules/htmlparser2/README.md +112 -26
- package/node_modules/htmlparser2/dist/Parser.d.ts +257 -0
- package/node_modules/htmlparser2/dist/Parser.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/Parser.js +644 -0
- package/node_modules/htmlparser2/dist/Parser.js.map +1 -0
- package/node_modules/htmlparser2/dist/Tokenizer.d.ts +194 -0
- package/node_modules/htmlparser2/dist/Tokenizer.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/Tokenizer.js +1056 -0
- package/node_modules/htmlparser2/dist/Tokenizer.js.map +1 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.d.ts +24 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.js +44 -0
- package/node_modules/htmlparser2/dist/WebWritableStream.js.map +1 -0
- package/node_modules/htmlparser2/dist/WritableStream.d.ts +14 -0
- package/node_modules/htmlparser2/dist/WritableStream.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/WritableStream.js +32 -0
- package/node_modules/htmlparser2/dist/WritableStream.js.map +1 -0
- package/node_modules/htmlparser2/dist/index.d.ts +34 -0
- package/node_modules/htmlparser2/dist/index.d.ts.map +1 -0
- package/node_modules/htmlparser2/dist/index.js +46 -0
- package/node_modules/htmlparser2/dist/index.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/LICENSE +7 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/README.md +115 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.d.ts +11 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.js +15 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.d.ts +72 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.js +173 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/package.json +69 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/src/foreign-names.ts +19 -0
- package/node_modules/htmlparser2/node_modules/dom-serializer/src/index.ts +315 -0
- package/node_modules/htmlparser2/node_modules/domelementtype/dist/index.d.ts +48 -0
- package/node_modules/htmlparser2/node_modules/domelementtype/dist/index.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domelementtype/dist/index.js +60 -0
- package/node_modules/htmlparser2/node_modules/domelementtype/package.json +59 -0
- package/node_modules/htmlparser2/node_modules/domhandler/dist/index.d.ts +79 -0
- package/node_modules/htmlparser2/node_modules/domhandler/dist/index.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domhandler/dist/index.js +155 -0
- package/node_modules/htmlparser2/node_modules/domhandler/dist/node.d.ts +264 -0
- package/node_modules/htmlparser2/node_modules/domhandler/dist/node.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domhandler/dist/node.js +359 -0
- package/node_modules/htmlparser2/node_modules/domhandler/package.json +65 -0
- package/node_modules/htmlparser2/node_modules/domhandler/readme.md +86 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.d.ts +71 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.js +180 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.d.ts +59 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.js +136 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/index.d.ts +8 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/index.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/index.js +8 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/index.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.d.ts +79 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.js +152 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.d.ts +49 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.js +138 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/querying.d.ts +54 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/querying.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/querying.js +129 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/querying.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.d.ts +46 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.js +81 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.d.ts +74 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.js +105 -0
- package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/domutils/package.json +69 -0
- package/node_modules/htmlparser2/node_modules/domutils/readme.md +25 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/__snapshots__/feeds.spec.ts.snap +103 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/feeds.ts +301 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/helpers.ts +154 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/index.ts +7 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/legacy.ts +224 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/manipulation.ts +156 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/querying.ts +172 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/stringify.ts +90 -0
- package/node_modules/htmlparser2/node_modules/domutils/src/traversal.ts +132 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.d.ts +8 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.js +46 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode.d.ts +194 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode.js +544 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/decode.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/encode.d.ts +24 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/encode.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/encode.js +90 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/encode.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/escape.d.ts +48 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/escape.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/escape.js +132 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/escape.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.js +5 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.js +5 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.d.ts +5 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.js +12 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/index.d.ts +89 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/index.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/index.js +91 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/index.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.d.ts +7 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.js +17 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.d.ts +33 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.d.ts.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.js +93 -0
- package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.js.map +1 -0
- package/node_modules/htmlparser2/node_modules/entities/package.json +25 -62
- package/node_modules/htmlparser2/node_modules/entities/readme.md +4 -16
- package/node_modules/htmlparser2/node_modules/entities/src/decode-codepoint.ts +1 -32
- package/node_modules/htmlparser2/node_modules/entities/src/decode.ts +12 -26
- package/node_modules/htmlparser2/node_modules/entities/src/encode.ts +2 -0
- package/node_modules/htmlparser2/node_modules/entities/src/escape.ts +11 -12
- package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-html.ts +1 -0
- package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-xml.ts +1 -0
- package/node_modules/htmlparser2/node_modules/entities/src/generated/encode-html.ts +2 -1
- package/node_modules/htmlparser2/node_modules/entities/src/index.ts +8 -33
- package/node_modules/htmlparser2/node_modules/entities/src/internal/decode-shared.ts +3 -15
- package/node_modules/htmlparser2/node_modules/entities/src/internal/encode-shared.ts +4 -2
- package/node_modules/htmlparser2/package.json +34 -61
- package/node_modules/htmlparser2/src/Parser.ts +260 -100
- package/node_modules/htmlparser2/src/Tokenizer.ts +438 -165
- package/node_modules/htmlparser2/src/WebWritableStream.ts +47 -0
- package/node_modules/htmlparser2/src/WritableStream.ts +1 -2
- package/node_modules/htmlparser2/src/index.ts +14 -43
- package/node_modules/js-yaml/README.md +20 -187
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +1008 -946
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +29 -23
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js +1043 -583
- package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.d.ts +877 -133
- package/node_modules/js-yaml/dist/js-yaml.mjs +995 -556
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/package.json +8 -7
- package/node_modules/listr2/dist/index.d.mts +1558 -0
- package/node_modules/listr2/dist/index.mjs +2230 -0
- package/node_modules/listr2/node_modules/string-width/index.js +207 -0
- package/node_modules/listr2/node_modules/string-width/package.json +65 -0
- package/node_modules/listr2/node_modules/string-width/readme.md +66 -0
- package/node_modules/listr2/node_modules/wrap-ansi/index.d.ts +1 -1
- package/node_modules/listr2/node_modules/wrap-ansi/index.js +544 -116
- package/node_modules/listr2/node_modules/wrap-ansi/package.json +10 -13
- package/node_modules/listr2/node_modules/wrap-ansi/readme.md +2 -0
- package/node_modules/listr2/package.json +16 -19
- package/node_modules/log-update/index.d.ts +64 -1
- package/node_modules/log-update/index.js +268 -18
- package/node_modules/log-update/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/log-update/node_modules/string-width/index.js +207 -0
- package/node_modules/log-update/node_modules/string-width/package.json +65 -0
- package/node_modules/log-update/node_modules/string-width/readme.md +66 -0
- package/node_modules/log-update/node_modules/wrap-ansi/index.d.ts +1 -1
- package/node_modules/log-update/node_modules/wrap-ansi/index.js +544 -116
- package/node_modules/log-update/node_modules/wrap-ansi/package.json +10 -13
- package/node_modules/log-update/node_modules/wrap-ansi/readme.md +2 -0
- package/node_modules/log-update/package.json +14 -12
- package/node_modules/log-update/readme.md +61 -0
- package/node_modules/slice-ansi/index.d.ts +2 -2
- package/node_modules/slice-ansi/index.js +260 -112
- package/node_modules/slice-ansi/package.json +10 -9
- package/node_modules/slice-ansi/readme.md +3 -2
- package/node_modules/slice-ansi/tokenize-ansi.js +752 -0
- package/node_modules/smol-toml/README.md +205 -191
- package/node_modules/smol-toml/dist/date.d.ts +0 -1
- package/node_modules/smol-toml/dist/date.js +0 -1
- package/node_modules/smol-toml/dist/error.d.ts +0 -1
- package/node_modules/smol-toml/dist/error.js +0 -1
- package/node_modules/smol-toml/dist/extract.js +32 -65
- package/node_modules/smol-toml/dist/index.cjs +302 -288
- package/node_modules/smol-toml/dist/index.d.ts +0 -1
- package/node_modules/smol-toml/dist/index.js +0 -1
- package/node_modules/smol-toml/dist/parse.d.ts +1 -3
- package/node_modules/smol-toml/dist/parse.js +22 -21
- package/node_modules/smol-toml/dist/primitive.js +75 -76
- package/node_modules/smol-toml/dist/stringify.d.ts +0 -1
- package/node_modules/smol-toml/dist/stringify.js +43 -30
- package/node_modules/smol-toml/dist/struct.js +90 -93
- package/node_modules/smol-toml/dist/util.d.ts +1 -1
- package/node_modules/smol-toml/dist/util.js +36 -39
- package/node_modules/smol-toml/package.json +6 -6
- package/node_modules/strip-ansi/index.js +5 -0
- package/node_modules/strip-ansi/package.json +5 -5
- package/node_modules/yocto-spinner/index.d.ts +162 -0
- package/node_modules/yocto-spinner/index.js +432 -0
- package/node_modules/yocto-spinner/package.json +64 -0
- package/node_modules/yocto-spinner/readme.md +237 -0
- package/package.json +6 -8
- package/node_modules/@listr2/prompt-adapter-enquirer/README.md +0 -15
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.cjs +0 -127
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.cts +0 -152
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.ts +0 -152
- package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.js +0 -92
- package/node_modules/@listr2/prompt-adapter-enquirer/package.json +0 -80
- package/node_modules/boolbase/README.md +0 -10
- package/node_modules/boolbase/index.js +0 -8
- package/node_modules/boolbase/package.json +0 -23
- package/node_modules/chalk/package.json +0 -92
- package/node_modules/chalk/readme.md +0 -331
- package/node_modules/chalk/source/index.d.ts +0 -437
- package/node_modules/chalk/source/index.js +0 -261
- package/node_modules/chalk/source/utilities.js +0 -33
- package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -299
- package/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -261
- package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/node_modules/chalk/source/vendor/supports-color/browser.js +0 -32
- package/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/node_modules/chalk/source/vendor/supports-color/index.js +0 -206
- package/node_modules/cheerio/LICENSE +0 -21
- package/node_modules/cheerio/Readme.md +0 -229
- package/node_modules/cheerio/dist/browser/api/attributes.d.ts +0 -385
- package/node_modules/cheerio/dist/browser/api/attributes.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/api/attributes.js +0 -636
- package/node_modules/cheerio/dist/browser/api/attributes.js.map +0 -1
- package/node_modules/cheerio/dist/browser/api/css.d.ts +0 -42
- package/node_modules/cheerio/dist/browser/api/css.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/api/css.js +0 -116
- package/node_modules/cheerio/dist/browser/api/css.js.map +0 -1
- package/node_modules/cheerio/dist/browser/api/extract.d.ts +0 -27
- package/node_modules/cheerio/dist/browser/api/extract.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/api/extract.js +0 -42
- package/node_modules/cheerio/dist/browser/api/extract.js.map +0 -1
- package/node_modules/cheerio/dist/browser/api/forms.d.ts +0 -36
- package/node_modules/cheerio/dist/browser/api/forms.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/api/forms.js +0 -81
- package/node_modules/cheerio/dist/browser/api/forms.js.map +0 -1
- package/node_modules/cheerio/dist/browser/api/manipulation.d.ts +0 -528
- package/node_modules/cheerio/dist/browser/api/manipulation.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/api/manipulation.js +0 -831
- package/node_modules/cheerio/dist/browser/api/manipulation.js.map +0 -1
- package/node_modules/cheerio/dist/browser/api/traversing.d.ts +0 -657
- package/node_modules/cheerio/dist/browser/api/traversing.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/api/traversing.js +0 -857
- package/node_modules/cheerio/dist/browser/api/traversing.js.map +0 -1
- package/node_modules/cheerio/dist/browser/cheerio.d.ts +0 -85
- package/node_modules/cheerio/dist/browser/cheerio.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/cheerio.js +0 -58
- package/node_modules/cheerio/dist/browser/cheerio.js.map +0 -1
- package/node_modules/cheerio/dist/browser/index-browser.d.mts.map +0 -1
- package/node_modules/cheerio/dist/browser/index-browser.mjs.map +0 -1
- package/node_modules/cheerio/dist/browser/index.d.ts +0 -5
- package/node_modules/cheerio/dist/browser/index.js +0 -3
- package/node_modules/cheerio/dist/browser/load-parse.d.ts +0 -20
- package/node_modules/cheerio/dist/browser/load-parse.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/load-parse.js +0 -28
- package/node_modules/cheerio/dist/browser/load-parse.js.map +0 -1
- package/node_modules/cheerio/dist/browser/load.d.ts +0 -91
- package/node_modules/cheerio/dist/browser/load.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/load.js +0 -129
- package/node_modules/cheerio/dist/browser/load.js.map +0 -1
- package/node_modules/cheerio/dist/browser/options.d.ts +0 -98
- package/node_modules/cheerio/dist/browser/options.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/options.js +0 -34
- package/node_modules/cheerio/dist/browser/options.js.map +0 -1
- package/node_modules/cheerio/dist/browser/package.json +0 -3
- package/node_modules/cheerio/dist/browser/parse.d.ts +0 -18
- package/node_modules/cheerio/dist/browser/parse.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/parse.js +0 -73
- package/node_modules/cheerio/dist/browser/parse.js.map +0 -1
- package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts +0 -20
- package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js +0 -50
- package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js.map +0 -1
- package/node_modules/cheerio/dist/browser/slim.d.ts +0 -25
- package/node_modules/cheerio/dist/browser/slim.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/slim.js +0 -22
- package/node_modules/cheerio/dist/browser/slim.js.map +0 -1
- package/node_modules/cheerio/dist/browser/static.d.ts +0 -112
- package/node_modules/cheerio/dist/browser/static.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/static.js +0 -204
- package/node_modules/cheerio/dist/browser/static.js.map +0 -1
- package/node_modules/cheerio/dist/browser/types.d.ts +0 -21
- package/node_modules/cheerio/dist/browser/types.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/types.js +0 -3
- package/node_modules/cheerio/dist/browser/types.js.map +0 -1
- package/node_modules/cheerio/dist/browser/utils.d.ts +0 -55
- package/node_modules/cheerio/dist/browser/utils.d.ts.map +0 -1
- package/node_modules/cheerio/dist/browser/utils.js +0 -84
- package/node_modules/cheerio/dist/browser/utils.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/attributes.d.ts +0 -385
- package/node_modules/cheerio/dist/commonjs/api/attributes.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/attributes.js +0 -647
- package/node_modules/cheerio/dist/commonjs/api/attributes.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/css.d.ts +0 -42
- package/node_modules/cheerio/dist/commonjs/api/css.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/css.js +0 -119
- package/node_modules/cheerio/dist/commonjs/api/css.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/extract.d.ts +0 -27
- package/node_modules/cheerio/dist/commonjs/api/extract.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/extract.js +0 -45
- package/node_modules/cheerio/dist/commonjs/api/extract.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/forms.d.ts +0 -36
- package/node_modules/cheerio/dist/commonjs/api/forms.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/forms.js +0 -85
- package/node_modules/cheerio/dist/commonjs/api/forms.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts +0 -528
- package/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/manipulation.js +0 -850
- package/node_modules/cheerio/dist/commonjs/api/manipulation.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/traversing.d.ts +0 -657
- package/node_modules/cheerio/dist/commonjs/api/traversing.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/api/traversing.js +0 -914
- package/node_modules/cheerio/dist/commonjs/api/traversing.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/cheerio.d.ts +0 -85
- package/node_modules/cheerio/dist/commonjs/cheerio.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/cheerio.js +0 -95
- package/node_modules/cheerio/dist/commonjs/cheerio.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/index.d.ts +0 -104
- package/node_modules/cheerio/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/index.js +0 -250
- package/node_modules/cheerio/dist/commonjs/index.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/load-parse.d.ts +0 -20
- package/node_modules/cheerio/dist/commonjs/load-parse.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/load-parse.js +0 -34
- package/node_modules/cheerio/dist/commonjs/load-parse.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/load.d.ts +0 -91
- package/node_modules/cheerio/dist/commonjs/load.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/load.js +0 -165
- package/node_modules/cheerio/dist/commonjs/load.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/options.d.ts +0 -98
- package/node_modules/cheerio/dist/commonjs/options.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/options.js +0 -37
- package/node_modules/cheerio/dist/commonjs/options.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/package.json +0 -3
- package/node_modules/cheerio/dist/commonjs/parse.d.ts +0 -18
- package/node_modules/cheerio/dist/commonjs/parse.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/parse.js +0 -77
- package/node_modules/cheerio/dist/commonjs/parse.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts +0 -20
- package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js +0 -54
- package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/slim.d.ts +0 -25
- package/node_modules/cheerio/dist/commonjs/slim.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/slim.js +0 -30
- package/node_modules/cheerio/dist/commonjs/slim.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/static.d.ts +0 -112
- package/node_modules/cheerio/dist/commonjs/static.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/static.js +0 -214
- package/node_modules/cheerio/dist/commonjs/static.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/types.d.ts +0 -21
- package/node_modules/cheerio/dist/commonjs/types.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/types.js +0 -4
- package/node_modules/cheerio/dist/commonjs/types.js.map +0 -1
- package/node_modules/cheerio/dist/commonjs/utils.d.ts +0 -55
- package/node_modules/cheerio/dist/commonjs/utils.d.ts.map +0 -1
- package/node_modules/cheerio/dist/commonjs/utils.js +0 -91
- package/node_modules/cheerio/dist/commonjs/utils.js.map +0 -1
- package/node_modules/cheerio/dist/esm/api/attributes.d.ts +0 -385
- package/node_modules/cheerio/dist/esm/api/attributes.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/api/attributes.js +0 -636
- package/node_modules/cheerio/dist/esm/api/attributes.js.map +0 -1
- package/node_modules/cheerio/dist/esm/api/css.d.ts +0 -42
- package/node_modules/cheerio/dist/esm/api/css.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/api/css.js +0 -116
- package/node_modules/cheerio/dist/esm/api/css.js.map +0 -1
- package/node_modules/cheerio/dist/esm/api/extract.d.ts +0 -27
- package/node_modules/cheerio/dist/esm/api/extract.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/api/extract.js +0 -42
- package/node_modules/cheerio/dist/esm/api/extract.js.map +0 -1
- package/node_modules/cheerio/dist/esm/api/forms.d.ts +0 -36
- package/node_modules/cheerio/dist/esm/api/forms.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/api/forms.js +0 -81
- package/node_modules/cheerio/dist/esm/api/forms.js.map +0 -1
- package/node_modules/cheerio/dist/esm/api/manipulation.d.ts +0 -528
- package/node_modules/cheerio/dist/esm/api/manipulation.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/api/manipulation.js +0 -831
- package/node_modules/cheerio/dist/esm/api/manipulation.js.map +0 -1
- package/node_modules/cheerio/dist/esm/api/traversing.d.ts +0 -657
- package/node_modules/cheerio/dist/esm/api/traversing.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/api/traversing.js +0 -857
- package/node_modules/cheerio/dist/esm/api/traversing.js.map +0 -1
- package/node_modules/cheerio/dist/esm/cheerio.d.ts +0 -85
- package/node_modules/cheerio/dist/esm/cheerio.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/cheerio.js +0 -58
- package/node_modules/cheerio/dist/esm/cheerio.js.map +0 -1
- package/node_modules/cheerio/dist/esm/index.d.ts +0 -104
- package/node_modules/cheerio/dist/esm/index.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/index.js +0 -202
- package/node_modules/cheerio/dist/esm/index.js.map +0 -1
- package/node_modules/cheerio/dist/esm/load-parse.d.ts +0 -20
- package/node_modules/cheerio/dist/esm/load-parse.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/load-parse.js +0 -28
- package/node_modules/cheerio/dist/esm/load-parse.js.map +0 -1
- package/node_modules/cheerio/dist/esm/load.d.ts +0 -91
- package/node_modules/cheerio/dist/esm/load.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/load.js +0 -129
- package/node_modules/cheerio/dist/esm/load.js.map +0 -1
- package/node_modules/cheerio/dist/esm/options.d.ts +0 -98
- package/node_modules/cheerio/dist/esm/options.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/options.js +0 -34
- package/node_modules/cheerio/dist/esm/options.js.map +0 -1
- package/node_modules/cheerio/dist/esm/package.json +0 -3
- package/node_modules/cheerio/dist/esm/parse.d.ts +0 -18
- package/node_modules/cheerio/dist/esm/parse.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/parse.js +0 -73
- package/node_modules/cheerio/dist/esm/parse.js.map +0 -1
- package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts +0 -20
- package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js +0 -50
- package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js.map +0 -1
- package/node_modules/cheerio/dist/esm/slim.d.ts +0 -25
- package/node_modules/cheerio/dist/esm/slim.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/slim.js +0 -22
- package/node_modules/cheerio/dist/esm/slim.js.map +0 -1
- package/node_modules/cheerio/dist/esm/static.d.ts +0 -112
- package/node_modules/cheerio/dist/esm/static.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/static.js +0 -204
- package/node_modules/cheerio/dist/esm/static.js.map +0 -1
- package/node_modules/cheerio/dist/esm/types.d.ts +0 -21
- package/node_modules/cheerio/dist/esm/types.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/types.js +0 -3
- package/node_modules/cheerio/dist/esm/types.js.map +0 -1
- package/node_modules/cheerio/dist/esm/utils.d.ts +0 -55
- package/node_modules/cheerio/dist/esm/utils.d.ts.map +0 -1
- package/node_modules/cheerio/dist/esm/utils.js +0 -84
- package/node_modules/cheerio/dist/esm/utils.js.map +0 -1
- package/node_modules/cheerio/node_modules/undici/LICENSE +0 -21
- package/node_modules/cheerio/node_modules/undici/README.md +0 -741
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Agent.md +0 -84
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/CacheStore.md +0 -164
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Client.md +0 -285
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Connector.md +0 -115
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/ContentType.md +0 -57
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Cookies.md +0 -101
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Debug.md +0 -62
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -315
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1392
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Errors.md +0 -49
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/EventSource.md +0 -45
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Fetch.md +0 -60
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -139
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/H2CClient.md +0 -263
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockClient.md +0 -81
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockPool.md +0 -555
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Pool.md +0 -84
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -229
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -93
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/RetryAgent.md +0 -50
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/RetryHandler.md +0 -118
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -145
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -616
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -274
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/Util.md +0 -25
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/WebSocket.md +0 -141
- package/node_modules/cheerio/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
- package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
- package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/crawling.md +0 -58
- package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
- package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
- package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -224
- package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -63
- package/node_modules/cheerio/node_modules/undici/index-fetch.js +0 -65
- package/node_modules/cheerio/node_modules/undici/index.d.ts +0 -3
- package/node_modules/cheerio/node_modules/undici/index.js +0 -234
- package/node_modules/cheerio/node_modules/undici/lib/api/abort-signal.js +0 -59
- package/node_modules/cheerio/node_modules/undici/lib/api/api-connect.js +0 -110
- package/node_modules/cheerio/node_modules/undici/lib/api/api-pipeline.js +0 -252
- package/node_modules/cheerio/node_modules/undici/lib/api/api-request.js +0 -214
- package/node_modules/cheerio/node_modules/undici/lib/api/api-stream.js +0 -209
- package/node_modules/cheerio/node_modules/undici/lib/api/api-upgrade.js +0 -111
- package/node_modules/cheerio/node_modules/undici/lib/api/index.js +0 -7
- package/node_modules/cheerio/node_modules/undici/lib/api/readable.js +0 -580
- package/node_modules/cheerio/node_modules/undici/lib/cache/memory-cache-store.js +0 -234
- package/node_modules/cheerio/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -461
- package/node_modules/cheerio/node_modules/undici/lib/core/connect.js +0 -153
- package/node_modules/cheerio/node_modules/undici/lib/core/constants.js +0 -143
- package/node_modules/cheerio/node_modules/undici/lib/core/diagnostics.js +0 -227
- package/node_modules/cheerio/node_modules/undici/lib/core/errors.js +0 -477
- package/node_modules/cheerio/node_modules/undici/lib/core/request.js +0 -453
- package/node_modules/cheerio/node_modules/undici/lib/core/socks5-client.js +0 -412
- package/node_modules/cheerio/node_modules/undici/lib/core/socks5-utils.js +0 -198
- package/node_modules/cheerio/node_modules/undici/lib/core/symbols.js +0 -75
- package/node_modules/cheerio/node_modules/undici/lib/core/tree.js +0 -160
- package/node_modules/cheerio/node_modules/undici/lib/core/util.js +0 -992
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/agent.js +0 -158
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h1.js +0 -1654
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/client.js +0 -663
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -165
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool.js +0 -118
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -318
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
- package/node_modules/cheerio/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -249
- package/node_modules/cheerio/node_modules/undici/lib/encoding/index.js +0 -33
- package/node_modules/cheerio/node_modules/undici/lib/global.js +0 -50
- package/node_modules/cheerio/node_modules/undici/lib/handler/cache-handler.js +0 -578
- package/node_modules/cheerio/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
- package/node_modules/cheerio/node_modules/undici/lib/handler/decorator-handler.js +0 -67
- package/node_modules/cheerio/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
- package/node_modules/cheerio/node_modules/undici/lib/handler/redirect-handler.js +0 -238
- package/node_modules/cheerio/node_modules/undici/lib/handler/retry-handler.js +0 -394
- package/node_modules/cheerio/node_modules/undici/lib/handler/unwrap-handler.js +0 -100
- package/node_modules/cheerio/node_modules/undici/lib/handler/wrap-handler.js +0 -105
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/cache.js +0 -495
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/decompress.js +0 -259
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/dns.js +0 -571
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/dump.js +0 -112
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/redirect.js +0 -21
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/response-error.js +0 -95
- package/node_modules/cheerio/node_modules/undici/lib/interceptor/retry.js +0 -19
- package/node_modules/cheerio/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/cheerio/node_modules/undici/lib/llhttp/constants.d.ts +0 -195
- package/node_modules/cheerio/node_modules/undici/lib/llhttp/constants.js +0 -531
- package/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
- package/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
- package/node_modules/cheerio/node_modules/undici/lib/llhttp/utils.d.ts +0 -2
- package/node_modules/cheerio/node_modules/undici/lib/llhttp/utils.js +0 -12
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-agent.js +0 -232
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-call-history.js +0 -248
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-client.js +0 -68
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-errors.js +0 -29
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-pool.js +0 -68
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-symbols.js +0 -32
- package/node_modules/cheerio/node_modules/undici/lib/mock/mock-utils.js +0 -486
- package/node_modules/cheerio/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
- package/node_modules/cheerio/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
- package/node_modules/cheerio/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
- package/node_modules/cheerio/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
- package/node_modules/cheerio/node_modules/undici/lib/util/cache.js +0 -408
- package/node_modules/cheerio/node_modules/undici/lib/util/date.js +0 -653
- package/node_modules/cheerio/node_modules/undici/lib/util/promise.js +0 -28
- package/node_modules/cheerio/node_modules/undici/lib/util/runtime-features.js +0 -124
- package/node_modules/cheerio/node_modules/undici/lib/util/stats.js +0 -32
- package/node_modules/cheerio/node_modules/undici/lib/util/timers.js +0 -425
- package/node_modules/cheerio/node_modules/undici/lib/web/cache/cache.js +0 -864
- package/node_modules/cheerio/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
- package/node_modules/cheerio/node_modules/undici/lib/web/cache/util.js +0 -45
- package/node_modules/cheerio/node_modules/undici/lib/web/cookies/constants.js +0 -12
- package/node_modules/cheerio/node_modules/undici/lib/web/cookies/index.js +0 -199
- package/node_modules/cheerio/node_modules/undici/lib/web/cookies/parse.js +0 -322
- package/node_modules/cheerio/node_modules/undici/lib/web/cookies/util.js +0 -282
- package/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
- package/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
- package/node_modules/cheerio/node_modules/undici/lib/web/eventsource/util.js +0 -29
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/LICENSE +0 -21
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/body.js +0 -509
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/constants.js +0 -131
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/data-url.js +0 -596
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata.js +0 -259
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/global.js +0 -40
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/headers.js +0 -719
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js +0 -2413
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/request.js +0 -1115
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js +0 -641
- package/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js +0 -1522
- package/node_modules/cheerio/node_modules/undici/lib/web/infra/index.js +0 -229
- package/node_modules/cheerio/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
- package/node_modules/cheerio/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
- package/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js +0 -1006
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/connection.js +0 -329
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/constants.js +0 -126
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/events.js +0 -331
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/frame.js +0 -133
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -118
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/receiver.js +0 -450
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/sender.js +0 -109
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -491
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/util.js +0 -347
- package/node_modules/cheerio/node_modules/undici/lib/web/websocket/websocket.js +0 -751
- package/node_modules/cheerio/node_modules/undici/package.json +0 -152
- package/node_modules/cheerio/node_modules/undici/scripts/strip-comments.js +0 -10
- package/node_modules/cheerio/node_modules/undici/types/README.md +0 -6
- package/node_modules/cheerio/node_modules/undici/types/agent.d.ts +0 -32
- package/node_modules/cheerio/node_modules/undici/types/api.d.ts +0 -43
- package/node_modules/cheerio/node_modules/undici/types/balanced-pool.d.ts +0 -30
- package/node_modules/cheerio/node_modules/undici/types/cache-interceptor.d.ts +0 -179
- package/node_modules/cheerio/node_modules/undici/types/cache.d.ts +0 -36
- package/node_modules/cheerio/node_modules/undici/types/client-stats.d.ts +0 -15
- package/node_modules/cheerio/node_modules/undici/types/client.d.ts +0 -123
- package/node_modules/cheerio/node_modules/undici/types/connector.d.ts +0 -36
- package/node_modules/cheerio/node_modules/undici/types/content-type.d.ts +0 -21
- package/node_modules/cheerio/node_modules/undici/types/cookies.d.ts +0 -30
- package/node_modules/cheerio/node_modules/undici/types/diagnostics-channel.d.ts +0 -74
- package/node_modules/cheerio/node_modules/undici/types/dispatcher.d.ts +0 -273
- package/node_modules/cheerio/node_modules/undici/types/env-http-proxy-agent.d.ts +0 -22
- package/node_modules/cheerio/node_modules/undici/types/errors.d.ts +0 -177
- package/node_modules/cheerio/node_modules/undici/types/eventsource.d.ts +0 -66
- package/node_modules/cheerio/node_modules/undici/types/fetch.d.ts +0 -231
- package/node_modules/cheerio/node_modules/undici/types/formdata.d.ts +0 -114
- package/node_modules/cheerio/node_modules/undici/types/global-dispatcher.d.ts +0 -9
- package/node_modules/cheerio/node_modules/undici/types/global-origin.d.ts +0 -7
- package/node_modules/cheerio/node_modules/undici/types/h2c-client.d.ts +0 -73
- package/node_modules/cheerio/node_modules/undici/types/handlers.d.ts +0 -14
- package/node_modules/cheerio/node_modules/undici/types/header.d.ts +0 -160
- package/node_modules/cheerio/node_modules/undici/types/index.d.ts +0 -91
- package/node_modules/cheerio/node_modules/undici/types/interceptors.d.ts +0 -80
- package/node_modules/cheerio/node_modules/undici/types/mock-agent.d.ts +0 -68
- package/node_modules/cheerio/node_modules/undici/types/mock-call-history.d.ts +0 -111
- package/node_modules/cheerio/node_modules/undici/types/mock-client.d.ts +0 -27
- package/node_modules/cheerio/node_modules/undici/types/mock-errors.d.ts +0 -12
- package/node_modules/cheerio/node_modules/undici/types/mock-interceptor.d.ts +0 -94
- package/node_modules/cheerio/node_modules/undici/types/mock-pool.d.ts +0 -27
- package/node_modules/cheerio/node_modules/undici/types/patch.d.ts +0 -29
- package/node_modules/cheerio/node_modules/undici/types/pool-stats.d.ts +0 -19
- package/node_modules/cheerio/node_modules/undici/types/pool.d.ts +0 -41
- package/node_modules/cheerio/node_modules/undici/types/proxy-agent.d.ts +0 -29
- package/node_modules/cheerio/node_modules/undici/types/readable.d.ts +0 -68
- package/node_modules/cheerio/node_modules/undici/types/retry-agent.d.ts +0 -8
- package/node_modules/cheerio/node_modules/undici/types/retry-handler.d.ts +0 -125
- package/node_modules/cheerio/node_modules/undici/types/round-robin-pool.d.ts +0 -41
- package/node_modules/cheerio/node_modules/undici/types/snapshot-agent.d.ts +0 -109
- package/node_modules/cheerio/node_modules/undici/types/socks5-proxy-agent.d.ts +0 -25
- package/node_modules/cheerio/node_modules/undici/types/util.d.ts +0 -18
- package/node_modules/cheerio/node_modules/undici/types/utility.d.ts +0 -7
- package/node_modules/cheerio/node_modules/undici/types/webidl.d.ts +0 -347
- package/node_modules/cheerio/node_modules/undici/types/websocket.d.ts +0 -188
- package/node_modules/cheerio/package.json +0 -182
- package/node_modules/cheerio/src/api/attributes.ts +0 -1145
- package/node_modules/cheerio/src/api/css.ts +0 -224
- package/node_modules/cheerio/src/api/extract.ts +0 -92
- package/node_modules/cheerio/src/api/forms.ts +0 -103
- package/node_modules/cheerio/src/api/manipulation.ts +0 -1115
- package/node_modules/cheerio/src/api/traversing.ts +0 -1175
- package/node_modules/cheerio/src/cheerio.ts +0 -143
- package/node_modules/cheerio/src/index-browser.mts +0 -10
- package/node_modules/cheerio/src/index.ts +0 -294
- package/node_modules/cheerio/src/load-parse.ts +0 -39
- package/node_modules/cheerio/src/load.ts +0 -282
- package/node_modules/cheerio/src/options.ts +0 -136
- package/node_modules/cheerio/src/parse.ts +0 -105
- package/node_modules/cheerio/src/parsers/parse5-adapter.ts +0 -66
- package/node_modules/cheerio/src/slim.ts +0 -33
- package/node_modules/cheerio/src/static.ts +0 -312
- package/node_modules/cheerio/src/types.ts +0 -58
- package/node_modules/cheerio/src/utils.ts +0 -99
- package/node_modules/cheerio-select/README.md +0 -18
- package/node_modules/cheerio-select/lib/esm/helpers.d.ts +0 -5
- package/node_modules/cheerio-select/lib/esm/helpers.d.ts.map +0 -1
- package/node_modules/cheerio-select/lib/esm/helpers.js +0 -20
- package/node_modules/cheerio-select/lib/esm/helpers.js.map +0 -1
- package/node_modules/cheerio-select/lib/esm/index.d.ts +0 -12
- package/node_modules/cheerio-select/lib/esm/index.d.ts.map +0 -1
- package/node_modules/cheerio-select/lib/esm/index.js +0 -241
- package/node_modules/cheerio-select/lib/esm/index.js.map +0 -1
- package/node_modules/cheerio-select/lib/esm/package.json +0 -1
- package/node_modules/cheerio-select/lib/esm/positionals.d.ts +0 -10
- package/node_modules/cheerio-select/lib/esm/positionals.d.ts.map +0 -1
- package/node_modules/cheerio-select/lib/esm/positionals.js +0 -47
- package/node_modules/cheerio-select/lib/esm/positionals.js.map +0 -1
- package/node_modules/cheerio-select/lib/helpers.d.ts +0 -5
- package/node_modules/cheerio-select/lib/helpers.d.ts.map +0 -1
- package/node_modules/cheerio-select/lib/helpers.js +0 -26
- package/node_modules/cheerio-select/lib/helpers.js.map +0 -1
- package/node_modules/cheerio-select/lib/index.d.ts +0 -12
- package/node_modules/cheerio-select/lib/index.d.ts.map +0 -1
- package/node_modules/cheerio-select/lib/index.js +0 -302
- package/node_modules/cheerio-select/lib/index.js.map +0 -1
- package/node_modules/cheerio-select/lib/positionals.d.ts +0 -10
- package/node_modules/cheerio-select/lib/positionals.d.ts.map +0 -1
- package/node_modules/cheerio-select/lib/positionals.js +0 -52
- package/node_modules/cheerio-select/lib/positionals.js.map +0 -1
- package/node_modules/cheerio-select/package.json +0 -76
- package/node_modules/colorette/LICENSE.md +0 -7
- package/node_modules/colorette/README.md +0 -134
- package/node_modules/colorette/index.cjs +0 -218
- package/node_modules/colorette/index.d.ts +0 -93
- package/node_modules/colorette/index.js +0 -150
- package/node_modules/colorette/package.json +0 -40
- package/node_modules/css-select/README.md +0 -264
- package/node_modules/css-select/lib/attributes.d.ts +0 -7
- package/node_modules/css-select/lib/attributes.d.ts.map +0 -1
- package/node_modules/css-select/lib/attributes.js +0 -236
- package/node_modules/css-select/lib/attributes.js.map +0 -1
- package/node_modules/css-select/lib/compile.d.ts +0 -13
- package/node_modules/css-select/lib/compile.d.ts.map +0 -1
- package/node_modules/css-select/lib/compile.js +0 -151
- package/node_modules/css-select/lib/compile.js.map +0 -1
- package/node_modules/css-select/lib/esm/attributes.d.ts +0 -7
- package/node_modules/css-select/lib/esm/attributes.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/attributes.js +0 -222
- package/node_modules/css-select/lib/esm/attributes.js.map +0 -1
- package/node_modules/css-select/lib/esm/compile.d.ts +0 -13
- package/node_modules/css-select/lib/esm/compile.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/compile.js +0 -115
- package/node_modules/css-select/lib/esm/compile.js.map +0 -1
- package/node_modules/css-select/lib/esm/general.d.ts +0 -3
- package/node_modules/css-select/lib/esm/general.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/general.js +0 -144
- package/node_modules/css-select/lib/esm/general.js.map +0 -1
- package/node_modules/css-select/lib/esm/index.d.ts +0 -50
- package/node_modules/css-select/lib/esm/index.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/index.js +0 -115
- package/node_modules/css-select/lib/esm/index.js.map +0 -1
- package/node_modules/css-select/lib/esm/package.json +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts +0 -5
- package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js +0 -35
- package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts +0 -4
- package/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/filters.js +0 -143
- package/node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts +0 -8
- package/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/index.js +0 -40
- package/node_modules/css-select/lib/esm/pseudo-selectors/index.js.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts +0 -6
- package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js +0 -79
- package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts +0 -9
- package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js +0 -94
- package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map +0 -1
- package/node_modules/css-select/lib/esm/sort.d.ts +0 -12
- package/node_modules/css-select/lib/esm/sort.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/sort.js +0 -79
- package/node_modules/css-select/lib/esm/sort.js.map +0 -1
- package/node_modules/css-select/lib/esm/types.d.ts +0 -167
- package/node_modules/css-select/lib/esm/types.d.ts.map +0 -1
- package/node_modules/css-select/lib/esm/types.js +0 -2
- package/node_modules/css-select/lib/esm/types.js.map +0 -1
- package/node_modules/css-select/lib/general.d.ts +0 -3
- package/node_modules/css-select/lib/general.d.ts.map +0 -1
- package/node_modules/css-select/lib/general.js +0 -148
- package/node_modules/css-select/lib/general.js.map +0 -1
- package/node_modules/css-select/lib/index.d.ts +0 -50
- package/node_modules/css-select/lib/index.d.ts.map +0 -1
- package/node_modules/css-select/lib/index.js +0 -154
- package/node_modules/css-select/lib/index.js.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts +0 -5
- package/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/aliases.js +0 -34
- package/node_modules/css-select/lib/pseudo-selectors/aliases.js.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/filters.d.ts +0 -4
- package/node_modules/css-select/lib/pseudo-selectors/filters.d.ts.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/filters.js +0 -157
- package/node_modules/css-select/lib/pseudo-selectors/filters.js.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/index.d.ts +0 -8
- package/node_modules/css-select/lib/pseudo-selectors/index.d.ts.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/index.js +0 -46
- package/node_modules/css-select/lib/pseudo-selectors/index.js.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts +0 -6
- package/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/pseudos.js +0 -93
- package/node_modules/css-select/lib/pseudo-selectors/pseudos.js.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts +0 -9
- package/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts.map +0 -1
- package/node_modules/css-select/lib/pseudo-selectors/subselects.js +0 -112
- package/node_modules/css-select/lib/pseudo-selectors/subselects.js.map +0 -1
- package/node_modules/css-select/lib/sort.d.ts +0 -12
- package/node_modules/css-select/lib/sort.d.ts.map +0 -1
- package/node_modules/css-select/lib/sort.js +0 -84
- package/node_modules/css-select/lib/sort.js.map +0 -1
- package/node_modules/css-select/lib/types.d.ts +0 -167
- package/node_modules/css-select/lib/types.d.ts.map +0 -1
- package/node_modules/css-select/lib/types.js +0 -3
- package/node_modules/css-select/lib/types.js.map +0 -1
- package/node_modules/css-select/package.json +0 -81
- package/node_modules/css-what/lib/commonjs/index.d.ts +0 -4
- package/node_modules/css-what/lib/commonjs/index.d.ts.map +0 -1
- package/node_modules/css-what/lib/commonjs/index.js +0 -23
- package/node_modules/css-what/lib/commonjs/parse.d.ts +0 -20
- package/node_modules/css-what/lib/commonjs/parse.d.ts.map +0 -1
- package/node_modules/css-what/lib/commonjs/parse.js +0 -425
- package/node_modules/css-what/lib/commonjs/stringify.d.ts +0 -8
- package/node_modules/css-what/lib/commonjs/stringify.d.ts.map +0 -1
- package/node_modules/css-what/lib/commonjs/stringify.js +0 -138
- package/node_modules/css-what/lib/commonjs/types.d.ts +0 -70
- package/node_modules/css-what/lib/commonjs/types.d.ts.map +0 -1
- package/node_modules/css-what/lib/commonjs/types.js +0 -42
- package/node_modules/css-what/lib/es/index.d.ts +0 -4
- package/node_modules/css-what/lib/es/index.d.ts.map +0 -1
- package/node_modules/css-what/lib/es/index.js +0 -3
- package/node_modules/css-what/lib/es/parse.d.ts +0 -20
- package/node_modules/css-what/lib/es/parse.d.ts.map +0 -1
- package/node_modules/css-what/lib/es/parse.js +0 -420
- package/node_modules/css-what/lib/es/stringify.d.ts +0 -8
- package/node_modules/css-what/lib/es/stringify.d.ts.map +0 -1
- package/node_modules/css-what/lib/es/stringify.js +0 -126
- package/node_modules/css-what/lib/es/types.d.ts +0 -70
- package/node_modules/css-what/lib/es/types.d.ts.map +0 -1
- package/node_modules/css-what/lib/es/types.js +0 -39
- package/node_modules/css-what/package.json +0 -59
- package/node_modules/css-what/readme.md +0 -69
- package/node_modules/dom-serializer/LICENSE +0 -11
- package/node_modules/dom-serializer/README.md +0 -109
- package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts +0 -3
- package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/esm/foreignNames.js +0 -100
- package/node_modules/dom-serializer/lib/esm/index.d.ts +0 -52
- package/node_modules/dom-serializer/lib/esm/index.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/esm/index.js +0 -190
- package/node_modules/dom-serializer/lib/esm/package.json +0 -1
- package/node_modules/dom-serializer/lib/foreignNames.d.ts +0 -3
- package/node_modules/dom-serializer/lib/foreignNames.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/foreignNames.js +0 -103
- package/node_modules/dom-serializer/lib/index.d.ts +0 -52
- package/node_modules/dom-serializer/lib/index.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/index.js +0 -229
- package/node_modules/dom-serializer/package.json +0 -69
- package/node_modules/domelementtype/LICENSE +0 -11
- package/node_modules/domelementtype/lib/esm/index.d.ts +0 -48
- package/node_modules/domelementtype/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domelementtype/lib/esm/index.js +0 -51
- package/node_modules/domelementtype/lib/esm/package.json +0 -1
- package/node_modules/domelementtype/lib/index.d.ts +0 -48
- package/node_modules/domelementtype/lib/index.d.ts.map +0 -1
- package/node_modules/domelementtype/lib/index.js +0 -55
- package/node_modules/domelementtype/package.json +0 -54
- package/node_modules/domhandler/LICENSE +0 -11
- package/node_modules/domhandler/lib/esm/index.d.ts +0 -76
- package/node_modules/domhandler/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domhandler/lib/esm/index.js +0 -146
- package/node_modules/domhandler/lib/esm/node.d.ts +0 -245
- package/node_modules/domhandler/lib/esm/node.d.ts.map +0 -1
- package/node_modules/domhandler/lib/esm/node.js +0 -338
- package/node_modules/domhandler/lib/esm/package.json +0 -1
- package/node_modules/domhandler/lib/index.d.ts +0 -76
- package/node_modules/domhandler/lib/index.d.ts.map +0 -1
- package/node_modules/domhandler/lib/index.js +0 -165
- package/node_modules/domhandler/lib/node.d.ts +0 -245
- package/node_modules/domhandler/lib/node.d.ts.map +0 -1
- package/node_modules/domhandler/lib/node.js +0 -474
- package/node_modules/domhandler/package.json +0 -73
- package/node_modules/domhandler/readme.md +0 -92
- package/node_modules/domutils/LICENSE +0 -11
- package/node_modules/domutils/lib/esm/feeds.d.ts +0 -71
- package/node_modules/domutils/lib/esm/feeds.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/feeds.js +0 -183
- package/node_modules/domutils/lib/esm/feeds.js.map +0 -1
- package/node_modules/domutils/lib/esm/helpers.d.ts +0 -59
- package/node_modules/domutils/lib/esm/helpers.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/helpers.js +0 -136
- package/node_modules/domutils/lib/esm/helpers.js.map +0 -1
- package/node_modules/domutils/lib/esm/index.d.ts +0 -10
- package/node_modules/domutils/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/index.js +0 -10
- package/node_modules/domutils/lib/esm/index.js.map +0 -1
- package/node_modules/domutils/lib/esm/legacy.d.ts +0 -79
- package/node_modules/domutils/lib/esm/legacy.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/legacy.js +0 -152
- package/node_modules/domutils/lib/esm/legacy.js.map +0 -1
- package/node_modules/domutils/lib/esm/manipulation.d.ts +0 -49
- package/node_modules/domutils/lib/esm/manipulation.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/manipulation.js +0 -134
- package/node_modules/domutils/lib/esm/manipulation.js.map +0 -1
- package/node_modules/domutils/lib/esm/package.json +0 -1
- package/node_modules/domutils/lib/esm/querying.d.ts +0 -64
- package/node_modules/domutils/lib/esm/querying.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/querying.js +0 -142
- package/node_modules/domutils/lib/esm/querying.js.map +0 -1
- package/node_modules/domutils/lib/esm/stringify.d.ts +0 -46
- package/node_modules/domutils/lib/esm/stringify.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/stringify.js +0 -81
- package/node_modules/domutils/lib/esm/stringify.js.map +0 -1
- package/node_modules/domutils/lib/esm/traversal.d.ts +0 -67
- package/node_modules/domutils/lib/esm/traversal.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/traversal.js +0 -112
- package/node_modules/domutils/lib/esm/traversal.js.map +0 -1
- package/node_modules/domutils/lib/feeds.d.ts +0 -71
- package/node_modules/domutils/lib/feeds.d.ts.map +0 -1
- package/node_modules/domutils/lib/feeds.js +0 -190
- package/node_modules/domutils/lib/feeds.js.map +0 -1
- package/node_modules/domutils/lib/helpers.d.ts +0 -59
- package/node_modules/domutils/lib/helpers.d.ts.map +0 -1
- package/node_modules/domutils/lib/helpers.js +0 -142
- package/node_modules/domutils/lib/helpers.js.map +0 -1
- package/node_modules/domutils/lib/index.d.ts +0 -10
- package/node_modules/domutils/lib/index.d.ts.map +0 -1
- package/node_modules/domutils/lib/index.js +0 -33
- package/node_modules/domutils/lib/index.js.map +0 -1
- package/node_modules/domutils/lib/legacy.d.ts +0 -79
- package/node_modules/domutils/lib/legacy.d.ts.map +0 -1
- package/node_modules/domutils/lib/legacy.js +0 -168
- package/node_modules/domutils/lib/legacy.js.map +0 -1
- package/node_modules/domutils/lib/manipulation.d.ts +0 -49
- package/node_modules/domutils/lib/manipulation.d.ts.map +0 -1
- package/node_modules/domutils/lib/manipulation.js +0 -142
- package/node_modules/domutils/lib/manipulation.js.map +0 -1
- package/node_modules/domutils/lib/querying.d.ts +0 -64
- package/node_modules/domutils/lib/querying.d.ts.map +0 -1
- package/node_modules/domutils/lib/querying.js +0 -155
- package/node_modules/domutils/lib/querying.js.map +0 -1
- package/node_modules/domutils/lib/stringify.d.ts +0 -46
- package/node_modules/domutils/lib/stringify.d.ts.map +0 -1
- package/node_modules/domutils/lib/stringify.js +0 -91
- package/node_modules/domutils/lib/stringify.js.map +0 -1
- package/node_modules/domutils/lib/traversal.d.ts +0 -67
- package/node_modules/domutils/lib/traversal.d.ts.map +0 -1
- package/node_modules/domutils/lib/traversal.js +0 -125
- package/node_modules/domutils/lib/traversal.js.map +0 -1
- package/node_modules/domutils/package.json +0 -79
- package/node_modules/domutils/readme.md +0 -31
- package/node_modules/encoding-sniffer/LICENSE +0 -18
- package/node_modules/encoding-sniffer/README.md +0 -68
- package/node_modules/encoding-sniffer/dist/commonjs/index.d.ts +0 -31
- package/node_modules/encoding-sniffer/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/encoding-sniffer/dist/commonjs/index.js +0 -72
- package/node_modules/encoding-sniffer/dist/commonjs/index.js.map +0 -1
- package/node_modules/encoding-sniffer/dist/commonjs/package.json +0 -3
- package/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts +0 -148
- package/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts.map +0 -1
- package/node_modules/encoding-sniffer/dist/commonjs/sniffer.js +0 -990
- package/node_modules/encoding-sniffer/dist/commonjs/sniffer.js.map +0 -1
- package/node_modules/encoding-sniffer/dist/esm/index.d.ts +0 -31
- package/node_modules/encoding-sniffer/dist/esm/index.d.ts.map +0 -1
- package/node_modules/encoding-sniffer/dist/esm/index.js +0 -63
- package/node_modules/encoding-sniffer/dist/esm/index.js.map +0 -1
- package/node_modules/encoding-sniffer/dist/esm/package.json +0 -3
- package/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts +0 -148
- package/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts.map +0 -1
- package/node_modules/encoding-sniffer/dist/esm/sniffer.js +0 -985
- package/node_modules/encoding-sniffer/dist/esm/sniffer.js.map +0 -1
- package/node_modules/encoding-sniffer/package.json +0 -94
- package/node_modules/encoding-sniffer/sniffer.d.ts +0 -2
- package/node_modules/encoding-sniffer/sniffer.js +0 -3
- package/node_modules/entities/LICENSE +0 -11
- package/node_modules/entities/lib/decode.d.ts +0 -211
- package/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/node_modules/entities/lib/decode.js +0 -536
- package/node_modules/entities/lib/decode.js.map +0 -1
- package/node_modules/entities/lib/decode_codepoint.d.ts +0 -19
- package/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/node_modules/entities/lib/decode_codepoint.js +0 -76
- package/node_modules/entities/lib/decode_codepoint.js.map +0 -1
- package/node_modules/entities/lib/encode.d.ts +0 -22
- package/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/node_modules/entities/lib/encode.js +0 -77
- package/node_modules/entities/lib/encode.js.map +0 -1
- package/node_modules/entities/lib/escape.d.ts +0 -43
- package/node_modules/entities/lib/escape.d.ts.map +0 -1
- package/node_modules/entities/lib/escape.js +0 -122
- package/node_modules/entities/lib/escape.js.map +0 -1
- package/node_modules/entities/lib/esm/decode.d.ts +0 -211
- package/node_modules/entities/lib/esm/decode.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/decode.js +0 -496
- package/node_modules/entities/lib/esm/decode.js.map +0 -1
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts +0 -19
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/decode_codepoint.js +0 -71
- package/node_modules/entities/lib/esm/decode_codepoint.js.map +0 -1
- package/node_modules/entities/lib/esm/encode.d.ts +0 -22
- package/node_modules/entities/lib/esm/encode.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/encode.js +0 -69
- package/node_modules/entities/lib/esm/encode.js.map +0 -1
- package/node_modules/entities/lib/esm/escape.d.ts +0 -43
- package/node_modules/entities/lib/esm/escape.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/escape.js +0 -116
- package/node_modules/entities/lib/esm/escape.js.map +0 -1
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +0 -3
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +0 -1
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +0 -3
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +0 -1
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts +0 -8
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/generated/encode-html.js +0 -10
- package/node_modules/entities/lib/esm/generated/encode-html.js.map +0 -1
- package/node_modules/entities/lib/esm/index.d.ts +0 -96
- package/node_modules/entities/lib/esm/index.d.ts.map +0 -1
- package/node_modules/entities/lib/esm/index.js +0 -99
- package/node_modules/entities/lib/esm/index.js.map +0 -1
- package/node_modules/entities/lib/esm/package.json +0 -1
- package/node_modules/entities/lib/generated/decode-data-html.d.ts +0 -3
- package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts +0 -3
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
- package/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
- package/node_modules/entities/lib/generated/encode-html.d.ts +0 -8
- package/node_modules/entities/lib/generated/encode-html.d.ts.map +0 -1
- package/node_modules/entities/lib/generated/encode-html.js +0 -12
- package/node_modules/entities/lib/generated/encode-html.js.map +0 -1
- package/node_modules/entities/lib/index.d.ts +0 -96
- package/node_modules/entities/lib/index.d.ts.map +0 -1
- package/node_modules/entities/lib/index.js +0 -126
- package/node_modules/entities/lib/index.js.map +0 -1
- package/node_modules/entities/package.json +0 -90
- package/node_modules/entities/readme.md +0 -122
- package/node_modules/eventemitter3/LICENSE +0 -21
- package/node_modules/eventemitter3/README.md +0 -94
- package/node_modules/eventemitter3/dist/eventemitter3.esm.js +0 -347
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +0 -1
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +0 -1
- package/node_modules/eventemitter3/dist/eventemitter3.umd.js +0 -355
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +0 -1
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +0 -1
- package/node_modules/eventemitter3/index.d.ts +0 -135
- package/node_modules/eventemitter3/index.js +0 -336
- package/node_modules/eventemitter3/index.mjs +0 -4
- package/node_modules/eventemitter3/package.json +0 -67
- package/node_modules/figures/index.d.ts +0 -279
- package/node_modules/figures/index.js +0 -292
- package/node_modules/figures/package.json +0 -49
- package/node_modules/figures/readme.md +0 -337
- package/node_modules/htmlparser2/WritableStream.js +0 -3
- package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts +0 -198
- package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Parser.js +0 -527
- package/node_modules/htmlparser2/dist/commonjs/Parser.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts +0 -126
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +0 -805
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts +0 -15
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.js +0 -36
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/index.d.ts +0 -54
- package/node_modules/htmlparser2/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/index.js +0 -123
- package/node_modules/htmlparser2/dist/commonjs/index.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/package.json +0 -3
- package/node_modules/htmlparser2/dist/esm/Parser.d.ts +0 -198
- package/node_modules/htmlparser2/dist/esm/Parser.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Parser.js +0 -490
- package/node_modules/htmlparser2/dist/esm/Parser.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts +0 -126
- package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Tokenizer.js +0 -801
- package/node_modules/htmlparser2/dist/esm/Tokenizer.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts +0 -15
- package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/WritableStream.js +0 -32
- package/node_modules/htmlparser2/dist/esm/WritableStream.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/index.d.ts +0 -54
- package/node_modules/htmlparser2/dist/esm/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/index.js +0 -74
- package/node_modules/htmlparser2/dist/esm/index.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/decode.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/decode.js +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts +0 -205
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -568
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts +0 -22
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js +0 -92
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts +0 -46
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js +0 -138
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -14
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts +0 -96
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js +0 -131
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +0 -32
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js +0 -94
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts +0 -205
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js +0 -554
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts +0 -22
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js +0 -88
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts +0 -46
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js +0 -134
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -4
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -4
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js +0 -11
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts +0 -96
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js +0 -107
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +0 -17
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js +0 -28
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts +0 -32
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js +0 -91
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/escape.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/escape.js +0 -3
- package/node_modules/htmlparser2/node_modules/entities/src/generated/.eslintrc.json +0 -10
- package/node_modules/iconv-lite/.github/dependabot.yml +0 -11
- package/node_modules/iconv-lite/.idea/codeStyles/Project.xml +0 -47
- package/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/node_modules/iconv-lite/.idea/iconv-lite.iml +0 -12
- package/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/node_modules/iconv-lite/.idea/modules.xml +0 -8
- package/node_modules/iconv-lite/.idea/vcs.xml +0 -6
- package/node_modules/iconv-lite/Changelog.md +0 -212
- package/node_modules/iconv-lite/LICENSE +0 -21
- package/node_modules/iconv-lite/README.md +0 -130
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -597
- package/node_modules/iconv-lite/encodings/dbcs-data.js +0 -188
- package/node_modules/iconv-lite/encodings/index.js +0 -23
- package/node_modules/iconv-lite/encodings/internal.js +0 -198
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
- package/node_modules/iconv-lite/encodings/sbcs-data.js +0 -179
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
- package/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
- package/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
- package/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
- package/node_modules/iconv-lite/encodings/utf16.js +0 -197
- package/node_modules/iconv-lite/encodings/utf32.js +0 -319
- package/node_modules/iconv-lite/encodings/utf7.js +0 -290
- package/node_modules/iconv-lite/lib/bom-handling.js +0 -52
- package/node_modules/iconv-lite/lib/index.d.ts +0 -41
- package/node_modules/iconv-lite/lib/index.js +0 -180
- package/node_modules/iconv-lite/lib/streams.js +0 -109
- package/node_modules/iconv-lite/package.json +0 -44
- package/node_modules/listr2/dist/index.cjs +0 -2189
- package/node_modules/listr2/dist/index.d.cts +0 -1528
- package/node_modules/listr2/dist/index.d.ts +0 -1528
- package/node_modules/listr2/dist/index.js +0 -2107
- package/node_modules/log-update/node_modules/ansi-escapes/base.d.ts +0 -262
- package/node_modules/log-update/node_modules/ansi-escapes/base.js +0 -163
- package/node_modules/log-update/node_modules/ansi-escapes/package.json +0 -70
- package/node_modules/log-update/node_modules/ansi-escapes/readme.md +0 -261
- package/node_modules/nth-check/LICENSE +0 -11
- package/node_modules/nth-check/README.md +0 -136
- package/node_modules/nth-check/lib/compile.d.ts +0 -55
- package/node_modules/nth-check/lib/compile.d.ts.map +0 -1
- package/node_modules/nth-check/lib/compile.js +0 -121
- package/node_modules/nth-check/lib/compile.js.map +0 -1
- package/node_modules/nth-check/lib/esm/compile.d.ts +0 -55
- package/node_modules/nth-check/lib/esm/compile.d.ts.map +0 -1
- package/node_modules/nth-check/lib/esm/compile.js +0 -113
- package/node_modules/nth-check/lib/esm/compile.js.map +0 -1
- package/node_modules/nth-check/lib/esm/index.d.ts +0 -59
- package/node_modules/nth-check/lib/esm/index.d.ts.map +0 -1
- package/node_modules/nth-check/lib/esm/index.js +0 -63
- package/node_modules/nth-check/lib/esm/index.js.map +0 -1
- package/node_modules/nth-check/lib/esm/package.json +0 -1
- package/node_modules/nth-check/lib/esm/parse.d.ts +0 -9
- package/node_modules/nth-check/lib/esm/parse.d.ts.map +0 -1
- package/node_modules/nth-check/lib/esm/parse.js +0 -73
- package/node_modules/nth-check/lib/esm/parse.js.map +0 -1
- package/node_modules/nth-check/lib/index.d.ts +0 -59
- package/node_modules/nth-check/lib/index.d.ts.map +0 -1
- package/node_modules/nth-check/lib/index.js +0 -70
- package/node_modules/nth-check/lib/index.js.map +0 -1
- package/node_modules/nth-check/lib/parse.d.ts +0 -9
- package/node_modules/nth-check/lib/parse.d.ts.map +0 -1
- package/node_modules/nth-check/lib/parse.js +0 -77
- package/node_modules/nth-check/lib/parse.js.map +0 -1
- package/node_modules/nth-check/package.json +0 -78
- package/node_modules/ora/index.d.ts +0 -332
- package/node_modules/ora/index.js +0 -443
- package/node_modules/ora/node_modules/chalk/license +0 -9
- package/node_modules/ora/node_modules/chalk/package.json +0 -83
- package/node_modules/ora/node_modules/chalk/readme.md +0 -297
- package/node_modules/ora/node_modules/chalk/source/index.d.ts +0 -325
- package/node_modules/ora/node_modules/chalk/source/index.js +0 -225
- package/node_modules/ora/node_modules/chalk/source/utilities.js +0 -33
- package/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
- package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js +0 -190
- package/node_modules/ora/node_modules/cli-spinners/index.d.ts +0 -139
- package/node_modules/ora/node_modules/cli-spinners/index.js +0 -11
- package/node_modules/ora/node_modules/cli-spinners/license +0 -9
- package/node_modules/ora/node_modules/cli-spinners/package.json +0 -56
- package/node_modules/ora/node_modules/cli-spinners/readme.md +0 -74
- package/node_modules/ora/node_modules/cli-spinners/spinners.json +0 -1665
- package/node_modules/ora/node_modules/string-width/index.js +0 -89
- package/node_modules/ora/node_modules/string-width/license +0 -9
- package/node_modules/ora/node_modules/string-width/package.json +0 -65
- package/node_modules/ora/node_modules/string-width/readme.md +0 -66
- package/node_modules/ora/package.json +0 -64
- package/node_modules/ora/readme.md +0 -375
- package/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5/dist/cjs/common/doctype.d.ts +0 -4
- package/node_modules/parse5/dist/cjs/common/doctype.js +0 -118
- package/node_modules/parse5/dist/cjs/common/error-codes.d.ts +0 -67
- package/node_modules/parse5/dist/cjs/common/error-codes.js +0 -66
- package/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +0 -9
- package/node_modules/parse5/dist/cjs/common/foreign-content.js +0 -237
- package/node_modules/parse5/dist/cjs/common/html.d.ts +0 -289
- package/node_modules/parse5/dist/cjs/common/html.js +0 -528
- package/node_modules/parse5/dist/cjs/common/token.d.ts +0 -84
- package/node_modules/parse5/dist/cjs/common/token.js +0 -24
- package/node_modules/parse5/dist/cjs/common/unicode.d.ts +0 -42
- package/node_modules/parse5/dist/cjs/common/unicode.js +0 -70
- package/node_modules/parse5/dist/cjs/index.d.ts +0 -71
- package/node_modules/parse5/dist/cjs/index.js +0 -54
- package/node_modules/parse5/dist/cjs/package.json +0 -1
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +0 -36
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +0 -114
- package/node_modules/parse5/dist/cjs/parser/index.d.ts +0 -221
- package/node_modules/parse5/dist/cjs/parser/index.js +0 -3240
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +0 -53
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.js +0 -328
- package/node_modules/parse5/dist/cjs/serializer/index.d.ts +0 -60
- package/node_modules/parse5/dist/cjs/serializer/index.js +0 -172
- package/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +0 -247
- package/node_modules/parse5/dist/cjs/tokenizer/index.js +0 -2714
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +0 -36
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +0 -200
- package/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +0 -84
- package/node_modules/parse5/dist/cjs/tree-adapters/default.js +0 -176
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +0 -255
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.js +0 -2
- package/node_modules/parse5/dist/common/doctype.d.ts +0 -4
- package/node_modules/parse5/dist/common/doctype.js +0 -114
- package/node_modules/parse5/dist/common/error-codes.d.ts +0 -67
- package/node_modules/parse5/dist/common/error-codes.js +0 -63
- package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -9
- package/node_modules/parse5/dist/common/foreign-content.js +0 -228
- package/node_modules/parse5/dist/common/html.d.ts +0 -289
- package/node_modules/parse5/dist/common/html.js +0 -523
- package/node_modules/parse5/dist/common/token.d.ts +0 -84
- package/node_modules/parse5/dist/common/token.js +0 -20
- package/node_modules/parse5/dist/common/unicode.d.ts +0 -42
- package/node_modules/parse5/dist/common/unicode.js +0 -62
- package/node_modules/parse5/dist/index.d.ts +0 -71
- package/node_modules/parse5/dist/index.js +0 -42
- package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -36
- package/node_modules/parse5/dist/parser/formatting-element-list.js +0 -110
- package/node_modules/parse5/dist/parser/index.d.ts +0 -221
- package/node_modules/parse5/dist/parser/index.js +0 -3245
- package/node_modules/parse5/dist/parser/open-element-stack.d.ts +0 -53
- package/node_modules/parse5/dist/parser/open-element-stack.js +0 -324
- package/node_modules/parse5/dist/serializer/index.d.ts +0 -60
- package/node_modules/parse5/dist/serializer/index.js +0 -168
- package/node_modules/parse5/dist/tokenizer/index.d.ts +0 -247
- package/node_modules/parse5/dist/tokenizer/index.js +0 -2710
- package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +0 -36
- package/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -196
- package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -84
- package/node_modules/parse5/dist/tree-adapters/default.js +0 -173
- package/node_modules/parse5/dist/tree-adapters/interface.d.ts +0 -255
- package/node_modules/parse5/node_modules/entities/LICENSE +0 -11
- package/node_modules/parse5/node_modules/entities/decode.d.ts +0 -1
- package/node_modules/parse5/node_modules/entities/decode.js +0 -3
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.d.ts +0 -209
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.js +0 -511
- package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.d.ts +0 -22
- package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.js +0 -73
- package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.d.ts +0 -43
- package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.js +0 -121
- package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -10
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -10
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -8
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -13
- package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/index.d.ts +0 -96
- package/node_modules/parse5/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/index.js +0 -131
- package/node_modules/parse5/node_modules/entities/dist/commonjs/index.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/commonjs/package.json +0 -3
- package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
- package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
- package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/decode.d.ts +0 -209
- package/node_modules/parse5/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/decode.js +0 -497
- package/node_modules/parse5/node_modules/entities/dist/esm/decode.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/encode.d.ts +0 -22
- package/node_modules/parse5/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/encode.js +0 -69
- package/node_modules/parse5/node_modules/entities/dist/esm/encode.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/escape.d.ts +0 -43
- package/node_modules/parse5/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/escape.js +0 -117
- package/node_modules/parse5/node_modules/entities/dist/esm/escape.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -7
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -7
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -8
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.js +0 -10
- package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/index.d.ts +0 -96
- package/node_modules/parse5/node_modules/entities/dist/esm/index.d.ts.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/index.js +0 -107
- package/node_modules/parse5/node_modules/entities/dist/esm/index.js.map +0 -1
- package/node_modules/parse5/node_modules/entities/dist/esm/package.json +0 -3
- package/node_modules/parse5/node_modules/entities/escape.d.ts +0 -1
- package/node_modules/parse5/node_modules/entities/escape.js +0 -3
- package/node_modules/parse5/node_modules/entities/package.json +0 -118
- package/node_modules/parse5/node_modules/entities/readme.md +0 -122
- package/node_modules/parse5/node_modules/entities/src/decode-codepoint.ts +0 -81
- package/node_modules/parse5/node_modules/entities/src/decode.spec.ts +0 -320
- package/node_modules/parse5/node_modules/entities/src/decode.ts +0 -620
- package/node_modules/parse5/node_modules/entities/src/encode.spec.ts +0 -78
- package/node_modules/parse5/node_modules/entities/src/encode.ts +0 -77
- package/node_modules/parse5/node_modules/entities/src/escape.spec.ts +0 -14
- package/node_modules/parse5/node_modules/entities/src/escape.ts +0 -148
- package/node_modules/parse5/node_modules/entities/src/generated/.eslintrc.json +0 -10
- package/node_modules/parse5/node_modules/entities/src/generated/decode-data-html.ts +0 -8
- package/node_modules/parse5/node_modules/entities/src/generated/decode-data-xml.ts +0 -8
- package/node_modules/parse5/node_modules/entities/src/generated/encode-html.ts +0 -17
- package/node_modules/parse5/node_modules/entities/src/index.spec.ts +0 -125
- package/node_modules/parse5/node_modules/entities/src/index.ts +0 -188
- package/node_modules/parse5/package.json +0 -50
- package/node_modules/parse5-htmlparser2-tree-adapter/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/README.md +0 -34
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts +0 -6
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js +0 -214
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/package.json +0 -1
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts +0 -6
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +0 -213
- package/node_modules/parse5-htmlparser2-tree-adapter/package.json +0 -40
- package/node_modules/parse5-parser-stream/LICENSE +0 -19
- package/node_modules/parse5-parser-stream/README.md +0 -34
- package/node_modules/parse5-parser-stream/dist/cjs/index.d.ts +0 -85
- package/node_modules/parse5-parser-stream/dist/cjs/index.js +0 -90
- package/node_modules/parse5-parser-stream/dist/cjs/package.json +0 -1
- package/node_modules/parse5-parser-stream/dist/index.d.ts +0 -85
- package/node_modules/parse5-parser-stream/dist/index.js +0 -86
- package/node_modules/parse5-parser-stream/package.json +0 -39
- package/node_modules/rfdc/.github/workflows/ci.yml +0 -21
- package/node_modules/rfdc/LICENSE +0 -15
- package/node_modules/rfdc/default.js +0 -3
- package/node_modules/rfdc/index.d.ts +0 -13
- package/node_modules/rfdc/index.js +0 -198
- package/node_modules/rfdc/index.test-d.ts +0 -13
- package/node_modules/rfdc/package.json +0 -73
- package/node_modules/rfdc/readme.md +0 -181
- package/node_modules/rfdc/test/index.js +0 -306
- package/node_modules/smol-toml/dist/date.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/date.js.map +0 -1
- package/node_modules/smol-toml/dist/error.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/error.js.map +0 -1
- package/node_modules/smol-toml/dist/extract.js.map +0 -1
- package/node_modules/smol-toml/dist/index.cjs.map +0 -1
- package/node_modules/smol-toml/dist/index.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/index.js.map +0 -1
- package/node_modules/smol-toml/dist/parse.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/parse.js.map +0 -1
- package/node_modules/smol-toml/dist/primitive.d.ts +0 -29
- package/node_modules/smol-toml/dist/primitive.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/primitive.js.map +0 -1
- package/node_modules/smol-toml/dist/stringify.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/stringify.js.map +0 -1
- package/node_modules/smol-toml/dist/struct.js.map +0 -1
- package/node_modules/smol-toml/dist/util.d.ts.map +0 -1
- package/node_modules/smol-toml/dist/util.js.map +0 -1
- package/node_modules/smol-toml/src/date.ts +0 -152
- package/node_modules/smol-toml/src/error.ts +0 -77
- package/node_modules/smol-toml/src/extract.ts +0 -113
- package/node_modules/smol-toml/src/index.ts +0 -42
- package/node_modules/smol-toml/src/parse.ts +0 -184
- package/node_modules/smol-toml/src/primitive.ts +0 -249
- package/node_modules/smol-toml/src/stringify.ts +0 -191
- package/node_modules/smol-toml/src/struct.ts +0 -202
- package/node_modules/smol-toml/src/util.ts +0 -106
- package/node_modules/stdin-discarder/index.d.ts +0 -13
- package/node_modules/stdin-discarder/index.js +0 -59
- package/node_modules/stdin-discarder/license +0 -9
- package/node_modules/stdin-discarder/package.json +0 -42
- package/node_modules/stdin-discarder/readme.md +0 -37
- package/node_modules/whatwg-encoding/LICENSE.txt +0 -7
- package/node_modules/whatwg-encoding/README.md +0 -50
- package/node_modules/whatwg-encoding/lib/labels-to-names.json +0 -217
- package/node_modules/whatwg-encoding/lib/supported-names.json +0 -38
- package/node_modules/whatwg-encoding/lib/whatwg-encoding.js +0 -60
- package/node_modules/whatwg-encoding/package.json +0 -32
- package/node_modules/whatwg-mimetype/LICENSE.txt +0 -7
- package/node_modules/whatwg-mimetype/README.md +0 -101
- package/node_modules/whatwg-mimetype/lib/mime-type-parameters.js +0 -70
- package/node_modules/whatwg-mimetype/lib/mime-type.js +0 -127
- package/node_modules/whatwg-mimetype/lib/parser.js +0 -105
- package/node_modules/whatwg-mimetype/lib/serializer.js +0 -25
- package/node_modules/whatwg-mimetype/lib/utils.js +0 -60
- package/node_modules/whatwg-mimetype/package.json +0 -45
- /package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/LICENSE +0 -0
- /package/node_modules/{parse5/dist/tree-adapters/interface.js → @listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.js} +0 -0
- /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.d.ts +0 -0
- /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.js +0 -0
- /package/node_modules/{chalk → ansi-escapes}/license +0 -0
- /package/node_modules/{cheerio-select → htmlparser2/node_modules/domelementtype}/LICENSE +0 -0
- /package/node_modules/{domelementtype → htmlparser2/node_modules/domelementtype}/readme.md +0 -0
- /package/node_modules/{css-select → htmlparser2/node_modules/domhandler}/LICENSE +0 -0
- /package/node_modules/{css-what → htmlparser2/node_modules/domutils}/LICENSE +0 -0
- /package/node_modules/htmlparser2/node_modules/entities/dist/{commonjs/internal → internal}/bin-trie-flags.d.ts +0 -0
- /package/node_modules/htmlparser2/node_modules/entities/dist/{esm/internal → internal}/bin-trie-flags.js +0 -0
- /package/node_modules/{ora → listr2}/node_modules/string-width/index.d.ts +0 -0
- /package/node_modules/{figures → listr2/node_modules/string-width}/license +0 -0
- /package/node_modules/log-update/node_modules/{ansi-escapes → string-width}/license +0 -0
- /package/node_modules/{ora → yocto-spinner}/license +0 -0
|
@@ -0,0 +1,2230 @@
|
|
|
1
|
+
import EventEmitter, { setMaxListeners } from "node:events";
|
|
2
|
+
import { inspect, styleText } from "node:util";
|
|
3
|
+
import { format } from "util";
|
|
4
|
+
import { EOL } from "os";
|
|
5
|
+
import { StringDecoder } from "string_decoder";
|
|
6
|
+
import { Writable } from "stream";
|
|
7
|
+
import { randomUUID } from "crypto";
|
|
8
|
+
|
|
9
|
+
//#region src/constants/ansi-escape-codes.constants.ts
|
|
10
|
+
/**
|
|
11
|
+
* Indicates an UNICODE characters is coming up.
|
|
12
|
+
*/
|
|
13
|
+
const ANSI_ESCAPE = "\x1B[";
|
|
14
|
+
/**
|
|
15
|
+
* Generic ANSI escape characters for terminal based operations.
|
|
16
|
+
*/
|
|
17
|
+
const ANSI_ESCAPE_CODES = {
|
|
18
|
+
CURSOR_HIDE: "\x1B[?25l",
|
|
19
|
+
CURSOR_SHOW: "\x1B[?25h"
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/constants/environment-variables.constants.ts
|
|
24
|
+
/**
|
|
25
|
+
* Environment variables for Listr.
|
|
26
|
+
*/
|
|
27
|
+
let ListrEnvironmentVariables = /* @__PURE__ */ function(ListrEnvironmentVariables) {
|
|
28
|
+
ListrEnvironmentVariables["FORCE_UNICODE"] = "LISTR_FORCE_UNICODE";
|
|
29
|
+
ListrEnvironmentVariables["FORCE_TTY"] = "LISTR_FORCE_TTY";
|
|
30
|
+
ListrEnvironmentVariables["DISABLE_COLOR"] = "NO_COLOR";
|
|
31
|
+
ListrEnvironmentVariables["FORCE_COLOR"] = "FORCE_COLOR";
|
|
32
|
+
return ListrEnvironmentVariables;
|
|
33
|
+
}({});
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/constants/listr-error.constants.ts
|
|
37
|
+
/**
|
|
38
|
+
* The actual error type that is collected and to help identify where the error is triggered from.
|
|
39
|
+
*/
|
|
40
|
+
let ListrErrorTypes = /* @__PURE__ */ function(ListrErrorTypes) {
|
|
41
|
+
/** Task has failed and will try to retry. */
|
|
42
|
+
ListrErrorTypes["WILL_RETRY"] = "WILL_RETRY";
|
|
43
|
+
/** Task has failed and will try to rollback. */
|
|
44
|
+
ListrErrorTypes["WILL_ROLLBACK"] = "WILL_ROLLBACK";
|
|
45
|
+
/** Task has failed, ran the rollback action but the rollback action itself has failed. */
|
|
46
|
+
ListrErrorTypes["HAS_FAILED_TO_ROLLBACK"] = "HAS_FAILED_TO_ROLLBACK";
|
|
47
|
+
/** Task has failed. */
|
|
48
|
+
ListrErrorTypes["HAS_FAILED"] = "HAS_FAILED";
|
|
49
|
+
/** Task has failed, but exitOnError is set to false, so will ignore this error. */
|
|
50
|
+
ListrErrorTypes["HAS_FAILED_WITHOUT_ERROR"] = "HAS_FAILED_WITHOUT_ERROR";
|
|
51
|
+
return ListrErrorTypes;
|
|
52
|
+
}({});
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/constants/listr-events.constants.ts
|
|
56
|
+
/**
|
|
57
|
+
* Events that are triggered by Listr.
|
|
58
|
+
*
|
|
59
|
+
* These are stateful and singleton events by being attached to the main Listr class and propagating to the subtasks.
|
|
60
|
+
*
|
|
61
|
+
* @see {@link https://listr2.kilic.dev/listr/events.html}
|
|
62
|
+
*/
|
|
63
|
+
let ListrEventType = /* @__PURE__ */ function(ListrEventType) {
|
|
64
|
+
/** Indicates that underlying renderer should refresh the current render. */
|
|
65
|
+
ListrEventType["SHOULD_REFRESH_RENDER"] = "SHOUD_REFRESH_RENDER";
|
|
66
|
+
return ListrEventType;
|
|
67
|
+
}({});
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/constants/listr-renderer.constants.ts
|
|
71
|
+
let ListrRendererSelection = /* @__PURE__ */ function(ListrRendererSelection) {
|
|
72
|
+
ListrRendererSelection["PRIMARY"] = "PRIMARY";
|
|
73
|
+
ListrRendererSelection["SECONDARY"] = "SECONDARY";
|
|
74
|
+
ListrRendererSelection["SILENT"] = "SILENT";
|
|
75
|
+
return ListrRendererSelection;
|
|
76
|
+
}({});
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/constants/listr-task-events.constants.ts
|
|
80
|
+
/**
|
|
81
|
+
* Internal events that are fired from the Task.
|
|
82
|
+
*
|
|
83
|
+
* @see {@link https://listr2.kilic.dev/task/events.html}
|
|
84
|
+
*/
|
|
85
|
+
let ListrTaskEventType = /* @__PURE__ */ function(ListrTaskEventType) {
|
|
86
|
+
/** Title has changed for the current Task. */
|
|
87
|
+
ListrTaskEventType["TITLE"] = "TITLE";
|
|
88
|
+
/**
|
|
89
|
+
* State has changed for the current Task.
|
|
90
|
+
*
|
|
91
|
+
* @see {@link module:listr2.ListrTaskState}
|
|
92
|
+
*/
|
|
93
|
+
ListrTaskEventType["STATE"] = "STATE";
|
|
94
|
+
/** The current Task has been marked as enabled. */
|
|
95
|
+
ListrTaskEventType["ENABLED"] = "ENABLED";
|
|
96
|
+
/** The current Task is currently processing subtasks. */
|
|
97
|
+
ListrTaskEventType["SUBTASK"] = "SUBTASK";
|
|
98
|
+
/** The current Task is now processing a prompt. */
|
|
99
|
+
ListrTaskEventType["PROMPT"] = "PROMPT";
|
|
100
|
+
/** The current Task is now dumping output. */
|
|
101
|
+
ListrTaskEventType["OUTPUT"] = "OUTPUT";
|
|
102
|
+
/** The current Task has reset its streamed output. */
|
|
103
|
+
ListrTaskEventType["OUTPUT_RESET"] = "OUTPUT_RESET";
|
|
104
|
+
/**
|
|
105
|
+
* The current Task is now dumping a message.
|
|
106
|
+
*
|
|
107
|
+
* @see {module:Listr2.ListrTaskMessage}
|
|
108
|
+
*/
|
|
109
|
+
ListrTaskEventType["MESSAGE"] = "MESSAGE";
|
|
110
|
+
/** The current Task is closed and no further action in expected. */
|
|
111
|
+
ListrTaskEventType["CLOSED"] = "CLOSED";
|
|
112
|
+
return ListrTaskEventType;
|
|
113
|
+
}({});
|
|
114
|
+
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/constants/listr-task-state.constants.ts
|
|
117
|
+
/**
|
|
118
|
+
* Tasks can be in various states during the execution.
|
|
119
|
+
*
|
|
120
|
+
* Whenever a state change occurs, the task will emit a {@link module:listr2.ListrTaskEventType.STATE} with the appropriate state.
|
|
121
|
+
*/
|
|
122
|
+
let ListrTaskState = /* @__PURE__ */ function(ListrTaskState) {
|
|
123
|
+
/** Task has not started yet, waiting for pick-up. */
|
|
124
|
+
ListrTaskState["WAITING"] = "WAITING";
|
|
125
|
+
/** Task has started. */
|
|
126
|
+
ListrTaskState["STARTED"] = "STARTED";
|
|
127
|
+
/** Task has been completed. */
|
|
128
|
+
ListrTaskState["COMPLETED"] = "COMPLETED";
|
|
129
|
+
/** Task has failed. */
|
|
130
|
+
ListrTaskState["FAILED"] = "FAILED";
|
|
131
|
+
/** Task has been skipped. */
|
|
132
|
+
ListrTaskState["SKIPPED"] = "SKIPPED";
|
|
133
|
+
/** Task is currently trying to rollback. */
|
|
134
|
+
ListrTaskState["ROLLING_BACK"] = "ROLLING_BACK";
|
|
135
|
+
/** Task has rolledback successfully after failing. */
|
|
136
|
+
ListrTaskState["ROLLED_BACK"] = "ROLLED_BACK";
|
|
137
|
+
/** Task is currently retrying. */
|
|
138
|
+
ListrTaskState["RETRY"] = "RETRY";
|
|
139
|
+
/** Task is currently paused. */
|
|
140
|
+
ListrTaskState["PAUSED"] = "PAUSED";
|
|
141
|
+
/** Task is currently trying to process a prompt. */
|
|
142
|
+
ListrTaskState["PROMPT"] = "PROMPT";
|
|
143
|
+
/** Task has successfully processed the prompt. */
|
|
144
|
+
ListrTaskState["PROMPT_COMPLETED"] = "PROMPT_COMPLETED";
|
|
145
|
+
/** Task has failed to process the prompt. */
|
|
146
|
+
ListrTaskState["PROMPT_FAILED"] = "PROMPT_FAILED";
|
|
147
|
+
/** Task has been cancelled by an interruption before it could finish. */
|
|
148
|
+
ListrTaskState["CANCELLED"] = "CANCELLED";
|
|
149
|
+
return ListrTaskState;
|
|
150
|
+
}({});
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/lib/event-manager.ts
|
|
154
|
+
var EventManager = class {
|
|
155
|
+
emitter = new EventEmitter();
|
|
156
|
+
constructor() {
|
|
157
|
+
this.emitter.setMaxListeners(0);
|
|
158
|
+
}
|
|
159
|
+
emit(dispatch, args) {
|
|
160
|
+
this.emitter.emit(dispatch, args);
|
|
161
|
+
}
|
|
162
|
+
on(dispatch, handler) {
|
|
163
|
+
if (!handler) return;
|
|
164
|
+
this.emitter.addListener(dispatch, handler);
|
|
165
|
+
}
|
|
166
|
+
once(dispatch, handler) {
|
|
167
|
+
if (!handler) return;
|
|
168
|
+
this.emitter.once(dispatch, handler);
|
|
169
|
+
}
|
|
170
|
+
off(dispatch, handler) {
|
|
171
|
+
if (handler) this.emitter.off(dispatch, handler);
|
|
172
|
+
else this.emitter.removeAllListeners(dispatch);
|
|
173
|
+
}
|
|
174
|
+
complete() {
|
|
175
|
+
this.emitter.removeAllListeners();
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/interfaces/event.interface.ts
|
|
181
|
+
/**
|
|
182
|
+
* Give event map a set of indexes to not make it go crazy when some events are missing from it.
|
|
183
|
+
* They are optional after all.
|
|
184
|
+
*/
|
|
185
|
+
var BaseEventMap = class {};
|
|
186
|
+
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/interfaces/listr-error.interface.ts
|
|
189
|
+
/**
|
|
190
|
+
* Internal error handling mechanism for Listr collects the errors and details for a failed task.
|
|
191
|
+
*
|
|
192
|
+
* @see {@link https://listr2.kilic.dev/task/error-handling.html}
|
|
193
|
+
*/
|
|
194
|
+
var ListrError = class extends Error {
|
|
195
|
+
error;
|
|
196
|
+
type;
|
|
197
|
+
task;
|
|
198
|
+
path;
|
|
199
|
+
constructor(error, type, task) {
|
|
200
|
+
super(error.message);
|
|
201
|
+
this.error = error;
|
|
202
|
+
this.type = type;
|
|
203
|
+
this.task = task;
|
|
204
|
+
this.name = "ListrError";
|
|
205
|
+
this.path = task.path;
|
|
206
|
+
this.stack = error?.stack;
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/interfaces/listr-renderer-error.interface.ts
|
|
212
|
+
/**
|
|
213
|
+
* Internal error coming from renderer.
|
|
214
|
+
*/
|
|
215
|
+
var ListrRendererError = class extends Error {};
|
|
216
|
+
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region src/interfaces/prompt-error.interface.ts
|
|
219
|
+
/**
|
|
220
|
+
* Internal error handling mechanism for Listr prompts to identify the failing cause is coming from a prompt.
|
|
221
|
+
*
|
|
222
|
+
* @see {@link https://listr2.kilic.dev/task/prompts.html}
|
|
223
|
+
*/
|
|
224
|
+
var PromptError = class extends Error {};
|
|
225
|
+
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region src/utils/environment/is-observable.ts
|
|
228
|
+
/**
|
|
229
|
+
* Tests to see if the object is an RxJS {@link Observable}
|
|
230
|
+
* @param obj the object to test
|
|
231
|
+
*/
|
|
232
|
+
function isObservable(obj) {
|
|
233
|
+
return !!obj && typeof obj === "object" && typeof obj.subscribe === "function";
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/utils/environment/is-readable.ts
|
|
238
|
+
/**
|
|
239
|
+
* Tests to see if the object is an Readable or NodeJS.ReadableStream {@link Readable, NodeJS.ReadableStream}
|
|
240
|
+
* @param obj the object to test
|
|
241
|
+
*/
|
|
242
|
+
function isReadable(obj) {
|
|
243
|
+
return !!obj && typeof obj === "object" && obj.readable === true && typeof obj.read === "function" && typeof obj.on === "function";
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/utils/environment/is-unicode-supported.ts
|
|
248
|
+
function isUnicodeSupported() {
|
|
249
|
+
/* istanbul ignore next */
|
|
250
|
+
return !!process.env["LISTR_FORCE_UNICODE"] || process.platform !== "win32" || !!process.env.CI || !!process.env.WT_SESSION || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty";
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/utils/format/cleanse-ansi.constants.ts
|
|
255
|
+
const CLEAR_LINE_REGEX = "(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+";
|
|
256
|
+
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/utils/format/cleanse-ansi.ts
|
|
259
|
+
function cleanseAnsi(chunk) {
|
|
260
|
+
return String(chunk).replace(new RegExp(CLEAR_LINE_REGEX, "gmi"), "").trim();
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/utils/format/color.ts
|
|
265
|
+
/**
|
|
266
|
+
* Color palette.
|
|
267
|
+
*/
|
|
268
|
+
const color = Object.fromEntries(Object.keys(inspect.colors).map((color) => [color, (text) => styleText(color, String(text))]));
|
|
269
|
+
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/utils/format/indent.ts
|
|
272
|
+
function indent(string, count) {
|
|
273
|
+
return string.replace(/^(?!\s*$)/gm, " ".repeat(count));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/utils/format/figures.ts
|
|
278
|
+
const FIGURES_MAIN = {
|
|
279
|
+
warning: "⚠",
|
|
280
|
+
info: "ℹ",
|
|
281
|
+
cross: "✖",
|
|
282
|
+
arrowDown: "↓",
|
|
283
|
+
tick: "✔",
|
|
284
|
+
arrowRight: "→",
|
|
285
|
+
pointer: "❯",
|
|
286
|
+
checkboxOn: "☒",
|
|
287
|
+
arrowLeft: "←",
|
|
288
|
+
squareSmallFilled: "◼",
|
|
289
|
+
pointerSmall: "›",
|
|
290
|
+
circleSlash: "⊘"
|
|
291
|
+
};
|
|
292
|
+
const FIGURES_FALLBACK = {
|
|
293
|
+
...FIGURES_MAIN,
|
|
294
|
+
warning: "‼",
|
|
295
|
+
info: "i",
|
|
296
|
+
cross: "×",
|
|
297
|
+
tick: "√",
|
|
298
|
+
pointer: ">",
|
|
299
|
+
checkboxOn: "[×]",
|
|
300
|
+
squareSmallFilled: "■",
|
|
301
|
+
circleSlash: "ø"
|
|
302
|
+
};
|
|
303
|
+
const figures = isUnicodeSupported() ? FIGURES_MAIN : FIGURES_FALLBACK;
|
|
304
|
+
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/utils/format/splat.ts
|
|
307
|
+
function splat(message, ...splat) {
|
|
308
|
+
return format(String(message), ...splat);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region src/utils/logger/logger.constants.ts
|
|
313
|
+
/** Default ListrLogLevels for the logger */
|
|
314
|
+
let ListrLogLevels = /* @__PURE__ */ function(ListrLogLevels) {
|
|
315
|
+
ListrLogLevels["STARTED"] = "STARTED";
|
|
316
|
+
ListrLogLevels["COMPLETED"] = "COMPLETED";
|
|
317
|
+
ListrLogLevels["FAILED"] = "FAILED";
|
|
318
|
+
ListrLogLevels["SKIPPED"] = "SKIPPED";
|
|
319
|
+
ListrLogLevels["OUTPUT"] = "OUTPUT";
|
|
320
|
+
ListrLogLevels["TITLE"] = "TITLE";
|
|
321
|
+
ListrLogLevels["ROLLBACK"] = "ROLLBACK";
|
|
322
|
+
ListrLogLevels["RETRY"] = "RETRY";
|
|
323
|
+
ListrLogLevels["PROMPT"] = "PROMPT";
|
|
324
|
+
ListrLogLevels["PAUSED"] = "PAUSED";
|
|
325
|
+
ListrLogLevels["CANCELLED"] = "CANCELLED";
|
|
326
|
+
return ListrLogLevels;
|
|
327
|
+
}({});
|
|
328
|
+
const LISTR_LOGGER_STYLE = {
|
|
329
|
+
icon: {
|
|
330
|
+
["STARTED"]: figures.pointer,
|
|
331
|
+
["FAILED"]: figures.cross,
|
|
332
|
+
["SKIPPED"]: figures.arrowDown,
|
|
333
|
+
["COMPLETED"]: figures.tick,
|
|
334
|
+
["OUTPUT"]: figures.pointerSmall,
|
|
335
|
+
["TITLE"]: figures.arrowRight,
|
|
336
|
+
["RETRY"]: figures.warning,
|
|
337
|
+
["ROLLBACK"]: figures.arrowLeft,
|
|
338
|
+
["PAUSED"]: figures.squareSmallFilled,
|
|
339
|
+
["CANCELLED"]: figures.circleSlash
|
|
340
|
+
},
|
|
341
|
+
color: {
|
|
342
|
+
["STARTED"]: color.yellow,
|
|
343
|
+
["FAILED"]: color.red,
|
|
344
|
+
["SKIPPED"]: color.yellow,
|
|
345
|
+
["COMPLETED"]: color.green,
|
|
346
|
+
["RETRY"]: color.yellowBright,
|
|
347
|
+
["ROLLBACK"]: color.redBright,
|
|
348
|
+
["PAUSED"]: color.yellowBright,
|
|
349
|
+
["CANCELLED"]: color.red
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
const LISTR_LOGGER_STDERR_LEVELS = [
|
|
353
|
+
"RETRY",
|
|
354
|
+
"ROLLBACK",
|
|
355
|
+
"FAILED"
|
|
356
|
+
];
|
|
357
|
+
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/utils/logger/logger.ts
|
|
360
|
+
/**
|
|
361
|
+
* Creates a new Listr2 logger.
|
|
362
|
+
*
|
|
363
|
+
* This logger is used throughout the renderers for consistency.
|
|
364
|
+
*
|
|
365
|
+
* @see {@link https://listr2.kilic.dev/renderer/logger.html}
|
|
366
|
+
*/
|
|
367
|
+
var ListrLogger = class {
|
|
368
|
+
options;
|
|
369
|
+
process;
|
|
370
|
+
constructor(options) {
|
|
371
|
+
this.options = options;
|
|
372
|
+
this.options = {
|
|
373
|
+
useIcons: true,
|
|
374
|
+
toStderr: [],
|
|
375
|
+
...options ?? {}
|
|
376
|
+
};
|
|
377
|
+
this.options.fields ??= {};
|
|
378
|
+
this.options.fields.prefix ??= [];
|
|
379
|
+
this.options.fields.suffix ??= [];
|
|
380
|
+
this.process = this.options.processOutput ?? new ProcessOutput();
|
|
381
|
+
}
|
|
382
|
+
log(level, message, options) {
|
|
383
|
+
const output = this.format(level, message, options);
|
|
384
|
+
if (this.options.toStderr.includes(level)) {
|
|
385
|
+
this.process.toStderr(output);
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
this.process.toStdout(output);
|
|
389
|
+
}
|
|
390
|
+
toStdout(message, options, eol = true) {
|
|
391
|
+
this.process.toStdout(this.format(null, message, options), eol);
|
|
392
|
+
}
|
|
393
|
+
toStderr(message, options, eol = true) {
|
|
394
|
+
this.process.toStderr(this.format(null, message, options), eol);
|
|
395
|
+
}
|
|
396
|
+
wrap(message, options) {
|
|
397
|
+
if (!message) return message;
|
|
398
|
+
return this.applyFormat(`[${message}]`, options);
|
|
399
|
+
}
|
|
400
|
+
splat(...args) {
|
|
401
|
+
const message = args.shift() ?? "";
|
|
402
|
+
return args.length === 0 ? message : splat(message, args);
|
|
403
|
+
}
|
|
404
|
+
suffix(message, ...suffixes) {
|
|
405
|
+
suffixes.filter(Boolean).forEach((suffix) => {
|
|
406
|
+
message += this.spacing(message);
|
|
407
|
+
if (typeof suffix === "string") message += this.wrap(suffix);
|
|
408
|
+
else if (typeof suffix === "object") {
|
|
409
|
+
suffix.args ??= [];
|
|
410
|
+
if (typeof suffix.condition === "function" ? !suffix.condition(...suffix.args) : !(suffix.condition ?? true)) return message;
|
|
411
|
+
message += this.wrap(typeof suffix.field === "function" ? suffix.field(...suffix.args) : suffix.field, { format: suffix?.format(...suffix.args) });
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
return message;
|
|
415
|
+
}
|
|
416
|
+
prefix(message, ...prefixes) {
|
|
417
|
+
prefixes.filter(Boolean).forEach((prefix) => {
|
|
418
|
+
message = this.spacing(message) + message;
|
|
419
|
+
if (typeof prefix === "string") message = this.wrap(prefix) + message;
|
|
420
|
+
else if (typeof prefix === "object") {
|
|
421
|
+
prefix.args ??= [];
|
|
422
|
+
if (typeof prefix.condition === "function" ? !prefix.condition(...prefix.args) : !(prefix.condition ?? true)) return message;
|
|
423
|
+
message = this.wrap(typeof prefix.field === "function" ? prefix.field(...prefix.args) : prefix.field, { format: prefix?.format() }) + message;
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
return message;
|
|
427
|
+
}
|
|
428
|
+
fields(message, options) {
|
|
429
|
+
if (this.options?.fields?.prefix) message = this.prefix(message, ...this.options.fields.prefix);
|
|
430
|
+
if (options?.prefix) message = this.prefix(message, ...options.prefix);
|
|
431
|
+
if (options?.suffix) message = this.suffix(message, ...options.suffix);
|
|
432
|
+
if (this.options?.fields?.suffix) message = this.suffix(message, ...this.options.fields.suffix);
|
|
433
|
+
return message;
|
|
434
|
+
}
|
|
435
|
+
icon(level, icon) {
|
|
436
|
+
if (!level) return null;
|
|
437
|
+
if (!icon) {
|
|
438
|
+
const i = this.options.icon?.[level];
|
|
439
|
+
icon = typeof i === "function" ? i() : i;
|
|
440
|
+
}
|
|
441
|
+
const coloring = this.options.color?.[level];
|
|
442
|
+
if (icon && coloring) icon = coloring(icon);
|
|
443
|
+
return icon;
|
|
444
|
+
}
|
|
445
|
+
format(level, message, options) {
|
|
446
|
+
if (!Array.isArray(message)) message = [message];
|
|
447
|
+
message = this.splat(message.shift(), ...message).toString().split(EOL).filter((m) => !m || m.trim() !== "").map((m) => {
|
|
448
|
+
return this.style(level, this.fields(m, {
|
|
449
|
+
prefix: Array.isArray(options?.prefix) ? options.prefix : [options?.prefix],
|
|
450
|
+
suffix: Array.isArray(options?.suffix) ? options.suffix : [options?.suffix]
|
|
451
|
+
}));
|
|
452
|
+
}).join(EOL);
|
|
453
|
+
return message;
|
|
454
|
+
}
|
|
455
|
+
style(level, message) {
|
|
456
|
+
if (!level || !message) return message;
|
|
457
|
+
const icon = this.icon(level, !this.options.useIcons && this.wrap(level));
|
|
458
|
+
if (icon) message = icon + " " + message;
|
|
459
|
+
return message;
|
|
460
|
+
}
|
|
461
|
+
applyFormat(message, options) {
|
|
462
|
+
if (options?.format) return options.format(message);
|
|
463
|
+
return message;
|
|
464
|
+
}
|
|
465
|
+
spacing(message) {
|
|
466
|
+
return typeof message === "undefined" || message.trim() === "" ? "" : " ";
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
//#endregion
|
|
471
|
+
//#region src/utils/process-output/process-output-buffer.ts
|
|
472
|
+
var ProcessOutputBuffer = class {
|
|
473
|
+
options;
|
|
474
|
+
buffer = [];
|
|
475
|
+
decoder = new StringDecoder();
|
|
476
|
+
constructor(options) {
|
|
477
|
+
this.options = options;
|
|
478
|
+
}
|
|
479
|
+
get all() {
|
|
480
|
+
return this.buffer;
|
|
481
|
+
}
|
|
482
|
+
get last() {
|
|
483
|
+
return this.buffer.at(-1);
|
|
484
|
+
}
|
|
485
|
+
get length() {
|
|
486
|
+
return this.buffer.length;
|
|
487
|
+
}
|
|
488
|
+
write(data, ...args) {
|
|
489
|
+
const callback = args[args.length - 1];
|
|
490
|
+
this.buffer.push({
|
|
491
|
+
time: Date.now(),
|
|
492
|
+
stream: this.options?.stream,
|
|
493
|
+
entry: this.decoder.write(typeof data === "string" ? Buffer.from(data, typeof args[0] === "string" ? args[0] : void 0) : Buffer.from(data))
|
|
494
|
+
});
|
|
495
|
+
if (this.options?.limit) this.buffer = this.buffer.slice(-this.options.limit);
|
|
496
|
+
if (typeof callback === "function") callback();
|
|
497
|
+
return true;
|
|
498
|
+
}
|
|
499
|
+
reset() {
|
|
500
|
+
this.buffer = [];
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
//#endregion
|
|
505
|
+
//#region src/utils/process-output/process-output-stream.ts
|
|
506
|
+
var ProcessOutputStream = class {
|
|
507
|
+
stream;
|
|
508
|
+
method;
|
|
509
|
+
buffer;
|
|
510
|
+
constructor(stream) {
|
|
511
|
+
this.stream = stream;
|
|
512
|
+
this.method = stream.write;
|
|
513
|
+
this.buffer = new ProcessOutputBuffer({ stream });
|
|
514
|
+
}
|
|
515
|
+
get out() {
|
|
516
|
+
const self = this;
|
|
517
|
+
return new Proxy(this.stream, { get(target, prop, receiver) {
|
|
518
|
+
if (prop === "write") return self.write.bind(self);
|
|
519
|
+
return Reflect.get(target, prop, receiver);
|
|
520
|
+
} });
|
|
521
|
+
}
|
|
522
|
+
hijack() {
|
|
523
|
+
this.stream.write = this.buffer.write.bind(this.buffer);
|
|
524
|
+
}
|
|
525
|
+
release() {
|
|
526
|
+
this.stream.write = this.method;
|
|
527
|
+
const buffer = [...this.buffer.all];
|
|
528
|
+
this.buffer.reset();
|
|
529
|
+
return buffer;
|
|
530
|
+
}
|
|
531
|
+
write(...args) {
|
|
532
|
+
return this.method.apply(this.stream, args);
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/utils/process-output/process-output.ts
|
|
538
|
+
/**
|
|
539
|
+
* Creates a new Listr2 process-output controller.
|
|
540
|
+
*
|
|
541
|
+
* This is used to control the flow to `process.stdout` and `process.stderr` for all renderers.
|
|
542
|
+
*
|
|
543
|
+
* @see {@link https://listr2.kilic.dev/renderer/process-output.html}
|
|
544
|
+
*/
|
|
545
|
+
var ProcessOutput = class {
|
|
546
|
+
options;
|
|
547
|
+
stream;
|
|
548
|
+
active;
|
|
549
|
+
constructor(stdout, stderr, options) {
|
|
550
|
+
this.options = options;
|
|
551
|
+
this.stream = {
|
|
552
|
+
stdout: new ProcessOutputStream(stdout ?? process.stdout),
|
|
553
|
+
stderr: new ProcessOutputStream(stderr ?? process.stderr)
|
|
554
|
+
};
|
|
555
|
+
this.options = {
|
|
556
|
+
dump: ["stdout", "stderr"],
|
|
557
|
+
leaveEmptyLine: true,
|
|
558
|
+
...options
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
get stdout() {
|
|
562
|
+
return this.stream.stdout.out;
|
|
563
|
+
}
|
|
564
|
+
get stderr() {
|
|
565
|
+
return this.stream.stderr.out;
|
|
566
|
+
}
|
|
567
|
+
hijack() {
|
|
568
|
+
if (this.active) throw new Error("ProcessOutput has been already hijacked!");
|
|
569
|
+
this.stream.stdout.write(ANSI_ESCAPE_CODES.CURSOR_HIDE);
|
|
570
|
+
Object.values(this.stream).forEach((stream) => stream.hijack());
|
|
571
|
+
this.active = true;
|
|
572
|
+
}
|
|
573
|
+
release() {
|
|
574
|
+
const output = Object.entries(this.stream).map(([name, stream]) => ({
|
|
575
|
+
name,
|
|
576
|
+
buffer: stream.release()
|
|
577
|
+
})).filter((output) => this.options.dump.includes(output.name)).flatMap((output) => output.buffer).sort((a, b) => a.time - b.time).map((message) => {
|
|
578
|
+
return {
|
|
579
|
+
...message,
|
|
580
|
+
entry: cleanseAnsi(message.entry)
|
|
581
|
+
};
|
|
582
|
+
}).filter((message) => message.entry);
|
|
583
|
+
if (output.length > 0) {
|
|
584
|
+
if (this.options.leaveEmptyLine) this.stdout.write(EOL);
|
|
585
|
+
output.forEach((message) => {
|
|
586
|
+
(message.stream ?? this.stdout).write(message.entry + EOL);
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
this.stream.stdout.write(ANSI_ESCAPE_CODES.CURSOR_SHOW);
|
|
590
|
+
this.active = false;
|
|
591
|
+
}
|
|
592
|
+
toStdout(buffer, eol = true) {
|
|
593
|
+
if (eol) buffer = buffer + EOL;
|
|
594
|
+
return this.stream.stdout.write(buffer);
|
|
595
|
+
}
|
|
596
|
+
toStderr(buffer, eol = true) {
|
|
597
|
+
if (eol) buffer = buffer + EOL;
|
|
598
|
+
return this.stream.stderr.write(buffer);
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/utils/process-output/writable.ts
|
|
604
|
+
/* istanbul ignore next */
|
|
605
|
+
function createWritable(cb) {
|
|
606
|
+
const writable = new Writable();
|
|
607
|
+
writable.rows = Infinity;
|
|
608
|
+
writable.columns = Infinity;
|
|
609
|
+
writable.write = (chunk) => {
|
|
610
|
+
cb(chunk.toString());
|
|
611
|
+
return true;
|
|
612
|
+
};
|
|
613
|
+
return writable;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region src/utils/prompts/adapter.ts
|
|
618
|
+
/* istanbul ignore next */
|
|
619
|
+
var ListrPromptAdapter = class {
|
|
620
|
+
task;
|
|
621
|
+
wrapper;
|
|
622
|
+
state;
|
|
623
|
+
constructor(task, wrapper) {
|
|
624
|
+
this.task = task;
|
|
625
|
+
this.wrapper = wrapper;
|
|
626
|
+
}
|
|
627
|
+
reportStarted() {
|
|
628
|
+
this.state = this.task.state;
|
|
629
|
+
if (this.task.prompt) throw new PromptError("There is already an active prompt attached to this task which may not be cleaned up properly.");
|
|
630
|
+
this.task.prompt = this;
|
|
631
|
+
this.task.state$ = "PROMPT";
|
|
632
|
+
}
|
|
633
|
+
reportFailed() {
|
|
634
|
+
this.task.state$ = "PROMPT_FAILED";
|
|
635
|
+
this.restoreState();
|
|
636
|
+
}
|
|
637
|
+
reportCompleted() {
|
|
638
|
+
this.task.state$ = "PROMPT_COMPLETED";
|
|
639
|
+
this.restoreState();
|
|
640
|
+
}
|
|
641
|
+
restoreState() {
|
|
642
|
+
this.task.prompt = void 0;
|
|
643
|
+
if (this.state) this.task.state = this.state;
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
//#endregion
|
|
648
|
+
//#region src/utils/ui/spinner.ts
|
|
649
|
+
/* istanbul ignore next */
|
|
650
|
+
var Spinner = class {
|
|
651
|
+
spinner = !isUnicodeSupported() ? [
|
|
652
|
+
"-",
|
|
653
|
+
"\\",
|
|
654
|
+
"|",
|
|
655
|
+
"/"
|
|
656
|
+
] : [
|
|
657
|
+
"⠋",
|
|
658
|
+
"⠙",
|
|
659
|
+
"⠹",
|
|
660
|
+
"⠸",
|
|
661
|
+
"⠼",
|
|
662
|
+
"⠴",
|
|
663
|
+
"⠦",
|
|
664
|
+
"⠧",
|
|
665
|
+
"⠇",
|
|
666
|
+
"⠏"
|
|
667
|
+
];
|
|
668
|
+
id;
|
|
669
|
+
spinnerPosition = 0;
|
|
670
|
+
spin() {
|
|
671
|
+
this.spinnerPosition = ++this.spinnerPosition % this.spinner.length;
|
|
672
|
+
}
|
|
673
|
+
fetch() {
|
|
674
|
+
return this.spinner[this.spinnerPosition];
|
|
675
|
+
}
|
|
676
|
+
isRunning() {
|
|
677
|
+
return !!this.id;
|
|
678
|
+
}
|
|
679
|
+
start(cb, interval = 100) {
|
|
680
|
+
this.id = setInterval(() => {
|
|
681
|
+
this.spin();
|
|
682
|
+
if (cb) cb();
|
|
683
|
+
}, interval);
|
|
684
|
+
}
|
|
685
|
+
stop() {
|
|
686
|
+
clearInterval(this.id);
|
|
687
|
+
this.id = void 0;
|
|
688
|
+
}
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
//#endregion
|
|
692
|
+
//#region src/renderer/default/renderer.constants.ts
|
|
693
|
+
let ListrDefaultRendererLogLevels = /* @__PURE__ */ function(ListrDefaultRendererLogLevels) {
|
|
694
|
+
ListrDefaultRendererLogLevels["SKIPPED_WITH_COLLAPSE"] = "SKIPPED_WITH_COLLAPSE";
|
|
695
|
+
ListrDefaultRendererLogLevels["SKIPPED_WITHOUT_COLLAPSE"] = "SKIPPED_WITHOUT_COLLAPSE";
|
|
696
|
+
ListrDefaultRendererLogLevels["OUTPUT"] = "OUTPUT";
|
|
697
|
+
ListrDefaultRendererLogLevels["OUTPUT_WITH_BOTTOMBAR"] = "OUTPUT_WITH_BOTTOMBAR";
|
|
698
|
+
ListrDefaultRendererLogLevels["PENDING"] = "PENDING";
|
|
699
|
+
ListrDefaultRendererLogLevels["COMPLETED"] = "COMPLETED";
|
|
700
|
+
ListrDefaultRendererLogLevels["COMPLETED_WITH_FAILED_SUBTASKS"] = "COMPLETED_WITH_FAILED_SUBTASKS";
|
|
701
|
+
ListrDefaultRendererLogLevels["COMPLETED_WITH_FAILED_SISTER_TASKS"] = "COMPLETED_WITH_SISTER_TASKS_FAILED";
|
|
702
|
+
ListrDefaultRendererLogLevels["RETRY"] = "RETRY";
|
|
703
|
+
ListrDefaultRendererLogLevels["ROLLING_BACK"] = "ROLLING_BACK";
|
|
704
|
+
ListrDefaultRendererLogLevels["ROLLED_BACK"] = "ROLLED_BACK";
|
|
705
|
+
ListrDefaultRendererLogLevels["FAILED"] = "FAILED";
|
|
706
|
+
ListrDefaultRendererLogLevels["FAILED_WITH_FAILED_SUBTASKS"] = "FAILED_WITH_SUBTASKS";
|
|
707
|
+
ListrDefaultRendererLogLevels["WAITING"] = "WAITING";
|
|
708
|
+
ListrDefaultRendererLogLevels["PAUSED"] = "PAUSED";
|
|
709
|
+
ListrDefaultRendererLogLevels["CANCELLED"] = "CANCELLED";
|
|
710
|
+
return ListrDefaultRendererLogLevels;
|
|
711
|
+
}({});
|
|
712
|
+
const LISTR_DEFAULT_RENDERER_STYLE = {
|
|
713
|
+
icon: {
|
|
714
|
+
["SKIPPED_WITH_COLLAPSE"]: figures.arrowDown,
|
|
715
|
+
["SKIPPED_WITHOUT_COLLAPSE"]: figures.warning,
|
|
716
|
+
["OUTPUT"]: figures.pointerSmall,
|
|
717
|
+
["OUTPUT_WITH_BOTTOMBAR"]: figures.pointerSmall,
|
|
718
|
+
["PENDING"]: figures.pointer,
|
|
719
|
+
["COMPLETED"]: figures.tick,
|
|
720
|
+
["COMPLETED_WITH_FAILED_SUBTASKS"]: figures.warning,
|
|
721
|
+
["COMPLETED_WITH_SISTER_TASKS_FAILED"]: figures.squareSmallFilled,
|
|
722
|
+
["RETRY"]: figures.warning,
|
|
723
|
+
["ROLLING_BACK"]: figures.warning,
|
|
724
|
+
["ROLLED_BACK"]: figures.arrowLeft,
|
|
725
|
+
["FAILED"]: figures.cross,
|
|
726
|
+
["FAILED_WITH_SUBTASKS"]: figures.pointer,
|
|
727
|
+
["WAITING"]: figures.squareSmallFilled,
|
|
728
|
+
["PAUSED"]: figures.squareSmallFilled,
|
|
729
|
+
["CANCELLED"]: figures.circleSlash
|
|
730
|
+
},
|
|
731
|
+
color: {
|
|
732
|
+
["SKIPPED_WITH_COLLAPSE"]: color.yellow,
|
|
733
|
+
["SKIPPED_WITHOUT_COLLAPSE"]: color.yellow,
|
|
734
|
+
["PENDING"]: color.yellow,
|
|
735
|
+
["COMPLETED"]: color.green,
|
|
736
|
+
["COMPLETED_WITH_FAILED_SUBTASKS"]: color.yellow,
|
|
737
|
+
["COMPLETED_WITH_SISTER_TASKS_FAILED"]: color.red,
|
|
738
|
+
["RETRY"]: color.yellowBright,
|
|
739
|
+
["ROLLING_BACK"]: color.redBright,
|
|
740
|
+
["ROLLED_BACK"]: color.redBright,
|
|
741
|
+
["FAILED"]: color.red,
|
|
742
|
+
["FAILED_WITH_SUBTASKS"]: color.red,
|
|
743
|
+
["WAITING"]: color.dim,
|
|
744
|
+
["PAUSED"]: color.yellowBright,
|
|
745
|
+
["CANCELLED"]: color.red
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
//#endregion
|
|
750
|
+
//#region src/presets/timer/parser.ts
|
|
751
|
+
/**
|
|
752
|
+
* A basic function to parse minutes and tasks passed given a duration.
|
|
753
|
+
* Useful for renderers to show the task time.
|
|
754
|
+
*/
|
|
755
|
+
/* istanbul ignore next */
|
|
756
|
+
function parseTimer(duration) {
|
|
757
|
+
const seconds = Math.floor(duration / 1e3);
|
|
758
|
+
const minutes = Math.floor(seconds / 60);
|
|
759
|
+
let parsedTime;
|
|
760
|
+
if (seconds === 0 && minutes === 0) parsedTime = `0.${Math.floor(duration / 100)}s`;
|
|
761
|
+
if (seconds > 0) parsedTime = `${seconds % 60}s`;
|
|
762
|
+
if (minutes > 0) parsedTime = `${minutes}m${parsedTime}`;
|
|
763
|
+
return parsedTime;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
//#endregion
|
|
767
|
+
//#region src/presets/timer/preset.ts
|
|
768
|
+
/* istanbul ignore next */
|
|
769
|
+
const PRESET_TIMER = {
|
|
770
|
+
condition: true,
|
|
771
|
+
field: parseTimer,
|
|
772
|
+
format: () => color.dim
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region src/presets/timestamp/parser.ts
|
|
777
|
+
/* istanbul ignore next */
|
|
778
|
+
function parseTimestamp() {
|
|
779
|
+
const now = /* @__PURE__ */ new Date();
|
|
780
|
+
return String(now.getHours()).padStart(2, "0") + ":" + String(now.getMinutes()).padStart(2, "0") + ":" + String(now.getSeconds()).padStart(2, "0");
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
//#endregion
|
|
784
|
+
//#region src/presets/timestamp/preset.ts
|
|
785
|
+
/* istanbul ignore next */
|
|
786
|
+
const PRESET_TIMESTAMP = {
|
|
787
|
+
condition: true,
|
|
788
|
+
field: parseTimestamp,
|
|
789
|
+
format: () => color.dim
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region src/renderer/default/renderer.ts
|
|
794
|
+
var DefaultRenderer = class DefaultRenderer {
|
|
795
|
+
tasks;
|
|
796
|
+
options;
|
|
797
|
+
events;
|
|
798
|
+
static nonTTY = false;
|
|
799
|
+
static rendererOptions = {
|
|
800
|
+
indentation: 2,
|
|
801
|
+
clearOutput: false,
|
|
802
|
+
showSubtasks: true,
|
|
803
|
+
collapseSubtasks: true,
|
|
804
|
+
collapseSkips: true,
|
|
805
|
+
showSkipMessage: true,
|
|
806
|
+
suffixSkips: false,
|
|
807
|
+
collapseErrors: true,
|
|
808
|
+
showErrorMessage: true,
|
|
809
|
+
suffixRetries: true,
|
|
810
|
+
lazy: false,
|
|
811
|
+
removeEmptyLines: true,
|
|
812
|
+
formatOutput: "wrap",
|
|
813
|
+
pausedTimer: {
|
|
814
|
+
...PRESET_TIMER,
|
|
815
|
+
format: () => color.yellowBright
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
static rendererTaskOptions = { outputBar: true };
|
|
819
|
+
prompt;
|
|
820
|
+
activePrompt;
|
|
821
|
+
spinner;
|
|
822
|
+
logger;
|
|
823
|
+
updater;
|
|
824
|
+
truncate;
|
|
825
|
+
wrap;
|
|
826
|
+
buffer = {
|
|
827
|
+
output: /* @__PURE__ */ new Map(),
|
|
828
|
+
bottom: /* @__PURE__ */ new Map()
|
|
829
|
+
};
|
|
830
|
+
cache = {
|
|
831
|
+
render: /* @__PURE__ */ new Map(),
|
|
832
|
+
rendererOptions: /* @__PURE__ */ new Map(),
|
|
833
|
+
rendererTaskOptions: /* @__PURE__ */ new Map()
|
|
834
|
+
};
|
|
835
|
+
constructor(tasks, options, events) {
|
|
836
|
+
this.tasks = tasks;
|
|
837
|
+
this.options = options;
|
|
838
|
+
this.events = events;
|
|
839
|
+
this.options = {
|
|
840
|
+
...DefaultRenderer.rendererOptions,
|
|
841
|
+
...this.options,
|
|
842
|
+
icon: {
|
|
843
|
+
...LISTR_DEFAULT_RENDERER_STYLE.icon,
|
|
844
|
+
...options?.icon ?? {}
|
|
845
|
+
},
|
|
846
|
+
color: {
|
|
847
|
+
...LISTR_DEFAULT_RENDERER_STYLE.color,
|
|
848
|
+
...options?.color ?? {}
|
|
849
|
+
}
|
|
850
|
+
};
|
|
851
|
+
this.spinner = this.options.spinner ?? new Spinner();
|
|
852
|
+
this.logger = this.options.logger ?? new ListrLogger({
|
|
853
|
+
useIcons: true,
|
|
854
|
+
toStderr: []
|
|
855
|
+
});
|
|
856
|
+
this.logger.options.icon = this.options.icon;
|
|
857
|
+
this.logger.options.color = this.options.color;
|
|
858
|
+
}
|
|
859
|
+
async render() {
|
|
860
|
+
const { createLogUpdate } = await import("log-update");
|
|
861
|
+
const { default: truncate } = await import("cli-truncate");
|
|
862
|
+
const { default: wrap } = await import("wrap-ansi");
|
|
863
|
+
this.updater = createLogUpdate(this.logger.process.stdout);
|
|
864
|
+
this.truncate = truncate;
|
|
865
|
+
this.wrap = wrap;
|
|
866
|
+
this.logger.process.hijack();
|
|
867
|
+
/* istanbul ignore if */
|
|
868
|
+
if (!this.options?.lazy) this.spinner.start(() => {
|
|
869
|
+
this.update();
|
|
870
|
+
});
|
|
871
|
+
this.events.on("SHOUD_REFRESH_RENDER", this.refresh);
|
|
872
|
+
}
|
|
873
|
+
update() {
|
|
874
|
+
this.updater(this.create());
|
|
875
|
+
}
|
|
876
|
+
end() {
|
|
877
|
+
this.spinner.stop();
|
|
878
|
+
this.events.off("SHOUD_REFRESH_RENDER", this.refresh);
|
|
879
|
+
this.updater.clear();
|
|
880
|
+
this.updater.done();
|
|
881
|
+
if (!this.options.clearOutput) this.logger.process.toStdout(this.create({ prompt: false }));
|
|
882
|
+
this.logger.process.release();
|
|
883
|
+
}
|
|
884
|
+
create(options) {
|
|
885
|
+
options = {
|
|
886
|
+
tasks: true,
|
|
887
|
+
bottomBar: true,
|
|
888
|
+
prompt: true,
|
|
889
|
+
...options
|
|
890
|
+
};
|
|
891
|
+
const render = [];
|
|
892
|
+
const renderTasks = this.renderer(this.tasks);
|
|
893
|
+
const renderBottomBar = this.renderBottomBar();
|
|
894
|
+
const renderPrompt = this.renderPrompt();
|
|
895
|
+
if (options.tasks && renderTasks.length > 0) render.push(...renderTasks);
|
|
896
|
+
if (options.bottomBar && renderBottomBar.length > 0) {
|
|
897
|
+
if (render.length > 0) render.push("");
|
|
898
|
+
render.push(...renderBottomBar);
|
|
899
|
+
}
|
|
900
|
+
if (options.prompt && renderPrompt.length > 0) {
|
|
901
|
+
if (render.length > 0) render.push("");
|
|
902
|
+
render.push(...renderPrompt);
|
|
903
|
+
}
|
|
904
|
+
return render.join(EOL);
|
|
905
|
+
}
|
|
906
|
+
style(task, output = false) {
|
|
907
|
+
const rendererOptions = this.cache.rendererOptions.get(task.id);
|
|
908
|
+
if (task.isSkipped()) {
|
|
909
|
+
if (output || rendererOptions.collapseSkips) return this.logger.icon("SKIPPED_WITH_COLLAPSE");
|
|
910
|
+
else if (rendererOptions.collapseSkips === false) return this.logger.icon("SKIPPED_WITHOUT_COLLAPSE");
|
|
911
|
+
}
|
|
912
|
+
if (output) {
|
|
913
|
+
if (this.shouldOutputToBottomBar(task)) return this.logger.icon("OUTPUT_WITH_BOTTOMBAR");
|
|
914
|
+
return this.logger.icon("OUTPUT");
|
|
915
|
+
}
|
|
916
|
+
if (task.hasSubtasks()) {
|
|
917
|
+
if (task.isStarted() || task.isPrompt() && rendererOptions.showSubtasks !== false && !task.subtasks.every((subtask) => !subtask.hasTitle())) return this.logger.icon("PENDING");
|
|
918
|
+
else if (task.isCompleted() && task.subtasks.some((subtask) => subtask.hasFailed())) return this.logger.icon("COMPLETED_WITH_FAILED_SUBTASKS");
|
|
919
|
+
else if (task.hasFailed()) return this.logger.icon("FAILED_WITH_SUBTASKS");
|
|
920
|
+
}
|
|
921
|
+
if (task.isStarted() || task.isPrompt()) return this.logger.icon("PENDING", !this.options?.lazy && this.spinner.fetch());
|
|
922
|
+
else if (task.isCompleted()) return this.logger.icon("COMPLETED");
|
|
923
|
+
else if (task.isRetrying()) return this.logger.icon("RETRY", !this.options?.lazy && this.spinner.fetch());
|
|
924
|
+
else if (task.isRollingBack()) return this.logger.icon("ROLLING_BACK", !this.options?.lazy && this.spinner.fetch());
|
|
925
|
+
else if (task.hasRolledBack()) return this.logger.icon("ROLLED_BACK");
|
|
926
|
+
else if (task.hasFailed()) return this.logger.icon("FAILED");
|
|
927
|
+
else if (task.isCancelled()) return this.logger.icon("CANCELLED");
|
|
928
|
+
else if (task.isPaused()) return this.logger.icon("PAUSED");
|
|
929
|
+
return this.logger.icon("WAITING");
|
|
930
|
+
}
|
|
931
|
+
format(message, icon, level) {
|
|
932
|
+
if (message.trim() === "") return [];
|
|
933
|
+
if (icon) message = icon + " " + message;
|
|
934
|
+
let parsed;
|
|
935
|
+
const columns = (this.logger.process.stdout.columns ?? 80) - level * this.options.indentation - 2;
|
|
936
|
+
switch (this.options.formatOutput) {
|
|
937
|
+
case "truncate":
|
|
938
|
+
parsed = message.split(EOL).map((s, i) => {
|
|
939
|
+
return this.truncate(this.indent(s, i), columns);
|
|
940
|
+
});
|
|
941
|
+
break;
|
|
942
|
+
case "wrap":
|
|
943
|
+
parsed = this.wrap(message, columns, {
|
|
944
|
+
hard: true,
|
|
945
|
+
trim: false
|
|
946
|
+
}).split(EOL).map((s, i) => this.indent(s, i));
|
|
947
|
+
break;
|
|
948
|
+
default: throw new ListrRendererError("Format option for the renderer is wrong.");
|
|
949
|
+
}
|
|
950
|
+
if (this.options.removeEmptyLines) parsed = parsed.filter(Boolean);
|
|
951
|
+
return parsed.map((str) => indent(str, level * this.options.indentation));
|
|
952
|
+
}
|
|
953
|
+
shouldOutputToOutputBar(task) {
|
|
954
|
+
const outputBar = this.cache.rendererTaskOptions.get(task.id).outputBar;
|
|
955
|
+
return typeof outputBar === "number" && outputBar !== 0 || typeof outputBar === "boolean" && outputBar !== false;
|
|
956
|
+
}
|
|
957
|
+
shouldOutputToBottomBar(task) {
|
|
958
|
+
const bottomBar = this.cache.rendererTaskOptions.get(task.id).bottomBar;
|
|
959
|
+
return typeof bottomBar === "number" && bottomBar !== 0 || typeof bottomBar === "boolean" && bottomBar !== false || !task.hasTitle();
|
|
960
|
+
}
|
|
961
|
+
refresh = () => {
|
|
962
|
+
this.update();
|
|
963
|
+
};
|
|
964
|
+
renderer(tasks, level = 0) {
|
|
965
|
+
return tasks.flatMap((task) => {
|
|
966
|
+
if (!task.isEnabled()) return [];
|
|
967
|
+
if (this.cache.render.has(task.id)) return this.cache.render.get(task.id);
|
|
968
|
+
this.calculate(task);
|
|
969
|
+
this.setupBuffer(task);
|
|
970
|
+
const rendererOptions = this.cache.rendererOptions.get(task.id);
|
|
971
|
+
const rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);
|
|
972
|
+
const output = [];
|
|
973
|
+
if (task.isPrompt()) {
|
|
974
|
+
if (this.activePrompt && this.activePrompt !== task.id) throw new ListrRendererError("Only one prompt can be active at the given time, please re-evaluate your task design.");
|
|
975
|
+
else if (!this.activePrompt) {
|
|
976
|
+
task.on("PROMPT", (prompt) => {
|
|
977
|
+
const cleansed = cleanseAnsi(prompt);
|
|
978
|
+
if (cleansed) this.prompt = cleansed;
|
|
979
|
+
});
|
|
980
|
+
task.on("STATE", (state) => {
|
|
981
|
+
if (state === "PROMPT_COMPLETED" || task.hasFinalized() || task.hasReset()) {
|
|
982
|
+
this.prompt = null;
|
|
983
|
+
this.activePrompt = null;
|
|
984
|
+
task.off("PROMPT");
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
this.activePrompt = task.id;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
if (task.hasTitle()) if (!(tasks.some((task) => task.hasFailed()) && !task.hasFailed() && task.options.exitOnError !== false && !(task.isCompleted() || task.isSkipped() || task.isCancelled()))) if (task.hasFailed() && rendererOptions.collapseErrors) output.push(...this.format(!task.hasSubtasks() && task.message.error && rendererOptions.showErrorMessage ? task.message.error : task.title, this.style(task), level));
|
|
991
|
+
else if (task.isSkipped() && rendererOptions.collapseSkips) output.push(...this.format(this.logger.suffix(task.message.skip && rendererOptions.showSkipMessage ? task.message.skip : task.title, {
|
|
992
|
+
field: "SKIPPED",
|
|
993
|
+
condition: rendererOptions.suffixSkips,
|
|
994
|
+
format: () => color.dim
|
|
995
|
+
}), this.style(task), level));
|
|
996
|
+
else if (task.isRetrying()) output.push(...this.format(this.logger.suffix(task.title, {
|
|
997
|
+
field: `${"RETRY"}:${task.message.retry.count}`,
|
|
998
|
+
format: () => color.yellow,
|
|
999
|
+
condition: rendererOptions.suffixRetries
|
|
1000
|
+
}), this.style(task), level));
|
|
1001
|
+
else if (task.isCompleted() && task.hasTitle() && assertFunctionOrSelf(rendererTaskOptions.timer?.condition, task.message.duration)) output.push(...this.format(this.logger.suffix(task?.title, {
|
|
1002
|
+
...rendererTaskOptions.timer,
|
|
1003
|
+
args: [task.message.duration]
|
|
1004
|
+
}), this.style(task), level));
|
|
1005
|
+
else if (task.isPaused()) output.push(...this.format(this.logger.suffix(task.title, {
|
|
1006
|
+
...rendererOptions.pausedTimer,
|
|
1007
|
+
args: [task.message.paused - Date.now()]
|
|
1008
|
+
}), this.style(task), level));
|
|
1009
|
+
else output.push(...this.format(task.title, this.style(task), level));
|
|
1010
|
+
else output.push(...this.format(task.title, this.logger.icon("COMPLETED_WITH_SISTER_TASKS_FAILED"), level));
|
|
1011
|
+
if (!task.hasSubtasks() || !rendererOptions.showSubtasks) {
|
|
1012
|
+
if (task.hasFailed() && rendererOptions.collapseErrors === false && (rendererOptions.showErrorMessage || !rendererOptions.showSubtasks)) output.push(...this.dump(task, level, "FAILED"));
|
|
1013
|
+
else if (task.isSkipped() && rendererOptions.collapseSkips === false && (rendererOptions.showSkipMessage || !rendererOptions.showSubtasks)) output.push(...this.dump(task, level, "SKIPPED"));
|
|
1014
|
+
}
|
|
1015
|
+
if (task.isPending() || rendererTaskOptions.persistentOutput) output.push(...this.renderOutputBar(task, level));
|
|
1016
|
+
if (rendererOptions.showSubtasks !== false && task.hasSubtasks() && (task.isPending() || task.hasFinalized() && !task.hasTitle() || task.isCompleted() && rendererOptions.collapseSubtasks === false && !task.subtasks.some((subtask) => this.cache.rendererOptions.get(subtask.id)?.collapseSubtasks === true) || task.subtasks.some((subtask) => this.cache.rendererOptions.get(subtask.id)?.collapseSubtasks === false) || task.subtasks.some((subtask) => subtask.hasFailed()) || task.subtasks.some((subtask) => subtask.hasRolledBack()) || task.subtasks.some((subtask) => subtask.isCancelled()))) {
|
|
1017
|
+
const subtaskLevel = !task.hasTitle() ? level : level + 1;
|
|
1018
|
+
const subtaskRender = this.renderer(task.subtasks, subtaskLevel);
|
|
1019
|
+
output.push(...subtaskRender);
|
|
1020
|
+
}
|
|
1021
|
+
if (task.hasFinalized()) {
|
|
1022
|
+
if (!rendererTaskOptions.persistentOutput) {
|
|
1023
|
+
this.buffer.bottom.delete(task.id);
|
|
1024
|
+
this.buffer.output.delete(task.id);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
if (task.isClosed()) {
|
|
1028
|
+
this.cache.render.set(task.id, output);
|
|
1029
|
+
this.reset(task);
|
|
1030
|
+
}
|
|
1031
|
+
return output;
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
renderOutputBar(task, level) {
|
|
1035
|
+
const output = this.buffer.output.get(task.id);
|
|
1036
|
+
if (!output) return [];
|
|
1037
|
+
return output.all.flatMap((o) => this.dump(task, level, "OUTPUT", o.entry));
|
|
1038
|
+
}
|
|
1039
|
+
renderBottomBar() {
|
|
1040
|
+
if (this.buffer.bottom.size === 0) return [];
|
|
1041
|
+
return Array.from(this.buffer.bottom.values()).flatMap((output) => output.all).sort((a, b) => a.time - b.time).map((output) => output.entry);
|
|
1042
|
+
}
|
|
1043
|
+
renderPrompt() {
|
|
1044
|
+
if (!this.prompt) return [];
|
|
1045
|
+
return [this.prompt];
|
|
1046
|
+
}
|
|
1047
|
+
calculate(task) {
|
|
1048
|
+
if (this.cache.rendererOptions.has(task.id) && this.cache.rendererTaskOptions.has(task.id)) return;
|
|
1049
|
+
const rendererOptions = {
|
|
1050
|
+
...this.options,
|
|
1051
|
+
...task.rendererOptions
|
|
1052
|
+
};
|
|
1053
|
+
this.cache.rendererOptions.set(task.id, rendererOptions);
|
|
1054
|
+
this.cache.rendererTaskOptions.set(task.id, {
|
|
1055
|
+
...DefaultRenderer.rendererTaskOptions,
|
|
1056
|
+
timer: rendererOptions.timer,
|
|
1057
|
+
...task.rendererTaskOptions
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
setupBuffer(task) {
|
|
1061
|
+
if (this.buffer.bottom.has(task.id) || this.buffer.output.has(task.id)) return;
|
|
1062
|
+
if (task.hasFinalized()) return;
|
|
1063
|
+
const rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);
|
|
1064
|
+
if (this.shouldOutputToBottomBar(task) && !this.buffer.bottom.has(task.id)) {
|
|
1065
|
+
this.buffer.bottom.set(task.id, new ProcessOutputBuffer({ limit: typeof rendererTaskOptions.bottomBar === "number" ? rendererTaskOptions.bottomBar : 1 }));
|
|
1066
|
+
task.on("OUTPUT", (output) => {
|
|
1067
|
+
const data = this.dump(task, -1, "OUTPUT", output);
|
|
1068
|
+
this.buffer.bottom.get(task.id).write(data.join(EOL));
|
|
1069
|
+
});
|
|
1070
|
+
task.on("OUTPUT_RESET", () => {
|
|
1071
|
+
this.buffer.bottom.get(task.id)?.reset();
|
|
1072
|
+
});
|
|
1073
|
+
task.on("STATE", (state) => {
|
|
1074
|
+
if (state === "RETRY" || state === "ROLLING_BACK") this.buffer.bottom.delete(task.id);
|
|
1075
|
+
});
|
|
1076
|
+
} else if (this.shouldOutputToOutputBar(task) && !this.buffer.output.has(task.id)) {
|
|
1077
|
+
this.buffer.output.set(task.id, new ProcessOutputBuffer({ limit: typeof rendererTaskOptions.outputBar === "number" ? rendererTaskOptions.outputBar : 1 }));
|
|
1078
|
+
task.on("OUTPUT", (output) => {
|
|
1079
|
+
this.buffer.output.get(task.id).write(output);
|
|
1080
|
+
});
|
|
1081
|
+
task.on("OUTPUT_RESET", () => {
|
|
1082
|
+
this.buffer.output.get(task.id)?.reset();
|
|
1083
|
+
});
|
|
1084
|
+
task.on("STATE", (state) => {
|
|
1085
|
+
if (state === "RETRY" || state === "ROLLING_BACK") this.buffer.output.delete(task.id);
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
reset(task) {
|
|
1090
|
+
this.cache.rendererOptions.delete(task.id);
|
|
1091
|
+
this.cache.rendererTaskOptions.delete(task.id);
|
|
1092
|
+
this.buffer.output.delete(task.id);
|
|
1093
|
+
}
|
|
1094
|
+
dump(task, level, source = "OUTPUT", data) {
|
|
1095
|
+
if (!data) switch (source) {
|
|
1096
|
+
case "OUTPUT":
|
|
1097
|
+
data = task.output;
|
|
1098
|
+
break;
|
|
1099
|
+
case "SKIPPED":
|
|
1100
|
+
data = task.message.skip;
|
|
1101
|
+
break;
|
|
1102
|
+
case "FAILED":
|
|
1103
|
+
data = task.message.error;
|
|
1104
|
+
break;
|
|
1105
|
+
}
|
|
1106
|
+
if (task.hasTitle() && source === "FAILED" && data === task.title || typeof data !== "string") return [];
|
|
1107
|
+
if (source === "OUTPUT") data = cleanseAnsi(data);
|
|
1108
|
+
return this.format(data, this.style(task, true), level + 1);
|
|
1109
|
+
}
|
|
1110
|
+
indent(str, i) {
|
|
1111
|
+
return i > 0 ? indent(str.trimEnd(), this.options.indentation) : str.trimEnd();
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1114
|
+
|
|
1115
|
+
//#endregion
|
|
1116
|
+
//#region src/renderer/silent/renderer.ts
|
|
1117
|
+
var SilentRenderer = class {
|
|
1118
|
+
tasks;
|
|
1119
|
+
options;
|
|
1120
|
+
static nonTTY = true;
|
|
1121
|
+
static rendererOptions;
|
|
1122
|
+
static rendererTaskOptions;
|
|
1123
|
+
constructor(tasks, options) {
|
|
1124
|
+
this.tasks = tasks;
|
|
1125
|
+
this.options = options;
|
|
1126
|
+
}
|
|
1127
|
+
render() {}
|
|
1128
|
+
end() {}
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
//#endregion
|
|
1132
|
+
//#region src/renderer/simple/renderer.ts
|
|
1133
|
+
var SimpleRenderer = class SimpleRenderer {
|
|
1134
|
+
tasks;
|
|
1135
|
+
options;
|
|
1136
|
+
static nonTTY = true;
|
|
1137
|
+
static rendererOptions = { pausedTimer: {
|
|
1138
|
+
...PRESET_TIMER,
|
|
1139
|
+
field: (time) => `${"PAUSED"}:${time}`,
|
|
1140
|
+
format: () => color.yellowBright
|
|
1141
|
+
} };
|
|
1142
|
+
static rendererTaskOptions = {};
|
|
1143
|
+
logger;
|
|
1144
|
+
cache = {
|
|
1145
|
+
rendererOptions: /* @__PURE__ */ new Map(),
|
|
1146
|
+
rendererTaskOptions: /* @__PURE__ */ new Map()
|
|
1147
|
+
};
|
|
1148
|
+
constructor(tasks, options) {
|
|
1149
|
+
this.tasks = tasks;
|
|
1150
|
+
this.options = options;
|
|
1151
|
+
this.options = {
|
|
1152
|
+
...SimpleRenderer.rendererOptions,
|
|
1153
|
+
...options,
|
|
1154
|
+
icon: {
|
|
1155
|
+
...LISTR_LOGGER_STYLE.icon,
|
|
1156
|
+
...options?.icon ?? {}
|
|
1157
|
+
},
|
|
1158
|
+
color: {
|
|
1159
|
+
...LISTR_LOGGER_STYLE.color,
|
|
1160
|
+
...options?.color ?? {}
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
this.logger = this.options.logger ?? new ListrLogger({
|
|
1164
|
+
useIcons: true,
|
|
1165
|
+
toStderr: LISTR_LOGGER_STDERR_LEVELS
|
|
1166
|
+
});
|
|
1167
|
+
this.logger.options.icon = this.options.icon;
|
|
1168
|
+
this.logger.options.color = this.options.color;
|
|
1169
|
+
if (this.options.timestamp) this.logger.options.fields.prefix.unshift(this.options.timestamp);
|
|
1170
|
+
}
|
|
1171
|
+
end() {}
|
|
1172
|
+
render() {
|
|
1173
|
+
this.renderer(this.tasks);
|
|
1174
|
+
}
|
|
1175
|
+
renderer(tasks) {
|
|
1176
|
+
tasks.forEach((task) => {
|
|
1177
|
+
this.calculate(task);
|
|
1178
|
+
task.once("CLOSED", () => {
|
|
1179
|
+
this.reset(task);
|
|
1180
|
+
});
|
|
1181
|
+
const rendererOptions = this.cache.rendererOptions.get(task.id);
|
|
1182
|
+
const rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);
|
|
1183
|
+
task.on("SUBTASK", (subtasks) => {
|
|
1184
|
+
this.renderer(subtasks);
|
|
1185
|
+
});
|
|
1186
|
+
task.on("STATE", (state) => {
|
|
1187
|
+
if (!task.hasTitle()) return;
|
|
1188
|
+
if (state === "STARTED") this.logger.log("STARTED", task.title);
|
|
1189
|
+
else if (state === "COMPLETED") {
|
|
1190
|
+
const timer = rendererTaskOptions?.timer;
|
|
1191
|
+
this.logger.log("COMPLETED", task.title, timer && { suffix: {
|
|
1192
|
+
...timer,
|
|
1193
|
+
condition: !!task.message?.duration && timer.condition,
|
|
1194
|
+
args: [task.message.duration]
|
|
1195
|
+
} });
|
|
1196
|
+
} else if (state === "PROMPT") {
|
|
1197
|
+
this.logger.process.hijack();
|
|
1198
|
+
task.on("PROMPT", (prompt) => {
|
|
1199
|
+
this.logger.process.toStderr(prompt, false);
|
|
1200
|
+
});
|
|
1201
|
+
} else if (state === "PROMPT_COMPLETED") {
|
|
1202
|
+
task.off("PROMPT");
|
|
1203
|
+
this.logger.process.release();
|
|
1204
|
+
} else if (state === "CANCELLED") this.logger.log("CANCELLED", task.title);
|
|
1205
|
+
});
|
|
1206
|
+
task.on("OUTPUT", (output) => {
|
|
1207
|
+
this.logger.log("OUTPUT", output);
|
|
1208
|
+
});
|
|
1209
|
+
task.on("MESSAGE", (message) => {
|
|
1210
|
+
if (message.error) this.logger.log("FAILED", task.title, { suffix: {
|
|
1211
|
+
field: `${"FAILED"}: ${message.error}`,
|
|
1212
|
+
format: () => color.red
|
|
1213
|
+
} });
|
|
1214
|
+
else if (message.skip) this.logger.log("SKIPPED", task.title, { suffix: {
|
|
1215
|
+
field: `${"SKIPPED"}: ${message.skip}`,
|
|
1216
|
+
format: () => color.yellow
|
|
1217
|
+
} });
|
|
1218
|
+
else if (message.rollback) this.logger.log("ROLLBACK", task.title, { suffix: {
|
|
1219
|
+
field: `${"ROLLBACK"}: ${message.rollback}`,
|
|
1220
|
+
format: () => color.red
|
|
1221
|
+
} });
|
|
1222
|
+
else if (message.retry) this.logger.log("RETRY", task.title, { suffix: {
|
|
1223
|
+
field: `${"RETRY"}:${message.retry.count}`,
|
|
1224
|
+
format: () => color.red
|
|
1225
|
+
} });
|
|
1226
|
+
else if (message.paused) {
|
|
1227
|
+
const timer = rendererOptions?.pausedTimer;
|
|
1228
|
+
this.logger.log("PAUSED", task.title, timer && { suffix: {
|
|
1229
|
+
...timer,
|
|
1230
|
+
condition: !!message?.paused && timer.condition,
|
|
1231
|
+
args: [message.paused - Date.now()]
|
|
1232
|
+
} });
|
|
1233
|
+
}
|
|
1234
|
+
});
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
calculate(task) {
|
|
1238
|
+
if (this.cache.rendererOptions.has(task.id) && this.cache.rendererTaskOptions.has(task.id)) return;
|
|
1239
|
+
const rendererOptions = {
|
|
1240
|
+
...this.options,
|
|
1241
|
+
...task.rendererOptions
|
|
1242
|
+
};
|
|
1243
|
+
this.cache.rendererOptions.set(task.id, rendererOptions);
|
|
1244
|
+
this.cache.rendererTaskOptions.set(task.id, {
|
|
1245
|
+
...SimpleRenderer.rendererTaskOptions,
|
|
1246
|
+
timer: rendererOptions.timer,
|
|
1247
|
+
...task.rendererTaskOptions
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
reset(task) {
|
|
1251
|
+
this.cache.rendererOptions.delete(task.id);
|
|
1252
|
+
this.cache.rendererTaskOptions.delete(task.id);
|
|
1253
|
+
}
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region src/renderer/test/serializer.ts
|
|
1258
|
+
var TestRendererSerializer = class {
|
|
1259
|
+
options;
|
|
1260
|
+
constructor(options) {
|
|
1261
|
+
this.options = options;
|
|
1262
|
+
}
|
|
1263
|
+
serialize(event, data, task) {
|
|
1264
|
+
return JSON.stringify(this.generate(event, data, task));
|
|
1265
|
+
}
|
|
1266
|
+
generate(event, data, task) {
|
|
1267
|
+
const output = {
|
|
1268
|
+
event,
|
|
1269
|
+
data
|
|
1270
|
+
};
|
|
1271
|
+
if (typeof this.options?.task !== "boolean") {
|
|
1272
|
+
const t = Object.fromEntries(this.options.task.map((entity) => {
|
|
1273
|
+
const property = task[entity];
|
|
1274
|
+
if (typeof property === "function") return [entity, property.call(task)];
|
|
1275
|
+
return [entity, property];
|
|
1276
|
+
}));
|
|
1277
|
+
if (Object.keys(task).length > 0) output.task = t;
|
|
1278
|
+
}
|
|
1279
|
+
return output;
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
//#endregion
|
|
1284
|
+
//#region src/renderer/test/renderer.ts
|
|
1285
|
+
var TestRenderer = class TestRenderer {
|
|
1286
|
+
tasks;
|
|
1287
|
+
options;
|
|
1288
|
+
static nonTTY = true;
|
|
1289
|
+
static rendererOptions = {
|
|
1290
|
+
subtasks: true,
|
|
1291
|
+
state: Object.values(ListrTaskState),
|
|
1292
|
+
output: true,
|
|
1293
|
+
prompt: true,
|
|
1294
|
+
title: true,
|
|
1295
|
+
messages: [
|
|
1296
|
+
"skip",
|
|
1297
|
+
"error",
|
|
1298
|
+
"retry",
|
|
1299
|
+
"rollback",
|
|
1300
|
+
"paused"
|
|
1301
|
+
],
|
|
1302
|
+
messagesToStderr: [
|
|
1303
|
+
"error",
|
|
1304
|
+
"rollback",
|
|
1305
|
+
"retry"
|
|
1306
|
+
],
|
|
1307
|
+
task: [
|
|
1308
|
+
"hasRolledBack",
|
|
1309
|
+
"isRollingBack",
|
|
1310
|
+
"isCompleted",
|
|
1311
|
+
"isSkipped",
|
|
1312
|
+
"hasFinalized",
|
|
1313
|
+
"hasSubtasks",
|
|
1314
|
+
"title",
|
|
1315
|
+
"hasReset",
|
|
1316
|
+
"hasTitle",
|
|
1317
|
+
"isPrompt",
|
|
1318
|
+
"isPaused",
|
|
1319
|
+
"isPending",
|
|
1320
|
+
"isCancelled",
|
|
1321
|
+
"isStarted",
|
|
1322
|
+
"hasFailed",
|
|
1323
|
+
"isEnabled",
|
|
1324
|
+
"isRetrying",
|
|
1325
|
+
"path"
|
|
1326
|
+
]
|
|
1327
|
+
};
|
|
1328
|
+
static rendererTaskOptions;
|
|
1329
|
+
logger;
|
|
1330
|
+
serializer;
|
|
1331
|
+
constructor(tasks, options) {
|
|
1332
|
+
this.tasks = tasks;
|
|
1333
|
+
this.options = options;
|
|
1334
|
+
this.options = {
|
|
1335
|
+
...TestRenderer.rendererOptions,
|
|
1336
|
+
...this.options
|
|
1337
|
+
};
|
|
1338
|
+
this.logger = this.options.logger ?? new ListrLogger({ useIcons: false });
|
|
1339
|
+
this.serializer = new TestRendererSerializer(this.options);
|
|
1340
|
+
}
|
|
1341
|
+
render() {
|
|
1342
|
+
this.renderer(this.tasks);
|
|
1343
|
+
}
|
|
1344
|
+
end() {}
|
|
1345
|
+
renderer(tasks) {
|
|
1346
|
+
tasks.forEach((task) => {
|
|
1347
|
+
if (this.options.subtasks) task.on("SUBTASK", (subtasks) => {
|
|
1348
|
+
this.renderer(subtasks);
|
|
1349
|
+
});
|
|
1350
|
+
if (this.options.state) task.on("STATE", (state) => {
|
|
1351
|
+
this.logger.toStdout(this.serializer.serialize("STATE", state, task));
|
|
1352
|
+
});
|
|
1353
|
+
if (this.options.output) task.on("OUTPUT", (data) => {
|
|
1354
|
+
this.logger.toStdout(this.serializer.serialize("OUTPUT", data, task));
|
|
1355
|
+
});
|
|
1356
|
+
if (this.options.prompt) task.on("PROMPT", (prompt) => {
|
|
1357
|
+
this.logger.toStdout(this.serializer.serialize("PROMPT", prompt, task));
|
|
1358
|
+
});
|
|
1359
|
+
if (this.options.title) task.on("TITLE", (title) => {
|
|
1360
|
+
this.logger.toStdout(this.serializer.serialize("TITLE", title, task));
|
|
1361
|
+
});
|
|
1362
|
+
task.on("MESSAGE", (message) => {
|
|
1363
|
+
const parsed = Object.fromEntries(Object.entries(message).map(([key, value]) => {
|
|
1364
|
+
if (this.options.messages.includes(key)) return [key, value];
|
|
1365
|
+
}).filter(Boolean));
|
|
1366
|
+
if (Object.keys(parsed).length > 0) {
|
|
1367
|
+
const output = this.serializer.serialize("MESSAGE", parsed, task);
|
|
1368
|
+
if (this.options.messagesToStderr.some((state) => Object.keys(parsed).includes(state))) this.logger.toStderr(output);
|
|
1369
|
+
else this.logger.toStdout(output);
|
|
1370
|
+
}
|
|
1371
|
+
});
|
|
1372
|
+
});
|
|
1373
|
+
}
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1376
|
+
//#endregion
|
|
1377
|
+
//#region src/renderer/verbose/renderer.ts
|
|
1378
|
+
var VerboseRenderer = class VerboseRenderer {
|
|
1379
|
+
tasks;
|
|
1380
|
+
options;
|
|
1381
|
+
static nonTTY = true;
|
|
1382
|
+
static rendererOptions = {
|
|
1383
|
+
logTitleChange: false,
|
|
1384
|
+
pausedTimer: {
|
|
1385
|
+
...PRESET_TIMER,
|
|
1386
|
+
format: () => color.yellowBright
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
static rendererTaskOptions;
|
|
1390
|
+
logger;
|
|
1391
|
+
cache = {
|
|
1392
|
+
rendererOptions: /* @__PURE__ */ new Map(),
|
|
1393
|
+
rendererTaskOptions: /* @__PURE__ */ new Map()
|
|
1394
|
+
};
|
|
1395
|
+
constructor(tasks, options) {
|
|
1396
|
+
this.tasks = tasks;
|
|
1397
|
+
this.options = options;
|
|
1398
|
+
this.options = {
|
|
1399
|
+
...VerboseRenderer.rendererOptions,
|
|
1400
|
+
...this.options,
|
|
1401
|
+
icon: {
|
|
1402
|
+
...LISTR_LOGGER_STYLE.icon,
|
|
1403
|
+
...options?.icon ?? {}
|
|
1404
|
+
},
|
|
1405
|
+
color: {
|
|
1406
|
+
...LISTR_LOGGER_STYLE.color,
|
|
1407
|
+
...options?.color ?? {}
|
|
1408
|
+
}
|
|
1409
|
+
};
|
|
1410
|
+
this.logger = this.options.logger ?? new ListrLogger({
|
|
1411
|
+
useIcons: false,
|
|
1412
|
+
toStderr: LISTR_LOGGER_STDERR_LEVELS
|
|
1413
|
+
});
|
|
1414
|
+
this.logger.options.icon = this.options.icon;
|
|
1415
|
+
this.logger.options.color = this.options.color;
|
|
1416
|
+
if (this.options.timestamp) this.logger.options.fields.prefix.unshift(this.options.timestamp);
|
|
1417
|
+
}
|
|
1418
|
+
render() {
|
|
1419
|
+
this.renderer(this.tasks);
|
|
1420
|
+
}
|
|
1421
|
+
end() {}
|
|
1422
|
+
renderer(tasks) {
|
|
1423
|
+
tasks.forEach((task) => {
|
|
1424
|
+
this.calculate(task);
|
|
1425
|
+
task.once("CLOSED", () => {
|
|
1426
|
+
this.reset(task);
|
|
1427
|
+
});
|
|
1428
|
+
const rendererOptions = this.cache.rendererOptions.get(task.id);
|
|
1429
|
+
const rendererTaskOptions = this.cache.rendererTaskOptions.get(task.id);
|
|
1430
|
+
task.on("SUBTASK", (subtasks) => {
|
|
1431
|
+
this.renderer(subtasks);
|
|
1432
|
+
});
|
|
1433
|
+
task.on("STATE", (state) => {
|
|
1434
|
+
if (!task.hasTitle()) return;
|
|
1435
|
+
if (state === "STARTED") this.logger.log("STARTED", task.title);
|
|
1436
|
+
else if (state === "COMPLETED") {
|
|
1437
|
+
const timer = rendererTaskOptions.timer;
|
|
1438
|
+
this.logger.log("COMPLETED", task.title, timer && { suffix: {
|
|
1439
|
+
...timer,
|
|
1440
|
+
condition: !!task.message?.duration && timer.condition,
|
|
1441
|
+
args: [task.message.duration]
|
|
1442
|
+
} });
|
|
1443
|
+
} else if (state === "CANCELLED") this.logger.log("CANCELLED", task.title);
|
|
1444
|
+
});
|
|
1445
|
+
task.on("OUTPUT", (data) => {
|
|
1446
|
+
this.logger.log("OUTPUT", data);
|
|
1447
|
+
});
|
|
1448
|
+
task.on("PROMPT", (prompt) => {
|
|
1449
|
+
const cleansed = cleanseAnsi(prompt);
|
|
1450
|
+
if (cleansed) this.logger.log("PROMPT", cleansed);
|
|
1451
|
+
});
|
|
1452
|
+
if (this.options?.logTitleChange !== false) task.on("TITLE", (title) => {
|
|
1453
|
+
this.logger.log("TITLE", title);
|
|
1454
|
+
});
|
|
1455
|
+
task.on("MESSAGE", (message) => {
|
|
1456
|
+
if (message?.error) this.logger.log("FAILED", message.error);
|
|
1457
|
+
else if (message?.skip) this.logger.log("SKIPPED", message.skip);
|
|
1458
|
+
else if (message?.rollback) this.logger.log("ROLLBACK", message.rollback);
|
|
1459
|
+
else if (message?.retry) this.logger.log("RETRY", task.title, { suffix: message.retry.count.toString() });
|
|
1460
|
+
else if (message?.paused) {
|
|
1461
|
+
const timer = rendererOptions?.pausedTimer;
|
|
1462
|
+
this.logger.log("PAUSED", task.title, timer && { suffix: {
|
|
1463
|
+
...timer,
|
|
1464
|
+
condition: !!message?.paused && timer.condition,
|
|
1465
|
+
args: [message.paused - Date.now()]
|
|
1466
|
+
} });
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
calculate(task) {
|
|
1472
|
+
if (this.cache.rendererOptions.has(task.id) && this.cache.rendererTaskOptions.has(task.id)) return;
|
|
1473
|
+
const rendererOptions = {
|
|
1474
|
+
...this.options,
|
|
1475
|
+
...task.rendererOptions
|
|
1476
|
+
};
|
|
1477
|
+
this.cache.rendererOptions.set(task.id, rendererOptions);
|
|
1478
|
+
this.cache.rendererTaskOptions.set(task.id, {
|
|
1479
|
+
...VerboseRenderer.rendererTaskOptions,
|
|
1480
|
+
timer: rendererOptions.timer,
|
|
1481
|
+
...task.rendererTaskOptions
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
reset(task) {
|
|
1485
|
+
this.cache.rendererOptions.delete(task.id);
|
|
1486
|
+
this.cache.rendererTaskOptions.delete(task.id);
|
|
1487
|
+
}
|
|
1488
|
+
};
|
|
1489
|
+
|
|
1490
|
+
//#endregion
|
|
1491
|
+
//#region src/utils/ui/renderer.ts
|
|
1492
|
+
const RENDERERS = {
|
|
1493
|
+
default: DefaultRenderer,
|
|
1494
|
+
simple: SimpleRenderer,
|
|
1495
|
+
verbose: VerboseRenderer,
|
|
1496
|
+
test: TestRenderer,
|
|
1497
|
+
silent: SilentRenderer
|
|
1498
|
+
};
|
|
1499
|
+
function isRendererSupported(renderer) {
|
|
1500
|
+
return process.stdout.isTTY === true || renderer.nonTTY === true;
|
|
1501
|
+
}
|
|
1502
|
+
function getRendererClass(renderer) {
|
|
1503
|
+
if (typeof renderer === "string") return RENDERERS[renderer] ?? RENDERERS.default;
|
|
1504
|
+
return typeof renderer === "function" ? renderer : RENDERERS.default;
|
|
1505
|
+
}
|
|
1506
|
+
function getRenderer(options) {
|
|
1507
|
+
if (assertFunctionOrSelf(options?.silentRendererCondition)) return {
|
|
1508
|
+
renderer: getRendererClass("silent"),
|
|
1509
|
+
selection: "SILENT"
|
|
1510
|
+
};
|
|
1511
|
+
const r = {
|
|
1512
|
+
renderer: getRendererClass(options.renderer),
|
|
1513
|
+
options: options.rendererOptions,
|
|
1514
|
+
selection: "PRIMARY"
|
|
1515
|
+
};
|
|
1516
|
+
if (!isRendererSupported(r.renderer) || assertFunctionOrSelf(options?.fallbackRendererCondition)) return {
|
|
1517
|
+
renderer: getRendererClass(options.fallbackRenderer),
|
|
1518
|
+
options: options.fallbackRendererOptions,
|
|
1519
|
+
selection: "SECONDARY"
|
|
1520
|
+
};
|
|
1521
|
+
return r;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
//#endregion
|
|
1525
|
+
//#region src/utils/assert.ts
|
|
1526
|
+
/**
|
|
1527
|
+
* This function asserts the given value as a function or itself.
|
|
1528
|
+
* If the value itself is a function it will evaluate it with the passed in arguments,
|
|
1529
|
+
* elsewise it will directly return itself.
|
|
1530
|
+
*/
|
|
1531
|
+
function assertFunctionOrSelf(functionOrSelf, ...args) {
|
|
1532
|
+
if (typeof functionOrSelf === "function") return functionOrSelf(...args);
|
|
1533
|
+
else return functionOrSelf;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
//#endregion
|
|
1537
|
+
//#region src/utils/concurrency.ts
|
|
1538
|
+
var Concurrency = class {
|
|
1539
|
+
concurrency;
|
|
1540
|
+
count;
|
|
1541
|
+
queue;
|
|
1542
|
+
constructor(options) {
|
|
1543
|
+
this.concurrency = options.concurrency;
|
|
1544
|
+
this.count = 0;
|
|
1545
|
+
this.queue = /* @__PURE__ */ new Set();
|
|
1546
|
+
}
|
|
1547
|
+
add(fn) {
|
|
1548
|
+
if (this.count < this.concurrency) return this.run(fn);
|
|
1549
|
+
return new Promise((resolve) => {
|
|
1550
|
+
const callback = () => resolve(this.run(fn));
|
|
1551
|
+
this.queue.add(callback);
|
|
1552
|
+
});
|
|
1553
|
+
}
|
|
1554
|
+
flush() {
|
|
1555
|
+
for (const callback of this.queue) {
|
|
1556
|
+
if (this.count >= this.concurrency) break;
|
|
1557
|
+
this.queue.delete(callback);
|
|
1558
|
+
callback();
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
run(fn) {
|
|
1562
|
+
this.count++;
|
|
1563
|
+
const promise = fn();
|
|
1564
|
+
const cleanup = () => {
|
|
1565
|
+
this.count--;
|
|
1566
|
+
this.flush();
|
|
1567
|
+
};
|
|
1568
|
+
promise.then(cleanup, () => {
|
|
1569
|
+
this.queue.clear();
|
|
1570
|
+
});
|
|
1571
|
+
return promise;
|
|
1572
|
+
}
|
|
1573
|
+
};
|
|
1574
|
+
|
|
1575
|
+
//#endregion
|
|
1576
|
+
//#region src/utils/delay.ts
|
|
1577
|
+
function delay(time) {
|
|
1578
|
+
return new Promise((resolve) => {
|
|
1579
|
+
setTimeout(resolve, time);
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
//#endregion
|
|
1584
|
+
//#region src/lib/task-wrapper.ts
|
|
1585
|
+
/**
|
|
1586
|
+
* The original Task that is defined by the user is wrapped with the TaskWrapper to provide additional functionality.
|
|
1587
|
+
*
|
|
1588
|
+
* @see {@link https://listr2.kilic.dev/task/task.html}
|
|
1589
|
+
*/
|
|
1590
|
+
var TaskWrapper = class {
|
|
1591
|
+
task;
|
|
1592
|
+
constructor(task) {
|
|
1593
|
+
this.task = task;
|
|
1594
|
+
}
|
|
1595
|
+
/* istanbul ignore next */
|
|
1596
|
+
get title() {
|
|
1597
|
+
return this.task.title;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Title of the current task.
|
|
1601
|
+
*
|
|
1602
|
+
* @see {@link https://listr2.kilic.dev/task/title.html}
|
|
1603
|
+
*/
|
|
1604
|
+
set title(title) {
|
|
1605
|
+
title = Array.isArray(title) ? title : [title];
|
|
1606
|
+
this.task.title$ = splat(title.shift(), ...title);
|
|
1607
|
+
}
|
|
1608
|
+
/* istanbul ignore next */
|
|
1609
|
+
get output() {
|
|
1610
|
+
return this.task.output;
|
|
1611
|
+
}
|
|
1612
|
+
/* istanbul ignore next */
|
|
1613
|
+
/**
|
|
1614
|
+
* Send output from the current task to the renderer.
|
|
1615
|
+
*
|
|
1616
|
+
* @see {@link https://listr2.kilic.dev/task/output.html}
|
|
1617
|
+
*/
|
|
1618
|
+
set output(output) {
|
|
1619
|
+
if (output === null) {
|
|
1620
|
+
this.task.outputReset$ = null;
|
|
1621
|
+
return;
|
|
1622
|
+
}
|
|
1623
|
+
output = Array.isArray(output) ? output : [output];
|
|
1624
|
+
this.task.output$ = splat(output.shift(), ...output);
|
|
1625
|
+
}
|
|
1626
|
+
/* istanbul ignore next */
|
|
1627
|
+
/** Send an output to the output channel as prompt. */
|
|
1628
|
+
set promptOutput(output) {
|
|
1629
|
+
this.task.promptOutput$ = output;
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* The `AbortSignal` for the current run, aborted when the run is interrupted (e.g. `SIGINT`).
|
|
1633
|
+
* Wire it into your own async work (`fetch`, child processes, timers) to cancel cooperatively.
|
|
1634
|
+
*
|
|
1635
|
+
* @see {@link https://listr2.kilic.dev/task/rollback.html}
|
|
1636
|
+
*/
|
|
1637
|
+
get signal() {
|
|
1638
|
+
return this.task.listr.signal;
|
|
1639
|
+
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Interrupt the whole run programmatically, as if it received a `SIGINT`.
|
|
1642
|
+
* The other in-flight tasks roll back or are marked as cancelled, then the process exits with `127`.
|
|
1643
|
+
*/
|
|
1644
|
+
cancel() {
|
|
1645
|
+
this.task.listr.cancel();
|
|
1646
|
+
}
|
|
1647
|
+
/**
|
|
1648
|
+
* Creates a new set of Listr subtasks.
|
|
1649
|
+
*
|
|
1650
|
+
* @see {@link https://listr2.kilic.dev/task/subtasks.html}
|
|
1651
|
+
*/
|
|
1652
|
+
newListr(task, options) {
|
|
1653
|
+
let tasks;
|
|
1654
|
+
if (typeof task === "function") tasks = task(this);
|
|
1655
|
+
else tasks = task;
|
|
1656
|
+
return new Listr(tasks, options, this.task);
|
|
1657
|
+
}
|
|
1658
|
+
/**
|
|
1659
|
+
* Report an error that has to be collected and handled.
|
|
1660
|
+
*
|
|
1661
|
+
* @see {@link https://listr2.kilic.dev/task/error-handling.html}
|
|
1662
|
+
*/
|
|
1663
|
+
report(error, type) {
|
|
1664
|
+
if (this.task.options.collectErrors) this.task.listr.errors?.push(new ListrError(error, type, this.task));
|
|
1665
|
+
this.task.message$ = { error: error.message ?? this.task?.title };
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* Skip the current task.
|
|
1669
|
+
*
|
|
1670
|
+
* @see {@link https://listr2.kilic.dev/task/skip.html}
|
|
1671
|
+
*/
|
|
1672
|
+
skip(message, ...metadata) {
|
|
1673
|
+
this.task.state$ = "SKIPPED";
|
|
1674
|
+
if (message) this.task.message$ = { skip: message ? splat(message, ...metadata) : this.task?.title };
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Check whether this task is currently in a retry state.
|
|
1678
|
+
*
|
|
1679
|
+
* @see {@link https://listr2.kilic.dev/task/retry.html}
|
|
1680
|
+
*/
|
|
1681
|
+
isRetrying() {
|
|
1682
|
+
return this.task.isRetrying() ? this.task.retry : { count: 0 };
|
|
1683
|
+
}
|
|
1684
|
+
/* istanbul ignore next */
|
|
1685
|
+
/**
|
|
1686
|
+
* Create a new prompt for getting user input through the prompt adapter.
|
|
1687
|
+
* This will create a new prompt through the adapter if the task is not currently rendering a prompt or will return the active instance.
|
|
1688
|
+
*
|
|
1689
|
+
* This part of the application requires optional peer dependencies, please refer to documentation.
|
|
1690
|
+
*
|
|
1691
|
+
* @see {@link https://listr2.kilic.dev/task/prompt.html}
|
|
1692
|
+
*/
|
|
1693
|
+
prompt(adapter) {
|
|
1694
|
+
if (this.task.prompt) return this.task.prompt;
|
|
1695
|
+
return new adapter(this.task, this);
|
|
1696
|
+
}
|
|
1697
|
+
/* istanbul ignore next */
|
|
1698
|
+
/**
|
|
1699
|
+
* Generates a fake stdout for your use case, where it will be tunnelled through Listr to handle the rendering process.
|
|
1700
|
+
*
|
|
1701
|
+
* @see {@link https://listr2.kilic.dev/renderer/process-output.html}
|
|
1702
|
+
*/
|
|
1703
|
+
stdout(type) {
|
|
1704
|
+
return createWritable((chunk) => {
|
|
1705
|
+
switch (type) {
|
|
1706
|
+
case "PROMPT":
|
|
1707
|
+
this.promptOutput = chunk;
|
|
1708
|
+
break;
|
|
1709
|
+
default: this.output = chunk;
|
|
1710
|
+
}
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
/** Run this task. */
|
|
1714
|
+
run(ctx) {
|
|
1715
|
+
return this.task.run(ctx, this);
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
//#endregion
|
|
1720
|
+
//#region src/lib/listr-task-event-manager.ts
|
|
1721
|
+
var ListrTaskEventManager = class extends EventManager {};
|
|
1722
|
+
|
|
1723
|
+
//#endregion
|
|
1724
|
+
//#region src/lib/task.ts
|
|
1725
|
+
/**
|
|
1726
|
+
* Creates and handles a runnable instance of the Task.
|
|
1727
|
+
*/
|
|
1728
|
+
var Task = class extends ListrTaskEventManager {
|
|
1729
|
+
listr;
|
|
1730
|
+
task;
|
|
1731
|
+
options;
|
|
1732
|
+
rendererOptions;
|
|
1733
|
+
rendererTaskOptions;
|
|
1734
|
+
/** Unique id per task, can be used for identifying a Task. */
|
|
1735
|
+
id = randomUUID();
|
|
1736
|
+
/** The current state of the task. */
|
|
1737
|
+
state = "WAITING";
|
|
1738
|
+
/** Subtasks of the current task. */
|
|
1739
|
+
subtasks;
|
|
1740
|
+
/** Title of the task. */
|
|
1741
|
+
title;
|
|
1742
|
+
/** Initial/Untouched version of the title for using whenever task has a reset. */
|
|
1743
|
+
initialTitle;
|
|
1744
|
+
/** Output channel for the task. */
|
|
1745
|
+
output;
|
|
1746
|
+
/** Current state of the retry process whenever the task is retrying. */
|
|
1747
|
+
retry;
|
|
1748
|
+
/**
|
|
1749
|
+
* A channel for messages.
|
|
1750
|
+
*
|
|
1751
|
+
* This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers.
|
|
1752
|
+
*/
|
|
1753
|
+
message = {};
|
|
1754
|
+
/** Current prompt instance or prompt error whenever the task is prompting. */
|
|
1755
|
+
prompt;
|
|
1756
|
+
/** Parent task of the current task. */
|
|
1757
|
+
parent;
|
|
1758
|
+
/** Enable flag of this task. */
|
|
1759
|
+
enabled;
|
|
1760
|
+
/** User provided Task callback function to run. */
|
|
1761
|
+
taskFn;
|
|
1762
|
+
/** Marks the task as closed. This is different from finalized since this is not really related to task itself. */
|
|
1763
|
+
closed;
|
|
1764
|
+
constructor(listr, task, options, rendererOptions, rendererTaskOptions) {
|
|
1765
|
+
super();
|
|
1766
|
+
this.listr = listr;
|
|
1767
|
+
this.task = task;
|
|
1768
|
+
this.options = options;
|
|
1769
|
+
this.rendererOptions = rendererOptions;
|
|
1770
|
+
this.rendererTaskOptions = rendererTaskOptions;
|
|
1771
|
+
if (task.title) {
|
|
1772
|
+
const title = Array.isArray(task?.title) ? task.title : [task.title];
|
|
1773
|
+
this.title = splat(title.shift(), ...title);
|
|
1774
|
+
this.initialTitle = this.title;
|
|
1775
|
+
}
|
|
1776
|
+
this.taskFn = task.task;
|
|
1777
|
+
this.parent = listr.parentTask;
|
|
1778
|
+
}
|
|
1779
|
+
/**
|
|
1780
|
+
* Update the current state of the Task and emit the neccassary events.
|
|
1781
|
+
*/
|
|
1782
|
+
set state$(state) {
|
|
1783
|
+
this.state = state;
|
|
1784
|
+
this.emit("STATE", state);
|
|
1785
|
+
if (this.hasSubtasks() && this.hasFailed()) {
|
|
1786
|
+
for (const subtask of this.subtasks) if (subtask.state === "STARTED") subtask.state$ = "FAILED";
|
|
1787
|
+
}
|
|
1788
|
+
this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Update the current output of the Task and emit the neccassary events.
|
|
1792
|
+
*/
|
|
1793
|
+
set output$(data) {
|
|
1794
|
+
this.output = data;
|
|
1795
|
+
this.emit("OUTPUT", data);
|
|
1796
|
+
this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
1797
|
+
}
|
|
1798
|
+
/**
|
|
1799
|
+
* Reset the current output of the Task and emit the neccassary events.
|
|
1800
|
+
*/
|
|
1801
|
+
set outputReset$(data) {
|
|
1802
|
+
this.output = data;
|
|
1803
|
+
this.emit("OUTPUT_RESET");
|
|
1804
|
+
this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* Update the current prompt output of the Task and emit the neccassary events.
|
|
1808
|
+
*/
|
|
1809
|
+
set promptOutput$(data) {
|
|
1810
|
+
this.emit("PROMPT", data);
|
|
1811
|
+
if (cleanseAnsi(data)) this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Update or extend the current message of the Task and emit the neccassary events.
|
|
1815
|
+
*/
|
|
1816
|
+
set message$(data) {
|
|
1817
|
+
this.message = {
|
|
1818
|
+
...this.message,
|
|
1819
|
+
...data
|
|
1820
|
+
};
|
|
1821
|
+
this.emit("MESSAGE", data);
|
|
1822
|
+
this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
1823
|
+
}
|
|
1824
|
+
/**
|
|
1825
|
+
* Update the current title of the Task and emit the neccassary events.
|
|
1826
|
+
*/
|
|
1827
|
+
set title$(title) {
|
|
1828
|
+
this.title = title;
|
|
1829
|
+
this.emit("TITLE", title);
|
|
1830
|
+
this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* Current task path in the hierarchy.
|
|
1834
|
+
*/
|
|
1835
|
+
get path() {
|
|
1836
|
+
return [...this.listr.path, this.initialTitle];
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* Checks whether the current task with the given context should be set as enabled.
|
|
1840
|
+
*/
|
|
1841
|
+
async check(ctx) {
|
|
1842
|
+
if (this.state === "WAITING") {
|
|
1843
|
+
this.enabled = await assertFunctionOrSelf(this.task?.enabled ?? true, ctx);
|
|
1844
|
+
this.emit("ENABLED", this.enabled);
|
|
1845
|
+
this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
1846
|
+
}
|
|
1847
|
+
return this.enabled;
|
|
1848
|
+
}
|
|
1849
|
+
/** Returns whether this task has subtasks. */
|
|
1850
|
+
hasSubtasks() {
|
|
1851
|
+
return this.subtasks?.length > 0;
|
|
1852
|
+
}
|
|
1853
|
+
/** Returns whether this task is finalized in someform. */
|
|
1854
|
+
hasFinalized() {
|
|
1855
|
+
return this.isCompleted() || this.hasFailed() || this.isSkipped() || this.hasRolledBack() || this.isCancelled();
|
|
1856
|
+
}
|
|
1857
|
+
/** Returns whether this task is in progress. */
|
|
1858
|
+
isPending() {
|
|
1859
|
+
return this.isStarted() || this.isPrompt() || this.hasReset();
|
|
1860
|
+
}
|
|
1861
|
+
/** Returns whether this task has started. */
|
|
1862
|
+
isStarted() {
|
|
1863
|
+
return this.state === "STARTED";
|
|
1864
|
+
}
|
|
1865
|
+
/** Returns whether this task is skipped. */
|
|
1866
|
+
isSkipped() {
|
|
1867
|
+
return this.state === "SKIPPED";
|
|
1868
|
+
}
|
|
1869
|
+
/** Returns whether this task has been completed. */
|
|
1870
|
+
isCompleted() {
|
|
1871
|
+
return this.state === "COMPLETED";
|
|
1872
|
+
}
|
|
1873
|
+
/** Returns whether this task has been failed. */
|
|
1874
|
+
hasFailed() {
|
|
1875
|
+
return this.state === "FAILED";
|
|
1876
|
+
}
|
|
1877
|
+
/** Returns whether this task has been cancelled by an interruption. */
|
|
1878
|
+
isCancelled() {
|
|
1879
|
+
return this.state === "CANCELLED";
|
|
1880
|
+
}
|
|
1881
|
+
/** Returns whether this task has an active rollback task going on. */
|
|
1882
|
+
isRollingBack() {
|
|
1883
|
+
return this.state === "ROLLING_BACK";
|
|
1884
|
+
}
|
|
1885
|
+
/** Returns whether the rollback action was successful. */
|
|
1886
|
+
hasRolledBack() {
|
|
1887
|
+
return this.state === "ROLLED_BACK";
|
|
1888
|
+
}
|
|
1889
|
+
/** Returns whether this task has an actively retrying task going on. */
|
|
1890
|
+
isRetrying() {
|
|
1891
|
+
return this.state === "RETRY";
|
|
1892
|
+
}
|
|
1893
|
+
/** Returns whether this task has some kind of reset like retry and rollback going on. */
|
|
1894
|
+
hasReset() {
|
|
1895
|
+
return this.state === "RETRY" || this.state === "ROLLING_BACK";
|
|
1896
|
+
}
|
|
1897
|
+
/** Returns whether enabled function resolves to true. */
|
|
1898
|
+
isEnabled() {
|
|
1899
|
+
return this.enabled;
|
|
1900
|
+
}
|
|
1901
|
+
/** Returns whether this task actually has a title. */
|
|
1902
|
+
hasTitle() {
|
|
1903
|
+
return typeof this?.title === "string";
|
|
1904
|
+
}
|
|
1905
|
+
/** Returns whether this task has a prompt inside. */
|
|
1906
|
+
isPrompt() {
|
|
1907
|
+
return this.state === "PROMPT";
|
|
1908
|
+
}
|
|
1909
|
+
/** Returns whether this task is currently paused. */
|
|
1910
|
+
isPaused() {
|
|
1911
|
+
return this.state === "PAUSED";
|
|
1912
|
+
}
|
|
1913
|
+
/** Returns whether this task is closed. */
|
|
1914
|
+
isClosed() {
|
|
1915
|
+
return this.closed;
|
|
1916
|
+
}
|
|
1917
|
+
/** Pause the given task for certain time. */
|
|
1918
|
+
async pause(time) {
|
|
1919
|
+
const state = this.state;
|
|
1920
|
+
this.state$ = "PAUSED";
|
|
1921
|
+
this.message$ = { paused: Date.now() + time };
|
|
1922
|
+
await delay(time);
|
|
1923
|
+
this.state$ = state;
|
|
1924
|
+
this.message$ = { paused: null };
|
|
1925
|
+
}
|
|
1926
|
+
/** Run the current task. */
|
|
1927
|
+
async run(context, wrapper) {
|
|
1928
|
+
const handleResult = (result) => {
|
|
1929
|
+
if (result instanceof Listr) {
|
|
1930
|
+
result.options = {
|
|
1931
|
+
...this.options,
|
|
1932
|
+
...result.options
|
|
1933
|
+
};
|
|
1934
|
+
result.rendererClass = getRendererClass("silent");
|
|
1935
|
+
this.subtasks = result.tasks;
|
|
1936
|
+
result.errors = this.listr.errors;
|
|
1937
|
+
this.emit("SUBTASK", this.subtasks);
|
|
1938
|
+
result = result.run(context);
|
|
1939
|
+
} else if (result instanceof Promise) result = result.then(handleResult);
|
|
1940
|
+
else if (isReadable(result)) result = new Promise((resolve, reject) => {
|
|
1941
|
+
result.on("data", (data) => {
|
|
1942
|
+
this.output$ = data.toString();
|
|
1943
|
+
});
|
|
1944
|
+
result.on("error", (error) => reject(error));
|
|
1945
|
+
result.on("end", () => resolve(null));
|
|
1946
|
+
});
|
|
1947
|
+
else if (isObservable(result)) result = new Promise((resolve, reject) => {
|
|
1948
|
+
result.subscribe({
|
|
1949
|
+
next: (data) => {
|
|
1950
|
+
this.output$ = data;
|
|
1951
|
+
},
|
|
1952
|
+
error: reject,
|
|
1953
|
+
complete: resolve
|
|
1954
|
+
});
|
|
1955
|
+
});
|
|
1956
|
+
return result;
|
|
1957
|
+
};
|
|
1958
|
+
const startTime = Date.now();
|
|
1959
|
+
this.state$ = "STARTED";
|
|
1960
|
+
const skipped = await assertFunctionOrSelf(this.task?.skip ?? false, context);
|
|
1961
|
+
if (skipped) {
|
|
1962
|
+
if (typeof skipped === "string") this.message$ = { skip: skipped };
|
|
1963
|
+
else if (this.hasTitle()) this.message$ = { skip: this.title };
|
|
1964
|
+
else this.message$ = { skip: "Skipped task without a title." };
|
|
1965
|
+
this.state$ = "SKIPPED";
|
|
1966
|
+
return;
|
|
1967
|
+
}
|
|
1968
|
+
try {
|
|
1969
|
+
const retryCount = typeof this.task?.retry === "number" && this.task.retry > 0 ? this.task.retry + 1 : typeof this.task?.retry === "object" && this.task.retry.tries > 0 ? this.task.retry.tries + 1 : 1;
|
|
1970
|
+
const retryDelay = typeof this.task.retry === "object" && this.task.retry.delay;
|
|
1971
|
+
for (let retries = 1; retries <= retryCount; retries++) try {
|
|
1972
|
+
await Promise.race([handleResult(this.taskFn(context, wrapper)), this.whenInterrupted()]);
|
|
1973
|
+
break;
|
|
1974
|
+
} catch (err) {
|
|
1975
|
+
if (this.listr.signal.aborted) throw err;
|
|
1976
|
+
if (retries !== retryCount) {
|
|
1977
|
+
this.retry = {
|
|
1978
|
+
count: retries,
|
|
1979
|
+
error: err
|
|
1980
|
+
};
|
|
1981
|
+
this.message$ = { retry: this.retry };
|
|
1982
|
+
this.title$ = this.initialTitle;
|
|
1983
|
+
this.output = void 0;
|
|
1984
|
+
wrapper.report(err, "WILL_RETRY");
|
|
1985
|
+
this.state$ = "RETRY";
|
|
1986
|
+
if (retryDelay) await this.pause(retryDelay);
|
|
1987
|
+
} else throw err;
|
|
1988
|
+
}
|
|
1989
|
+
if (this.isStarted() || this.isRetrying()) {
|
|
1990
|
+
this.message$ = { duration: Date.now() - startTime };
|
|
1991
|
+
this.state$ = "COMPLETED";
|
|
1992
|
+
}
|
|
1993
|
+
} catch (error) {
|
|
1994
|
+
if (this.prompt instanceof PromptError) error = this.prompt;
|
|
1995
|
+
if (this.task?.rollback) {
|
|
1996
|
+
wrapper.report(error, "WILL_ROLLBACK");
|
|
1997
|
+
try {
|
|
1998
|
+
this.state$ = "ROLLING_BACK";
|
|
1999
|
+
await this.task.rollback(context, wrapper);
|
|
2000
|
+
this.message$ = { rollback: this.title };
|
|
2001
|
+
this.state$ = "ROLLED_BACK";
|
|
2002
|
+
} catch (err) {
|
|
2003
|
+
this.state$ = "FAILED";
|
|
2004
|
+
wrapper.report(err, "HAS_FAILED_TO_ROLLBACK");
|
|
2005
|
+
this.close();
|
|
2006
|
+
throw err;
|
|
2007
|
+
}
|
|
2008
|
+
if (this.listr.options?.exitAfterRollback !== false) {
|
|
2009
|
+
this.close();
|
|
2010
|
+
throw error;
|
|
2011
|
+
}
|
|
2012
|
+
} else {
|
|
2013
|
+
if (this.listr.signal.aborted) {
|
|
2014
|
+
this.state$ = "CANCELLED";
|
|
2015
|
+
throw error;
|
|
2016
|
+
}
|
|
2017
|
+
this.state$ = "FAILED";
|
|
2018
|
+
if (this.listr.options.exitOnError !== false && await assertFunctionOrSelf(this.task?.exitOnError, context) !== false) {
|
|
2019
|
+
wrapper.report(error, "HAS_FAILED");
|
|
2020
|
+
this.close();
|
|
2021
|
+
throw error;
|
|
2022
|
+
} else if (!this.hasSubtasks()) wrapper.report(error, "HAS_FAILED_WITHOUT_ERROR");
|
|
2023
|
+
}
|
|
2024
|
+
} finally {
|
|
2025
|
+
this.close();
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
close() {
|
|
2029
|
+
this.emit("CLOSED");
|
|
2030
|
+
this.listr.events.emit("SHOUD_REFRESH_RENDER");
|
|
2031
|
+
this.complete();
|
|
2032
|
+
}
|
|
2033
|
+
whenInterrupted() {
|
|
2034
|
+
return new Promise((_, reject) => {
|
|
2035
|
+
const onAbort = () => {
|
|
2036
|
+
if (!this.hasSubtasks()) reject(/* @__PURE__ */ new Error("Interrupted."));
|
|
2037
|
+
};
|
|
2038
|
+
if (this.listr.signal.aborted) {
|
|
2039
|
+
onAbort();
|
|
2040
|
+
return;
|
|
2041
|
+
}
|
|
2042
|
+
this.listr.signal.addEventListener("abort", onAbort, { once: true });
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
};
|
|
2046
|
+
|
|
2047
|
+
//#endregion
|
|
2048
|
+
//#region src/lib/listr-event-manager.ts
|
|
2049
|
+
var ListrEventManager = class extends EventManager {};
|
|
2050
|
+
|
|
2051
|
+
//#endregion
|
|
2052
|
+
//#region src/listr.ts
|
|
2053
|
+
/**
|
|
2054
|
+
* Create a new task list with Listr.
|
|
2055
|
+
*
|
|
2056
|
+
* @see {@link https://listr2.kilic.dev/listr/listr.html}
|
|
2057
|
+
*/
|
|
2058
|
+
var Listr = class {
|
|
2059
|
+
task;
|
|
2060
|
+
options;
|
|
2061
|
+
parentTask;
|
|
2062
|
+
tasks = [];
|
|
2063
|
+
errors;
|
|
2064
|
+
ctx;
|
|
2065
|
+
events;
|
|
2066
|
+
path = [];
|
|
2067
|
+
rendererClass;
|
|
2068
|
+
rendererClassOptions;
|
|
2069
|
+
rendererSelection;
|
|
2070
|
+
boundSignalHandler;
|
|
2071
|
+
signal;
|
|
2072
|
+
concurrency;
|
|
2073
|
+
renderer;
|
|
2074
|
+
abortController;
|
|
2075
|
+
startedTasks = [];
|
|
2076
|
+
constructor(task, options, parentTask) {
|
|
2077
|
+
this.task = task;
|
|
2078
|
+
this.options = options;
|
|
2079
|
+
this.parentTask = parentTask;
|
|
2080
|
+
this.options = {
|
|
2081
|
+
concurrent: false,
|
|
2082
|
+
renderer: "default",
|
|
2083
|
+
fallbackRenderer: "simple",
|
|
2084
|
+
exitOnError: true,
|
|
2085
|
+
exitAfterRollback: true,
|
|
2086
|
+
collectErrors: false,
|
|
2087
|
+
registerSignalListeners: true,
|
|
2088
|
+
...this.parentTask?.options ?? {},
|
|
2089
|
+
...options
|
|
2090
|
+
};
|
|
2091
|
+
if (this.options.concurrent === true) this.options.concurrent = Infinity;
|
|
2092
|
+
else if (typeof this.options.concurrent !== "number") this.options.concurrent = 1;
|
|
2093
|
+
this.concurrency = new Concurrency({ concurrency: this.options.concurrent });
|
|
2094
|
+
if (parentTask) {
|
|
2095
|
+
this.path = [...parentTask.listr.path, parentTask.title];
|
|
2096
|
+
this.errors = parentTask.listr.errors;
|
|
2097
|
+
} else this.errors = this.options.collectErrors ? [] : null;
|
|
2098
|
+
if (this.parentTask?.listr.events instanceof ListrEventManager) this.events = this.parentTask.listr.events;
|
|
2099
|
+
else this.events = new ListrEventManager();
|
|
2100
|
+
if (this.parentTask?.listr.abortController instanceof AbortController) this.abortController = this.parentTask.listr.abortController;
|
|
2101
|
+
else {
|
|
2102
|
+
this.abortController = new AbortController();
|
|
2103
|
+
setMaxListeners(0, this.abortController.signal);
|
|
2104
|
+
}
|
|
2105
|
+
this.signal = this.abortController.signal;
|
|
2106
|
+
/* istanbul ignore if */
|
|
2107
|
+
if (this.options?.forceTTY || process.env["LISTR_FORCE_TTY"]) {
|
|
2108
|
+
process.stdout.isTTY = true;
|
|
2109
|
+
process.stderr.isTTY = true;
|
|
2110
|
+
}
|
|
2111
|
+
/* istanbul ignore if */
|
|
2112
|
+
if (this.options?.forceUnicode) process.env["LISTR_FORCE_UNICODE"] = "1";
|
|
2113
|
+
const renderer = getRenderer({
|
|
2114
|
+
renderer: this.options.renderer,
|
|
2115
|
+
rendererOptions: this.options.rendererOptions,
|
|
2116
|
+
fallbackRenderer: this.options.fallbackRenderer,
|
|
2117
|
+
fallbackRendererOptions: this.options.fallbackRendererOptions,
|
|
2118
|
+
fallbackRendererCondition: this.options?.fallbackRendererCondition,
|
|
2119
|
+
silentRendererCondition: this.options?.silentRendererCondition
|
|
2120
|
+
});
|
|
2121
|
+
this.rendererClass = renderer.renderer;
|
|
2122
|
+
this.rendererClassOptions = renderer.options;
|
|
2123
|
+
this.rendererSelection = renderer.selection;
|
|
2124
|
+
/* istanbul ignore next */
|
|
2125
|
+
this.add(task ?? []);
|
|
2126
|
+
/* istanbul ignore if */
|
|
2127
|
+
if (this.options.registerSignalListeners && this.isRoot()) {
|
|
2128
|
+
this.boundSignalHandler = this.signalHandler.bind(this);
|
|
2129
|
+
process.on("SIGINT", this.boundSignalHandler).setMaxListeners(0);
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Whether this is the root task.
|
|
2134
|
+
*/
|
|
2135
|
+
isRoot() {
|
|
2136
|
+
return !this.parentTask;
|
|
2137
|
+
}
|
|
2138
|
+
/**
|
|
2139
|
+
* Whether this is a subtask of another task list.
|
|
2140
|
+
*/
|
|
2141
|
+
isSubtask() {
|
|
2142
|
+
return !!this.parentTask;
|
|
2143
|
+
}
|
|
2144
|
+
/**
|
|
2145
|
+
* Add tasks to current task list.
|
|
2146
|
+
*
|
|
2147
|
+
* @see {@link https://listr2.kilic.dev/task/task.html}
|
|
2148
|
+
*/
|
|
2149
|
+
add(tasks) {
|
|
2150
|
+
this.tasks.push(...this.generate(tasks));
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* Run the task list.
|
|
2154
|
+
*
|
|
2155
|
+
* @see {@link https://listr2.kilic.dev/listr/listr.html#run-the-generated-task-list}
|
|
2156
|
+
*/
|
|
2157
|
+
async run(context) {
|
|
2158
|
+
if (!this.renderer) this.renderer = new this.rendererClass(this.tasks, this.rendererClassOptions, this.events);
|
|
2159
|
+
await this.renderer.render();
|
|
2160
|
+
this.ctx = this.options?.ctx ?? context ?? {};
|
|
2161
|
+
let error;
|
|
2162
|
+
let failed = false;
|
|
2163
|
+
try {
|
|
2164
|
+
await Promise.all(this.tasks.map((task) => task.check(this.ctx)));
|
|
2165
|
+
await Promise.all(this.tasks.map((task) => this.concurrency.add(() => this.runTask(task))));
|
|
2166
|
+
} catch (err) {
|
|
2167
|
+
failed = true;
|
|
2168
|
+
error = err;
|
|
2169
|
+
}
|
|
2170
|
+
if (this.signal.aborted) {
|
|
2171
|
+
await Promise.allSettled(this.startedTasks);
|
|
2172
|
+
if (this.isRoot()) {
|
|
2173
|
+
this.cancelUnfinishedTasks();
|
|
2174
|
+
this.renderer.end();
|
|
2175
|
+
this.removeSignalHandler();
|
|
2176
|
+
process.exit(127);
|
|
2177
|
+
return this.ctx;
|
|
2178
|
+
}
|
|
2179
|
+
throw error ?? /* @__PURE__ */ new Error("Interrupted.");
|
|
2180
|
+
}
|
|
2181
|
+
if (failed && this.options.exitOnError !== false) {
|
|
2182
|
+
this.renderer.end(error);
|
|
2183
|
+
this.removeSignalHandler();
|
|
2184
|
+
throw error;
|
|
2185
|
+
}
|
|
2186
|
+
if (!failed) {
|
|
2187
|
+
this.renderer.end();
|
|
2188
|
+
this.removeSignalHandler();
|
|
2189
|
+
}
|
|
2190
|
+
return this.ctx;
|
|
2191
|
+
}
|
|
2192
|
+
/**
|
|
2193
|
+
* Interrupt the running task list programmatically, as if it received a `SIGINT`.
|
|
2194
|
+
*
|
|
2195
|
+
* In-flight tasks roll back or are marked as cancelled and the process exits with `127`.
|
|
2196
|
+
*/
|
|
2197
|
+
cancel() {
|
|
2198
|
+
this.abortController.abort();
|
|
2199
|
+
}
|
|
2200
|
+
generate(tasks) {
|
|
2201
|
+
tasks = Array.isArray(tasks) ? tasks : [tasks];
|
|
2202
|
+
return tasks.map((task) => {
|
|
2203
|
+
let rendererTaskOptions;
|
|
2204
|
+
if (this.rendererSelection === "PRIMARY") rendererTaskOptions = task.rendererOptions;
|
|
2205
|
+
else if (this.rendererSelection === "SECONDARY") rendererTaskOptions = task.fallbackRendererOptions;
|
|
2206
|
+
return new Task(this, task, this.options, this.rendererClassOptions, rendererTaskOptions);
|
|
2207
|
+
});
|
|
2208
|
+
}
|
|
2209
|
+
async runTask(task) {
|
|
2210
|
+
if (!await task.check(this.ctx)) return;
|
|
2211
|
+
const promise = new TaskWrapper(task).run(this.ctx);
|
|
2212
|
+
this.startedTasks.push(promise);
|
|
2213
|
+
return promise;
|
|
2214
|
+
}
|
|
2215
|
+
signalHandler() {
|
|
2216
|
+
this.abortController.abort();
|
|
2217
|
+
}
|
|
2218
|
+
removeSignalHandler() {
|
|
2219
|
+
if (this.boundSignalHandler) process.removeListener("SIGINT", this.boundSignalHandler);
|
|
2220
|
+
}
|
|
2221
|
+
cancelUnfinishedTasks(tasks = this.tasks) {
|
|
2222
|
+
for (const task of tasks) {
|
|
2223
|
+
if (task.hasSubtasks()) this.cancelUnfinishedTasks(task.subtasks);
|
|
2224
|
+
if (task.isEnabled() !== false && !task.hasFinalized()) task.state$ = "CANCELLED";
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
};
|
|
2228
|
+
|
|
2229
|
+
//#endregion
|
|
2230
|
+
export { ANSI_ESCAPE, ANSI_ESCAPE_CODES, BaseEventMap, Concurrency, DefaultRenderer, EventManager, LISTR_DEFAULT_RENDERER_STYLE, LISTR_LOGGER_STDERR_LEVELS, LISTR_LOGGER_STYLE, Listr, ListrDefaultRendererLogLevels, ListrEnvironmentVariables, ListrError, ListrErrorTypes, ListrEventManager, ListrEventType, ListrLogLevels, ListrLogger, ListrPromptAdapter, ListrRendererError, ListrRendererSelection, ListrTaskEventManager, ListrTaskEventType, ListrTaskState, PRESET_TIMER, PRESET_TIMESTAMP, ProcessOutput, ProcessOutputBuffer, ProcessOutputStream, PromptError, SilentRenderer, SimpleRenderer, Spinner, TestRenderer, TestRendererSerializer, VerboseRenderer, assertFunctionOrSelf, cleanseAnsi, color, createWritable, delay, figures, getRenderer, getRendererClass, indent, isObservable, isReadable, isUnicodeSupported, parseTimer, parseTimestamp, splat };
|