prismic-ts-codegen 0.1.15 → 0.1.17
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/bin/prismic-ts-codegen.js +3 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs +144 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs.map +1 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.js +143 -0
- package/dist/_node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.cjs +82 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.cjs.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.js +83 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs +62 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js +61 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.cjs +35 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.cjs.map +1 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.js +36 -0
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/dist/_node_modules/@babel/highlight/lib/index.cjs +100 -0
- package/dist/_node_modules/@babel/highlight/lib/index.cjs.map +1 -0
- package/dist/_node_modules/@babel/highlight/lib/index.js +99 -0
- package/dist/_node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/dist/_node_modules/ansi-styles/index.cjs +146 -0
- package/dist/_node_modules/ansi-styles/index.cjs.map +1 -0
- package/dist/_node_modules/ansi-styles/index.js +146 -0
- package/dist/_node_modules/ansi-styles/index.js.map +1 -0
- package/dist/_node_modules/arrify/index.cjs +10 -0
- package/dist/_node_modules/arrify/index.cjs.map +1 -0
- package/dist/_node_modules/arrify/index.js +10 -0
- package/dist/_node_modules/arrify/index.js.map +1 -0
- package/dist/_node_modules/camelcase/index.cjs +83 -0
- package/dist/_node_modules/camelcase/index.cjs.map +1 -0
- package/dist/_node_modules/camelcase/index.js +84 -0
- package/dist/_node_modules/camelcase/index.js.map +1 -0
- package/dist/_node_modules/camelcase-keys/index.cjs +55 -0
- package/dist/_node_modules/camelcase-keys/index.cjs.map +1 -0
- package/dist/_node_modules/camelcase-keys/index.js +56 -0
- package/dist/_node_modules/camelcase-keys/index.js.map +1 -0
- package/dist/_node_modules/chalk/index.cjs +172 -0
- package/dist/_node_modules/chalk/index.cjs.map +1 -0
- package/dist/_node_modules/chalk/index.js +172 -0
- package/dist/_node_modules/chalk/index.js.map +1 -0
- package/dist/_node_modules/chalk/templates.cjs +108 -0
- package/dist/_node_modules/chalk/templates.cjs.map +1 -0
- package/dist/_node_modules/chalk/templates.js +108 -0
- package/dist/_node_modules/chalk/templates.js.map +1 -0
- package/dist/_node_modules/color-convert/conversions.cjs +710 -0
- package/dist/_node_modules/color-convert/conversions.cjs.map +1 -0
- package/dist/_node_modules/color-convert/conversions.js +710 -0
- package/dist/_node_modules/color-convert/conversions.js.map +1 -0
- package/dist/_node_modules/color-convert/index.cjs +59 -0
- package/dist/_node_modules/color-convert/index.cjs.map +1 -0
- package/dist/_node_modules/color-convert/index.js +59 -0
- package/dist/_node_modules/color-convert/index.js.map +1 -0
- package/dist/_node_modules/color-convert/route.cjs +69 -0
- package/dist/_node_modules/color-convert/route.cjs.map +1 -0
- package/dist/_node_modules/color-convert/route.js +69 -0
- package/dist/_node_modules/color-convert/route.js.map +1 -0
- package/dist/_node_modules/color-name/index.cjs +154 -0
- package/dist/_node_modules/color-name/index.cjs.map +1 -0
- package/dist/_node_modules/color-name/index.js +154 -0
- package/dist/_node_modules/color-name/index.js.map +1 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs +41 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js +41 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
- package/dist/_node_modules/decamelize/index.cjs +38 -0
- package/dist/_node_modules/decamelize/index.cjs.map +1 -0
- package/dist/_node_modules/decamelize/index.js +39 -0
- package/dist/_node_modules/decamelize/index.js.map +1 -0
- package/dist/_node_modules/decamelize-keys/index.cjs +50 -0
- package/dist/_node_modules/decamelize-keys/index.cjs.map +1 -0
- package/dist/_node_modules/decamelize-keys/index.js +51 -0
- package/dist/_node_modules/decamelize-keys/index.js.map +1 -0
- package/dist/_node_modules/error-ex/index.cjs +109 -0
- package/dist/_node_modules/error-ex/index.cjs.map +1 -0
- package/dist/_node_modules/error-ex/index.js +109 -0
- package/dist/_node_modules/error-ex/index.js.map +1 -0
- package/dist/_node_modules/escape-string-regexp/index.cjs +11 -0
- package/dist/_node_modules/escape-string-regexp/index.cjs.map +1 -0
- package/dist/_node_modules/escape-string-regexp/index.js +11 -0
- package/dist/_node_modules/escape-string-regexp/index.js.map +1 -0
- package/dist/_node_modules/fetch-blob/file.cjs +61 -0
- package/dist/_node_modules/fetch-blob/file.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/file.js +61 -0
- package/dist/_node_modules/fetch-blob/file.js.map +1 -0
- package/dist/_node_modules/fetch-blob/index.cjs +223 -0
- package/dist/_node_modules/fetch-blob/index.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/index.js +223 -0
- package/dist/_node_modules/fetch-blob/index.js.map +1 -0
- package/dist/_node_modules/fetch-blob/streams.cjs +43 -0
- package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/streams.js +42 -0
- package/dist/_node_modules/fetch-blob/streams.js.map +1 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs +116 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.js +116 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -0
- package/dist/_node_modules/function-bind/implementation.cjs +47 -0
- package/dist/_node_modules/function-bind/implementation.cjs.map +1 -0
- package/dist/_node_modules/function-bind/implementation.js +47 -0
- package/dist/_node_modules/function-bind/implementation.js.map +1 -0
- package/dist/_node_modules/function-bind/index.cjs +7 -0
- package/dist/_node_modules/function-bind/index.cjs.map +1 -0
- package/dist/_node_modules/function-bind/index.js +7 -0
- package/dist/_node_modules/function-bind/index.js.map +1 -0
- package/dist/_node_modules/hard-rejection/index.cjs +25 -0
- package/dist/_node_modules/hard-rejection/index.cjs.map +1 -0
- package/dist/_node_modules/hard-rejection/index.js +26 -0
- package/dist/_node_modules/hard-rejection/index.js.map +1 -0
- package/dist/_node_modules/has/src/index.cjs +7 -0
- package/dist/_node_modules/has/src/index.cjs.map +1 -0
- package/dist/_node_modules/has/src/index.js +7 -0
- package/dist/_node_modules/has/src/index.js.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/from-url.cjs +93 -0
- package/dist/_node_modules/hosted-git-info/lib/from-url.cjs.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/from-url.js +93 -0
- package/dist/_node_modules/hosted-git-info/lib/from-url.js.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/hosts.cjs +164 -0
- package/dist/_node_modules/hosted-git-info/lib/hosts.cjs.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/hosts.js +164 -0
- package/dist/_node_modules/hosted-git-info/lib/hosts.js.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/index.cjs +168 -0
- package/dist/_node_modules/hosted-git-info/lib/index.cjs.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/index.js +168 -0
- package/dist/_node_modules/hosted-git-info/lib/index.js.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/parse-url.cjs +51 -0
- package/dist/_node_modules/hosted-git-info/lib/parse-url.cjs.map +1 -0
- package/dist/_node_modules/hosted-git-info/lib/parse-url.js +51 -0
- package/dist/_node_modules/hosted-git-info/lib/parse-url.js.map +1 -0
- package/dist/_node_modules/indent-string/index.cjs +34 -0
- package/dist/_node_modules/indent-string/index.cjs.map +1 -0
- package/dist/_node_modules/indent-string/index.js +35 -0
- package/dist/_node_modules/indent-string/index.js.map +1 -0
- package/dist/_node_modules/is-arrayish/index.cjs +10 -0
- package/dist/_node_modules/is-arrayish/index.cjs.map +1 -0
- package/dist/_node_modules/is-arrayish/index.js +10 -0
- package/dist/_node_modules/is-arrayish/index.js.map +1 -0
- package/dist/_node_modules/is-core-module/core.json.cjs +496 -0
- package/dist/_node_modules/is-core-module/core.json.cjs.map +1 -0
- package/dist/_node_modules/is-core-module/core.json.js +496 -0
- package/dist/_node_modules/is-core-module/core.json.js.map +1 -0
- package/dist/_node_modules/is-core-module/index.cjs +62 -0
- package/dist/_node_modules/is-core-module/index.cjs.map +1 -0
- package/dist/_node_modules/is-core-module/index.js +62 -0
- package/dist/_node_modules/is-core-module/index.js.map +1 -0
- package/dist/_node_modules/is-plain-obj/index.cjs +9 -0
- package/dist/_node_modules/is-plain-obj/index.cjs.map +1 -0
- package/dist/_node_modules/is-plain-obj/index.js +9 -0
- package/dist/_node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/_node_modules/js-tokens/index.cjs +27 -0
- package/dist/_node_modules/js-tokens/index.cjs.map +1 -0
- package/dist/_node_modules/js-tokens/index.js +26 -0
- package/dist/_node_modules/js-tokens/index.js.map +1 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.cjs +90 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.cjs.map +1 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.js +90 -0
- package/dist/_node_modules/json-parse-even-better-errors/index.js.map +1 -0
- package/dist/_node_modules/kind-of/index.cjs +129 -0
- package/dist/_node_modules/kind-of/index.cjs.map +1 -0
- package/dist/_node_modules/kind-of/index.js +129 -0
- package/dist/_node_modules/kind-of/index.js.map +1 -0
- package/dist/_node_modules/lines-and-columns/build/index.cjs +67 -0
- package/dist/_node_modules/lines-and-columns/build/index.cjs.map +1 -0
- package/dist/_node_modules/lines-and-columns/build/index.js +66 -0
- package/dist/_node_modules/lines-and-columns/build/index.js.map +1 -0
- package/dist/_node_modules/lru-cache/index.cjs +1015 -0
- package/dist/_node_modules/lru-cache/index.cjs.map +1 -0
- package/dist/_node_modules/lru-cache/index.js +1015 -0
- package/dist/_node_modules/lru-cache/index.js.map +1 -0
- package/dist/_node_modules/map-obj/index.cjs +49 -0
- package/dist/_node_modules/map-obj/index.cjs.map +1 -0
- package/dist/_node_modules/map-obj/index.js +50 -0
- package/dist/_node_modules/map-obj/index.js.map +1 -0
- package/dist/_node_modules/meow/source/index.cjs +88 -0
- package/dist/_node_modules/meow/source/index.cjs.map +1 -0
- package/dist/_node_modules/meow/source/index.js +89 -0
- package/dist/_node_modules/meow/source/index.js.map +1 -0
- package/dist/_node_modules/meow/source/options.cjs +83 -0
- package/dist/_node_modules/meow/source/options.cjs.map +1 -0
- package/dist/_node_modules/meow/source/options.js +83 -0
- package/dist/_node_modules/meow/source/options.js.map +1 -0
- package/dist/_node_modules/meow/source/parser.cjs +61 -0
- package/dist/_node_modules/meow/source/parser.cjs.map +1 -0
- package/dist/_node_modules/meow/source/parser.js +61 -0
- package/dist/_node_modules/meow/source/parser.js.map +1 -0
- package/dist/_node_modules/meow/source/utils.cjs +8 -0
- package/dist/_node_modules/meow/source/utils.cjs.map +1 -0
- package/dist/_node_modules/meow/source/utils.js +8 -0
- package/dist/_node_modules/meow/source/utils.js.map +1 -0
- package/dist/_node_modules/meow/source/validate.cjs +102 -0
- package/dist/_node_modules/meow/source/validate.cjs.map +1 -0
- package/dist/_node_modules/meow/source/validate.js +102 -0
- package/dist/_node_modules/meow/source/validate.js.map +1 -0
- package/dist/_node_modules/min-indent/index.cjs +12 -0
- package/dist/_node_modules/min-indent/index.cjs.map +1 -0
- package/dist/_node_modules/min-indent/index.js +13 -0
- package/dist/_node_modules/min-indent/index.js.map +1 -0
- package/dist/_node_modules/minimist-options/index.cjs +94 -0
- package/dist/_node_modules/minimist-options/index.cjs.map +1 -0
- package/dist/_node_modules/minimist-options/index.js +95 -0
- package/dist/_node_modules/minimist-options/index.js.map +1 -0
- package/dist/_node_modules/node-domexception/index.cjs +11 -0
- package/dist/_node_modules/node-domexception/index.cjs.map +1 -0
- package/dist/_node_modules/node-domexception/index.js +10 -0
- package/dist/_node_modules/node-domexception/index.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/body.cjs +262 -0
- package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/body.js +262 -0
- package/dist/_node_modules/node-fetch/src/body.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs +10 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js +10 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/base.cjs +17 -0
- package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/base.js +17 -0
- package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs +19 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js +19 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/headers.cjs +190 -0
- package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/headers.js +190 -0
- package/dist/_node_modules/node-fetch/src/headers.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/index.cjs +292 -0
- package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/index.js +292 -0
- package/dist/_node_modules/node-fetch/src/index.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/request.cjs +206 -0
- package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/request.js +206 -0
- package/dist/_node_modules/node-fetch/src/request.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/response.cjs +122 -0
- package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/response.js +123 -0
- package/dist/_node_modules/node-fetch/src/response.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs +12 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.js +12 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs +8 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js +8 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is.cjs +28 -0
- package/dist/_node_modules/node-fetch/src/utils/is.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is.js +28 -0
- package/dist/_node_modules/node-fetch/src/utils/is.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +356 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +356 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs +149 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.js +149 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/extract_description.cjs +24 -0
- package/dist/_node_modules/normalize-package-data/lib/extract_description.cjs.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/extract_description.js +24 -0
- package/dist/_node_modules/normalize-package-data/lib/extract_description.js.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/fixer.cjs +438 -0
- package/dist/_node_modules/normalize-package-data/lib/fixer.cjs.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/fixer.js +438 -0
- package/dist/_node_modules/normalize-package-data/lib/fixer.js.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/make_warning.cjs +26 -0
- package/dist/_node_modules/normalize-package-data/lib/make_warning.cjs.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/make_warning.js +26 -0
- package/dist/_node_modules/normalize-package-data/lib/make_warning.js.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/normalize.cjs +58 -0
- package/dist/_node_modules/normalize-package-data/lib/normalize.cjs.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/normalize.js +59 -0
- package/dist/_node_modules/normalize-package-data/lib/normalize.js.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/typos.json.cjs +41 -0
- package/dist/_node_modules/normalize-package-data/lib/typos.json.cjs.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/typos.json.js +41 -0
- package/dist/_node_modules/normalize-package-data/lib/typos.json.js.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.cjs +90 -0
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.cjs.map +1 -0
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.js +90 -0
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.js.map +1 -0
- package/dist/_node_modules/parse-json/index.cjs +54 -0
- package/dist/_node_modules/parse-json/index.cjs.map +1 -0
- package/dist/_node_modules/parse-json/index.js +55 -0
- package/dist/_node_modules/parse-json/index.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.cjs +159 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.js +159 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.cjs +88 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.js +88 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs +180 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js +180 -0
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.cjs +268 -0
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.js +268 -0
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.cjs +20 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.js +20 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs +438 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js +438 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.cjs +26 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.js +26 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.cjs +58 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.js +59 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.cjs +41 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.js +41 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.js.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.cjs +90 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.js +90 -0
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.js.map +1 -0
- package/dist/_node_modules/read-pkg/index.cjs +20 -0
- package/dist/_node_modules/read-pkg/index.cjs.map +1 -0
- package/dist/_node_modules/read-pkg/index.js +20 -0
- package/dist/_node_modules/read-pkg/index.js.map +1 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.cjs +48 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.cjs.map +1 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.js +48 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.js.map +1 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.cjs +43 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.cjs.map +1 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.js +43 -0
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.js.map +1 -0
- package/dist/_node_modules/read-pkg-up/index.cjs +17 -0
- package/dist/_node_modules/read-pkg-up/index.cjs.map +1 -0
- package/dist/_node_modules/read-pkg-up/index.js +17 -0
- package/dist/_node_modules/read-pkg-up/index.js.map +1 -0
- package/dist/_node_modules/redent/index.cjs +8 -0
- package/dist/_node_modules/redent/index.cjs.map +1 -0
- package/dist/_node_modules/redent/index.js +9 -0
- package/dist/_node_modules/redent/index.js.map +1 -0
- package/dist/_node_modules/semver/classes/semver.cjs +245 -0
- package/dist/_node_modules/semver/classes/semver.cjs.map +1 -0
- package/dist/_node_modules/semver/classes/semver.js +245 -0
- package/dist/_node_modules/semver/classes/semver.js.map +1 -0
- package/dist/_node_modules/semver/functions/clean.cjs +11 -0
- package/dist/_node_modules/semver/functions/clean.cjs.map +1 -0
- package/dist/_node_modules/semver/functions/clean.js +11 -0
- package/dist/_node_modules/semver/functions/clean.js.map +1 -0
- package/dist/_node_modules/semver/functions/parse.cjs +20 -0
- package/dist/_node_modules/semver/functions/parse.cjs.map +1 -0
- package/dist/_node_modules/semver/functions/parse.js +20 -0
- package/dist/_node_modules/semver/functions/parse.js.map +1 -0
- package/dist/_node_modules/semver/functions/valid.cjs +11 -0
- package/dist/_node_modules/semver/functions/valid.cjs.map +1 -0
- package/dist/_node_modules/semver/functions/valid.js +11 -0
- package/dist/_node_modules/semver/functions/valid.js.map +1 -0
- package/dist/_node_modules/semver/internal/constants.cjs +29 -0
- package/dist/_node_modules/semver/internal/constants.cjs.map +1 -0
- package/dist/_node_modules/semver/internal/constants.js +29 -0
- package/dist/_node_modules/semver/internal/constants.js.map +1 -0
- package/dist/_node_modules/semver/internal/debug.cjs +7 -0
- package/dist/_node_modules/semver/internal/debug.cjs.map +1 -0
- package/dist/_node_modules/semver/internal/debug.js +7 -0
- package/dist/_node_modules/semver/internal/debug.js.map +1 -0
- package/dist/_node_modules/semver/internal/identifiers.cjs +19 -0
- package/dist/_node_modules/semver/internal/identifiers.cjs.map +1 -0
- package/dist/_node_modules/semver/internal/identifiers.js +19 -0
- package/dist/_node_modules/semver/internal/identifiers.js.map +1 -0
- package/dist/_node_modules/semver/internal/parse-options.cjs +16 -0
- package/dist/_node_modules/semver/internal/parse-options.cjs.map +1 -0
- package/dist/_node_modules/semver/internal/parse-options.js +16 -0
- package/dist/_node_modules/semver/internal/parse-options.js.map +1 -0
- package/dist/_node_modules/semver/internal/re.cjs +82 -0
- package/dist/_node_modules/semver/internal/re.cjs.map +1 -0
- package/dist/_node_modules/semver/internal/re.js +82 -0
- package/dist/_node_modules/semver/internal/re.js.map +1 -0
- package/dist/_node_modules/spdx-correct/index.cjs +334 -0
- package/dist/_node_modules/spdx-correct/index.cjs.map +1 -0
- package/dist/_node_modules/spdx-correct/index.js +334 -0
- package/dist/_node_modules/spdx-correct/index.js.map +1 -0
- package/dist/_node_modules/spdx-exceptions/index.json.cjs +43 -0
- package/dist/_node_modules/spdx-exceptions/index.json.cjs.map +1 -0
- package/dist/_node_modules/spdx-exceptions/index.json.js +44 -0
- package/dist/_node_modules/spdx-exceptions/index.json.js.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/index.cjs +11 -0
- package/dist/_node_modules/spdx-expression-parse/index.cjs.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/index.js +11 -0
- package/dist/_node_modules/spdx-expression-parse/index.js.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/parse.cjs +111 -0
- package/dist/_node_modules/spdx-expression-parse/parse.cjs.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/parse.js +111 -0
- package/dist/_node_modules/spdx-expression-parse/parse.js.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/scan.cjs +104 -0
- package/dist/_node_modules/spdx-expression-parse/scan.cjs.map +1 -0
- package/dist/_node_modules/spdx-expression-parse/scan.js +104 -0
- package/dist/_node_modules/spdx-expression-parse/scan.js.map +1 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.cjs +30 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.cjs.map +1 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.js +31 -0
- package/dist/_node_modules/spdx-license-ids/deprecated.json.js.map +1 -0
- package/dist/_node_modules/spdx-license-ids/index.json.cjs +510 -0
- package/dist/_node_modules/spdx-license-ids/index.json.cjs.map +1 -0
- package/dist/_node_modules/spdx-license-ids/index.json.js +511 -0
- package/dist/_node_modules/spdx-license-ids/index.json.js.map +1 -0
- package/dist/_node_modules/strip-indent/index.cjs +12 -0
- package/dist/_node_modules/strip-indent/index.cjs.map +1 -0
- package/dist/_node_modules/strip-indent/index.js +13 -0
- package/dist/_node_modules/strip-indent/index.js.map +1 -0
- package/dist/_node_modules/supports-color/browser.cjs +8 -0
- package/dist/_node_modules/supports-color/browser.cjs.map +1 -0
- package/dist/_node_modules/supports-color/browser.js +8 -0
- package/dist/_node_modules/supports-color/browser.js.map +1 -0
- package/dist/_node_modules/trim-newlines/index.cjs +15 -0
- package/dist/_node_modules/trim-newlines/index.cjs.map +1 -0
- package/dist/_node_modules/trim-newlines/index.js +15 -0
- package/dist/_node_modules/trim-newlines/index.js.map +1 -0
- package/dist/_node_modules/validate-npm-package-license/index.cjs +71 -0
- package/dist/_node_modules/validate-npm-package-license/index.cjs.map +1 -0
- package/dist/_node_modules/validate-npm-package-license/index.js +71 -0
- package/dist/_node_modules/validate-npm-package-license/index.js.map +1 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +3822 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +3822 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -0
- package/dist/_node_modules/yallist/iterator.cjs +19 -0
- package/dist/_node_modules/yallist/iterator.cjs.map +1 -0
- package/dist/_node_modules/yallist/iterator.js +19 -0
- package/dist/_node_modules/yallist/iterator.js.map +1 -0
- package/dist/_node_modules/yallist/yallist.cjs +367 -0
- package/dist/_node_modules/yallist/yallist.cjs.map +1 -0
- package/dist/_node_modules/yallist/yallist.js +367 -0
- package/dist/_node_modules/yallist/yallist.js.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/index.cjs +56 -0
- package/dist/_node_modules/yargs-parser/build/lib/index.cjs.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/index.js +57 -0
- package/dist/_node_modules/yargs-parser/build/lib/index.js.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.cjs +63 -0
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.cjs.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.js +63 -0
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.js.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.cjs +39 -0
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.cjs.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.js +39 -0
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.js.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.cjs +15 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.cjs.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.js +16 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.js.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.cjs +847 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.cjs.map +1 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.js +847 -0
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +9 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/conversions.cjs +5 -0
- package/dist/_virtual/conversions.cjs.map +1 -0
- package/dist/_virtual/conversions.js +5 -0
- package/dist/_virtual/conversions.js.map +1 -0
- package/dist/_virtual/identifier.cjs +5 -0
- package/dist/_virtual/identifier.cjs.map +1 -0
- package/dist/_virtual/identifier.js +5 -0
- package/dist/_virtual/identifier.js.map +1 -0
- package/dist/_virtual/index.cjs +5 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index10.cjs +5 -0
- package/dist/_virtual/index10.cjs.map +1 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index10.js.map +1 -0
- package/dist/_virtual/index11.cjs +5 -0
- package/dist/_virtual/index11.cjs.map +1 -0
- package/dist/_virtual/index11.js +5 -0
- package/dist/_virtual/index11.js.map +1 -0
- package/dist/_virtual/index2.cjs +5 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.cjs +5 -0
- package/dist/_virtual/index3.cjs.map +1 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.cjs +5 -0
- package/dist/_virtual/index4.cjs.map +1 -0
- package/dist/_virtual/index4.js +5 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.cjs +5 -0
- package/dist/_virtual/index5.cjs.map +1 -0
- package/dist/_virtual/index5.js +5 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/index6.cjs +5 -0
- package/dist/_virtual/index6.cjs.map +1 -0
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index6.js.map +1 -0
- package/dist/_virtual/index7.cjs +5 -0
- package/dist/_virtual/index7.cjs.map +1 -0
- package/dist/_virtual/index7.js +5 -0
- package/dist/_virtual/index7.js.map +1 -0
- package/dist/_virtual/index8.cjs +5 -0
- package/dist/_virtual/index8.cjs.map +1 -0
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index8.js.map +1 -0
- package/dist/_virtual/index9.cjs +5 -0
- package/dist/_virtual/index9.cjs.map +1 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/keyword.cjs +5 -0
- package/dist/_virtual/keyword.cjs.map +1 -0
- package/dist/_virtual/keyword.js +5 -0
- package/dist/_virtual/keyword.js.map +1 -0
- package/dist/_virtual/ponyfill.es2018.cjs +5 -0
- package/dist/_virtual/ponyfill.es2018.cjs.map +1 -0
- package/dist/_virtual/ponyfill.es2018.js +5 -0
- package/dist/_virtual/ponyfill.es2018.js.map +1 -0
- package/dist/_virtual/re.cjs +5 -0
- package/dist/_virtual/re.cjs.map +1 -0
- package/dist/_virtual/re.js +5 -0
- package/dist/_virtual/re.js.map +1 -0
- package/dist/cli/loadLocaleIDs.cjs +2 -2
- package/dist/cli/loadLocaleIDs.cjs.map +1 -1
- package/dist/cli/loadLocaleIDs.js +1 -1
- package/dist/cli/loadModels.cjs +2 -2
- package/dist/cli/loadModels.cjs.map +1 -1
- package/dist/cli/loadModels.js +1 -1
- package/dist/cli.cjs +2 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/generateTypes.cjs +2 -3
- package/dist/generateTypes.cjs.map +1 -1
- package/dist/generateTypes.js +2 -3
- package/dist/generateTypes.js.map +1 -1
- package/dist/lib/buildCustomTypeDataType.cjs +4 -1
- package/dist/lib/buildCustomTypeDataType.cjs.map +1 -1
- package/dist/lib/buildCustomTypeDataType.d.ts +1 -0
- package/dist/lib/buildCustomTypeDataType.js +4 -1
- package/dist/lib/buildCustomTypeDataType.js.map +1 -1
- package/dist/lib/buildCustomTypeType.cjs +5 -2
- package/dist/lib/buildCustomTypeType.cjs.map +1 -1
- package/dist/lib/buildCustomTypeType.d.ts +1 -1
- package/dist/lib/buildCustomTypeType.js +5 -2
- package/dist/lib/buildCustomTypeType.js.map +1 -1
- package/dist/lib/buildFieldProperties.cjs +10 -2
- package/dist/lib/buildFieldProperties.cjs.map +1 -1
- package/dist/lib/buildFieldProperties.d.ts +1 -0
- package/dist/lib/buildFieldProperties.js +10 -2
- package/dist/lib/buildFieldProperties.js.map +1 -1
- package/dist/lib/buildSharedSliceType.cjs +9 -2
- package/dist/lib/buildSharedSliceType.cjs.map +1 -1
- package/dist/lib/buildSharedSliceType.d.ts +1 -1
- package/dist/lib/buildSharedSliceType.js +9 -2
- package/dist/lib/buildSharedSliceType.js.map +1 -1
- package/package.json +2 -2
- package/src/generateTypes.ts +2 -3
- package/src/lib/buildCustomTypeDataType.ts +4 -0
- package/src/lib/buildCustomTypeType.ts +5 -2
- package/src/lib/buildFieldProperties.ts +10 -0
- package/src/lib/buildSharedSliceType.ts +12 -2
- package/bin/prismic-ts-codegen.mjs +0 -3
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../_virtual/index10.cjs");
|
|
4
|
+
const index$1 = require("../escape-string-regexp/index.cjs");
|
|
5
|
+
const index$2 = require("../ansi-styles/index.cjs");
|
|
6
|
+
const browser = require("../supports-color/browser.cjs");
|
|
7
|
+
const templates = require("./templates.cjs");
|
|
8
|
+
(function(module2) {
|
|
9
|
+
const escapeStringRegexp = index$1.escapeStringRegexp;
|
|
10
|
+
const ansiStyles = index$2.ansiStylesExports;
|
|
11
|
+
const stdoutColor = browser.browser.stdout;
|
|
12
|
+
const template = templates.templates;
|
|
13
|
+
const isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
|
|
14
|
+
const levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
|
|
15
|
+
const skipModels = /* @__PURE__ */ new Set(["gray"]);
|
|
16
|
+
const styles = /* @__PURE__ */ Object.create(null);
|
|
17
|
+
function applyOptions(obj, options) {
|
|
18
|
+
options = options || {};
|
|
19
|
+
const scLevel = stdoutColor ? stdoutColor.level : 0;
|
|
20
|
+
obj.level = options.level === void 0 ? scLevel : options.level;
|
|
21
|
+
obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
|
|
22
|
+
}
|
|
23
|
+
function Chalk(options) {
|
|
24
|
+
if (!this || !(this instanceof Chalk) || this.template) {
|
|
25
|
+
const chalk = {};
|
|
26
|
+
applyOptions(chalk, options);
|
|
27
|
+
chalk.template = function() {
|
|
28
|
+
const args = [].slice.call(arguments);
|
|
29
|
+
return chalkTag.apply(null, [chalk.template].concat(args));
|
|
30
|
+
};
|
|
31
|
+
Object.setPrototypeOf(chalk, Chalk.prototype);
|
|
32
|
+
Object.setPrototypeOf(chalk.template, chalk);
|
|
33
|
+
chalk.template.constructor = Chalk;
|
|
34
|
+
return chalk.template;
|
|
35
|
+
}
|
|
36
|
+
applyOptions(this, options);
|
|
37
|
+
}
|
|
38
|
+
if (isSimpleWindowsTerm) {
|
|
39
|
+
ansiStyles.blue.open = "\x1B[94m";
|
|
40
|
+
}
|
|
41
|
+
for (const key of Object.keys(ansiStyles)) {
|
|
42
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
43
|
+
styles[key] = {
|
|
44
|
+
get() {
|
|
45
|
+
const codes = ansiStyles[key];
|
|
46
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
styles.visible = {
|
|
51
|
+
get() {
|
|
52
|
+
return build.call(this, this._styles || [], true, "visible");
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
|
|
56
|
+
for (const model of Object.keys(ansiStyles.color.ansi)) {
|
|
57
|
+
if (skipModels.has(model)) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
styles[model] = {
|
|
61
|
+
get() {
|
|
62
|
+
const level = this.level;
|
|
63
|
+
return function() {
|
|
64
|
+
const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
|
|
65
|
+
const codes = {
|
|
66
|
+
open,
|
|
67
|
+
close: ansiStyles.color.close,
|
|
68
|
+
closeRe: ansiStyles.color.closeRe
|
|
69
|
+
};
|
|
70
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
|
|
76
|
+
for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
|
|
77
|
+
if (skipModels.has(model)) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
81
|
+
styles[bgModel] = {
|
|
82
|
+
get() {
|
|
83
|
+
const level = this.level;
|
|
84
|
+
return function() {
|
|
85
|
+
const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
|
|
86
|
+
const codes = {
|
|
87
|
+
open,
|
|
88
|
+
close: ansiStyles.bgColor.close,
|
|
89
|
+
closeRe: ansiStyles.bgColor.closeRe
|
|
90
|
+
};
|
|
91
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const proto = Object.defineProperties(() => {
|
|
97
|
+
}, styles);
|
|
98
|
+
function build(_styles, _empty, key) {
|
|
99
|
+
const builder = function() {
|
|
100
|
+
return applyStyle.apply(builder, arguments);
|
|
101
|
+
};
|
|
102
|
+
builder._styles = _styles;
|
|
103
|
+
builder._empty = _empty;
|
|
104
|
+
const self = this;
|
|
105
|
+
Object.defineProperty(builder, "level", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get() {
|
|
108
|
+
return self.level;
|
|
109
|
+
},
|
|
110
|
+
set(level) {
|
|
111
|
+
self.level = level;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(builder, "enabled", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get() {
|
|
117
|
+
return self.enabled;
|
|
118
|
+
},
|
|
119
|
+
set(enabled) {
|
|
120
|
+
self.enabled = enabled;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
|
|
124
|
+
builder.__proto__ = proto;
|
|
125
|
+
return builder;
|
|
126
|
+
}
|
|
127
|
+
function applyStyle() {
|
|
128
|
+
const args = arguments;
|
|
129
|
+
const argsLen = args.length;
|
|
130
|
+
let str = String(arguments[0]);
|
|
131
|
+
if (argsLen === 0) {
|
|
132
|
+
return "";
|
|
133
|
+
}
|
|
134
|
+
if (argsLen > 1) {
|
|
135
|
+
for (let a = 1; a < argsLen; a++) {
|
|
136
|
+
str += " " + args[a];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (!this.enabled || this.level <= 0 || !str) {
|
|
140
|
+
return this._empty ? "" : str;
|
|
141
|
+
}
|
|
142
|
+
const originalDim = ansiStyles.dim.open;
|
|
143
|
+
if (isSimpleWindowsTerm && this.hasGrey) {
|
|
144
|
+
ansiStyles.dim.open = "";
|
|
145
|
+
}
|
|
146
|
+
for (const code of this._styles.slice().reverse()) {
|
|
147
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
148
|
+
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
|
|
149
|
+
}
|
|
150
|
+
ansiStyles.dim.open = originalDim;
|
|
151
|
+
return str;
|
|
152
|
+
}
|
|
153
|
+
function chalkTag(chalk, strings) {
|
|
154
|
+
if (!Array.isArray(strings)) {
|
|
155
|
+
return [].slice.call(arguments, 1).join(" ");
|
|
156
|
+
}
|
|
157
|
+
const args = [].slice.call(arguments, 2);
|
|
158
|
+
const parts = [strings.raw[0]];
|
|
159
|
+
for (let i = 1; i < strings.length; i++) {
|
|
160
|
+
parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
|
161
|
+
parts.push(String(strings.raw[i]));
|
|
162
|
+
}
|
|
163
|
+
return template(chalk, parts.join(""));
|
|
164
|
+
}
|
|
165
|
+
Object.defineProperties(Chalk.prototype, styles);
|
|
166
|
+
module2.exports = Chalk();
|
|
167
|
+
module2.exports.supportsColor = stdoutColor;
|
|
168
|
+
module2.exports.default = module2.exports;
|
|
169
|
+
})(index.__module);
|
|
170
|
+
var chalkExports = index.__module.exports;
|
|
171
|
+
exports.chalkExports = chalkExports;
|
|
172
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../node_modules/chalk/index.js"],"sourcesContent":["'use strict';\nconst escapeStringRegexp = require('escape-string-regexp');\nconst ansiStyles = require('ansi-styles');\nconst stdoutColor = require('supports-color').stdout;\n\nconst template = require('./templates.js');\n\nconst isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];\n\n// `color-convert` models to exclude from the Chalk API due to conflicts and such\nconst skipModels = new Set(['gray']);\n\nconst styles = Object.create(null);\n\nfunction applyOptions(obj, options) {\n\toptions = options || {};\n\n\t// Detect level if not set manually\n\tconst scLevel = stdoutColor ? stdoutColor.level : 0;\n\tobj.level = options.level === undefined ? scLevel : options.level;\n\tobj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;\n}\n\nfunction Chalk(options) {\n\t// We check for this.template here since calling `chalk.constructor()`\n\t// by itself will have a `this` of a previously constructed chalk object\n\tif (!this || !(this instanceof Chalk) || this.template) {\n\t\tconst chalk = {};\n\t\tapplyOptions(chalk, options);\n\n\t\tchalk.template = function () {\n\t\t\tconst args = [].slice.call(arguments);\n\t\t\treturn chalkTag.apply(null, [chalk.template].concat(args));\n\t\t};\n\n\t\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\t\tObject.setPrototypeOf(chalk.template, chalk);\n\n\t\tchalk.template.constructor = Chalk;\n\n\t\treturn chalk.template;\n\t}\n\n\tapplyOptions(this, options);\n}\n\n// Use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001B[94m';\n}\n\nfor (const key of Object.keys(ansiStyles)) {\n\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\tstyles[key] = {\n\t\tget() {\n\t\t\tconst codes = ansiStyles[key];\n\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\treturn build.call(this, this._styles || [], true, 'visible');\n\t}\n};\n\nansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');\nfor (const model of Object.keys(ansiStyles.color.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.color.close,\n\t\t\t\t\tcloseRe: ansiStyles.color.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');\nfor (const model of Object.keys(ansiStyles.bgColor.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.bgColor.close,\n\t\t\t\t\tcloseRe: ansiStyles.bgColor.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, styles);\n\nfunction build(_styles, _empty, key) {\n\tconst builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder._empty = _empty;\n\n\tconst self = this;\n\n\tObject.defineProperty(builder, 'level', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.level;\n\t\t},\n\t\tset(level) {\n\t\t\tself.level = level;\n\t\t}\n\t});\n\n\tObject.defineProperty(builder, 'enabled', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.enabled;\n\t\t},\n\t\tset(enabled) {\n\t\t\tself.enabled = enabled;\n\t\t}\n\t});\n\n\t// See below for fix regarding invisible grey/dim combination on Windows\n\tbuilder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';\n\n\t// `__proto__` is used because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tbuilder.__proto__ = proto; // eslint-disable-line no-proto\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// Support varags, but simply cast to string in case there's only one arg\n\tconst args = arguments;\n\tconst argsLen = args.length;\n\tlet str = String(arguments[0]);\n\n\tif (argsLen === 0) {\n\t\treturn '';\n\t}\n\n\tif (argsLen > 1) {\n\t\t// Don't slice `arguments`, it prevents V8 optimizations\n\t\tfor (let a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || this.level <= 0 || !str) {\n\t\treturn this._empty ? '' : str;\n\t}\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tconst originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && this.hasGrey) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\tfor (const code of this._styles.slice().reverse()) {\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\n\t\t// Close the styling before a linebreak and reopen\n\t\t// after next line to fix a bleed issue on macOS\n\t\t// https://github.com/chalk/chalk/pull/92\n\t\tstr = str.replace(/\\r?\\n/g, `${code.close}$&${code.open}`);\n\t}\n\n\t// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction chalkTag(chalk, strings) {\n\tif (!Array.isArray(strings)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn [].slice.call(arguments, 1).join(' ');\n\t}\n\n\tconst args = [].slice.call(arguments, 2);\n\tconst parts = [strings.raw[0]];\n\n\tfor (let i = 1; i < strings.length; i++) {\n\t\tparts.push(String(args[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'));\n\t\tparts.push(String(strings.raw[i]));\n\t}\n\n\treturn template(chalk, parts.join(''));\n}\n\nObject.defineProperties(Chalk.prototype, styles);\n\nmodule.exports = Chalk(); // eslint-disable-line new-cap\nmodule.exports.supportsColor = stdoutColor;\nmodule.exports.default = module.exports; // For TypeScript\n"],"names":["require$$0","require$$1","require$$2","require$$3","module"],"mappings":";;;;;;;;AACA,QAAM,qBAAqBA,QAAAA;AAC3B,QAAM,aAAaC,QAAAA;AACnB,QAAM,cAAcC,QAAyB,QAAC;AAE9C,QAAM,WAAWC,UAAAA;AAEjB,QAAM,sBAAsB,QAAQ,aAAa,WAAW,EAAE,QAAQ,IAAI,QAAQ,IAAI,YAAa,EAAC,WAAW,OAAO;AAGtH,QAAM,eAAe,CAAC,QAAQ,QAAQ,WAAW,SAAS;AAG1D,QAAM,aAAa,oBAAI,IAAI,CAAC,MAAM,CAAC;AAEnC,QAAM,SAAS,uBAAO,OAAO,IAAI;AAEjC,WAAS,aAAa,KAAK,SAAS;AACnC,cAAU,WAAW;AAGrB,UAAM,UAAU,cAAc,YAAY,QAAQ;AAClD,QAAI,QAAQ,QAAQ,UAAU,SAAY,UAAU,QAAQ;AAC5D,QAAI,UAAU,aAAa,UAAU,QAAQ,UAAU,IAAI,QAAQ;AAAA,EACnE;AAED,WAAS,MAAM,SAAS;AAGvB,QAAI,CAAC,QAAQ,EAAE,gBAAgB,UAAU,KAAK,UAAU;AACvD,YAAM,QAAQ,CAAA;AACd,mBAAa,OAAO,OAAO;AAE3B,YAAM,WAAW,WAAY;AAC5B,cAAM,OAAO,CAAE,EAAC,MAAM,KAAK,SAAS;AACpC,eAAO,SAAS,MAAM,MAAM,CAAC,MAAM,QAAQ,EAAE,OAAO,IAAI,CAAC;AAAA,MAC5D;AAEE,aAAO,eAAe,OAAO,MAAM,SAAS;AAC5C,aAAO,eAAe,MAAM,UAAU,KAAK;AAE3C,YAAM,SAAS,cAAc;AAE7B,aAAO,MAAM;AAAA,IACb;AAED,i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,SAAS,OAAO,MAAM,KAAK,EAAE,CAAC;AAAA,EACrC;AAED,SAAO,iBAAiB,MAAM,WAAW,MAAM;AAE/C,EAAAC,QAAiB,UAAA;AACjB,EAAAA,QAAA,QAAA,gBAA+B;AAC/B,EAAAA,QAAyB,QAAA,UAAAA,QAAO;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { __module as chalk } from "../../_virtual/index10.js";
|
|
2
|
+
import { e as escapeStringRegexp } from "../escape-string-regexp/index.js";
|
|
3
|
+
import { a as ansiStylesExports } from "../ansi-styles/index.js";
|
|
4
|
+
import { b as browser } from "../supports-color/browser.js";
|
|
5
|
+
import { t as templates } from "./templates.js";
|
|
6
|
+
(function(module) {
|
|
7
|
+
const escapeStringRegexp$1 = escapeStringRegexp;
|
|
8
|
+
const ansiStyles = ansiStylesExports;
|
|
9
|
+
const stdoutColor = browser.stdout;
|
|
10
|
+
const template = templates;
|
|
11
|
+
const isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
|
|
12
|
+
const levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
|
|
13
|
+
const skipModels = /* @__PURE__ */ new Set(["gray"]);
|
|
14
|
+
const styles = /* @__PURE__ */ Object.create(null);
|
|
15
|
+
function applyOptions(obj, options) {
|
|
16
|
+
options = options || {};
|
|
17
|
+
const scLevel = stdoutColor ? stdoutColor.level : 0;
|
|
18
|
+
obj.level = options.level === void 0 ? scLevel : options.level;
|
|
19
|
+
obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
|
|
20
|
+
}
|
|
21
|
+
function Chalk(options) {
|
|
22
|
+
if (!this || !(this instanceof Chalk) || this.template) {
|
|
23
|
+
const chalk2 = {};
|
|
24
|
+
applyOptions(chalk2, options);
|
|
25
|
+
chalk2.template = function() {
|
|
26
|
+
const args = [].slice.call(arguments);
|
|
27
|
+
return chalkTag.apply(null, [chalk2.template].concat(args));
|
|
28
|
+
};
|
|
29
|
+
Object.setPrototypeOf(chalk2, Chalk.prototype);
|
|
30
|
+
Object.setPrototypeOf(chalk2.template, chalk2);
|
|
31
|
+
chalk2.template.constructor = Chalk;
|
|
32
|
+
return chalk2.template;
|
|
33
|
+
}
|
|
34
|
+
applyOptions(this, options);
|
|
35
|
+
}
|
|
36
|
+
if (isSimpleWindowsTerm) {
|
|
37
|
+
ansiStyles.blue.open = "\x1B[94m";
|
|
38
|
+
}
|
|
39
|
+
for (const key of Object.keys(ansiStyles)) {
|
|
40
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp$1(ansiStyles[key].close), "g");
|
|
41
|
+
styles[key] = {
|
|
42
|
+
get() {
|
|
43
|
+
const codes = ansiStyles[key];
|
|
44
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
styles.visible = {
|
|
49
|
+
get() {
|
|
50
|
+
return build.call(this, this._styles || [], true, "visible");
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp$1(ansiStyles.color.close), "g");
|
|
54
|
+
for (const model of Object.keys(ansiStyles.color.ansi)) {
|
|
55
|
+
if (skipModels.has(model)) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
styles[model] = {
|
|
59
|
+
get() {
|
|
60
|
+
const level = this.level;
|
|
61
|
+
return function() {
|
|
62
|
+
const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
|
|
63
|
+
const codes = {
|
|
64
|
+
open,
|
|
65
|
+
close: ansiStyles.color.close,
|
|
66
|
+
closeRe: ansiStyles.color.closeRe
|
|
67
|
+
};
|
|
68
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp$1(ansiStyles.bgColor.close), "g");
|
|
74
|
+
for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
|
|
75
|
+
if (skipModels.has(model)) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
79
|
+
styles[bgModel] = {
|
|
80
|
+
get() {
|
|
81
|
+
const level = this.level;
|
|
82
|
+
return function() {
|
|
83
|
+
const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
|
|
84
|
+
const codes = {
|
|
85
|
+
open,
|
|
86
|
+
close: ansiStyles.bgColor.close,
|
|
87
|
+
closeRe: ansiStyles.bgColor.closeRe
|
|
88
|
+
};
|
|
89
|
+
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const proto = Object.defineProperties(() => {
|
|
95
|
+
}, styles);
|
|
96
|
+
function build(_styles, _empty, key) {
|
|
97
|
+
const builder = function() {
|
|
98
|
+
return applyStyle.apply(builder, arguments);
|
|
99
|
+
};
|
|
100
|
+
builder._styles = _styles;
|
|
101
|
+
builder._empty = _empty;
|
|
102
|
+
const self = this;
|
|
103
|
+
Object.defineProperty(builder, "level", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get() {
|
|
106
|
+
return self.level;
|
|
107
|
+
},
|
|
108
|
+
set(level) {
|
|
109
|
+
self.level = level;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(builder, "enabled", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get() {
|
|
115
|
+
return self.enabled;
|
|
116
|
+
},
|
|
117
|
+
set(enabled) {
|
|
118
|
+
self.enabled = enabled;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
|
|
122
|
+
builder.__proto__ = proto;
|
|
123
|
+
return builder;
|
|
124
|
+
}
|
|
125
|
+
function applyStyle() {
|
|
126
|
+
const args = arguments;
|
|
127
|
+
const argsLen = args.length;
|
|
128
|
+
let str = String(arguments[0]);
|
|
129
|
+
if (argsLen === 0) {
|
|
130
|
+
return "";
|
|
131
|
+
}
|
|
132
|
+
if (argsLen > 1) {
|
|
133
|
+
for (let a = 1; a < argsLen; a++) {
|
|
134
|
+
str += " " + args[a];
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (!this.enabled || this.level <= 0 || !str) {
|
|
138
|
+
return this._empty ? "" : str;
|
|
139
|
+
}
|
|
140
|
+
const originalDim = ansiStyles.dim.open;
|
|
141
|
+
if (isSimpleWindowsTerm && this.hasGrey) {
|
|
142
|
+
ansiStyles.dim.open = "";
|
|
143
|
+
}
|
|
144
|
+
for (const code of this._styles.slice().reverse()) {
|
|
145
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
146
|
+
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
|
|
147
|
+
}
|
|
148
|
+
ansiStyles.dim.open = originalDim;
|
|
149
|
+
return str;
|
|
150
|
+
}
|
|
151
|
+
function chalkTag(chalk2, strings) {
|
|
152
|
+
if (!Array.isArray(strings)) {
|
|
153
|
+
return [].slice.call(arguments, 1).join(" ");
|
|
154
|
+
}
|
|
155
|
+
const args = [].slice.call(arguments, 2);
|
|
156
|
+
const parts = [strings.raw[0]];
|
|
157
|
+
for (let i = 1; i < strings.length; i++) {
|
|
158
|
+
parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
|
159
|
+
parts.push(String(strings.raw[i]));
|
|
160
|
+
}
|
|
161
|
+
return template(chalk2, parts.join(""));
|
|
162
|
+
}
|
|
163
|
+
Object.defineProperties(Chalk.prototype, styles);
|
|
164
|
+
module.exports = Chalk();
|
|
165
|
+
module.exports.supportsColor = stdoutColor;
|
|
166
|
+
module.exports.default = module.exports;
|
|
167
|
+
})(chalk);
|
|
168
|
+
var chalkExports = chalk.exports;
|
|
169
|
+
export {
|
|
170
|
+
chalkExports as c
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/chalk/index.js"],"sourcesContent":["'use strict';\nconst escapeStringRegexp = require('escape-string-regexp');\nconst ansiStyles = require('ansi-styles');\nconst stdoutColor = require('supports-color').stdout;\n\nconst template = require('./templates.js');\n\nconst isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];\n\n// `color-convert` models to exclude from the Chalk API due to conflicts and such\nconst skipModels = new Set(['gray']);\n\nconst styles = Object.create(null);\n\nfunction applyOptions(obj, options) {\n\toptions = options || {};\n\n\t// Detect level if not set manually\n\tconst scLevel = stdoutColor ? stdoutColor.level : 0;\n\tobj.level = options.level === undefined ? scLevel : options.level;\n\tobj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;\n}\n\nfunction Chalk(options) {\n\t// We check for this.template here since calling `chalk.constructor()`\n\t// by itself will have a `this` of a previously constructed chalk object\n\tif (!this || !(this instanceof Chalk) || this.template) {\n\t\tconst chalk = {};\n\t\tapplyOptions(chalk, options);\n\n\t\tchalk.template = function () {\n\t\t\tconst args = [].slice.call(arguments);\n\t\t\treturn chalkTag.apply(null, [chalk.template].concat(args));\n\t\t};\n\n\t\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\t\tObject.setPrototypeOf(chalk.template, chalk);\n\n\t\tchalk.template.constructor = Chalk;\n\n\t\treturn chalk.template;\n\t}\n\n\tapplyOptions(this, options);\n}\n\n// Use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001B[94m';\n}\n\nfor (const key of Object.keys(ansiStyles)) {\n\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\tstyles[key] = {\n\t\tget() {\n\t\t\tconst codes = ansiStyles[key];\n\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\treturn build.call(this, this._styles || [], true, 'visible');\n\t}\n};\n\nansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');\nfor (const model of Object.keys(ansiStyles.color.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.color.close,\n\t\t\t\t\tcloseRe: ansiStyles.color.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');\nfor (const model of Object.keys(ansiStyles.bgColor.ansi)) {\n\tif (skipModels.has(model)) {\n\t\tcontinue;\n\t}\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst level = this.level;\n\t\t\treturn function () {\n\t\t\t\tconst open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);\n\t\t\t\tconst codes = {\n\t\t\t\t\topen,\n\t\t\t\t\tclose: ansiStyles.bgColor.close,\n\t\t\t\t\tcloseRe: ansiStyles.bgColor.closeRe\n\t\t\t\t};\n\t\t\t\treturn build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, styles);\n\nfunction build(_styles, _empty, key) {\n\tconst builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder._empty = _empty;\n\n\tconst self = this;\n\n\tObject.defineProperty(builder, 'level', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.level;\n\t\t},\n\t\tset(level) {\n\t\t\tself.level = level;\n\t\t}\n\t});\n\n\tObject.defineProperty(builder, 'enabled', {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn self.enabled;\n\t\t},\n\t\tset(enabled) {\n\t\t\tself.enabled = enabled;\n\t\t}\n\t});\n\n\t// See below for fix regarding invisible grey/dim combination on Windows\n\tbuilder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';\n\n\t// `__proto__` is used because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tbuilder.__proto__ = proto; // eslint-disable-line no-proto\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// Support varags, but simply cast to string in case there's only one arg\n\tconst args = arguments;\n\tconst argsLen = args.length;\n\tlet str = String(arguments[0]);\n\n\tif (argsLen === 0) {\n\t\treturn '';\n\t}\n\n\tif (argsLen > 1) {\n\t\t// Don't slice `arguments`, it prevents V8 optimizations\n\t\tfor (let a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || this.level <= 0 || !str) {\n\t\treturn this._empty ? '' : str;\n\t}\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tconst originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && this.hasGrey) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\tfor (const code of this._styles.slice().reverse()) {\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\n\t\t// Close the styling before a linebreak and reopen\n\t\t// after next line to fix a bleed issue on macOS\n\t\t// https://github.com/chalk/chalk/pull/92\n\t\tstr = str.replace(/\\r?\\n/g, `${code.close}$&${code.open}`);\n\t}\n\n\t// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction chalkTag(chalk, strings) {\n\tif (!Array.isArray(strings)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn [].slice.call(arguments, 1).join(' ');\n\t}\n\n\tconst args = [].slice.call(arguments, 2);\n\tconst parts = [strings.raw[0]];\n\n\tfor (let i = 1; i < strings.length; i++) {\n\t\tparts.push(String(args[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'));\n\t\tparts.push(String(strings.raw[i]));\n\t}\n\n\treturn template(chalk, parts.join(''));\n}\n\nObject.defineProperties(Chalk.prototype, styles);\n\nmodule.exports = Chalk(); // eslint-disable-line new-cap\nmodule.exports.supportsColor = stdoutColor;\nmodule.exports.default = module.exports; // For TypeScript\n"],"names":["escapeStringRegexp","require$$0","require$$1","require$$2","require$$3","chalk"],"mappings":";;;;;;AACA,QAAMA,uBAAqBC;AAC3B,QAAM,aAAaC;AACnB,QAAM,cAAcC,QAA0B;AAE9C,QAAM,WAAWC;AAEjB,QAAM,sBAAsB,QAAQ,aAAa,WAAW,EAAE,QAAQ,IAAI,QAAQ,IAAI,YAAa,EAAC,WAAW,OAAO;AAGtH,QAAM,eAAe,CAAC,QAAQ,QAAQ,WAAW,SAAS;AAG1D,QAAM,aAAa,oBAAI,IAAI,CAAC,MAAM,CAAC;AAEnC,QAAM,SAAS,uBAAO,OAAO,IAAI;AAEjC,WAAS,aAAa,KAAK,SAAS;AACnC,cAAU,WAAW;AAGrB,UAAM,UAAU,cAAc,YAAY,QAAQ;AAClD,QAAI,QAAQ,QAAQ,UAAU,SAAY,UAAU,Q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AM;AAAA,IACzD;AAGD,eAAW,IAAI,OAAO;AAEtB,WAAO;AAAA,EACP;AAED,WAAS,SAASK,QAAO,SAAS;AACjC,QAAI,CAAC,MAAM,QAAQ,OAAO,GAAG;AAG5B,aAAO,CAAE,EAAC,MAAM,KAAK,WAAW,CAAC,EAAE,KAAK,GAAG;AAAA,IAC3C;AAED,UAAM,OAAO,CAAA,EAAG,MAAM,KAAK,WAAW,CAAC;AACvC,UAAM,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC;AAE7B,aAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACxC,YAAM,KAAK,OAAO,KAAK,IAAI,CAAC,CAAC,EAAE,QAAQ,WAAW,MAAM,CAAC;AACzD,YAAM,KAAK,OAAO,QAAQ,IAAI,CAAC,CAAC,CAAC;AAAA,IACjC;AAED,WAAO,SAASA,QAAO,MAAM,KAAK,EAAE,CAAC;AAAA,EACrC;AAED,SAAO,iBAAiB,MAAM,WAAW,MAAM;AAE/C,SAAiB,UAAA;AACjB,SAAA,QAAA,gBAA+B;AAC/B,SAAyB,QAAA,UAAA,OAAO;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
4
|
+
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
5
|
+
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
6
|
+
const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
7
|
+
const ESCAPES = /* @__PURE__ */ new Map([
|
|
8
|
+
["n", "\n"],
|
|
9
|
+
["r", "\r"],
|
|
10
|
+
["t", " "],
|
|
11
|
+
["b", "\b"],
|
|
12
|
+
["f", "\f"],
|
|
13
|
+
["v", "\v"],
|
|
14
|
+
["0", "\0"],
|
|
15
|
+
["\\", "\\"],
|
|
16
|
+
["e", "\x1B"],
|
|
17
|
+
["a", "\x07"]
|
|
18
|
+
]);
|
|
19
|
+
function unescape(c) {
|
|
20
|
+
if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
|
|
21
|
+
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
22
|
+
}
|
|
23
|
+
return ESCAPES.get(c) || c;
|
|
24
|
+
}
|
|
25
|
+
function parseArguments(name, args) {
|
|
26
|
+
const results = [];
|
|
27
|
+
const chunks = args.trim().split(/\s*,\s*/g);
|
|
28
|
+
let matches;
|
|
29
|
+
for (const chunk of chunks) {
|
|
30
|
+
if (!isNaN(chunk)) {
|
|
31
|
+
results.push(Number(chunk));
|
|
32
|
+
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
33
|
+
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
|
|
34
|
+
} else {
|
|
35
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return results;
|
|
39
|
+
}
|
|
40
|
+
function parseStyle(style) {
|
|
41
|
+
STYLE_REGEX.lastIndex = 0;
|
|
42
|
+
const results = [];
|
|
43
|
+
let matches;
|
|
44
|
+
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
45
|
+
const name = matches[1];
|
|
46
|
+
if (matches[2]) {
|
|
47
|
+
const args = parseArguments(name, matches[2]);
|
|
48
|
+
results.push([name].concat(args));
|
|
49
|
+
} else {
|
|
50
|
+
results.push([name]);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return results;
|
|
54
|
+
}
|
|
55
|
+
function buildStyle(chalk, styles) {
|
|
56
|
+
const enabled = {};
|
|
57
|
+
for (const layer of styles) {
|
|
58
|
+
for (const style of layer.styles) {
|
|
59
|
+
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
let current = chalk;
|
|
63
|
+
for (const styleName of Object.keys(enabled)) {
|
|
64
|
+
if (Array.isArray(enabled[styleName])) {
|
|
65
|
+
if (!(styleName in current)) {
|
|
66
|
+
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
67
|
+
}
|
|
68
|
+
if (enabled[styleName].length > 0) {
|
|
69
|
+
current = current[styleName].apply(current, enabled[styleName]);
|
|
70
|
+
} else {
|
|
71
|
+
current = current[styleName];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return current;
|
|
76
|
+
}
|
|
77
|
+
var templates = (chalk, tmp) => {
|
|
78
|
+
const styles = [];
|
|
79
|
+
const chunks = [];
|
|
80
|
+
let chunk = [];
|
|
81
|
+
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
|
|
82
|
+
if (escapeChar) {
|
|
83
|
+
chunk.push(unescape(escapeChar));
|
|
84
|
+
} else if (style) {
|
|
85
|
+
const str = chunk.join("");
|
|
86
|
+
chunk = [];
|
|
87
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
|
|
88
|
+
styles.push({ inverse, styles: parseStyle(style) });
|
|
89
|
+
} else if (close) {
|
|
90
|
+
if (styles.length === 0) {
|
|
91
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
92
|
+
}
|
|
93
|
+
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
94
|
+
chunk = [];
|
|
95
|
+
styles.pop();
|
|
96
|
+
} else {
|
|
97
|
+
chunk.push(chr);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
chunks.push(chunk.join(""));
|
|
101
|
+
if (styles.length > 0) {
|
|
102
|
+
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
103
|
+
throw new Error(errMsg);
|
|
104
|
+
}
|
|
105
|
+
return chunks.join("");
|
|
106
|
+
};
|
|
107
|
+
exports.templates = templates;
|
|
108
|
+
//# sourceMappingURL=templates.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.cjs","sources":["../../../node_modules/chalk/templates.js"],"sourcesContent":["'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tif ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, args) {\n\tconst results = [];\n\tconst chunks = args.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tif (!isNaN(chunk)) {\n\t\t\tresults.push(Number(chunk));\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const styleName of Object.keys(enabled)) {\n\t\tif (Array.isArray(enabled[styleName])) {\n\t\t\tif (!(styleName in current)) {\n\t\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t\t}\n\n\t\t\tif (enabled[styleName].length > 0) {\n\t\t\t\tcurrent = current[styleName].apply(current, enabled[styleName]);\n\t\t\t} else {\n\t\t\t\tcurrent = current[styleName];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, tmp) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {\n\t\tif (escapeChar) {\n\t\t\tchunk.push(unescape(escapeChar));\n\t\t} else if (style) {\n\t\t\tconst str = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(chr);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMsg);\n\t}\n\n\treturn chunks.join('');\n};\n"],"names":[],"mappings":";;AACA,MAAM,iBAAiB;AACvB,MAAM,cAAc;AACpB,MAAM,eAAe;AACrB,MAAM,eAAe;AAErB,MAAM,UAAU,oBAAI,IAAI;AAAA,EACvB,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,GAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,MAAM,IAAI;AAAA,EACX,CAAC,KAAK,MAAQ;AAAA,EACd,CAAC,KAAK,MAAQ;AACf,CAAC;AAED,SAAS,SAAS,GAAG;AACpB,MAAK,EAAE,CAAC,MAAM,OAAO,EAAE,WAAW,KAAO,EAAE,CAAC,MAAM,OAAO,EAAE,WAAW,GAAI;AACzE,WAAO,OAAO,aAAa,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;AAAA,EACnD;AAED,SAAO,QAAQ,IAAI,CAAC,KAAK;AAC1B;AAEA,SAAS,eAAe,MAAM,MAAM;AACnC,QAAM,UAAU,CAAA;AAChB,QAAM,SAAS,KAAK,KAAM,EAAC,MAAM,UAAU;AAC3C,MAAI;AAEJ,aAAW,SAAS,QAAQ;AAC3B,QAAI,CAAC,MAAM,KAAK,GAAG;AAClB,cAAQ,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|
+
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
3
|
+
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
4
|
+
const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
5
|
+
const ESCAPES = /* @__PURE__ */ new Map([
|
|
6
|
+
["n", "\n"],
|
|
7
|
+
["r", "\r"],
|
|
8
|
+
["t", " "],
|
|
9
|
+
["b", "\b"],
|
|
10
|
+
["f", "\f"],
|
|
11
|
+
["v", "\v"],
|
|
12
|
+
["0", "\0"],
|
|
13
|
+
["\\", "\\"],
|
|
14
|
+
["e", "\x1B"],
|
|
15
|
+
["a", "\x07"]
|
|
16
|
+
]);
|
|
17
|
+
function unescape(c) {
|
|
18
|
+
if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) {
|
|
19
|
+
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
20
|
+
}
|
|
21
|
+
return ESCAPES.get(c) || c;
|
|
22
|
+
}
|
|
23
|
+
function parseArguments(name, args) {
|
|
24
|
+
const results = [];
|
|
25
|
+
const chunks = args.trim().split(/\s*,\s*/g);
|
|
26
|
+
let matches;
|
|
27
|
+
for (const chunk of chunks) {
|
|
28
|
+
if (!isNaN(chunk)) {
|
|
29
|
+
results.push(Number(chunk));
|
|
30
|
+
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
31
|
+
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
|
|
32
|
+
} else {
|
|
33
|
+
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return results;
|
|
37
|
+
}
|
|
38
|
+
function parseStyle(style) {
|
|
39
|
+
STYLE_REGEX.lastIndex = 0;
|
|
40
|
+
const results = [];
|
|
41
|
+
let matches;
|
|
42
|
+
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
43
|
+
const name = matches[1];
|
|
44
|
+
if (matches[2]) {
|
|
45
|
+
const args = parseArguments(name, matches[2]);
|
|
46
|
+
results.push([name].concat(args));
|
|
47
|
+
} else {
|
|
48
|
+
results.push([name]);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return results;
|
|
52
|
+
}
|
|
53
|
+
function buildStyle(chalk, styles) {
|
|
54
|
+
const enabled = {};
|
|
55
|
+
for (const layer of styles) {
|
|
56
|
+
for (const style of layer.styles) {
|
|
57
|
+
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
let current = chalk;
|
|
61
|
+
for (const styleName of Object.keys(enabled)) {
|
|
62
|
+
if (Array.isArray(enabled[styleName])) {
|
|
63
|
+
if (!(styleName in current)) {
|
|
64
|
+
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
65
|
+
}
|
|
66
|
+
if (enabled[styleName].length > 0) {
|
|
67
|
+
current = current[styleName].apply(current, enabled[styleName]);
|
|
68
|
+
} else {
|
|
69
|
+
current = current[styleName];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return current;
|
|
74
|
+
}
|
|
75
|
+
var templates = (chalk, tmp) => {
|
|
76
|
+
const styles = [];
|
|
77
|
+
const chunks = [];
|
|
78
|
+
let chunk = [];
|
|
79
|
+
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
|
|
80
|
+
if (escapeChar) {
|
|
81
|
+
chunk.push(unescape(escapeChar));
|
|
82
|
+
} else if (style) {
|
|
83
|
+
const str = chunk.join("");
|
|
84
|
+
chunk = [];
|
|
85
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
|
|
86
|
+
styles.push({ inverse, styles: parseStyle(style) });
|
|
87
|
+
} else if (close) {
|
|
88
|
+
if (styles.length === 0) {
|
|
89
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
90
|
+
}
|
|
91
|
+
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
92
|
+
chunk = [];
|
|
93
|
+
styles.pop();
|
|
94
|
+
} else {
|
|
95
|
+
chunk.push(chr);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
chunks.push(chunk.join(""));
|
|
99
|
+
if (styles.length > 0) {
|
|
100
|
+
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
101
|
+
throw new Error(errMsg);
|
|
102
|
+
}
|
|
103
|
+
return chunks.join("");
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
templates as t
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sources":["../../../node_modules/chalk/templates.js"],"sourcesContent":["'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u[a-f\\d]{4}|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tif ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, args) {\n\tconst results = [];\n\tconst chunks = args.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tif (!isNaN(chunk)) {\n\t\t\tresults.push(Number(chunk));\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const styleName of Object.keys(enabled)) {\n\t\tif (Array.isArray(enabled[styleName])) {\n\t\t\tif (!(styleName in current)) {\n\t\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t\t}\n\n\t\t\tif (enabled[styleName].length > 0) {\n\t\t\t\tcurrent = current[styleName].apply(current, enabled[styleName]);\n\t\t\t} else {\n\t\t\t\tcurrent = current[styleName];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, tmp) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {\n\t\tif (escapeChar) {\n\t\t\tchunk.push(unescape(escapeChar));\n\t\t} else if (style) {\n\t\t\tconst str = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(chr);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMsg);\n\t}\n\n\treturn chunks.join('');\n};\n"],"names":[],"mappings":"AACA,MAAM,iBAAiB;AACvB,MAAM,cAAc;AACpB,MAAM,eAAe;AACrB,MAAM,eAAe;AAErB,MAAM,UAAU,oBAAI,IAAI;AAAA,EACvB,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,GAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,KAAK,IAAI;AAAA,EACV,CAAC,MAAM,IAAI;AAAA,EACX,CAAC,KAAK,MAAQ;AAAA,EACd,CAAC,KAAK,MAAQ;AACf,CAAC;AAED,SAAS,SAAS,GAAG;AACpB,MAAK,EAAE,CAAC,MAAM,OAAO,EAAE,WAAW,KAAO,EAAE,CAAC,MAAM,OAAO,EAAE,WAAW,GAAI;AACzE,WAAO,OAAO,aAAa,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC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