@flourish/sdk 4.2.1 → 4.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/RELEASE_NOTES.md +3 -0
- package/common/embed/credit.d.ts +5 -0
- package/common/embed/credit.js +47 -0
- package/common/embed/customer_analytics.d.ts +5 -0
- package/common/embed/customer_analytics.js +114 -0
- package/common/embed/embedding.d.ts +25 -0
- package/common/embed/embedding.js +461 -0
- package/common/embed/localizations.d.ts +243 -0
- package/common/embed/localizations.js +90 -0
- package/common/embed/parse_query_params.d.ts +2 -0
- package/common/embed/parse_query_params.js +18 -0
- package/common/package.json +8 -0
- package/common/tsconfig.sdk.tsbuildinfo +1 -0
- package/common/utils/columns.d.ts +11 -0
- package/common/utils/columns.js +175 -0
- package/common/utils/data.d.ts +30 -0
- package/common/utils/data.js +279 -0
- package/common/utils/json.d.ts +3 -0
- package/common/utils/json.js +60 -0
- package/common/utils/polyfills.d.ts +0 -0
- package/common/utils/polyfills.js +30 -0
- package/common/utils/state.d.ts +7 -0
- package/common/utils/state.js +144 -0
- package/lib/cmd/publish.js +1 -1
- package/lib/common.js +1 -1
- package/lib/validate_config.js +1 -1
- package/my_template/node_modules/.package-lock.json +525 -0
- package/my_template/node_modules/@babel/code-frame/LICENSE +22 -0
- package/my_template/node_modules/@babel/code-frame/README.md +19 -0
- package/my_template/node_modules/@babel/code-frame/lib/index.js +157 -0
- package/my_template/node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/my_template/node_modules/@babel/code-frame/package.json +30 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/package.json +28 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +73 -0
- package/my_template/node_modules/@babel/highlight/LICENSE +22 -0
- package/my_template/node_modules/@babel/highlight/README.md +19 -0
- package/my_template/node_modules/@babel/highlight/lib/index.js +105 -0
- package/my_template/node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/my_template/node_modules/@babel/highlight/package.json +29 -0
- package/my_template/node_modules/@types/estree/LICENSE +21 -0
- package/my_template/node_modules/@types/estree/README.md +15 -0
- package/my_template/node_modules/@types/estree/flow.d.ts +167 -0
- package/my_template/node_modules/@types/estree/index.d.ts +683 -0
- package/my_template/node_modules/@types/estree/package.json +26 -0
- package/my_template/node_modules/@types/node/LICENSE +21 -0
- package/my_template/node_modules/@types/node/README.md +15 -0
- package/my_template/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/my_template/node_modules/@types/node/assert.d.ts +996 -0
- package/my_template/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/my_template/node_modules/@types/node/buffer.d.ts +2362 -0
- package/my_template/node_modules/@types/node/child_process.d.ts +1540 -0
- package/my_template/node_modules/@types/node/cluster.d.ts +432 -0
- package/my_template/node_modules/@types/node/console.d.ts +415 -0
- package/my_template/node_modules/@types/node/constants.d.ts +19 -0
- package/my_template/node_modules/@types/node/crypto.d.ts +4456 -0
- package/my_template/node_modules/@types/node/dgram.d.ts +586 -0
- package/my_template/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/my_template/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/my_template/node_modules/@types/node/dns.d.ts +809 -0
- package/my_template/node_modules/@types/node/dom-events.d.ts +122 -0
- package/my_template/node_modules/@types/node/domain.d.ts +170 -0
- package/my_template/node_modules/@types/node/events.d.ts +879 -0
- package/my_template/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/my_template/node_modules/@types/node/fs.d.ts +4291 -0
- package/my_template/node_modules/@types/node/globals.d.ts +385 -0
- package/my_template/node_modules/@types/node/globals.global.d.ts +1 -0
- package/my_template/node_modules/@types/node/http.d.ts +1888 -0
- package/my_template/node_modules/@types/node/http2.d.ts +2382 -0
- package/my_template/node_modules/@types/node/https.d.ts +550 -0
- package/my_template/node_modules/@types/node/index.d.ts +88 -0
- package/my_template/node_modules/@types/node/inspector.d.ts +2747 -0
- package/my_template/node_modules/@types/node/module.d.ts +301 -0
- package/my_template/node_modules/@types/node/net.d.ts +949 -0
- package/my_template/node_modules/@types/node/os.d.ts +478 -0
- package/my_template/node_modules/@types/node/package.json +230 -0
- package/my_template/node_modules/@types/node/path.d.ts +191 -0
- package/my_template/node_modules/@types/node/perf_hooks.d.ts +639 -0
- package/my_template/node_modules/@types/node/process.d.ts +1539 -0
- package/my_template/node_modules/@types/node/punycode.d.ts +117 -0
- package/my_template/node_modules/@types/node/querystring.d.ts +141 -0
- package/my_template/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/my_template/node_modules/@types/node/readline.d.ts +539 -0
- package/my_template/node_modules/@types/node/repl.d.ts +430 -0
- package/my_template/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/my_template/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/my_template/node_modules/@types/node/stream/web.d.ts +350 -0
- package/my_template/node_modules/@types/node/stream.d.ts +1701 -0
- package/my_template/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/my_template/node_modules/@types/node/test.d.ts +1382 -0
- package/my_template/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/my_template/node_modules/@types/node/timers.d.ts +240 -0
- package/my_template/node_modules/@types/node/tls.d.ts +1210 -0
- package/my_template/node_modules/@types/node/trace_events.d.ts +182 -0
- package/my_template/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/my_template/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/my_template/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/my_template/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/my_template/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/my_template/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/my_template/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/my_template/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/my_template/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
- package/my_template/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
- package/my_template/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/my_template/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/my_template/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/my_template/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/my_template/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/my_template/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/my_template/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/my_template/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
- package/my_template/node_modules/@types/node/ts4.8/globals.d.ts +385 -0
- package/my_template/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/my_template/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
- package/my_template/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/my_template/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/my_template/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/my_template/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/my_template/node_modules/@types/node/ts4.8/module.d.ts +301 -0
- package/my_template/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/my_template/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/my_template/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/my_template/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
- package/my_template/node_modules/@types/node/ts4.8/process.d.ts +1539 -0
- package/my_template/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/my_template/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/my_template/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/my_template/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/my_template/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/my_template/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/my_template/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/my_template/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
- package/my_template/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/my_template/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/my_template/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
- package/my_template/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/my_template/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/my_template/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/my_template/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/my_template/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/my_template/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/my_template/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/my_template/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/my_template/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/my_template/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/my_template/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/my_template/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/my_template/node_modules/@types/node/tty.d.ts +208 -0
- package/my_template/node_modules/@types/node/url.d.ts +927 -0
- package/my_template/node_modules/@types/node/util.d.ts +2183 -0
- package/my_template/node_modules/@types/node/v8.d.ts +635 -0
- package/my_template/node_modules/@types/node/vm.d.ts +903 -0
- package/my_template/node_modules/@types/node/wasi.d.ts +158 -0
- package/my_template/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/my_template/node_modules/@types/node/zlib.d.ts +517 -0
- package/my_template/node_modules/@types/resolve/LICENSE +21 -0
- package/my_template/node_modules/@types/resolve/README.md +16 -0
- package/my_template/node_modules/@types/resolve/index.d.ts +113 -0
- package/my_template/node_modules/@types/resolve/package.json +29 -0
- package/my_template/node_modules/acorn/CHANGELOG.md +620 -0
- package/my_template/node_modules/acorn/LICENSE +21 -0
- package/my_template/node_modules/acorn/README.md +269 -0
- package/my_template/node_modules/acorn/bin/acorn +4 -0
- package/my_template/node_modules/acorn/dist/acorn.d.ts +209 -0
- package/my_template/node_modules/acorn/dist/acorn.js +5186 -0
- package/my_template/node_modules/acorn/dist/acorn.js.map +1 -0
- package/my_template/node_modules/acorn/dist/acorn.mjs +5155 -0
- package/my_template/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
- package/my_template/node_modules/acorn/dist/acorn.mjs.map +1 -0
- package/my_template/node_modules/acorn/dist/bin.js +64 -0
- package/my_template/node_modules/acorn/package.json +35 -0
- package/my_template/node_modules/amdefine/LICENSE +58 -0
- package/my_template/node_modules/amdefine/README.md +171 -0
- package/my_template/node_modules/amdefine/amdefine.js +301 -0
- package/my_template/node_modules/amdefine/intercept.js +36 -0
- package/my_template/node_modules/amdefine/package.json +16 -0
- package/my_template/node_modules/ansi-styles/index.js +165 -0
- package/my_template/node_modules/ansi-styles/license +9 -0
- package/my_template/node_modules/ansi-styles/package.json +56 -0
- package/my_template/node_modules/ansi-styles/readme.md +147 -0
- package/my_template/node_modules/builtin-modules/builtin-modules.json +43 -0
- package/my_template/node_modules/builtin-modules/index.d.ts +14 -0
- package/my_template/node_modules/builtin-modules/index.js +11 -0
- package/my_template/node_modules/builtin-modules/license +9 -0
- package/my_template/node_modules/builtin-modules/package.json +44 -0
- package/my_template/node_modules/builtin-modules/readme.md +44 -0
- package/my_template/node_modules/builtin-modules/static.d.ts +14 -0
- package/my_template/node_modules/builtin-modules/static.js +2 -0
- package/my_template/node_modules/chalk/index.js +228 -0
- package/my_template/node_modules/chalk/index.js.flow +93 -0
- package/my_template/node_modules/chalk/license +9 -0
- package/my_template/node_modules/chalk/package.json +71 -0
- package/my_template/node_modules/chalk/readme.md +314 -0
- package/my_template/node_modules/chalk/templates.js +128 -0
- package/my_template/node_modules/chalk/types/index.d.ts +97 -0
- package/my_template/node_modules/clean-css/History.md +1138 -0
- package/my_template/node_modules/clean-css/LICENSE +19 -0
- package/my_template/node_modules/clean-css/README.md +369 -0
- package/my_template/node_modules/clean-css/bin/cleancss +184 -0
- package/my_template/node_modules/clean-css/index.js +1 -0
- package/my_template/node_modules/clean-css/lib/clean.js +231 -0
- package/my_template/node_modules/clean-css/lib/colors/hex-name-shortener.js +186 -0
- package/my_template/node_modules/clean-css/lib/colors/hsl.js +67 -0
- package/my_template/node_modules/clean-css/lib/colors/rgb.js +16 -0
- package/my_template/node_modules/clean-css/lib/imports/inliner.js +399 -0
- package/my_template/node_modules/clean-css/lib/properties/break-up.js +335 -0
- package/my_template/node_modules/clean-css/lib/properties/can-override.js +142 -0
- package/my_template/node_modules/clean-css/lib/properties/clone.js +26 -0
- package/my_template/node_modules/clean-css/lib/properties/compactable.js +285 -0
- package/my_template/node_modules/clean-css/lib/properties/every-combination.js +28 -0
- package/my_template/node_modules/clean-css/lib/properties/has-inherit.js +10 -0
- package/my_template/node_modules/clean-css/lib/properties/invalid-property-error.js +10 -0
- package/my_template/node_modules/clean-css/lib/properties/optimizer.js +215 -0
- package/my_template/node_modules/clean-css/lib/properties/override-compactor.js +384 -0
- package/my_template/node_modules/clean-css/lib/properties/populate-components.js +32 -0
- package/my_template/node_modules/clean-css/lib/properties/remove-unused.js +10 -0
- package/my_template/node_modules/clean-css/lib/properties/restore-from-optimizing.js +60 -0
- package/my_template/node_modules/clean-css/lib/properties/restore.js +232 -0
- package/my_template/node_modules/clean-css/lib/properties/shorthand-compactor.js +134 -0
- package/my_template/node_modules/clean-css/lib/properties/validator.js +197 -0
- package/my_template/node_modules/clean-css/lib/properties/vendor-prefixes.js +26 -0
- package/my_template/node_modules/clean-css/lib/properties/wrap-for-optimizing.js +118 -0
- package/my_template/node_modules/clean-css/lib/selectors/advanced.js +86 -0
- package/my_template/node_modules/clean-css/lib/selectors/clean-up.js +89 -0
- package/my_template/node_modules/clean-css/lib/selectors/extractor.js +69 -0
- package/my_template/node_modules/clean-css/lib/selectors/is-special.js +5 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-adjacent.js +35 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-media-queries.js +64 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-body.js +61 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-selector.js +76 -0
- package/my_template/node_modules/clean-css/lib/selectors/reduce-non-adjacent.js +172 -0
- package/my_template/node_modules/clean-css/lib/selectors/remove-duplicate-media-queries.js +21 -0
- package/my_template/node_modules/clean-css/lib/selectors/remove-duplicates.js +41 -0
- package/my_template/node_modules/clean-css/lib/selectors/reorderable.js +99 -0
- package/my_template/node_modules/clean-css/lib/selectors/restructure.js +369 -0
- package/my_template/node_modules/clean-css/lib/selectors/simple.js +454 -0
- package/my_template/node_modules/clean-css/lib/source-maps/track.js +119 -0
- package/my_template/node_modules/clean-css/lib/stringifier/helpers.js +167 -0
- package/my_template/node_modules/clean-css/lib/stringifier/one-time.js +50 -0
- package/my_template/node_modules/clean-css/lib/stringifier/simple.js +22 -0
- package/my_template/node_modules/clean-css/lib/stringifier/source-maps.js +96 -0
- package/my_template/node_modules/clean-css/lib/text/comments-processor.js +131 -0
- package/my_template/node_modules/clean-css/lib/text/escape-store.js +53 -0
- package/my_template/node_modules/clean-css/lib/text/expressions-processor.js +117 -0
- package/my_template/node_modules/clean-css/lib/text/free-text-processor.js +98 -0
- package/my_template/node_modules/clean-css/lib/text/urls-processor.js +75 -0
- package/my_template/node_modules/clean-css/lib/tokenizer/extract-properties.js +193 -0
- package/my_template/node_modules/clean-css/lib/tokenizer/extract-selectors.js +17 -0
- package/my_template/node_modules/clean-css/lib/tokenizer/tokenize.js +297 -0
- package/my_template/node_modules/clean-css/lib/urls/rebase.js +30 -0
- package/my_template/node_modules/clean-css/lib/urls/reduce.js +154 -0
- package/my_template/node_modules/clean-css/lib/urls/rewrite.js +107 -0
- package/my_template/node_modules/clean-css/lib/utils/clone-array.js +12 -0
- package/my_template/node_modules/clean-css/lib/utils/compatibility.js +162 -0
- package/my_template/node_modules/clean-css/lib/utils/input-source-map-tracker.js +284 -0
- package/my_template/node_modules/clean-css/lib/utils/object.js +11 -0
- package/my_template/node_modules/clean-css/lib/utils/quote-scanner.js +119 -0
- package/my_template/node_modules/clean-css/lib/utils/source-reader.js +96 -0
- package/my_template/node_modules/clean-css/lib/utils/source-tracker.js +31 -0
- package/my_template/node_modules/clean-css/lib/utils/split.js +62 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/README.md +510 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/assert-shim.js +56 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/mini-require.js +152 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-source-map.jsm +21 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-utils.jsm +18 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-browser.js +8 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-utils.jsm +21 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/test-prefix.js +8 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/test-suffix.js +3 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/array-set.js +107 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64-vlq.js +146 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64.js +73 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/binary-search.js +117 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/mapping-list.js +86 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/quick-sort.js +120 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-consumer.js +1077 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-generator.js +399 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-node.js +414 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/util.js +370 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map.js +8 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/package.json +68 -0
- package/my_template/node_modules/clean-css/package.json +53 -0
- package/my_template/node_modules/color-convert/CHANGELOG.md +54 -0
- package/my_template/node_modules/color-convert/LICENSE +21 -0
- package/my_template/node_modules/color-convert/README.md +68 -0
- package/my_template/node_modules/color-convert/conversions.js +868 -0
- package/my_template/node_modules/color-convert/index.js +78 -0
- package/my_template/node_modules/color-convert/package.json +46 -0
- package/my_template/node_modules/color-convert/route.js +97 -0
- package/my_template/node_modules/color-name/.eslintrc.json +43 -0
- package/my_template/node_modules/color-name/LICENSE +8 -0
- package/my_template/node_modules/color-name/README.md +11 -0
- package/my_template/node_modules/color-name/index.js +152 -0
- package/my_template/node_modules/color-name/package.json +25 -0
- package/my_template/node_modules/color-name/test.js +7 -0
- package/my_template/node_modules/commander/History.md +256 -0
- package/my_template/node_modules/commander/LICENSE +22 -0
- package/my_template/node_modules/commander/Readme.md +342 -0
- package/my_template/node_modules/commander/index.js +1103 -0
- package/my_template/node_modules/commander/package.json +33 -0
- package/my_template/node_modules/copy-anything/LICENSE +21 -0
- package/my_template/node_modules/copy-anything/README.md +130 -0
- package/my_template/node_modules/copy-anything/dist/index.cjs +52 -0
- package/my_template/node_modules/copy-anything/dist/index.es.js +48 -0
- package/my_template/node_modules/copy-anything/dist/types/index.d.ts +15 -0
- package/my_template/node_modules/copy-anything/package.json +98 -0
- package/my_template/node_modules/errno/.jshintrc +59 -0
- package/my_template/node_modules/errno/.travis.yml +19 -0
- package/my_template/node_modules/errno/README.md +145 -0
- package/my_template/node_modules/errno/build.js +43 -0
- package/my_template/node_modules/errno/cli.js +22 -0
- package/my_template/node_modules/errno/custom.js +57 -0
- package/my_template/node_modules/errno/errno.js +313 -0
- package/my_template/node_modules/errno/package.json +33 -0
- package/my_template/node_modules/errno/test.js +88 -0
- package/my_template/node_modules/escape-string-regexp/index.js +11 -0
- package/my_template/node_modules/escape-string-regexp/license +21 -0
- package/my_template/node_modules/escape-string-regexp/package.json +41 -0
- package/my_template/node_modules/escape-string-regexp/readme.md +27 -0
- package/my_template/node_modules/estree-walker/CHANGELOG.md +55 -0
- package/my_template/node_modules/estree-walker/README.md +45 -0
- package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js +65 -0
- package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js.map +1 -0
- package/my_template/node_modules/estree-walker/index.d.ts +27 -0
- package/my_template/node_modules/estree-walker/package.json +30 -0
- package/my_template/node_modules/estree-walker/src/estree-walker.js +51 -0
- package/my_template/node_modules/function-bind/.eslintrc +21 -0
- package/my_template/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/my_template/node_modules/function-bind/.nycrc +13 -0
- package/my_template/node_modules/function-bind/CHANGELOG.md +136 -0
- package/my_template/node_modules/function-bind/LICENSE +20 -0
- package/my_template/node_modules/function-bind/README.md +46 -0
- package/my_template/node_modules/function-bind/implementation.js +84 -0
- package/my_template/node_modules/function-bind/index.js +5 -0
- package/my_template/node_modules/function-bind/package.json +87 -0
- package/my_template/node_modules/function-bind/test/.eslintrc +9 -0
- package/my_template/node_modules/function-bind/test/index.js +252 -0
- package/my_template/node_modules/graceful-fs/LICENSE +15 -0
- package/my_template/node_modules/graceful-fs/README.md +143 -0
- package/my_template/node_modules/graceful-fs/clone.js +23 -0
- package/my_template/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/my_template/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/my_template/node_modules/graceful-fs/package.json +53 -0
- package/my_template/node_modules/graceful-fs/polyfills.js +355 -0
- package/my_template/node_modules/graceful-readlink/.travis.yml +5 -0
- package/my_template/node_modules/graceful-readlink/LICENSE +22 -0
- package/my_template/node_modules/graceful-readlink/README.md +17 -0
- package/my_template/node_modules/graceful-readlink/index.js +12 -0
- package/my_template/node_modules/graceful-readlink/package.json +18 -0
- package/my_template/node_modules/has-flag/index.js +8 -0
- package/my_template/node_modules/has-flag/license +9 -0
- package/my_template/node_modules/has-flag/package.json +44 -0
- package/my_template/node_modules/has-flag/readme.md +70 -0
- package/my_template/node_modules/hasown/.eslintrc +5 -0
- package/my_template/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/hasown/.nycrc +13 -0
- package/my_template/node_modules/hasown/CHANGELOG.md +20 -0
- package/my_template/node_modules/hasown/LICENSE +21 -0
- package/my_template/node_modules/hasown/README.md +40 -0
- package/my_template/node_modules/hasown/index.d.ts +3 -0
- package/my_template/node_modules/hasown/index.d.ts.map +1 -0
- package/my_template/node_modules/hasown/index.js +8 -0
- package/my_template/node_modules/hasown/package.json +91 -0
- package/my_template/node_modules/hasown/tsconfig.json +49 -0
- package/my_template/node_modules/image-size/LICENSE +9 -0
- package/my_template/node_modules/image-size/Readme.md +88 -0
- package/my_template/node_modules/image-size/bin/image-size.js +36 -0
- package/my_template/node_modules/image-size/lib/detector.js +19 -0
- package/my_template/node_modules/image-size/lib/index.js +105 -0
- package/my_template/node_modules/image-size/lib/readUInt.js +11 -0
- package/my_template/node_modules/image-size/lib/types/bmp.js +17 -0
- package/my_template/node_modules/image-size/lib/types/dds.js +18 -0
- package/my_template/node_modules/image-size/lib/types/gif.js +19 -0
- package/my_template/node_modules/image-size/lib/types/jpg.js +62 -0
- package/my_template/node_modules/image-size/lib/types/png.js +36 -0
- package/my_template/node_modules/image-size/lib/types/psd.js +17 -0
- package/my_template/node_modules/image-size/lib/types/svg.js +78 -0
- package/my_template/node_modules/image-size/lib/types/tiff.js +118 -0
- package/my_template/node_modules/image-size/lib/types/webp.js +69 -0
- package/my_template/node_modules/image-size/lib/types.js +13 -0
- package/my_template/node_modules/image-size/package.json +49 -0
- package/my_template/node_modules/is-core-module/.eslintrc +18 -0
- package/my_template/node_modules/is-core-module/.nycrc +9 -0
- package/my_template/node_modules/is-core-module/CHANGELOG.md +180 -0
- package/my_template/node_modules/is-core-module/LICENSE +20 -0
- package/my_template/node_modules/is-core-module/README.md +40 -0
- package/my_template/node_modules/is-core-module/core.json +158 -0
- package/my_template/node_modules/is-core-module/index.js +69 -0
- package/my_template/node_modules/is-core-module/package.json +73 -0
- package/my_template/node_modules/is-core-module/test/index.js +133 -0
- package/my_template/node_modules/is-module/README.md +41 -0
- package/my_template/node_modules/is-module/component.json +11 -0
- package/my_template/node_modules/is-module/index.js +11 -0
- package/my_template/node_modules/is-module/package.json +20 -0
- package/my_template/node_modules/is-what/.babelrc +3 -0
- package/my_template/node_modules/is-what/.eslintignore +9 -0
- package/my_template/node_modules/is-what/.eslintrc.js +18 -0
- package/my_template/node_modules/is-what/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/is-what/.prettierrc +9 -0
- package/my_template/node_modules/is-what/.vscode/settings.json +9 -0
- package/my_template/node_modules/is-what/LICENSE +21 -0
- package/my_template/node_modules/is-what/README.md +191 -0
- package/my_template/node_modules/is-what/build.js +60 -0
- package/my_template/node_modules/is-what/dist/index.cjs.js +364 -0
- package/my_template/node_modules/is-what/dist/index.esm.js +327 -0
- package/my_template/node_modules/is-what/package.json +86 -0
- package/my_template/node_modules/is-what/src/index.ts +395 -0
- package/my_template/node_modules/is-what/test/ava.ts +376 -0
- package/my_template/node_modules/is-what/test/index.test.js +15 -0
- package/my_template/node_modules/is-what/tsconfig.json +11 -0
- package/my_template/node_modules/is-what/types/index.d.ts +253 -0
- package/my_template/node_modules/jest-worker/LICENSE +21 -0
- package/my_template/node_modules/jest-worker/README.md +215 -0
- package/my_template/node_modules/jest-worker/build/Farm.d.ts +27 -0
- package/my_template/node_modules/jest-worker/build/Farm.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/Farm.js +179 -0
- package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts +14 -0
- package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/WorkerPool.js +49 -0
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts +22 -0
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.js +134 -0
- package/my_template/node_modules/jest-worker/build/index.d.ts +46 -0
- package/my_template/node_modules/jest-worker/build/index.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/index.js +184 -0
- package/my_template/node_modules/jest-worker/build/types.d.ts +98 -0
- package/my_template/node_modules/jest-worker/build/types.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/types.js +43 -0
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts +47 -0
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.js +310 -0
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts +29 -0
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +289 -0
- package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts +8 -0
- package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/processChild.js +166 -0
- package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts +8 -0
- package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/threadChild.js +176 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/browser.js +5 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/index.js +138 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/license +9 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/package.json +53 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/readme.md +85 -0
- package/my_template/node_modules/jest-worker/package.json +29 -0
- package/my_template/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/my_template/node_modules/js-tokens/LICENSE +21 -0
- package/my_template/node_modules/js-tokens/README.md +240 -0
- package/my_template/node_modules/js-tokens/index.js +23 -0
- package/my_template/node_modules/js-tokens/package.json +30 -0
- package/my_template/node_modules/less/.eslintignore +5 -0
- package/my_template/node_modules/less/.eslintrc.json +3 -0
- package/my_template/node_modules/less/Gruntfile.js +420 -0
- package/my_template/node_modules/less/README.md +13 -0
- package/my_template/node_modules/less/bin/lessc +633 -0
- package/my_template/node_modules/less/bower.json +22 -0
- package/my_template/node_modules/less/dist/less.js +11275 -0
- package/my_template/node_modules/less/dist/less.min.js +11 -0
- package/my_template/node_modules/less/dist/less.min.js.map +1 -0
- package/my_template/node_modules/less/index.js +1 -0
- package/my_template/node_modules/less/lib/less/constants.js +15 -0
- package/my_template/node_modules/less/lib/less/constants.js.map +1 -0
- package/my_template/node_modules/less/lib/less/contexts.js +171 -0
- package/my_template/node_modules/less/lib/less/contexts.js.map +1 -0
- package/my_template/node_modules/less/lib/less/data/colors.js +153 -0
- package/my_template/node_modules/less/lib/less/data/colors.js.map +1 -0
- package/my_template/node_modules/less/lib/less/data/index.js +9 -0
- package/my_template/node_modules/less/lib/less/data/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/data/unit-conversions.js +24 -0
- package/my_template/node_modules/less/lib/less/data/unit-conversions.js.map +1 -0
- package/my_template/node_modules/less/lib/less/default-options.js +57 -0
- package/my_template/node_modules/less/lib/less/default-options.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js +122 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js +168 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/environment-api.js +28 -0
- package/my_template/node_modules/less/lib/less/environment/environment-api.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/environment.js +57 -0
- package/my_template/node_modules/less/lib/less/environment/environment.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/file-manager-api.js +106 -0
- package/my_template/node_modules/less/lib/less/environment/file-manager-api.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/boolean.js +21 -0
- package/my_template/node_modules/less/lib/less/functions/boolean.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/color-blending.js +78 -0
- package/my_template/node_modules/less/lib/less/functions/color-blending.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/color.js +404 -0
- package/my_template/node_modules/less/lib/less/functions/color.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/data-uri.js +86 -0
- package/my_template/node_modules/less/lib/less/functions/data-uri.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/default.js +29 -0
- package/my_template/node_modules/less/lib/less/functions/default.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/function-caller.js +66 -0
- package/my_template/node_modules/less/lib/less/functions/function-caller.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/function-registry.js +36 -0
- package/my_template/node_modules/less/lib/less/functions/function-registry.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/index.js +35 -0
- package/my_template/node_modules/less/lib/less/functions/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/list.js +136 -0
- package/my_template/node_modules/less/lib/less/functions/list.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/math-helper.js +20 -0
- package/my_template/node_modules/less/lib/less/functions/math-helper.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/math.js +30 -0
- package/my_template/node_modules/less/lib/less/functions/math.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/number.js +98 -0
- package/my_template/node_modules/less/lib/less/functions/number.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/string.js +42 -0
- package/my_template/node_modules/less/lib/less/functions/string.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/svg.js +88 -0
- package/my_template/node_modules/less/lib/less/functions/svg.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/types.js +75 -0
- package/my_template/node_modules/less/lib/less/functions/types.js.map +1 -0
- package/my_template/node_modules/less/lib/less/import-manager.js +196 -0
- package/my_template/node_modules/less/lib/less/import-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less/index.js +130 -0
- package/my_template/node_modules/less/lib/less/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/less-error.js +162 -0
- package/my_template/node_modules/less/lib/less/less-error.js.map +1 -0
- package/my_template/node_modules/less/lib/less/logger.js +37 -0
- package/my_template/node_modules/less/lib/less/logger.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parse-tree.js +69 -0
- package/my_template/node_modules/less/lib/less/parse-tree.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parse.js +108 -0
- package/my_template/node_modules/less/lib/less/parse.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parser/chunker.js +147 -0
- package/my_template/node_modules/less/lib/less/parser/chunker.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parser/parser-input.js +355 -0
- package/my_template/node_modules/less/lib/less/parser/parser-input.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parser/parser.js +2262 -0
- package/my_template/node_modules/less/lib/less/parser/parser.js.map +1 -0
- package/my_template/node_modules/less/lib/less/plugin-manager.js +158 -0
- package/my_template/node_modules/less/lib/less/plugin-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less/render.js +64 -0
- package/my_template/node_modules/less/lib/less/render.js.map +1 -0
- package/my_template/node_modules/less/lib/less/source-map-builder.js +72 -0
- package/my_template/node_modules/less/lib/less/source-map-builder.js.map +1 -0
- package/my_template/node_modules/less/lib/less/source-map-output.js +140 -0
- package/my_template/node_modules/less/lib/less/source-map-output.js.map +1 -0
- package/my_template/node_modules/less/lib/less/transform-tree.js +93 -0
- package/my_template/node_modules/less/lib/less/transform-tree.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/anonymous.js +34 -0
- package/my_template/node_modules/less/lib/less/tree/anonymous.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/assignment.js +32 -0
- package/my_template/node_modules/less/lib/less/tree/assignment.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/atrule.js +146 -0
- package/my_template/node_modules/less/lib/less/tree/atrule.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/attribute.js +29 -0
- package/my_template/node_modules/less/lib/less/tree/attribute.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/call.js +104 -0
- package/my_template/node_modules/less/lib/less/tree/call.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/color.js +243 -0
- package/my_template/node_modules/less/lib/less/tree/color.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/combinator.js +29 -0
- package/my_template/node_modules/less/lib/less/tree/combinator.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/comment.js +28 -0
- package/my_template/node_modules/less/lib/less/tree/comment.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/condition.js +41 -0
- package/my_template/node_modules/less/lib/less/tree/condition.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/debug-info.js +37 -0
- package/my_template/node_modules/less/lib/less/tree/debug-info.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/declaration.js +118 -0
- package/my_template/node_modules/less/lib/less/tree/declaration.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js +47 -0
- package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/dimension.js +159 -0
- package/my_template/node_modules/less/lib/less/tree/dimension.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/element.js +64 -0
- package/my_template/node_modules/less/lib/less/tree/element.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/expression.js +90 -0
- package/my_template/node_modules/less/lib/less/tree/expression.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/extend.js +62 -0
- package/my_template/node_modules/less/lib/less/tree/extend.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/import.js +191 -0
- package/my_template/node_modules/less/lib/less/tree/import.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/index.js +56 -0
- package/my_template/node_modules/less/lib/less/tree/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/javascript.js +35 -0
- package/my_template/node_modules/less/lib/less/tree/javascript.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/js-eval-node.js +57 -0
- package/my_template/node_modules/less/lib/less/tree/js-eval-node.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/keyword.js +21 -0
- package/my_template/node_modules/less/lib/less/tree/keyword.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/media.js +152 -0
- package/my_template/node_modules/less/lib/less/tree/media.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-call.js +194 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-call.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-definition.js +233 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-definition.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/namespace-value.js +76 -0
- package/my_template/node_modules/less/lib/less/tree/namespace-value.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/negative.js +25 -0
- package/my_template/node_modules/less/lib/less/tree/negative.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/node.js +166 -0
- package/my_template/node_modules/less/lib/less/tree/node.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/operation.js +77 -0
- package/my_template/node_modules/less/lib/less/tree/operation.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/paren.js +21 -0
- package/my_template/node_modules/less/lib/less/tree/paren.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/property.js +62 -0
- package/my_template/node_modules/less/lib/less/tree/property.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/quoted.js +66 -0
- package/my_template/node_modules/less/lib/less/tree/quoted.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/ruleset.js +786 -0
- package/my_template/node_modules/less/lib/less/tree/ruleset.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/selector.js +126 -0
- package/my_template/node_modules/less/lib/less/tree/selector.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js +13 -0
- package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/unit.js +141 -0
- package/my_template/node_modules/less/lib/less/tree/unit.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/url.js +60 -0
- package/my_template/node_modules/less/lib/less/tree/url.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/value.js +43 -0
- package/my_template/node_modules/less/lib/less/tree/value.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/variable-call.js +44 -0
- package/my_template/node_modules/less/lib/less/tree/variable-call.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/variable.js +61 -0
- package/my_template/node_modules/less/lib/less/tree/variable.js.map +1 -0
- package/my_template/node_modules/less/lib/less/utils.js +143 -0
- package/my_template/node_modules/less/lib/less/utils.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js +462 -0
- package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js +61 -0
- package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/import-visitor.js +202 -0
- package/my_template/node_modules/less/lib/less/visitors/import-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/index.js +20 -0
- package/my_template/node_modules/less/lib/less/visitors/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js +57 -0
- package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js +43 -0
- package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js +321 -0
- package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/visitor.js +158 -0
- package/my_template/node_modules/less/lib/less/visitors/visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/add-default-options.js +45 -0
- package/my_template/node_modules/less/lib/less-browser/add-default-options.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/bootstrap.js +64 -0
- package/my_template/node_modules/less/lib/less-browser/bootstrap.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/browser.js +80 -0
- package/my_template/node_modules/less/lib/less-browser/browser.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/cache.js +45 -0
- package/my_template/node_modules/less/lib/less-browser/cache.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/error-reporting.js +183 -0
- package/my_template/node_modules/less/lib/less-browser/error-reporting.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/file-manager.js +122 -0
- package/my_template/node_modules/less/lib/less-browser/file-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/image-size.js +30 -0
- package/my_template/node_modules/less/lib/less-browser/image-size.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/index.js +256 -0
- package/my_template/node_modules/less/lib/less-browser/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/log-listener.js +43 -0
- package/my_template/node_modules/less/lib/less-browser/log-listener.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/plugin-loader.js +42 -0
- package/my_template/node_modules/less/lib/less-browser/plugin-loader.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/utils.js +29 -0
- package/my_template/node_modules/less/lib/less-browser/utils.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/environment.js +19 -0
- package/my_template/node_modules/less/lib/less-node/environment.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/file-manager.js +158 -0
- package/my_template/node_modules/less/lib/less-node/file-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/fs.js +11 -0
- package/my_template/node_modules/less/lib/less-node/fs.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/image-size.js +54 -0
- package/my_template/node_modules/less/lib/less-node/image-size.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/index.js +28 -0
- package/my_template/node_modules/less/lib/less-node/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/lessc-helper.js +92 -0
- package/my_template/node_modules/less/lib/less-node/lessc-helper.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/plugin-loader.js +73 -0
- package/my_template/node_modules/less/lib/less-node/plugin-loader.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/url-file-manager.js +68 -0
- package/my_template/node_modules/less/lib/less-node/url-file-manager.js.map +1 -0
- package/my_template/node_modules/less/package.json +133 -0
- package/my_template/node_modules/less/test/.eslintrc.json +9 -0
- package/my_template/node_modules/less/test/README.md +3 -0
- package/my_template/node_modules/less/test/browser/common.js +230 -0
- package/my_template/node_modules/less/test/browser/css/global-vars/simple.css +3 -0
- package/my_template/node_modules/less/test/browser/css/modify-vars/simple.css +8 -0
- package/my_template/node_modules/less/test/browser/css/plugin/plugin.css +3 -0
- package/my_template/node_modules/less/test/browser/css/postProcessor/postProcessor.css +4 -0
- package/my_template/node_modules/less/test/browser/css/relative-urls/urls.css +36 -0
- package/my_template/node_modules/less/test/browser/css/rewrite-urls/urls.css +36 -0
- package/my_template/node_modules/less/test/browser/css/rootpath/urls.css +35 -0
- package/my_template/node_modules/less/test/browser/css/rootpath-relative/urls.css +35 -0
- package/my_template/node_modules/less/test/browser/css/rootpath-rewrite-urls/urls.css +35 -0
- package/my_template/node_modules/less/test/browser/css/urls.css +54 -0
- package/my_template/node_modules/less/test/browser/generator/benchmark.config.js +50 -0
- package/my_template/node_modules/less/test/browser/generator/generate.js +78 -0
- package/my_template/node_modules/less/test/browser/generator/runner.config.js +186 -0
- package/my_template/node_modules/less/test/browser/generator/runner.js +2 -0
- package/my_template/node_modules/less/test/browser/generator/template.js +83 -0
- package/my_template/node_modules/less/test/browser/less/console-errors/test-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/console-errors/test-error.txt +2 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-height-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-height-error.txt +4 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-size-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-size-error.txt +4 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-width-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-width-error.txt +4 -0
- package/my_template/node_modules/less/test/browser/less/global-vars/simple.less +3 -0
- package/my_template/node_modules/less/test/browser/less/imports/urls.less +4 -0
- package/my_template/node_modules/less/test/browser/less/imports/urls2.less +4 -0
- package/my_template/node_modules/less/test/browser/less/modify-vars/imports/simple2.less +4 -0
- package/my_template/node_modules/less/test/browser/less/modify-vars/simple.less +8 -0
- package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/my_template/node_modules/less/test/browser/less/plugin/plugin.js +4 -0
- package/my_template/node_modules/less/test/browser/less/plugin/plugin.less +4 -0
- package/my_template/node_modules/less/test/browser/less/postProcessor/postProcessor.less +4 -0
- package/my_template/node_modules/less/test/browser/less/relative-urls/urls.less +34 -0
- package/my_template/node_modules/less/test/browser/less/rewrite-urls/urls.less +34 -0
- package/my_template/node_modules/less/test/browser/less/rootpath/urls.less +33 -0
- package/my_template/node_modules/less/test/browser/less/rootpath-relative/urls.less +33 -0
- package/my_template/node_modules/less/test/browser/less/rootpath-rewrite-urls/urls.less +33 -0
- package/my_template/node_modules/less/test/browser/less/urls.less +62 -0
- package/my_template/node_modules/less/test/browser/runner-VisitorPlugin-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-VisitorPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-browser-options.js +51 -0
- package/my_template/node_modules/less/test/browser/runner-browser-spec.js +12 -0
- package/my_template/node_modules/less/test/browser/runner-console-errors.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-errors-options.js +6 -0
- package/my_template/node_modules/less/test/browser/runner-errors-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin-options.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-global-vars-options.js +7 -0
- package/my_template/node_modules/less/test/browser/runner-global-vars-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-legacy-options.js +6 -0
- package/my_template/node_modules/less/test/browser/runner-legacy-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-main-options.js +17 -0
- package/my_template/node_modules/less/test/browser/runner-main-spec.js +7 -0
- package/my_template/node_modules/less/test/browser/runner-modify-vars-options.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-modify-vars-spec.js +33 -0
- package/my_template/node_modules/less/test/browser/runner-no-js-errors-options.js +4 -0
- package/my_template/node_modules/less/test/browser/runner-no-js-errors-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-production-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-production-spec.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-relative-urls-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-relative-urls-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rewrite-urls-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rewrite-urls-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-relative-options.js +4 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-relative-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-options.js +4 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-strict-units-options.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-strict-units-spec.js +3 -0
- package/my_template/node_modules/less/test/index.js +89 -0
- package/my_template/node_modules/less/test/less-test.js +535 -0
- package/my_template/node_modules/less/test/modify-vars.js +28 -0
- package/my_template/node_modules/less/test/plugins/filemanager/index.js +19 -0
- package/my_template/node_modules/less/test/plugins/postprocess/index.js +14 -0
- package/my_template/node_modules/less/test/plugins/preprocess/index.js +19 -0
- package/my_template/node_modules/less/test/plugins/visitor/index.js +24 -0
- package/my_template/node_modules/less/test/sourcemaps/basic.json +1 -0
- package/my_template/node_modules/less/test/sourcemaps/custom-props.json +1 -0
- package/my_template/node_modules/less/test/sourcemaps/index.html +17 -0
- package/my_template/node_modules/less/test/sourcemaps-disable-annotation/basic.json +1 -0
- package/my_template/node_modules/less/test/test-es6.ts +17 -0
- package/my_template/node_modules/less/tsconfig.json +13 -0
- package/my_template/node_modules/less-plugin-clean-css/LICENSE +201 -0
- package/my_template/node_modules/less-plugin-clean-css/README.md +33 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/clean-css-processor.js +63 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/index.js +23 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/parse-options.js +61 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/usage.js +19 -0
- package/my_template/node_modules/less-plugin-clean-css/package.json +39 -0
- package/my_template/node_modules/make-dir/index.d.ts +39 -0
- package/my_template/node_modules/make-dir/index.js +139 -0
- package/my_template/node_modules/make-dir/license +9 -0
- package/my_template/node_modules/make-dir/package.json +59 -0
- package/my_template/node_modules/make-dir/readme.md +123 -0
- package/my_template/node_modules/merge-stream/LICENSE +21 -0
- package/my_template/node_modules/merge-stream/README.md +78 -0
- package/my_template/node_modules/merge-stream/index.js +41 -0
- package/my_template/node_modules/merge-stream/package.json +19 -0
- package/my_template/node_modules/mime/CHANGELOG.md +164 -0
- package/my_template/node_modules/mime/LICENSE +21 -0
- package/my_template/node_modules/mime/README.md +90 -0
- package/my_template/node_modules/mime/cli.js +8 -0
- package/my_template/node_modules/mime/mime.js +108 -0
- package/my_template/node_modules/mime/package.json +44 -0
- package/my_template/node_modules/mime/src/build.js +53 -0
- package/my_template/node_modules/mime/src/test.js +60 -0
- package/my_template/node_modules/mime/types.json +1 -0
- package/my_template/node_modules/native-request/README.md +184 -0
- package/my_template/node_modules/native-request/commons/jsonToParameter.js +14 -0
- package/my_template/node_modules/native-request/index.js +65 -0
- package/my_template/node_modules/native-request/lib/Request.js +144 -0
- package/my_template/node_modules/native-request/package.json +45 -0
- package/my_template/node_modules/native-request/test/express.get.cookies.js +58 -0
- package/my_template/node_modules/native-request/test/express.get.js +146 -0
- package/my_template/node_modules/native-request/test/express.post.cookies.js +59 -0
- package/my_template/node_modules/native-request/test/express.post.js +148 -0
- package/my_template/node_modules/native-request/test/get.cookies.js +72 -0
- package/my_template/node_modules/native-request/test/get.js +140 -0
- package/my_template/node_modules/native-request/test/post.cookies.js +72 -0
- package/my_template/node_modules/native-request/test/post.js +155 -0
- package/my_template/node_modules/path-parse/LICENSE +21 -0
- package/my_template/node_modules/path-parse/README.md +42 -0
- package/my_template/node_modules/path-parse/index.js +75 -0
- package/my_template/node_modules/path-parse/package.json +33 -0
- package/my_template/node_modules/pify/index.js +68 -0
- package/my_template/node_modules/pify/license +9 -0
- package/my_template/node_modules/pify/package.json +51 -0
- package/my_template/node_modules/pify/readme.md +145 -0
- package/my_template/node_modules/prr/.jshintrc +61 -0
- package/my_template/node_modules/prr/.travis.yml +10 -0
- package/my_template/node_modules/prr/LICENSE.md +11 -0
- package/my_template/node_modules/prr/README.md +47 -0
- package/my_template/node_modules/prr/package.json +26 -0
- package/my_template/node_modules/prr/prr.js +63 -0
- package/my_template/node_modules/prr/test.js +169 -0
- package/my_template/node_modules/resolve/.editorconfig +37 -0
- package/my_template/node_modules/resolve/.eslintrc +65 -0
- package/my_template/node_modules/resolve/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/resolve/LICENSE +21 -0
- package/my_template/node_modules/resolve/SECURITY.md +3 -0
- package/my_template/node_modules/resolve/async.js +3 -0
- package/my_template/node_modules/resolve/bin/resolve +50 -0
- package/my_template/node_modules/resolve/example/async.js +5 -0
- package/my_template/node_modules/resolve/example/sync.js +3 -0
- package/my_template/node_modules/resolve/index.js +6 -0
- package/my_template/node_modules/resolve/lib/async.js +329 -0
- package/my_template/node_modules/resolve/lib/caller.js +8 -0
- package/my_template/node_modules/resolve/lib/core.js +12 -0
- package/my_template/node_modules/resolve/lib/core.json +158 -0
- package/my_template/node_modules/resolve/lib/homedir.js +24 -0
- package/my_template/node_modules/resolve/lib/is-core.js +5 -0
- package/my_template/node_modules/resolve/lib/node-modules-paths.js +42 -0
- package/my_template/node_modules/resolve/lib/normalize-options.js +10 -0
- package/my_template/node_modules/resolve/lib/sync.js +208 -0
- package/my_template/node_modules/resolve/package.json +72 -0
- package/my_template/node_modules/resolve/readme.markdown +301 -0
- package/my_template/node_modules/resolve/sync.js +3 -0
- package/my_template/node_modules/resolve/test/core.js +88 -0
- package/my_template/node_modules/resolve/test/dotdot/abc/index.js +2 -0
- package/my_template/node_modules/resolve/test/dotdot/index.js +1 -0
- package/my_template/node_modules/resolve/test/dotdot.js +29 -0
- package/my_template/node_modules/resolve/test/faulty_basedir.js +29 -0
- package/my_template/node_modules/resolve/test/filter.js +34 -0
- package/my_template/node_modules/resolve/test/filter_sync.js +33 -0
- package/my_template/node_modules/resolve/test/home_paths.js +127 -0
- package/my_template/node_modules/resolve/test/home_paths_sync.js +114 -0
- package/my_template/node_modules/resolve/test/mock.js +315 -0
- package/my_template/node_modules/resolve/test/mock_sync.js +214 -0
- package/my_template/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
- package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
- package/my_template/node_modules/resolve/test/module_dir.js +56 -0
- package/my_template/node_modules/resolve/test/node-modules-paths.js +143 -0
- package/my_template/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path.js +70 -0
- package/my_template/node_modules/resolve/test/nonstring.js +9 -0
- package/my_template/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/my_template/node_modules/resolve/test/pathfilter.js +75 -0
- package/my_template/node_modules/resolve/test/precedence/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/aaa/main.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/aaa.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/bbb/main.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/bbb.js +1 -0
- package/my_template/node_modules/resolve/test/precedence.js +23 -0
- package/my_template/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/baz/package.json +4 -0
- package/my_template/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
- package/my_template/node_modules/resolve/test/resolver/cup.coffee +1 -0
- package/my_template/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/false_main/index.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/false_main/package.json +4 -0
- package/my_template/node_modules/resolve/test/resolver/foo.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- package/my_template/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
- package/my_template/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/my_template/node_modules/resolve/test/resolver/mug.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
- package/my_template/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
- package/my_template/node_modules/resolve/test/resolver.js +597 -0
- package/my_template/node_modules/resolve/test/resolver_sync.js +730 -0
- package/my_template/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
- package/my_template/node_modules/resolve/test/shadowed_core.js +54 -0
- package/my_template/node_modules/resolve/test/subdirs.js +13 -0
- package/my_template/node_modules/resolve/test/symlinks.js +176 -0
- package/my_template/node_modules/rollup/CHANGELOG.md +3084 -0
- package/my_template/node_modules/rollup/LICENSE.md +578 -0
- package/my_template/node_modules/rollup/README.md +138 -0
- package/my_template/node_modules/rollup/dist/bin/rollup +1457 -0
- package/my_template/node_modules/rollup/dist/rollup.browser.es.js +25 -0
- package/my_template/node_modules/rollup/dist/rollup.browser.js +26 -0
- package/my_template/node_modules/rollup/dist/rollup.d.ts +656 -0
- package/my_template/node_modules/rollup/dist/rollup.es.js +17493 -0
- package/my_template/node_modules/rollup/dist/rollup.js +29 -0
- package/my_template/node_modules/rollup/dist/shared/index.js +321 -0
- package/my_template/node_modules/rollup/dist/shared/node-entry.js +17504 -0
- package/my_template/node_modules/rollup/package.json +139 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/CHANGELOG.md +195 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/README.md +135 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js +425 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js +421 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/index.d.ts +100 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/package.json +60 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/src/index.js +358 -0
- package/my_template/node_modules/rollup-plugin-uglify/LICENSE +20 -0
- package/my_template/node_modules/rollup-plugin-uglify/README.md +84 -0
- package/my_template/node_modules/rollup-plugin-uglify/index.js +51 -0
- package/my_template/node_modules/rollup-plugin-uglify/package.json +43 -0
- package/my_template/node_modules/rollup-plugin-uglify/transform.js +13 -0
- package/my_template/node_modules/rollup-pluginutils/CHANGELOG.md +125 -0
- package/my_template/node_modules/rollup-pluginutils/README.md +169 -0
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +3292 -0
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.d.ts +39 -0
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.es.js +3280 -0
- package/my_template/node_modules/rollup-pluginutils/package.json +57 -0
- package/my_template/node_modules/rollup-pluginutils/src/addExtension.ts +9 -0
- package/my_template/node_modules/rollup-pluginutils/src/attachScopes.ts +125 -0
- package/my_template/node_modules/rollup-pluginutils/src/createFilter.ts +52 -0
- package/my_template/node_modules/rollup-pluginutils/src/dataToEsm.ts +92 -0
- package/my_template/node_modules/rollup-pluginutils/src/extractAssignedNames.ts +46 -0
- package/my_template/node_modules/rollup-pluginutils/src/index.ts +6 -0
- package/my_template/node_modules/rollup-pluginutils/src/makeLegalIdentifier.ts +21 -0
- package/my_template/node_modules/rollup-pluginutils/src/pluginutils.d.ts +39 -0
- package/my_template/node_modules/rollup-pluginutils/src/utils/ensureArray.ts +5 -0
- package/my_template/node_modules/semver/LICENSE +15 -0
- package/my_template/node_modules/semver/README.md +412 -0
- package/my_template/node_modules/semver/bin/semver +160 -0
- package/my_template/node_modules/semver/package.json +38 -0
- package/my_template/node_modules/semver/range.bnf +16 -0
- package/my_template/node_modules/semver/semver.js +1525 -0
- package/my_template/node_modules/serialize-javascript/LICENSE +27 -0
- package/my_template/node_modules/serialize-javascript/README.md +143 -0
- package/my_template/node_modules/serialize-javascript/index.js +210 -0
- package/my_template/node_modules/serialize-javascript/package.json +33 -0
- package/my_template/node_modules/source-map/CHANGELOG.md +301 -0
- package/my_template/node_modules/source-map/LICENSE +28 -0
- package/my_template/node_modules/source-map/README.md +742 -0
- package/my_template/node_modules/source-map/dist/source-map.debug.js +3234 -0
- package/my_template/node_modules/source-map/dist/source-map.js +3233 -0
- package/my_template/node_modules/source-map/dist/source-map.min.js +2 -0
- package/my_template/node_modules/source-map/dist/source-map.min.js.map +1 -0
- package/my_template/node_modules/source-map/lib/array-set.js +121 -0
- package/my_template/node_modules/source-map/lib/base64-vlq.js +140 -0
- package/my_template/node_modules/source-map/lib/base64.js +67 -0
- package/my_template/node_modules/source-map/lib/binary-search.js +111 -0
- package/my_template/node_modules/source-map/lib/mapping-list.js +79 -0
- package/my_template/node_modules/source-map/lib/quick-sort.js +114 -0
- package/my_template/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- package/my_template/node_modules/source-map/lib/source-map-generator.js +425 -0
- package/my_template/node_modules/source-map/lib/source-node.js +413 -0
- package/my_template/node_modules/source-map/lib/util.js +488 -0
- package/my_template/node_modules/source-map/package.json +73 -0
- package/my_template/node_modules/source-map/source-map.d.ts +98 -0
- package/my_template/node_modules/source-map/source-map.js +8 -0
- package/my_template/node_modules/supports-color/browser.js +5 -0
- package/my_template/node_modules/supports-color/index.js +131 -0
- package/my_template/node_modules/supports-color/license +9 -0
- package/my_template/node_modules/supports-color/package.json +53 -0
- package/my_template/node_modules/supports-color/readme.md +66 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
- package/my_template/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/my_template/node_modules/tslib/LICENSE.txt +12 -0
- package/my_template/node_modules/tslib/README.md +142 -0
- package/my_template/node_modules/tslib/modules/index.js +51 -0
- package/my_template/node_modules/tslib/modules/package.json +3 -0
- package/my_template/node_modules/tslib/package.json +37 -0
- package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js +23 -0
- package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json +6 -0
- package/my_template/node_modules/tslib/tslib.d.ts +37 -0
- package/my_template/node_modules/tslib/tslib.es6.html +1 -0
- package/my_template/node_modules/tslib/tslib.es6.js +218 -0
- package/my_template/node_modules/tslib/tslib.html +1 -0
- package/my_template/node_modules/tslib/tslib.js +284 -0
- package/my_template/node_modules/uglify-js/LICENSE +29 -0
- package/my_template/node_modules/uglify-js/README.md +1478 -0
- package/my_template/node_modules/uglify-js/bin/uglifyjs +605 -0
- package/my_template/node_modules/uglify-js/lib/ast.js +2356 -0
- package/my_template/node_modules/uglify-js/lib/compress.js +14241 -0
- package/my_template/node_modules/uglify-js/lib/minify.js +276 -0
- package/my_template/node_modules/uglify-js/lib/mozilla-ast.js +1310 -0
- package/my_template/node_modules/uglify-js/lib/output.js +1956 -0
- package/my_template/node_modules/uglify-js/lib/parse.js +2585 -0
- package/my_template/node_modules/uglify-js/lib/propmangle.js +328 -0
- package/my_template/node_modules/uglify-js/lib/scope.js +866 -0
- package/my_template/node_modules/uglify-js/lib/sourcemap.js +195 -0
- package/my_template/node_modules/uglify-js/lib/transform.js +250 -0
- package/my_template/node_modules/uglify-js/lib/utils.js +287 -0
- package/my_template/node_modules/uglify-js/package.json +56 -0
- package/my_template/node_modules/uglify-js/tools/domprops.html +456 -0
- package/my_template/node_modules/uglify-js/tools/domprops.json +8325 -0
- package/my_template/node_modules/uglify-js/tools/exports.js +8 -0
- package/my_template/node_modules/uglify-js/tools/node.js +110 -0
- package/my_template/node_modules/uglify-js/tools/tty.js +22 -0
- package/my_template/node_modules/undici-types/README.md +6 -0
- package/my_template/node_modules/undici-types/agent.d.ts +31 -0
- package/my_template/node_modules/undici-types/api.d.ts +43 -0
- package/my_template/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/my_template/node_modules/undici-types/cache.d.ts +36 -0
- package/my_template/node_modules/undici-types/client.d.ts +97 -0
- package/my_template/node_modules/undici-types/connector.d.ts +34 -0
- package/my_template/node_modules/undici-types/content-type.d.ts +21 -0
- package/my_template/node_modules/undici-types/cookies.d.ts +28 -0
- package/my_template/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/my_template/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/my_template/node_modules/undici-types/errors.d.ts +128 -0
- package/my_template/node_modules/undici-types/fetch.d.ts +209 -0
- package/my_template/node_modules/undici-types/file.d.ts +39 -0
- package/my_template/node_modules/undici-types/filereader.d.ts +54 -0
- package/my_template/node_modules/undici-types/formdata.d.ts +108 -0
- package/my_template/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/my_template/node_modules/undici-types/global-origin.d.ts +7 -0
- package/my_template/node_modules/undici-types/handlers.d.ts +9 -0
- package/my_template/node_modules/undici-types/header.d.ts +4 -0
- package/my_template/node_modules/undici-types/index.d.ts +63 -0
- package/my_template/node_modules/undici-types/interceptors.d.ts +5 -0
- package/my_template/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/my_template/node_modules/undici-types/mock-client.d.ts +25 -0
- package/my_template/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/my_template/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/my_template/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/my_template/node_modules/undici-types/package.json +55 -0
- package/my_template/node_modules/undici-types/patch.d.ts +71 -0
- package/my_template/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/my_template/node_modules/undici-types/pool.d.ts +28 -0
- package/my_template/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/my_template/node_modules/undici-types/readable.d.ts +61 -0
- package/my_template/node_modules/undici-types/webidl.d.ts +220 -0
- package/my_template/node_modules/undici-types/websocket.d.ts +131 -0
- package/package.json +1 -1
- package/server/comms_js.js +1 -0
- package/server/index.js +3 -3
- package/site/images/icon-add-folder.svg +5 -0
- package/site/images/icon-all-projects.svg +3 -0
- package/site/images/icon-folder.svg +3 -0
- package/site/images/icon-search.svg +5 -0
- package/site/images/icon-shared-projects.svg +10 -0
- package/site/images/onboarding-tour-story-duplicate-slide.png +0 -0
- package/site/images/onboarding-tour-white-story.gif +0 -0
- package/site/images/story-onboarding-tour-legend.gif +0 -0
- package/site/script.js +2 -2
- package/site/sdk.css +2 -2
- package/tsconfig.json +10 -0
- package/utils/state.js +0 -152
|
@@ -0,0 +1,1103 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* Module dependencies.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
var EventEmitter = require('events').EventEmitter;
|
|
7
|
+
var spawn = require('child_process').spawn;
|
|
8
|
+
var readlink = require('graceful-readlink').readlinkSync;
|
|
9
|
+
var path = require('path');
|
|
10
|
+
var dirname = path.dirname;
|
|
11
|
+
var basename = path.basename;
|
|
12
|
+
var fs = require('fs');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Expose the root command.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
exports = module.exports = new Command();
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Expose `Command`.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
exports.Command = Command;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Expose `Option`.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
exports.Option = Option;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Initialize a new `Option` with the given `flags` and `description`.
|
|
34
|
+
*
|
|
35
|
+
* @param {String} flags
|
|
36
|
+
* @param {String} description
|
|
37
|
+
* @api public
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
function Option(flags, description) {
|
|
41
|
+
this.flags = flags;
|
|
42
|
+
this.required = ~flags.indexOf('<');
|
|
43
|
+
this.optional = ~flags.indexOf('[');
|
|
44
|
+
this.bool = !~flags.indexOf('-no-');
|
|
45
|
+
flags = flags.split(/[ ,|]+/);
|
|
46
|
+
if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
|
|
47
|
+
this.long = flags.shift();
|
|
48
|
+
this.description = description || '';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Return option name.
|
|
53
|
+
*
|
|
54
|
+
* @return {String}
|
|
55
|
+
* @api private
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
Option.prototype.name = function() {
|
|
59
|
+
return this.long
|
|
60
|
+
.replace('--', '')
|
|
61
|
+
.replace('no-', '');
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Check if `arg` matches the short or long flag.
|
|
66
|
+
*
|
|
67
|
+
* @param {String} arg
|
|
68
|
+
* @return {Boolean}
|
|
69
|
+
* @api private
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
Option.prototype.is = function(arg) {
|
|
73
|
+
return arg == this.short || arg == this.long;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Initialize a new `Command`.
|
|
78
|
+
*
|
|
79
|
+
* @param {String} name
|
|
80
|
+
* @api public
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
function Command(name) {
|
|
84
|
+
this.commands = [];
|
|
85
|
+
this.options = [];
|
|
86
|
+
this._execs = [];
|
|
87
|
+
this._allowUnknownOption = false;
|
|
88
|
+
this._args = [];
|
|
89
|
+
this._name = name;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Inherit from `EventEmitter.prototype`.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
Command.prototype.__proto__ = EventEmitter.prototype;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Add command `name`.
|
|
100
|
+
*
|
|
101
|
+
* The `.action()` callback is invoked when the
|
|
102
|
+
* command `name` is specified via __ARGV__,
|
|
103
|
+
* and the remaining arguments are applied to the
|
|
104
|
+
* function for access.
|
|
105
|
+
*
|
|
106
|
+
* When the `name` is "*" an un-matched command
|
|
107
|
+
* will be passed as the first arg, followed by
|
|
108
|
+
* the rest of __ARGV__ remaining.
|
|
109
|
+
*
|
|
110
|
+
* Examples:
|
|
111
|
+
*
|
|
112
|
+
* program
|
|
113
|
+
* .version('0.0.1')
|
|
114
|
+
* .option('-C, --chdir <path>', 'change the working directory')
|
|
115
|
+
* .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
|
|
116
|
+
* .option('-T, --no-tests', 'ignore test hook')
|
|
117
|
+
*
|
|
118
|
+
* program
|
|
119
|
+
* .command('setup')
|
|
120
|
+
* .description('run remote setup commands')
|
|
121
|
+
* .action(function() {
|
|
122
|
+
* console.log('setup');
|
|
123
|
+
* });
|
|
124
|
+
*
|
|
125
|
+
* program
|
|
126
|
+
* .command('exec <cmd>')
|
|
127
|
+
* .description('run the given remote command')
|
|
128
|
+
* .action(function(cmd) {
|
|
129
|
+
* console.log('exec "%s"', cmd);
|
|
130
|
+
* });
|
|
131
|
+
*
|
|
132
|
+
* program
|
|
133
|
+
* .command('teardown <dir> [otherDirs...]')
|
|
134
|
+
* .description('run teardown commands')
|
|
135
|
+
* .action(function(dir, otherDirs) {
|
|
136
|
+
* console.log('dir "%s"', dir);
|
|
137
|
+
* if (otherDirs) {
|
|
138
|
+
* otherDirs.forEach(function (oDir) {
|
|
139
|
+
* console.log('dir "%s"', oDir);
|
|
140
|
+
* });
|
|
141
|
+
* }
|
|
142
|
+
* });
|
|
143
|
+
*
|
|
144
|
+
* program
|
|
145
|
+
* .command('*')
|
|
146
|
+
* .description('deploy the given env')
|
|
147
|
+
* .action(function(env) {
|
|
148
|
+
* console.log('deploying "%s"', env);
|
|
149
|
+
* });
|
|
150
|
+
*
|
|
151
|
+
* program.parse(process.argv);
|
|
152
|
+
*
|
|
153
|
+
* @param {String} name
|
|
154
|
+
* @param {String} [desc] for git-style sub-commands
|
|
155
|
+
* @return {Command} the new command
|
|
156
|
+
* @api public
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
Command.prototype.command = function(name, desc, opts) {
|
|
160
|
+
opts = opts || {};
|
|
161
|
+
var args = name.split(/ +/);
|
|
162
|
+
var cmd = new Command(args.shift());
|
|
163
|
+
|
|
164
|
+
if (desc) {
|
|
165
|
+
cmd.description(desc);
|
|
166
|
+
this.executables = true;
|
|
167
|
+
this._execs[cmd._name] = true;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
cmd._noHelp = !!opts.noHelp;
|
|
171
|
+
this.commands.push(cmd);
|
|
172
|
+
cmd.parseExpectedArgs(args);
|
|
173
|
+
cmd.parent = this;
|
|
174
|
+
|
|
175
|
+
if (desc) return this;
|
|
176
|
+
return cmd;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Define argument syntax for the top-level command.
|
|
181
|
+
*
|
|
182
|
+
* @api public
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
Command.prototype.arguments = function (desc) {
|
|
186
|
+
return this.parseExpectedArgs(desc.split(/ +/));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Add an implicit `help [cmd]` subcommand
|
|
191
|
+
* which invokes `--help` for the given command.
|
|
192
|
+
*
|
|
193
|
+
* @api private
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
Command.prototype.addImplicitHelpCommand = function() {
|
|
197
|
+
this.command('help [cmd]', 'display help for [cmd]');
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Parse expected `args`.
|
|
202
|
+
*
|
|
203
|
+
* For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
|
|
204
|
+
*
|
|
205
|
+
* @param {Array} args
|
|
206
|
+
* @return {Command} for chaining
|
|
207
|
+
* @api public
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
Command.prototype.parseExpectedArgs = function(args) {
|
|
211
|
+
if (!args.length) return;
|
|
212
|
+
var self = this;
|
|
213
|
+
args.forEach(function(arg) {
|
|
214
|
+
var argDetails = {
|
|
215
|
+
required: false,
|
|
216
|
+
name: '',
|
|
217
|
+
variadic: false
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
switch (arg[0]) {
|
|
221
|
+
case '<':
|
|
222
|
+
argDetails.required = true;
|
|
223
|
+
argDetails.name = arg.slice(1, -1);
|
|
224
|
+
break;
|
|
225
|
+
case '[':
|
|
226
|
+
argDetails.name = arg.slice(1, -1);
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') {
|
|
231
|
+
argDetails.variadic = true;
|
|
232
|
+
argDetails.name = argDetails.name.slice(0, -3);
|
|
233
|
+
}
|
|
234
|
+
if (argDetails.name) {
|
|
235
|
+
self._args.push(argDetails);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
return this;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Register callback `fn` for the command.
|
|
243
|
+
*
|
|
244
|
+
* Examples:
|
|
245
|
+
*
|
|
246
|
+
* program
|
|
247
|
+
* .command('help')
|
|
248
|
+
* .description('display verbose help')
|
|
249
|
+
* .action(function() {
|
|
250
|
+
* // output help here
|
|
251
|
+
* });
|
|
252
|
+
*
|
|
253
|
+
* @param {Function} fn
|
|
254
|
+
* @return {Command} for chaining
|
|
255
|
+
* @api public
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
Command.prototype.action = function(fn) {
|
|
259
|
+
var self = this;
|
|
260
|
+
var listener = function(args, unknown) {
|
|
261
|
+
// Parse any so-far unknown options
|
|
262
|
+
args = args || [];
|
|
263
|
+
unknown = unknown || [];
|
|
264
|
+
|
|
265
|
+
var parsed = self.parseOptions(unknown);
|
|
266
|
+
|
|
267
|
+
// Output help if necessary
|
|
268
|
+
outputHelpIfNecessary(self, parsed.unknown);
|
|
269
|
+
|
|
270
|
+
// If there are still any unknown options, then we simply
|
|
271
|
+
// die, unless someone asked for help, in which case we give it
|
|
272
|
+
// to them, and then we die.
|
|
273
|
+
if (parsed.unknown.length > 0) {
|
|
274
|
+
self.unknownOption(parsed.unknown[0]);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Leftover arguments need to be pushed back. Fixes issue #56
|
|
278
|
+
if (parsed.args.length) args = parsed.args.concat(args);
|
|
279
|
+
|
|
280
|
+
self._args.forEach(function(arg, i) {
|
|
281
|
+
if (arg.required && null == args[i]) {
|
|
282
|
+
self.missingArgument(arg.name);
|
|
283
|
+
} else if (arg.variadic) {
|
|
284
|
+
if (i !== self._args.length - 1) {
|
|
285
|
+
self.variadicArgNotLast(arg.name);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
args[i] = args.splice(i);
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
// Always append ourselves to the end of the arguments,
|
|
293
|
+
// to make sure we match the number of arguments the user
|
|
294
|
+
// expects
|
|
295
|
+
if (self._args.length) {
|
|
296
|
+
args[self._args.length] = self;
|
|
297
|
+
} else {
|
|
298
|
+
args.push(self);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
fn.apply(self, args);
|
|
302
|
+
};
|
|
303
|
+
var parent = this.parent || this;
|
|
304
|
+
var name = parent === this ? '*' : this._name;
|
|
305
|
+
parent.on(name, listener);
|
|
306
|
+
if (this._alias) parent.on(this._alias, listener);
|
|
307
|
+
return this;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Define option with `flags`, `description` and optional
|
|
312
|
+
* coercion `fn`.
|
|
313
|
+
*
|
|
314
|
+
* The `flags` string should contain both the short and long flags,
|
|
315
|
+
* separated by comma, a pipe or space. The following are all valid
|
|
316
|
+
* all will output this way when `--help` is used.
|
|
317
|
+
*
|
|
318
|
+
* "-p, --pepper"
|
|
319
|
+
* "-p|--pepper"
|
|
320
|
+
* "-p --pepper"
|
|
321
|
+
*
|
|
322
|
+
* Examples:
|
|
323
|
+
*
|
|
324
|
+
* // simple boolean defaulting to false
|
|
325
|
+
* program.option('-p, --pepper', 'add pepper');
|
|
326
|
+
*
|
|
327
|
+
* --pepper
|
|
328
|
+
* program.pepper
|
|
329
|
+
* // => Boolean
|
|
330
|
+
*
|
|
331
|
+
* // simple boolean defaulting to true
|
|
332
|
+
* program.option('-C, --no-cheese', 'remove cheese');
|
|
333
|
+
*
|
|
334
|
+
* program.cheese
|
|
335
|
+
* // => true
|
|
336
|
+
*
|
|
337
|
+
* --no-cheese
|
|
338
|
+
* program.cheese
|
|
339
|
+
* // => false
|
|
340
|
+
*
|
|
341
|
+
* // required argument
|
|
342
|
+
* program.option('-C, --chdir <path>', 'change the working directory');
|
|
343
|
+
*
|
|
344
|
+
* --chdir /tmp
|
|
345
|
+
* program.chdir
|
|
346
|
+
* // => "/tmp"
|
|
347
|
+
*
|
|
348
|
+
* // optional argument
|
|
349
|
+
* program.option('-c, --cheese [type]', 'add cheese [marble]');
|
|
350
|
+
*
|
|
351
|
+
* @param {String} flags
|
|
352
|
+
* @param {String} description
|
|
353
|
+
* @param {Function|Mixed} fn or default
|
|
354
|
+
* @param {Mixed} defaultValue
|
|
355
|
+
* @return {Command} for chaining
|
|
356
|
+
* @api public
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
Command.prototype.option = function(flags, description, fn, defaultValue) {
|
|
360
|
+
var self = this
|
|
361
|
+
, option = new Option(flags, description)
|
|
362
|
+
, oname = option.name()
|
|
363
|
+
, name = camelcase(oname);
|
|
364
|
+
|
|
365
|
+
// default as 3rd arg
|
|
366
|
+
if (typeof fn != 'function') {
|
|
367
|
+
if (fn instanceof RegExp) {
|
|
368
|
+
var regex = fn;
|
|
369
|
+
fn = function(val, def) {
|
|
370
|
+
var m = regex.exec(val);
|
|
371
|
+
return m ? m[0] : def;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
defaultValue = fn;
|
|
376
|
+
fn = null;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// preassign default value only for --no-*, [optional], or <required>
|
|
381
|
+
if (false == option.bool || option.optional || option.required) {
|
|
382
|
+
// when --no-* we make sure default is true
|
|
383
|
+
if (false == option.bool) defaultValue = true;
|
|
384
|
+
// preassign only if we have a default
|
|
385
|
+
if (undefined !== defaultValue) self[name] = defaultValue;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// register the option
|
|
389
|
+
this.options.push(option);
|
|
390
|
+
|
|
391
|
+
// when it's passed assign the value
|
|
392
|
+
// and conditionally invoke the callback
|
|
393
|
+
this.on(oname, function(val) {
|
|
394
|
+
// coercion
|
|
395
|
+
if (null !== val && fn) val = fn(val, undefined === self[name]
|
|
396
|
+
? defaultValue
|
|
397
|
+
: self[name]);
|
|
398
|
+
|
|
399
|
+
// unassigned or bool
|
|
400
|
+
if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) {
|
|
401
|
+
// if no value, bool true, and we have a default, then use it!
|
|
402
|
+
if (null == val) {
|
|
403
|
+
self[name] = option.bool
|
|
404
|
+
? defaultValue || true
|
|
405
|
+
: false;
|
|
406
|
+
} else {
|
|
407
|
+
self[name] = val;
|
|
408
|
+
}
|
|
409
|
+
} else if (null !== val) {
|
|
410
|
+
// reassign
|
|
411
|
+
self[name] = val;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
return this;
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Allow unknown options on the command line.
|
|
420
|
+
*
|
|
421
|
+
* @param {Boolean} arg if `true` or omitted, no error will be thrown
|
|
422
|
+
* for unknown options.
|
|
423
|
+
* @api public
|
|
424
|
+
*/
|
|
425
|
+
Command.prototype.allowUnknownOption = function(arg) {
|
|
426
|
+
this._allowUnknownOption = arguments.length === 0 || arg;
|
|
427
|
+
return this;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Parse `argv`, settings options and invoking commands when defined.
|
|
432
|
+
*
|
|
433
|
+
* @param {Array} argv
|
|
434
|
+
* @return {Command} for chaining
|
|
435
|
+
* @api public
|
|
436
|
+
*/
|
|
437
|
+
|
|
438
|
+
Command.prototype.parse = function(argv) {
|
|
439
|
+
// implicit help
|
|
440
|
+
if (this.executables) this.addImplicitHelpCommand();
|
|
441
|
+
|
|
442
|
+
// store raw args
|
|
443
|
+
this.rawArgs = argv;
|
|
444
|
+
|
|
445
|
+
// guess name
|
|
446
|
+
this._name = this._name || basename(argv[1], '.js');
|
|
447
|
+
|
|
448
|
+
// github-style sub-commands with no sub-command
|
|
449
|
+
if (this.executables && argv.length < 3) {
|
|
450
|
+
// this user needs help
|
|
451
|
+
argv.push('--help');
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// process argv
|
|
455
|
+
var parsed = this.parseOptions(this.normalize(argv.slice(2)));
|
|
456
|
+
var args = this.args = parsed.args;
|
|
457
|
+
|
|
458
|
+
var result = this.parseArgs(this.args, parsed.unknown);
|
|
459
|
+
|
|
460
|
+
// executable sub-commands
|
|
461
|
+
var name = result.args[0];
|
|
462
|
+
if (this._execs[name] && typeof this._execs[name] != "function") {
|
|
463
|
+
return this.executeSubCommand(argv, args, parsed.unknown);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return result;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Execute a sub-command executable.
|
|
471
|
+
*
|
|
472
|
+
* @param {Array} argv
|
|
473
|
+
* @param {Array} args
|
|
474
|
+
* @param {Array} unknown
|
|
475
|
+
* @api private
|
|
476
|
+
*/
|
|
477
|
+
|
|
478
|
+
Command.prototype.executeSubCommand = function(argv, args, unknown) {
|
|
479
|
+
args = args.concat(unknown);
|
|
480
|
+
|
|
481
|
+
if (!args.length) this.help();
|
|
482
|
+
if ('help' == args[0] && 1 == args.length) this.help();
|
|
483
|
+
|
|
484
|
+
// <cmd> --help
|
|
485
|
+
if ('help' == args[0]) {
|
|
486
|
+
args[0] = args[1];
|
|
487
|
+
args[1] = '--help';
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// executable
|
|
491
|
+
var f = argv[1];
|
|
492
|
+
// name of the subcommand, link `pm-install`
|
|
493
|
+
var bin = basename(f, '.js') + '-' + args[0];
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
// In case of globally installed, get the base dir where executable
|
|
497
|
+
// subcommand file should be located at
|
|
498
|
+
var baseDir
|
|
499
|
+
, link = readlink(f);
|
|
500
|
+
|
|
501
|
+
// when symbolink is relative path
|
|
502
|
+
if (link !== f && link.charAt(0) !== '/') {
|
|
503
|
+
link = path.join(dirname(f), link)
|
|
504
|
+
}
|
|
505
|
+
baseDir = dirname(link);
|
|
506
|
+
|
|
507
|
+
// prefer local `./<bin>` to bin in the $PATH
|
|
508
|
+
var localBin = path.join(baseDir, bin);
|
|
509
|
+
|
|
510
|
+
// whether bin file is a js script with explicit `.js` extension
|
|
511
|
+
var isExplicitJS = false;
|
|
512
|
+
if (exists(localBin + '.js')) {
|
|
513
|
+
bin = localBin + '.js';
|
|
514
|
+
isExplicitJS = true;
|
|
515
|
+
} else if (exists(localBin)) {
|
|
516
|
+
bin = localBin;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
args = args.slice(1);
|
|
520
|
+
|
|
521
|
+
var proc;
|
|
522
|
+
if (process.platform !== 'win32') {
|
|
523
|
+
if (isExplicitJS) {
|
|
524
|
+
args.unshift(localBin);
|
|
525
|
+
// add executable arguments to spawn
|
|
526
|
+
args = (process.execArgv || []).concat(args);
|
|
527
|
+
|
|
528
|
+
proc = spawn('node', args, { stdio: 'inherit', customFds: [0, 1, 2] });
|
|
529
|
+
} else {
|
|
530
|
+
proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] });
|
|
531
|
+
}
|
|
532
|
+
} else {
|
|
533
|
+
args.unshift(localBin);
|
|
534
|
+
proc = spawn(process.execPath, args, { stdio: 'inherit'});
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
proc.on('close', process.exit.bind(process));
|
|
538
|
+
proc.on('error', function(err) {
|
|
539
|
+
if (err.code == "ENOENT") {
|
|
540
|
+
console.error('\n %s(1) does not exist, try --help\n', bin);
|
|
541
|
+
} else if (err.code == "EACCES") {
|
|
542
|
+
console.error('\n %s(1) not executable. try chmod or run with root\n', bin);
|
|
543
|
+
}
|
|
544
|
+
process.exit(1);
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
this.runningCommand = proc;
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Normalize `args`, splitting joined short flags. For example
|
|
552
|
+
* the arg "-abc" is equivalent to "-a -b -c".
|
|
553
|
+
* This also normalizes equal sign and splits "--abc=def" into "--abc def".
|
|
554
|
+
*
|
|
555
|
+
* @param {Array} args
|
|
556
|
+
* @return {Array}
|
|
557
|
+
* @api private
|
|
558
|
+
*/
|
|
559
|
+
|
|
560
|
+
Command.prototype.normalize = function(args) {
|
|
561
|
+
var ret = []
|
|
562
|
+
, arg
|
|
563
|
+
, lastOpt
|
|
564
|
+
, index;
|
|
565
|
+
|
|
566
|
+
for (var i = 0, len = args.length; i < len; ++i) {
|
|
567
|
+
arg = args[i];
|
|
568
|
+
if (i > 0) {
|
|
569
|
+
lastOpt = this.optionFor(args[i-1]);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
if (arg === '--') {
|
|
573
|
+
// Honor option terminator
|
|
574
|
+
ret = ret.concat(args.slice(i));
|
|
575
|
+
break;
|
|
576
|
+
} else if (lastOpt && lastOpt.required) {
|
|
577
|
+
ret.push(arg);
|
|
578
|
+
} else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) {
|
|
579
|
+
arg.slice(1).split('').forEach(function(c) {
|
|
580
|
+
ret.push('-' + c);
|
|
581
|
+
});
|
|
582
|
+
} else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) {
|
|
583
|
+
ret.push(arg.slice(0, index), arg.slice(index + 1));
|
|
584
|
+
} else {
|
|
585
|
+
ret.push(arg);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
return ret;
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Parse command `args`.
|
|
594
|
+
*
|
|
595
|
+
* When listener(s) are available those
|
|
596
|
+
* callbacks are invoked, otherwise the "*"
|
|
597
|
+
* event is emitted and those actions are invoked.
|
|
598
|
+
*
|
|
599
|
+
* @param {Array} args
|
|
600
|
+
* @return {Command} for chaining
|
|
601
|
+
* @api private
|
|
602
|
+
*/
|
|
603
|
+
|
|
604
|
+
Command.prototype.parseArgs = function(args, unknown) {
|
|
605
|
+
var name;
|
|
606
|
+
|
|
607
|
+
if (args.length) {
|
|
608
|
+
name = args[0];
|
|
609
|
+
if (this.listeners(name).length) {
|
|
610
|
+
this.emit(args.shift(), args, unknown);
|
|
611
|
+
} else {
|
|
612
|
+
this.emit('*', args);
|
|
613
|
+
}
|
|
614
|
+
} else {
|
|
615
|
+
outputHelpIfNecessary(this, unknown);
|
|
616
|
+
|
|
617
|
+
// If there were no args and we have unknown options,
|
|
618
|
+
// then they are extraneous and we need to error.
|
|
619
|
+
if (unknown.length > 0) {
|
|
620
|
+
this.unknownOption(unknown[0]);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
return this;
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Return an option matching `arg` if any.
|
|
629
|
+
*
|
|
630
|
+
* @param {String} arg
|
|
631
|
+
* @return {Option}
|
|
632
|
+
* @api private
|
|
633
|
+
*/
|
|
634
|
+
|
|
635
|
+
Command.prototype.optionFor = function(arg) {
|
|
636
|
+
for (var i = 0, len = this.options.length; i < len; ++i) {
|
|
637
|
+
if (this.options[i].is(arg)) {
|
|
638
|
+
return this.options[i];
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Parse options from `argv` returning `argv`
|
|
645
|
+
* void of these options.
|
|
646
|
+
*
|
|
647
|
+
* @param {Array} argv
|
|
648
|
+
* @return {Array}
|
|
649
|
+
* @api public
|
|
650
|
+
*/
|
|
651
|
+
|
|
652
|
+
Command.prototype.parseOptions = function(argv) {
|
|
653
|
+
var args = []
|
|
654
|
+
, len = argv.length
|
|
655
|
+
, literal
|
|
656
|
+
, option
|
|
657
|
+
, arg;
|
|
658
|
+
|
|
659
|
+
var unknownOptions = [];
|
|
660
|
+
|
|
661
|
+
// parse options
|
|
662
|
+
for (var i = 0; i < len; ++i) {
|
|
663
|
+
arg = argv[i];
|
|
664
|
+
|
|
665
|
+
// literal args after --
|
|
666
|
+
if ('--' == arg) {
|
|
667
|
+
literal = true;
|
|
668
|
+
continue;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
if (literal) {
|
|
672
|
+
args.push(arg);
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
// find matching Option
|
|
677
|
+
option = this.optionFor(arg);
|
|
678
|
+
|
|
679
|
+
// option is defined
|
|
680
|
+
if (option) {
|
|
681
|
+
// requires arg
|
|
682
|
+
if (option.required) {
|
|
683
|
+
arg = argv[++i];
|
|
684
|
+
if (null == arg) return this.optionMissingArgument(option);
|
|
685
|
+
this.emit(option.name(), arg);
|
|
686
|
+
// optional arg
|
|
687
|
+
} else if (option.optional) {
|
|
688
|
+
arg = argv[i+1];
|
|
689
|
+
if (null == arg || ('-' == arg[0] && '-' != arg)) {
|
|
690
|
+
arg = null;
|
|
691
|
+
} else {
|
|
692
|
+
++i;
|
|
693
|
+
}
|
|
694
|
+
this.emit(option.name(), arg);
|
|
695
|
+
// bool
|
|
696
|
+
} else {
|
|
697
|
+
this.emit(option.name());
|
|
698
|
+
}
|
|
699
|
+
continue;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// looks like an option
|
|
703
|
+
if (arg.length > 1 && '-' == arg[0]) {
|
|
704
|
+
unknownOptions.push(arg);
|
|
705
|
+
|
|
706
|
+
// If the next argument looks like it might be
|
|
707
|
+
// an argument for this option, we pass it on.
|
|
708
|
+
// If it isn't, then it'll simply be ignored
|
|
709
|
+
if (argv[i+1] && '-' != argv[i+1][0]) {
|
|
710
|
+
unknownOptions.push(argv[++i]);
|
|
711
|
+
}
|
|
712
|
+
continue;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
// arg
|
|
716
|
+
args.push(arg);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
return { args: args, unknown: unknownOptions };
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Return an object containing options as key-value pairs
|
|
724
|
+
*
|
|
725
|
+
* @return {Object}
|
|
726
|
+
* @api public
|
|
727
|
+
*/
|
|
728
|
+
Command.prototype.opts = function() {
|
|
729
|
+
var result = {}
|
|
730
|
+
, len = this.options.length;
|
|
731
|
+
|
|
732
|
+
for (var i = 0 ; i < len; i++) {
|
|
733
|
+
var key = camelcase(this.options[i].name());
|
|
734
|
+
result[key] = key === 'version' ? this._version : this[key];
|
|
735
|
+
}
|
|
736
|
+
return result;
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Argument `name` is missing.
|
|
741
|
+
*
|
|
742
|
+
* @param {String} name
|
|
743
|
+
* @api private
|
|
744
|
+
*/
|
|
745
|
+
|
|
746
|
+
Command.prototype.missingArgument = function(name) {
|
|
747
|
+
console.error();
|
|
748
|
+
console.error(" error: missing required argument `%s'", name);
|
|
749
|
+
console.error();
|
|
750
|
+
process.exit(1);
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* `Option` is missing an argument, but received `flag` or nothing.
|
|
755
|
+
*
|
|
756
|
+
* @param {String} option
|
|
757
|
+
* @param {String} flag
|
|
758
|
+
* @api private
|
|
759
|
+
*/
|
|
760
|
+
|
|
761
|
+
Command.prototype.optionMissingArgument = function(option, flag) {
|
|
762
|
+
console.error();
|
|
763
|
+
if (flag) {
|
|
764
|
+
console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
|
|
765
|
+
} else {
|
|
766
|
+
console.error(" error: option `%s' argument missing", option.flags);
|
|
767
|
+
}
|
|
768
|
+
console.error();
|
|
769
|
+
process.exit(1);
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Unknown option `flag`.
|
|
774
|
+
*
|
|
775
|
+
* @param {String} flag
|
|
776
|
+
* @api private
|
|
777
|
+
*/
|
|
778
|
+
|
|
779
|
+
Command.prototype.unknownOption = function(flag) {
|
|
780
|
+
if (this._allowUnknownOption) return;
|
|
781
|
+
console.error();
|
|
782
|
+
console.error(" error: unknown option `%s'", flag);
|
|
783
|
+
console.error();
|
|
784
|
+
process.exit(1);
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Variadic argument with `name` is not the last argument as required.
|
|
789
|
+
*
|
|
790
|
+
* @param {String} name
|
|
791
|
+
* @api private
|
|
792
|
+
*/
|
|
793
|
+
|
|
794
|
+
Command.prototype.variadicArgNotLast = function(name) {
|
|
795
|
+
console.error();
|
|
796
|
+
console.error(" error: variadic arguments must be last `%s'", name);
|
|
797
|
+
console.error();
|
|
798
|
+
process.exit(1);
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Set the program version to `str`.
|
|
803
|
+
*
|
|
804
|
+
* This method auto-registers the "-V, --version" flag
|
|
805
|
+
* which will print the version number when passed.
|
|
806
|
+
*
|
|
807
|
+
* @param {String} str
|
|
808
|
+
* @param {String} flags
|
|
809
|
+
* @return {Command} for chaining
|
|
810
|
+
* @api public
|
|
811
|
+
*/
|
|
812
|
+
|
|
813
|
+
Command.prototype.version = function(str, flags) {
|
|
814
|
+
if (0 == arguments.length) return this._version;
|
|
815
|
+
this._version = str;
|
|
816
|
+
flags = flags || '-V, --version';
|
|
817
|
+
this.option(flags, 'output the version number');
|
|
818
|
+
this.on('version', function() {
|
|
819
|
+
process.stdout.write(str + '\n');
|
|
820
|
+
process.exit(0);
|
|
821
|
+
});
|
|
822
|
+
return this;
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Set the description to `str`.
|
|
827
|
+
*
|
|
828
|
+
* @param {String} str
|
|
829
|
+
* @return {String|Command}
|
|
830
|
+
* @api public
|
|
831
|
+
*/
|
|
832
|
+
|
|
833
|
+
Command.prototype.description = function(str) {
|
|
834
|
+
if (0 == arguments.length) return this._description;
|
|
835
|
+
this._description = str;
|
|
836
|
+
return this;
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Set an alias for the command
|
|
841
|
+
*
|
|
842
|
+
* @param {String} alias
|
|
843
|
+
* @return {String|Command}
|
|
844
|
+
* @api public
|
|
845
|
+
*/
|
|
846
|
+
|
|
847
|
+
Command.prototype.alias = function(alias) {
|
|
848
|
+
if (0 == arguments.length) return this._alias;
|
|
849
|
+
this._alias = alias;
|
|
850
|
+
return this;
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Set / get the command usage `str`.
|
|
855
|
+
*
|
|
856
|
+
* @param {String} str
|
|
857
|
+
* @return {String|Command}
|
|
858
|
+
* @api public
|
|
859
|
+
*/
|
|
860
|
+
|
|
861
|
+
Command.prototype.usage = function(str) {
|
|
862
|
+
var args = this._args.map(function(arg) {
|
|
863
|
+
return humanReadableArgName(arg);
|
|
864
|
+
});
|
|
865
|
+
|
|
866
|
+
var usage = '[options]'
|
|
867
|
+
+ (this.commands.length ? ' [command]' : '')
|
|
868
|
+
+ (this._args.length ? ' ' + args.join(' ') : '');
|
|
869
|
+
|
|
870
|
+
if (0 == arguments.length) return this._usage || usage;
|
|
871
|
+
this._usage = str;
|
|
872
|
+
|
|
873
|
+
return this;
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Get the name of the command
|
|
878
|
+
*
|
|
879
|
+
* @param {String} name
|
|
880
|
+
* @return {String|Command}
|
|
881
|
+
* @api public
|
|
882
|
+
*/
|
|
883
|
+
|
|
884
|
+
Command.prototype.name = function() {
|
|
885
|
+
return this._name;
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Return the largest option length.
|
|
890
|
+
*
|
|
891
|
+
* @return {Number}
|
|
892
|
+
* @api private
|
|
893
|
+
*/
|
|
894
|
+
|
|
895
|
+
Command.prototype.largestOptionLength = function() {
|
|
896
|
+
return this.options.reduce(function(max, option) {
|
|
897
|
+
return Math.max(max, option.flags.length);
|
|
898
|
+
}, 0);
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Return help for options.
|
|
903
|
+
*
|
|
904
|
+
* @return {String}
|
|
905
|
+
* @api private
|
|
906
|
+
*/
|
|
907
|
+
|
|
908
|
+
Command.prototype.optionHelp = function() {
|
|
909
|
+
var width = this.largestOptionLength();
|
|
910
|
+
|
|
911
|
+
// Prepend the help information
|
|
912
|
+
return [pad('-h, --help', width) + ' ' + 'output usage information']
|
|
913
|
+
.concat(this.options.map(function(option) {
|
|
914
|
+
return pad(option.flags, width) + ' ' + option.description;
|
|
915
|
+
}))
|
|
916
|
+
.join('\n');
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Return command help documentation.
|
|
921
|
+
*
|
|
922
|
+
* @return {String}
|
|
923
|
+
* @api private
|
|
924
|
+
*/
|
|
925
|
+
|
|
926
|
+
Command.prototype.commandHelp = function() {
|
|
927
|
+
if (!this.commands.length) return '';
|
|
928
|
+
|
|
929
|
+
var commands = this.commands.filter(function(cmd) {
|
|
930
|
+
return !cmd._noHelp;
|
|
931
|
+
}).map(function(cmd) {
|
|
932
|
+
var args = cmd._args.map(function(arg) {
|
|
933
|
+
return humanReadableArgName(arg);
|
|
934
|
+
}).join(' ');
|
|
935
|
+
|
|
936
|
+
return [
|
|
937
|
+
cmd._name
|
|
938
|
+
+ (cmd._alias
|
|
939
|
+
? '|' + cmd._alias
|
|
940
|
+
: '')
|
|
941
|
+
+ (cmd.options.length
|
|
942
|
+
? ' [options]'
|
|
943
|
+
: '')
|
|
944
|
+
+ ' ' + args
|
|
945
|
+
, cmd.description()
|
|
946
|
+
];
|
|
947
|
+
});
|
|
948
|
+
|
|
949
|
+
var width = commands.reduce(function(max, command) {
|
|
950
|
+
return Math.max(max, command[0].length);
|
|
951
|
+
}, 0);
|
|
952
|
+
|
|
953
|
+
return [
|
|
954
|
+
''
|
|
955
|
+
, ' Commands:'
|
|
956
|
+
, ''
|
|
957
|
+
, commands.map(function(cmd) {
|
|
958
|
+
return pad(cmd[0], width) + ' ' + cmd[1];
|
|
959
|
+
}).join('\n').replace(/^/gm, ' ')
|
|
960
|
+
, ''
|
|
961
|
+
].join('\n');
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Return program help documentation.
|
|
966
|
+
*
|
|
967
|
+
* @return {String}
|
|
968
|
+
* @api private
|
|
969
|
+
*/
|
|
970
|
+
|
|
971
|
+
Command.prototype.helpInformation = function() {
|
|
972
|
+
var desc = [];
|
|
973
|
+
if (this._description) {
|
|
974
|
+
desc = [
|
|
975
|
+
' ' + this._description
|
|
976
|
+
, ''
|
|
977
|
+
];
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
var cmdName = this._name;
|
|
981
|
+
if (this._alias) {
|
|
982
|
+
cmdName = cmdName + '|' + this._alias;
|
|
983
|
+
}
|
|
984
|
+
var usage = [
|
|
985
|
+
''
|
|
986
|
+
,' Usage: ' + cmdName + ' ' + this.usage()
|
|
987
|
+
, ''
|
|
988
|
+
];
|
|
989
|
+
|
|
990
|
+
var cmds = [];
|
|
991
|
+
var commandHelp = this.commandHelp();
|
|
992
|
+
if (commandHelp) cmds = [commandHelp];
|
|
993
|
+
|
|
994
|
+
var options = [
|
|
995
|
+
' Options:'
|
|
996
|
+
, ''
|
|
997
|
+
, '' + this.optionHelp().replace(/^/gm, ' ')
|
|
998
|
+
, ''
|
|
999
|
+
, ''
|
|
1000
|
+
];
|
|
1001
|
+
|
|
1002
|
+
return usage
|
|
1003
|
+
.concat(cmds)
|
|
1004
|
+
.concat(desc)
|
|
1005
|
+
.concat(options)
|
|
1006
|
+
.join('\n');
|
|
1007
|
+
};
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Output help information for this command
|
|
1011
|
+
*
|
|
1012
|
+
* @api public
|
|
1013
|
+
*/
|
|
1014
|
+
|
|
1015
|
+
Command.prototype.outputHelp = function() {
|
|
1016
|
+
process.stdout.write(this.helpInformation());
|
|
1017
|
+
this.emit('--help');
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Output help information and exit.
|
|
1022
|
+
*
|
|
1023
|
+
* @api public
|
|
1024
|
+
*/
|
|
1025
|
+
|
|
1026
|
+
Command.prototype.help = function() {
|
|
1027
|
+
this.outputHelp();
|
|
1028
|
+
process.exit();
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Camel-case the given `flag`
|
|
1033
|
+
*
|
|
1034
|
+
* @param {String} flag
|
|
1035
|
+
* @return {String}
|
|
1036
|
+
* @api private
|
|
1037
|
+
*/
|
|
1038
|
+
|
|
1039
|
+
function camelcase(flag) {
|
|
1040
|
+
return flag.split('-').reduce(function(str, word) {
|
|
1041
|
+
return str + word[0].toUpperCase() + word.slice(1);
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Pad `str` to `width`.
|
|
1047
|
+
*
|
|
1048
|
+
* @param {String} str
|
|
1049
|
+
* @param {Number} width
|
|
1050
|
+
* @return {String}
|
|
1051
|
+
* @api private
|
|
1052
|
+
*/
|
|
1053
|
+
|
|
1054
|
+
function pad(str, width) {
|
|
1055
|
+
var len = Math.max(0, width - str.length);
|
|
1056
|
+
return str + Array(len + 1).join(' ');
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* Output help information if necessary
|
|
1061
|
+
*
|
|
1062
|
+
* @param {Command} command to output help for
|
|
1063
|
+
* @param {Array} array of options to search for -h or --help
|
|
1064
|
+
* @api private
|
|
1065
|
+
*/
|
|
1066
|
+
|
|
1067
|
+
function outputHelpIfNecessary(cmd, options) {
|
|
1068
|
+
options = options || [];
|
|
1069
|
+
for (var i = 0; i < options.length; i++) {
|
|
1070
|
+
if (options[i] == '--help' || options[i] == '-h') {
|
|
1071
|
+
cmd.outputHelp();
|
|
1072
|
+
process.exit(0);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Takes an argument an returns its human readable equivalent for help usage.
|
|
1079
|
+
*
|
|
1080
|
+
* @param {Object} arg
|
|
1081
|
+
* @return {String}
|
|
1082
|
+
* @api private
|
|
1083
|
+
*/
|
|
1084
|
+
|
|
1085
|
+
function humanReadableArgName(arg) {
|
|
1086
|
+
var nameOutput = arg.name + (arg.variadic === true ? '...' : '');
|
|
1087
|
+
|
|
1088
|
+
return arg.required
|
|
1089
|
+
? '<' + nameOutput + '>'
|
|
1090
|
+
: '[' + nameOutput + ']'
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
// for versions before node v0.8 when there weren't `fs.existsSync`
|
|
1094
|
+
function exists(file) {
|
|
1095
|
+
try {
|
|
1096
|
+
if (fs.statSync(file).isFile()) {
|
|
1097
|
+
return true;
|
|
1098
|
+
}
|
|
1099
|
+
} catch (e) {
|
|
1100
|
+
return false;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|