@bleedingdev/modern-js-utils 3.2.0-ultramodern.0
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/LICENSE +21 -0
- package/README.md +26 -0
- package/dist/cjs/cli/alias.js +82 -0
- package/dist/cjs/cli/applyOptionsChain.js +50 -0
- package/dist/cjs/cli/commands.js +69 -0
- package/dist/cjs/cli/common.js +59 -0
- package/dist/cjs/cli/config.js +39 -0
- package/dist/cjs/cli/constants.js +136 -0
- package/dist/cjs/cli/ensure.js +56 -0
- package/dist/cjs/cli/fs.js +46 -0
- package/dist/cjs/cli/get/config.js +48 -0
- package/dist/cjs/cli/get/data.js +106 -0
- package/dist/cjs/cli/get/index.js +112 -0
- package/dist/cjs/cli/index.js +212 -0
- package/dist/cjs/cli/is/config.js +86 -0
- package/dist/cjs/cli/is/env.js +52 -0
- package/dist/cjs/cli/is/index.js +79 -0
- package/dist/cjs/cli/is/project.js +147 -0
- package/dist/cjs/cli/is/type.js +84 -0
- package/dist/cjs/cli/logger.js +39 -0
- package/dist/cjs/cli/modulePath.js +87 -0
- package/dist/cjs/cli/monorepo.js +110 -0
- package/dist/cjs/cli/package.js +97 -0
- package/dist/cjs/cli/path.js +111 -0
- package/dist/cjs/cli/port.js +79 -0
- package/dist/cjs/cli/prettyInstructions.js +117 -0
- package/dist/cjs/cli/require.js +127 -0
- package/dist/cjs/cli/route.js +76 -0
- package/dist/cjs/cli/runtimeExports.js +86 -0
- package/dist/cjs/cli/tsconfig.js +51 -0
- package/dist/cjs/cli/version.js +67 -0
- package/dist/cjs/cli/watch.js +87 -0
- package/dist/cjs/compiled.js +209 -0
- package/dist/cjs/import.js +56 -0
- package/dist/cjs/index.js +72 -0
- package/dist/cjs/universal/constants.js +84 -0
- package/dist/cjs/universal/index.js +36 -0
- package/dist/cjs/universal/path.js +36 -0
- package/dist/cjs/universal/pluginDagSort.js +75 -0
- package/dist/compiled/address/index.js +171 -0
- package/dist/compiled/address/lib/address.d.ts +28 -0
- package/dist/compiled/address/package.json +1 -0
- package/dist/compiled/browserslist/index.d.ts +178 -0
- package/dist/compiled/browserslist/index.js +1329 -0
- package/dist/compiled/browserslist/license +20 -0
- package/dist/compiled/browserslist/package.json +1 -0
- package/dist/compiled/chalk/index.d.ts +415 -0
- package/dist/compiled/chalk/index.js +2368 -0
- package/dist/compiled/chalk/license +9 -0
- package/dist/compiled/chalk/package.json +1 -0
- package/dist/compiled/chokidar/anymatch/index.d.ts +19 -0
- package/dist/compiled/chokidar/fsevents.node +0 -0
- package/dist/compiled/chokidar/index.js +4162 -0
- package/dist/compiled/chokidar/index.js.LICENSE.txt +41 -0
- package/dist/compiled/chokidar/license +21 -0
- package/dist/compiled/chokidar/package.json +1 -0
- package/dist/compiled/chokidar/types/index.d.ts +188 -0
- package/dist/compiled/commander/index.js +1540 -0
- package/dist/compiled/commander/index.mjs +2 -0
- package/dist/compiled/commander/license +22 -0
- package/dist/compiled/commander/package.json +1 -0
- package/dist/compiled/commander/typings/index.d.ts +890 -0
- package/dist/compiled/debug/index.d.ts +54 -0
- package/dist/compiled/debug/index.js +621 -0
- package/dist/compiled/debug/license +20 -0
- package/dist/compiled/debug/ms/index.d.ts +25 -0
- package/dist/compiled/debug/package.json +1 -0
- package/dist/compiled/dotenv/index.js +101 -0
- package/dist/compiled/dotenv/license +23 -0
- package/dist/compiled/dotenv/package.json +1 -0
- package/dist/compiled/dotenv/types/index.d.ts +59 -0
- package/dist/compiled/dotenv-expand/index.d.ts +15 -0
- package/dist/compiled/dotenv-expand/index.js +54 -0
- package/dist/compiled/dotenv-expand/license +24 -0
- package/dist/compiled/dotenv-expand/package.json +1 -0
- package/dist/compiled/execa/index.d.ts +564 -0
- package/dist/compiled/execa/index.js +1738 -0
- package/dist/compiled/execa/license +9 -0
- package/dist/compiled/execa/package.json +1 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/dist/compiled/fast-glob/index.js +4665 -0
- package/dist/compiled/fast-glob/index.js.LICENSE.txt +38 -0
- package/dist/compiled/fast-glob/license +21 -0
- package/dist/compiled/fast-glob/out/index.d.ts +27 -0
- package/dist/compiled/fast-glob/out/managers/tasks.d.ts +22 -0
- package/dist/compiled/fast-glob/out/settings.d.ts +164 -0
- package/dist/compiled/fast-glob/out/types/index.d.ts +31 -0
- package/dist/compiled/fast-glob/package.json +1 -0
- package/dist/compiled/filesize/filesize.d.ts +131 -0
- package/dist/compiled/filesize/index.js +198 -0
- package/dist/compiled/filesize/index.js.LICENSE.txt +7 -0
- package/dist/compiled/filesize/license +28 -0
- package/dist/compiled/filesize/package.json +1 -0
- package/dist/compiled/fs-extra/index.d.ts +563 -0
- package/dist/compiled/fs-extra/index.js +2222 -0
- package/dist/compiled/fs-extra/license +15 -0
- package/dist/compiled/fs-extra/package.json +1 -0
- package/dist/compiled/glob/index.d.ts +91 -0
- package/dist/compiled/glob/index.js +2011 -0
- package/dist/compiled/glob/license +21 -0
- package/dist/compiled/glob/minimatch/index.d.ts +204 -0
- package/dist/compiled/glob/package.json +1 -0
- package/dist/compiled/globby/index.d.ts +186 -0
- package/dist/compiled/globby/index.js +690 -0
- package/dist/compiled/globby/license +9 -0
- package/dist/compiled/globby/package.json +1 -0
- package/dist/compiled/gzip-size/index.d.ts +96 -0
- package/dist/compiled/gzip-size/index.js +157 -0
- package/dist/compiled/gzip-size/license +9 -0
- package/dist/compiled/gzip-size/package.json +1 -0
- package/dist/compiled/import-lazy/index.d.ts +26 -0
- package/dist/compiled/import-lazy/index.js +45 -0
- package/dist/compiled/import-lazy/license +9 -0
- package/dist/compiled/import-lazy/package.json +1 -0
- package/dist/compiled/inquirer/index.d.ts +997 -0
- package/dist/compiled/inquirer/index.js +20167 -0
- package/dist/compiled/inquirer/index.js.LICENSE.txt +7 -0
- package/dist/compiled/inquirer/lib/objects/choice.d.ts +65 -0
- package/dist/compiled/inquirer/lib/objects/choices.d.ts +206 -0
- package/dist/compiled/inquirer/lib/objects/separator.d.ts +37 -0
- package/dist/compiled/inquirer/lib/ui/baseUI.d.ts +37 -0
- package/dist/compiled/inquirer/lib/ui/bottom-bar.d.ts +65 -0
- package/dist/compiled/inquirer/lib/ui/prompt.d.ts +104 -0
- package/dist/compiled/inquirer/license +22 -0
- package/dist/compiled/inquirer/package.json +1 -0
- package/dist/compiled/inquirer/through/index.d.ts +25 -0
- package/dist/compiled/js-yaml/index.d.ts +154 -0
- package/dist/compiled/js-yaml/index.js +2191 -0
- package/dist/compiled/js-yaml/index.mjs +2167 -0
- package/dist/compiled/js-yaml/index.mjs.LICENSE.txt +1 -0
- package/dist/compiled/js-yaml/license +21 -0
- package/dist/compiled/js-yaml/package.json +1 -0
- package/dist/compiled/json5/index.js +983 -0
- package/dist/compiled/json5/lib/index.d.ts +4 -0
- package/dist/compiled/json5/lib/parse.d.ts +15 -0
- package/dist/compiled/json5/lib/stringify.d.ts +89 -0
- package/dist/compiled/json5/package.json +1 -0
- package/dist/compiled/lodash/common/array.d.ts +2126 -0
- package/dist/compiled/lodash/common/collection.d.ts +1930 -0
- package/dist/compiled/lodash/common/common.d.ts +280 -0
- package/dist/compiled/lodash/common/date.d.ts +23 -0
- package/dist/compiled/lodash/common/function.d.ts +1446 -0
- package/dist/compiled/lodash/common/lang.d.ts +1693 -0
- package/dist/compiled/lodash/common/math.d.ts +405 -0
- package/dist/compiled/lodash/common/number.d.ts +131 -0
- package/dist/compiled/lodash/common/object.d.ts +2519 -0
- package/dist/compiled/lodash/common/seq.d.ts +210 -0
- package/dist/compiled/lodash/common/string.d.ts +788 -0
- package/dist/compiled/lodash/common/util.d.ts +1220 -0
- package/dist/compiled/lodash/index.d.ts +46 -0
- package/dist/compiled/lodash/index.js +1 -0
- package/dist/compiled/lodash/index.mjs +1 -0
- package/dist/compiled/lodash/license +47 -0
- package/dist/compiled/lodash/package.json +1 -0
- package/dist/compiled/mime-types/index.d.ts +14 -0
- package/dist/compiled/mime-types/index.js +116 -0
- package/dist/compiled/mime-types/index.js.LICENSE.txt +13 -0
- package/dist/compiled/mime-types/license +23 -0
- package/dist/compiled/mime-types/package.json +1 -0
- package/dist/compiled/minimist/index.d.ts +95 -0
- package/dist/compiled/minimist/index.js +202 -0
- package/dist/compiled/minimist/license +18 -0
- package/dist/compiled/minimist/package.json +1 -0
- package/dist/compiled/nanoid/index.d.ts +91 -0
- package/dist/compiled/nanoid/index.js +83 -0
- package/dist/compiled/nanoid/index.mjs +69 -0
- package/dist/compiled/nanoid/license +20 -0
- package/dist/compiled/nanoid/package.json +1 -0
- package/dist/compiled/ora/cli-spinners/index.d.ts +125 -0
- package/dist/compiled/ora/index.d.ts +277 -0
- package/dist/compiled/ora/index.js +3936 -0
- package/dist/compiled/ora/index.js.LICENSE.txt +1 -0
- package/dist/compiled/ora/license +9 -0
- package/dist/compiled/ora/package.json +1 -0
- package/dist/compiled/pkg-up/index.d.ts +48 -0
- package/dist/compiled/pkg-up/index.js +15 -0
- package/dist/compiled/pkg-up/license +9 -0
- package/dist/compiled/pkg-up/package.json +1 -0
- package/dist/compiled/semver/classes/comparator.d.ts +17 -0
- package/dist/compiled/semver/classes/range.d.ts +21 -0
- package/dist/compiled/semver/classes/semver.d.ts +62 -0
- package/dist/compiled/semver/functions/clean.d.ts +8 -0
- package/dist/compiled/semver/functions/cmp.d.ts +16 -0
- package/dist/compiled/semver/functions/coerce.d.ts +12 -0
- package/dist/compiled/semver/functions/compare-build.d.ts +16 -0
- package/dist/compiled/semver/functions/compare-loose.d.ts +5 -0
- package/dist/compiled/semver/functions/compare.d.ts +20 -0
- package/dist/compiled/semver/functions/diff.d.ts +13 -0
- package/dist/compiled/semver/functions/eq.d.ts +9 -0
- package/dist/compiled/semver/functions/gt.d.ts +9 -0
- package/dist/compiled/semver/functions/gte.d.ts +9 -0
- package/dist/compiled/semver/functions/inc.d.ts +15 -0
- package/dist/compiled/semver/functions/lt.d.ts +9 -0
- package/dist/compiled/semver/functions/lte.d.ts +8 -0
- package/dist/compiled/semver/functions/major.d.ts +9 -0
- package/dist/compiled/semver/functions/minor.d.ts +9 -0
- package/dist/compiled/semver/functions/neq.d.ts +9 -0
- package/dist/compiled/semver/functions/parse.d.ts +12 -0
- package/dist/compiled/semver/functions/patch.d.ts +9 -0
- package/dist/compiled/semver/functions/prerelease.d.ts +12 -0
- package/dist/compiled/semver/functions/rcompare.d.ts +15 -0
- package/dist/compiled/semver/functions/rsort.d.ts +9 -0
- package/dist/compiled/semver/functions/satisfies.d.ts +14 -0
- package/dist/compiled/semver/functions/sort.d.ts +9 -0
- package/dist/compiled/semver/functions/valid.d.ts +11 -0
- package/dist/compiled/semver/index.d.ts +133 -0
- package/dist/compiled/semver/index.js +1779 -0
- package/dist/compiled/semver/internals/identifiers.d.ts +13 -0
- package/dist/compiled/semver/license +15 -0
- package/dist/compiled/semver/package.json +1 -0
- package/dist/compiled/semver/ranges/gtr.d.ts +14 -0
- package/dist/compiled/semver/ranges/intersects.d.ts +13 -0
- package/dist/compiled/semver/ranges/ltr.d.ts +14 -0
- package/dist/compiled/semver/ranges/max-satisfying.d.ts +14 -0
- package/dist/compiled/semver/ranges/min-satisfying.d.ts +14 -0
- package/dist/compiled/semver/ranges/min-version.d.ts +10 -0
- package/dist/compiled/semver/ranges/outside.d.ts +15 -0
- package/dist/compiled/semver/ranges/simplify.d.ts +14 -0
- package/dist/compiled/semver/ranges/subset.d.ts +13 -0
- package/dist/compiled/semver/ranges/to-comparators.d.ts +9 -0
- package/dist/compiled/semver/ranges/valid.d.ts +12 -0
- package/dist/compiled/signale/index.d.ts +162 -0
- package/dist/compiled/signale/index.js +1704 -0
- package/dist/compiled/signale/package.json +1 -0
- package/dist/compiled/slash/index.d.ts +25 -0
- package/dist/compiled/slash/index.js +32 -0
- package/dist/compiled/slash/license +9 -0
- package/dist/compiled/slash/package.json +1 -0
- package/dist/compiled/strip-ansi/index.d.ts +17 -0
- package/dist/compiled/strip-ansi/index.js +34 -0
- package/dist/compiled/strip-ansi/license +9 -0
- package/dist/compiled/strip-ansi/package.json +1 -0
- package/dist/compiled/tsconfig-paths/index.js +629 -0
- package/dist/compiled/tsconfig-paths/index.mjs +2 -0
- package/dist/compiled/tsconfig-paths/lib/config-loader.d.ts +33 -0
- package/dist/compiled/tsconfig-paths/lib/filesystem.d.ts +34 -0
- package/dist/compiled/tsconfig-paths/lib/index.d.ts +5 -0
- package/dist/compiled/tsconfig-paths/lib/mapping-entry.d.ts +18 -0
- package/dist/compiled/tsconfig-paths/lib/match-path-async.d.ts +21 -0
- package/dist/compiled/tsconfig-paths/lib/match-path-sync.d.ts +32 -0
- package/dist/compiled/tsconfig-paths/lib/register.d.ts +12 -0
- package/dist/compiled/tsconfig-paths/lib/try-path.d.ts +15 -0
- package/dist/compiled/tsconfig-paths/lib/tsconfig-loader.d.ts +28 -0
- package/dist/compiled/tsconfig-paths/license +21 -0
- package/dist/compiled/tsconfig-paths/package.json +1 -0
- package/dist/compiled/upath/index.js +135 -0
- package/dist/compiled/upath/license +22 -0
- package/dist/compiled/upath/package.json +1 -0
- package/dist/compiled/upath/upath.d.ts +241 -0
- package/dist/compiled/url-join/index.d.ts +17 -0
- package/dist/compiled/url-join/index.js +61 -0
- package/dist/compiled/url-join/license +21 -0
- package/dist/compiled/url-join/package.json +1 -0
- package/dist/compiled/webpack-chain/index.js +1475 -0
- package/dist/compiled/webpack-chain/license +373 -0
- package/dist/compiled/webpack-chain/package.json +1 -0
- package/dist/compiled/webpack-chain/types/index.d.ts +599 -0
- package/dist/esm/cli/alias.mjs +31 -0
- package/dist/esm/cli/applyOptionsChain.mjs +16 -0
- package/dist/esm/cli/commands.mjs +23 -0
- package/dist/esm/cli/common.mjs +9 -0
- package/dist/esm/cli/config.mjs +5 -0
- package/dist/esm/cli/constants.mjs +30 -0
- package/dist/esm/cli/ensure.mjs +9 -0
- package/dist/esm/cli/fs.mjs +9 -0
- package/dist/esm/cli/get/config.mjs +14 -0
- package/dist/esm/cli/get/data.mjs +49 -0
- package/dist/esm/cli/get/index.mjs +18 -0
- package/dist/esm/cli/index.mjs +23 -0
- package/dist/esm/cli/is/config.mjs +37 -0
- package/dist/esm/cli/is/env.mjs +6 -0
- package/dist/esm/cli/is/index.mjs +4 -0
- package/dist/esm/cli/is/project.mjs +75 -0
- package/dist/esm/cli/is/type.mjs +26 -0
- package/dist/esm/cli/logger.mjs +1 -0
- package/dist/esm/cli/modulePath.mjs +33 -0
- package/dist/esm/cli/monorepo.mjs +50 -0
- package/dist/esm/cli/package.mjs +51 -0
- package/dist/esm/cli/path.mjs +35 -0
- package/dist/esm/cli/port.mjs +35 -0
- package/dist/esm/cli/prettyInstructions.mjs +70 -0
- package/dist/esm/cli/require.mjs +79 -0
- package/dist/esm/cli/route.mjs +36 -0
- package/dist/esm/cli/runtimeExports.mjs +42 -0
- package/dist/esm/cli/tsconfig.mjs +7 -0
- package/dist/esm/cli/version.mjs +24 -0
- package/dist/esm/cli/watch.mjs +40 -0
- package/dist/esm/compiled.mjs +45 -0
- package/dist/esm/import.mjs +9 -0
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/rslib-runtime.mjs +12 -0
- package/dist/esm/universal/constants.mjs +14 -0
- package/dist/esm/universal/index.mjs +1 -0
- package/dist/esm/universal/path.mjs +2 -0
- package/dist/esm/universal/pluginDagSort.mjs +41 -0
- package/dist/esm-node/cli/alias.mjs +32 -0
- package/dist/esm-node/cli/applyOptionsChain.mjs +17 -0
- package/dist/esm-node/cli/commands.mjs +24 -0
- package/dist/esm-node/cli/common.mjs +10 -0
- package/dist/esm-node/cli/config.mjs +6 -0
- package/dist/esm-node/cli/constants.mjs +31 -0
- package/dist/esm-node/cli/ensure.mjs +10 -0
- package/dist/esm-node/cli/fs.mjs +10 -0
- package/dist/esm-node/cli/get/config.mjs +15 -0
- package/dist/esm-node/cli/get/data.mjs +50 -0
- package/dist/esm-node/cli/get/index.mjs +19 -0
- package/dist/esm-node/cli/index.mjs +24 -0
- package/dist/esm-node/cli/is/config.mjs +38 -0
- package/dist/esm-node/cli/is/env.mjs +7 -0
- package/dist/esm-node/cli/is/index.mjs +5 -0
- package/dist/esm-node/cli/is/project.mjs +76 -0
- package/dist/esm-node/cli/is/type.mjs +27 -0
- package/dist/esm-node/cli/logger.mjs +2 -0
- package/dist/esm-node/cli/modulePath.mjs +34 -0
- package/dist/esm-node/cli/monorepo.mjs +51 -0
- package/dist/esm-node/cli/package.mjs +52 -0
- package/dist/esm-node/cli/path.mjs +36 -0
- package/dist/esm-node/cli/port.mjs +36 -0
- package/dist/esm-node/cli/prettyInstructions.mjs +71 -0
- package/dist/esm-node/cli/require.mjs +80 -0
- package/dist/esm-node/cli/route.mjs +37 -0
- package/dist/esm-node/cli/runtimeExports.mjs +43 -0
- package/dist/esm-node/cli/tsconfig.mjs +8 -0
- package/dist/esm-node/cli/version.mjs +25 -0
- package/dist/esm-node/cli/watch.mjs +41 -0
- package/dist/esm-node/compiled.mjs +45 -0
- package/dist/esm-node/import.mjs +10 -0
- package/dist/esm-node/index.mjs +4 -0
- package/dist/esm-node/universal/constants.mjs +15 -0
- package/dist/esm-node/universal/index.mjs +2 -0
- package/dist/esm-node/universal/path.mjs +3 -0
- package/dist/esm-node/universal/pluginDagSort.mjs +42 -0
- package/dist/types/cli/alias.d.ts +20 -0
- package/dist/types/cli/applyOptionsChain.d.ts +3 -0
- package/dist/types/cli/commands.d.ts +8 -0
- package/dist/types/cli/common.d.ts +9 -0
- package/dist/types/cli/config.d.ts +4 -0
- package/dist/types/cli/constants.d.ts +55 -0
- package/dist/types/cli/ensure.d.ts +8 -0
- package/dist/types/cli/fs.d.ts +7 -0
- package/dist/types/cli/get/config.d.ts +1 -0
- package/dist/types/cli/get/data.d.ts +6 -0
- package/dist/types/cli/get/index.d.ts +11 -0
- package/dist/types/cli/index.d.ts +23 -0
- package/dist/types/cli/is/config.d.ts +22 -0
- package/dist/types/cli/is/env.d.ts +8 -0
- package/dist/types/cli/is/index.d.ts +4 -0
- package/dist/types/cli/is/project.d.ts +39 -0
- package/dist/types/cli/is/type.d.ts +15 -0
- package/dist/types/cli/logger.d.ts +1 -0
- package/dist/types/cli/modulePath.d.ts +5 -0
- package/dist/types/cli/monorepo.d.ts +9 -0
- package/dist/types/cli/package.d.ts +5 -0
- package/dist/types/cli/path.d.ts +11 -0
- package/dist/types/cli/port.d.ts +12 -0
- package/dist/types/cli/prettyInstructions.d.ts +9 -0
- package/dist/types/cli/require.d.ts +9 -0
- package/dist/types/cli/route.d.ts +4 -0
- package/dist/types/cli/runtimeExports.d.ts +5 -0
- package/dist/types/cli/tsconfig.d.ts +1 -0
- package/dist/types/cli/version.d.ts +4 -0
- package/dist/types/cli/watch.d.ts +8 -0
- package/dist/types/compiled.d.ts +37 -0
- package/dist/types/import.d.ts +5 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/universal/constants.d.ts +47 -0
- package/dist/types/universal/index.d.ts +1 -0
- package/dist/types/universal/path.d.ts +1 -0
- package/dist/types/universal/pluginDagSort.d.ts +1 -0
- package/package.json +174 -0
- package/rslib.config.mts +162 -0
- package/rstest.config.mts +8 -0
|
@@ -0,0 +1,1704 @@
|
|
|
1
|
+
(()=>{
|
|
2
|
+
var e = {
|
|
3
|
+
305: (e, t, r)=>{
|
|
4
|
+
"use strict";
|
|
5
|
+
var n = r(837);
|
|
6
|
+
var i = r(589);
|
|
7
|
+
var s = function(e, t) {
|
|
8
|
+
if (!e || e.constructor !== String) {
|
|
9
|
+
t = e || {};
|
|
10
|
+
e = Error.name;
|
|
11
|
+
}
|
|
12
|
+
var r = function ErrorEXError(n) {
|
|
13
|
+
if (!this) return new ErrorEXError(n);
|
|
14
|
+
n = n instanceof Error ? n.message : n || this.message;
|
|
15
|
+
Error.call(this, n);
|
|
16
|
+
Error.captureStackTrace(this, r);
|
|
17
|
+
this.name = e;
|
|
18
|
+
Object.defineProperty(this, "message", {
|
|
19
|
+
configurable: true,
|
|
20
|
+
enumerable: false,
|
|
21
|
+
get: function() {
|
|
22
|
+
var e = n.split(/\r?\n/g);
|
|
23
|
+
for(var r in t)if (t.hasOwnProperty(r)) {
|
|
24
|
+
var s = t[r];
|
|
25
|
+
if ("message" in s) {
|
|
26
|
+
e = s.message(this[r], e) || e;
|
|
27
|
+
if (!i(e)) e = [
|
|
28
|
+
e
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return e.join("\n");
|
|
33
|
+
},
|
|
34
|
+
set: function(e) {
|
|
35
|
+
n = e;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
var s = null;
|
|
39
|
+
var o = Object.getOwnPropertyDescriptor(this, "stack");
|
|
40
|
+
var c = o.get;
|
|
41
|
+
var a = o.value;
|
|
42
|
+
delete o.value;
|
|
43
|
+
delete o.writable;
|
|
44
|
+
o.set = function(e) {
|
|
45
|
+
s = e;
|
|
46
|
+
};
|
|
47
|
+
o.get = function() {
|
|
48
|
+
var e = (s || (c ? c.call(this) : a)).split(/\r?\n+/g);
|
|
49
|
+
if (!s) e[0] = this.name + ": " + this.message;
|
|
50
|
+
var r = 1;
|
|
51
|
+
for(var n in t)if (t.hasOwnProperty(n)) {
|
|
52
|
+
var i = t[n];
|
|
53
|
+
if ("line" in i) {
|
|
54
|
+
var o = i.line(this[n]);
|
|
55
|
+
if (o) e.splice(r++, 0, " " + o);
|
|
56
|
+
}
|
|
57
|
+
if ("stack" in i) i.stack(this[n], e);
|
|
58
|
+
}
|
|
59
|
+
return e.join("\n");
|
|
60
|
+
};
|
|
61
|
+
Object.defineProperty(this, "stack", o);
|
|
62
|
+
};
|
|
63
|
+
if (Object.setPrototypeOf) {
|
|
64
|
+
Object.setPrototypeOf(r.prototype, Error.prototype);
|
|
65
|
+
Object.setPrototypeOf(r, Error);
|
|
66
|
+
} else n.inherits(r, Error);
|
|
67
|
+
return r;
|
|
68
|
+
};
|
|
69
|
+
s.append = function(e, t) {
|
|
70
|
+
return {
|
|
71
|
+
message: function(r, n) {
|
|
72
|
+
r = r || t;
|
|
73
|
+
if (r) n[0] += " " + e.replace("%s", r.toString());
|
|
74
|
+
return n;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
s.line = function(e, t) {
|
|
79
|
+
return {
|
|
80
|
+
line: function(r) {
|
|
81
|
+
r = r || t;
|
|
82
|
+
if (r) return e.replace("%s", r.toString());
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
e.exports = s;
|
|
88
|
+
},
|
|
89
|
+
434: (e)=>{
|
|
90
|
+
"use strict";
|
|
91
|
+
var t = /[|\\{}()[\]^$+*?.]/g;
|
|
92
|
+
e.exports = function(e) {
|
|
93
|
+
if ("string" != typeof e) throw new TypeError("Expected a string");
|
|
94
|
+
return e.replace(t, "\\$&");
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
877: (e, t, r)=>{
|
|
98
|
+
"use strict";
|
|
99
|
+
const n = r(434);
|
|
100
|
+
const i = process.platform;
|
|
101
|
+
const s = {
|
|
102
|
+
tick: "✔",
|
|
103
|
+
cross: "✖",
|
|
104
|
+
star: "★",
|
|
105
|
+
square: "▇",
|
|
106
|
+
squareSmall: "◻",
|
|
107
|
+
squareSmallFilled: "◼",
|
|
108
|
+
play: "▶",
|
|
109
|
+
circle: "◯",
|
|
110
|
+
circleFilled: "◉",
|
|
111
|
+
circleDotted: "◌",
|
|
112
|
+
circleDouble: "◎",
|
|
113
|
+
circleCircle: "ⓞ",
|
|
114
|
+
circleCross: "ⓧ",
|
|
115
|
+
circlePipe: "Ⓘ",
|
|
116
|
+
circleQuestionMark: "?⃝",
|
|
117
|
+
bullet: "●",
|
|
118
|
+
dot: "․",
|
|
119
|
+
line: "─",
|
|
120
|
+
ellipsis: "…",
|
|
121
|
+
pointer: "❯",
|
|
122
|
+
pointerSmall: "›",
|
|
123
|
+
info: "ℹ",
|
|
124
|
+
warning: "⚠",
|
|
125
|
+
hamburger: "☰",
|
|
126
|
+
smiley: "㋡",
|
|
127
|
+
mustache: "෴",
|
|
128
|
+
heart: "♥",
|
|
129
|
+
arrowUp: "↑",
|
|
130
|
+
arrowDown: "↓",
|
|
131
|
+
arrowLeft: "←",
|
|
132
|
+
arrowRight: "→",
|
|
133
|
+
radioOn: "◉",
|
|
134
|
+
radioOff: "◯",
|
|
135
|
+
checkboxOn: "☒",
|
|
136
|
+
checkboxOff: "☐",
|
|
137
|
+
checkboxCircleOn: "ⓧ",
|
|
138
|
+
checkboxCircleOff: "Ⓘ",
|
|
139
|
+
questionMarkPrefix: "?⃝",
|
|
140
|
+
oneHalf: "½",
|
|
141
|
+
oneThird: "⅓",
|
|
142
|
+
oneQuarter: "¼",
|
|
143
|
+
oneFifth: "⅕",
|
|
144
|
+
oneSixth: "⅙",
|
|
145
|
+
oneSeventh: "⅐",
|
|
146
|
+
oneEighth: "⅛",
|
|
147
|
+
oneNinth: "⅑",
|
|
148
|
+
oneTenth: "⅒",
|
|
149
|
+
twoThirds: "⅔",
|
|
150
|
+
twoFifths: "⅖",
|
|
151
|
+
threeQuarters: "¾",
|
|
152
|
+
threeFifths: "⅗",
|
|
153
|
+
threeEighths: "⅜",
|
|
154
|
+
fourFifths: "⅘",
|
|
155
|
+
fiveSixths: "⅚",
|
|
156
|
+
fiveEighths: "⅝",
|
|
157
|
+
sevenEighths: "⅞"
|
|
158
|
+
};
|
|
159
|
+
const o = {
|
|
160
|
+
tick: "√",
|
|
161
|
+
cross: "×",
|
|
162
|
+
star: "*",
|
|
163
|
+
square: "█",
|
|
164
|
+
squareSmall: "[ ]",
|
|
165
|
+
squareSmallFilled: "[█]",
|
|
166
|
+
play: "►",
|
|
167
|
+
circle: "( )",
|
|
168
|
+
circleFilled: "(*)",
|
|
169
|
+
circleDotted: "( )",
|
|
170
|
+
circleDouble: "( )",
|
|
171
|
+
circleCircle: "(○)",
|
|
172
|
+
circleCross: "(×)",
|
|
173
|
+
circlePipe: "(│)",
|
|
174
|
+
circleQuestionMark: "(?)",
|
|
175
|
+
bullet: "*",
|
|
176
|
+
dot: ".",
|
|
177
|
+
line: "─",
|
|
178
|
+
ellipsis: "...",
|
|
179
|
+
pointer: ">",
|
|
180
|
+
pointerSmall: "»",
|
|
181
|
+
info: "i",
|
|
182
|
+
warning: "‼",
|
|
183
|
+
hamburger: "≡",
|
|
184
|
+
smiley: "☺",
|
|
185
|
+
mustache: "┌─┐",
|
|
186
|
+
heart: s.heart,
|
|
187
|
+
arrowUp: s.arrowUp,
|
|
188
|
+
arrowDown: s.arrowDown,
|
|
189
|
+
arrowLeft: s.arrowLeft,
|
|
190
|
+
arrowRight: s.arrowRight,
|
|
191
|
+
radioOn: "(*)",
|
|
192
|
+
radioOff: "( )",
|
|
193
|
+
checkboxOn: "[×]",
|
|
194
|
+
checkboxOff: "[ ]",
|
|
195
|
+
checkboxCircleOn: "(×)",
|
|
196
|
+
checkboxCircleOff: "( )",
|
|
197
|
+
questionMarkPrefix: "?",
|
|
198
|
+
oneHalf: "1/2",
|
|
199
|
+
oneThird: "1/3",
|
|
200
|
+
oneQuarter: "1/4",
|
|
201
|
+
oneFifth: "1/5",
|
|
202
|
+
oneSixth: "1/6",
|
|
203
|
+
oneSeventh: "1/7",
|
|
204
|
+
oneEighth: "1/8",
|
|
205
|
+
oneNinth: "1/9",
|
|
206
|
+
oneTenth: "1/10",
|
|
207
|
+
twoThirds: "2/3",
|
|
208
|
+
twoFifths: "2/5",
|
|
209
|
+
threeQuarters: "3/4",
|
|
210
|
+
threeFifths: "3/5",
|
|
211
|
+
threeEighths: "3/8",
|
|
212
|
+
fourFifths: "4/5",
|
|
213
|
+
fiveSixths: "5/6",
|
|
214
|
+
fiveEighths: "5/8",
|
|
215
|
+
sevenEighths: "7/8"
|
|
216
|
+
};
|
|
217
|
+
if ("linux" === i) s.questionMarkPrefix = "?";
|
|
218
|
+
const c = "win32" === i ? o : s;
|
|
219
|
+
const fn = (e)=>{
|
|
220
|
+
if (c === s) return e;
|
|
221
|
+
Object.keys(s).forEach((t)=>{
|
|
222
|
+
if (s[t] === c[t]) return;
|
|
223
|
+
e = e.replace(new RegExp(n(s[t]), "g"), c[t]);
|
|
224
|
+
});
|
|
225
|
+
return e;
|
|
226
|
+
};
|
|
227
|
+
e.exports = Object.assign(fn, c);
|
|
228
|
+
},
|
|
229
|
+
834: (e, t, r)=>{
|
|
230
|
+
"use strict";
|
|
231
|
+
const n = r(17);
|
|
232
|
+
const i = r(69);
|
|
233
|
+
e.exports = (e, t)=>{
|
|
234
|
+
t = t || {};
|
|
235
|
+
const r = n.resolve(t.cwd || "");
|
|
236
|
+
const s = n.parse(r).root;
|
|
237
|
+
const o = [].concat(e);
|
|
238
|
+
return new Promise((e)=>{
|
|
239
|
+
(function find(t) {
|
|
240
|
+
i(o, {
|
|
241
|
+
cwd: t
|
|
242
|
+
}).then((r)=>{
|
|
243
|
+
if (r) e(n.join(t, r));
|
|
244
|
+
else if (t === s) e(null);
|
|
245
|
+
else find(n.dirname(t));
|
|
246
|
+
});
|
|
247
|
+
})(r);
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
e.exports.sync = (e, t)=>{
|
|
251
|
+
t = t || {};
|
|
252
|
+
let r = n.resolve(t.cwd || "");
|
|
253
|
+
const s = n.parse(r).root;
|
|
254
|
+
const o = [].concat(e);
|
|
255
|
+
while(true){
|
|
256
|
+
const e = i.sync(o, {
|
|
257
|
+
cwd: r
|
|
258
|
+
});
|
|
259
|
+
if (e) return n.join(r, e);
|
|
260
|
+
if (r === s) return null;
|
|
261
|
+
r = n.dirname(r);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
},
|
|
265
|
+
132: (e)=>{
|
|
266
|
+
"use strict";
|
|
267
|
+
e.exports = clone;
|
|
268
|
+
var t = Object.getPrototypeOf || function(e) {
|
|
269
|
+
return e.__proto__;
|
|
270
|
+
};
|
|
271
|
+
function clone(e) {
|
|
272
|
+
if (null === e || "object" != typeof e) return e;
|
|
273
|
+
if (e instanceof Object) var r = {
|
|
274
|
+
__proto__: t(e)
|
|
275
|
+
};
|
|
276
|
+
else var r = Object.create(null);
|
|
277
|
+
Object.getOwnPropertyNames(e).forEach(function(t) {
|
|
278
|
+
Object.defineProperty(r, t, Object.getOwnPropertyDescriptor(e, t));
|
|
279
|
+
});
|
|
280
|
+
return r;
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
127: (e, t, r)=>{
|
|
284
|
+
var n = r(147);
|
|
285
|
+
var i = r(738);
|
|
286
|
+
var s = r(876);
|
|
287
|
+
var o = r(132);
|
|
288
|
+
var c = r(837);
|
|
289
|
+
var a;
|
|
290
|
+
var l;
|
|
291
|
+
if ("function" == typeof Symbol && "function" == typeof Symbol.for) {
|
|
292
|
+
a = Symbol.for("graceful-fs.queue");
|
|
293
|
+
l = Symbol.for("graceful-fs.previous");
|
|
294
|
+
} else {
|
|
295
|
+
a = "___graceful-fs.queue";
|
|
296
|
+
l = "___graceful-fs.previous";
|
|
297
|
+
}
|
|
298
|
+
function noop() {}
|
|
299
|
+
function publishQueue(e, t) {
|
|
300
|
+
Object.defineProperty(e, a, {
|
|
301
|
+
get: function() {
|
|
302
|
+
return t;
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
var f = noop;
|
|
307
|
+
if (c.debuglog) f = c.debuglog("gfs4");
|
|
308
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) f = function() {
|
|
309
|
+
var e = c.format.apply(c, arguments);
|
|
310
|
+
e = "GFS4: " + e.split(/\n/).join("\nGFS4: ");
|
|
311
|
+
console.error(e);
|
|
312
|
+
};
|
|
313
|
+
if (!n[a]) {
|
|
314
|
+
var u = global[a] || [];
|
|
315
|
+
publishQueue(n, u);
|
|
316
|
+
n.close = function(e) {
|
|
317
|
+
function close(t, r) {
|
|
318
|
+
return e.call(n, t, function(e) {
|
|
319
|
+
if (!e) resetQueue();
|
|
320
|
+
if ("function" == typeof r) r.apply(this, arguments);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
Object.defineProperty(close, l, {
|
|
324
|
+
value: e
|
|
325
|
+
});
|
|
326
|
+
return close;
|
|
327
|
+
}(n.close);
|
|
328
|
+
n.closeSync = function(e) {
|
|
329
|
+
function closeSync(t) {
|
|
330
|
+
e.apply(n, arguments);
|
|
331
|
+
resetQueue();
|
|
332
|
+
}
|
|
333
|
+
Object.defineProperty(closeSync, l, {
|
|
334
|
+
value: e
|
|
335
|
+
});
|
|
336
|
+
return closeSync;
|
|
337
|
+
}(n.closeSync);
|
|
338
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
339
|
+
f(n[a]);
|
|
340
|
+
r(491).equal(n[a].length, 0);
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
if (!global[a]) publishQueue(global, n[a]);
|
|
344
|
+
e.exports = patch(o(n));
|
|
345
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !n.__patched) {
|
|
346
|
+
e.exports = patch(n);
|
|
347
|
+
n.__patched = true;
|
|
348
|
+
}
|
|
349
|
+
function patch(e) {
|
|
350
|
+
i(e);
|
|
351
|
+
e.gracefulify = patch;
|
|
352
|
+
e.createReadStream = createReadStream;
|
|
353
|
+
e.createWriteStream = createWriteStream;
|
|
354
|
+
var t = e.readFile;
|
|
355
|
+
e.readFile = readFile;
|
|
356
|
+
function readFile(e, r, n) {
|
|
357
|
+
if ("function" == typeof r) n = r, r = null;
|
|
358
|
+
return go$readFile(e, r, n);
|
|
359
|
+
function go$readFile(e, r, n, i) {
|
|
360
|
+
return t(e, r, function(t) {
|
|
361
|
+
if (t && ("EMFILE" === t.code || "ENFILE" === t.code)) enqueue([
|
|
362
|
+
go$readFile,
|
|
363
|
+
[
|
|
364
|
+
e,
|
|
365
|
+
r,
|
|
366
|
+
n
|
|
367
|
+
],
|
|
368
|
+
t,
|
|
369
|
+
i || Date.now(),
|
|
370
|
+
Date.now()
|
|
371
|
+
]);
|
|
372
|
+
else if ("function" == typeof n) n.apply(this, arguments);
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
var r = e.writeFile;
|
|
377
|
+
e.writeFile = writeFile;
|
|
378
|
+
function writeFile(e, t, n, i) {
|
|
379
|
+
if ("function" == typeof n) i = n, n = null;
|
|
380
|
+
return go$writeFile(e, t, n, i);
|
|
381
|
+
function go$writeFile(e, t, n, i, s) {
|
|
382
|
+
return r(e, t, n, function(r) {
|
|
383
|
+
if (r && ("EMFILE" === r.code || "ENFILE" === r.code)) enqueue([
|
|
384
|
+
go$writeFile,
|
|
385
|
+
[
|
|
386
|
+
e,
|
|
387
|
+
t,
|
|
388
|
+
n,
|
|
389
|
+
i
|
|
390
|
+
],
|
|
391
|
+
r,
|
|
392
|
+
s || Date.now(),
|
|
393
|
+
Date.now()
|
|
394
|
+
]);
|
|
395
|
+
else if ("function" == typeof i) i.apply(this, arguments);
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
var n = e.appendFile;
|
|
400
|
+
if (n) e.appendFile = appendFile;
|
|
401
|
+
function appendFile(e, t, r, i) {
|
|
402
|
+
if ("function" == typeof r) i = r, r = null;
|
|
403
|
+
return go$appendFile(e, t, r, i);
|
|
404
|
+
function go$appendFile(e, t, r, i, s) {
|
|
405
|
+
return n(e, t, r, function(n) {
|
|
406
|
+
if (n && ("EMFILE" === n.code || "ENFILE" === n.code)) enqueue([
|
|
407
|
+
go$appendFile,
|
|
408
|
+
[
|
|
409
|
+
e,
|
|
410
|
+
t,
|
|
411
|
+
r,
|
|
412
|
+
i
|
|
413
|
+
],
|
|
414
|
+
n,
|
|
415
|
+
s || Date.now(),
|
|
416
|
+
Date.now()
|
|
417
|
+
]);
|
|
418
|
+
else if ("function" == typeof i) i.apply(this, arguments);
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
var o = e.copyFile;
|
|
423
|
+
if (o) e.copyFile = copyFile;
|
|
424
|
+
function copyFile(e, t, r, n) {
|
|
425
|
+
if ("function" == typeof r) {
|
|
426
|
+
n = r;
|
|
427
|
+
r = 0;
|
|
428
|
+
}
|
|
429
|
+
return go$copyFile(e, t, r, n);
|
|
430
|
+
function go$copyFile(e, t, r, n, i) {
|
|
431
|
+
return o(e, t, r, function(s) {
|
|
432
|
+
if (s && ("EMFILE" === s.code || "ENFILE" === s.code)) enqueue([
|
|
433
|
+
go$copyFile,
|
|
434
|
+
[
|
|
435
|
+
e,
|
|
436
|
+
t,
|
|
437
|
+
r,
|
|
438
|
+
n
|
|
439
|
+
],
|
|
440
|
+
s,
|
|
441
|
+
i || Date.now(),
|
|
442
|
+
Date.now()
|
|
443
|
+
]);
|
|
444
|
+
else if ("function" == typeof n) n.apply(this, arguments);
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
var c = e.readdir;
|
|
449
|
+
e.readdir = readdir;
|
|
450
|
+
var a = /^v[0-5]\./;
|
|
451
|
+
function readdir(e, t, r) {
|
|
452
|
+
if ("function" == typeof t) r = t, t = null;
|
|
453
|
+
var n = a.test(process.version) ? function(e, t, r, n) {
|
|
454
|
+
return c(e, fs$readdirCallback(e, t, r, n));
|
|
455
|
+
} : function(e, t, r, n) {
|
|
456
|
+
return c(e, t, fs$readdirCallback(e, t, r, n));
|
|
457
|
+
};
|
|
458
|
+
return n(e, t, r);
|
|
459
|
+
function fs$readdirCallback(e, t, r, i) {
|
|
460
|
+
return function(s, o) {
|
|
461
|
+
if (s && ("EMFILE" === s.code || "ENFILE" === s.code)) enqueue([
|
|
462
|
+
n,
|
|
463
|
+
[
|
|
464
|
+
e,
|
|
465
|
+
t,
|
|
466
|
+
r
|
|
467
|
+
],
|
|
468
|
+
s,
|
|
469
|
+
i || Date.now(),
|
|
470
|
+
Date.now()
|
|
471
|
+
]);
|
|
472
|
+
else {
|
|
473
|
+
if (o && o.sort) o.sort();
|
|
474
|
+
if ("function" == typeof r) r.call(this, s, o);
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if ("v0.8" === process.version.substr(0, 4)) {
|
|
480
|
+
var l = s(e);
|
|
481
|
+
ReadStream = l.ReadStream;
|
|
482
|
+
WriteStream = l.WriteStream;
|
|
483
|
+
}
|
|
484
|
+
var f = e.ReadStream;
|
|
485
|
+
if (f) {
|
|
486
|
+
ReadStream.prototype = Object.create(f.prototype);
|
|
487
|
+
ReadStream.prototype.open = ReadStream$open;
|
|
488
|
+
}
|
|
489
|
+
var u = e.WriteStream;
|
|
490
|
+
if (u) {
|
|
491
|
+
WriteStream.prototype = Object.create(u.prototype);
|
|
492
|
+
WriteStream.prototype.open = WriteStream$open;
|
|
493
|
+
}
|
|
494
|
+
Object.defineProperty(e, "ReadStream", {
|
|
495
|
+
get: function() {
|
|
496
|
+
return ReadStream;
|
|
497
|
+
},
|
|
498
|
+
set: function(e) {
|
|
499
|
+
ReadStream = e;
|
|
500
|
+
},
|
|
501
|
+
enumerable: true,
|
|
502
|
+
configurable: true
|
|
503
|
+
});
|
|
504
|
+
Object.defineProperty(e, "WriteStream", {
|
|
505
|
+
get: function() {
|
|
506
|
+
return WriteStream;
|
|
507
|
+
},
|
|
508
|
+
set: function(e) {
|
|
509
|
+
WriteStream = e;
|
|
510
|
+
},
|
|
511
|
+
enumerable: true,
|
|
512
|
+
configurable: true
|
|
513
|
+
});
|
|
514
|
+
var h = ReadStream;
|
|
515
|
+
Object.defineProperty(e, "FileReadStream", {
|
|
516
|
+
get: function() {
|
|
517
|
+
return h;
|
|
518
|
+
},
|
|
519
|
+
set: function(e) {
|
|
520
|
+
h = e;
|
|
521
|
+
},
|
|
522
|
+
enumerable: true,
|
|
523
|
+
configurable: true
|
|
524
|
+
});
|
|
525
|
+
var p = WriteStream;
|
|
526
|
+
Object.defineProperty(e, "FileWriteStream", {
|
|
527
|
+
get: function() {
|
|
528
|
+
return p;
|
|
529
|
+
},
|
|
530
|
+
set: function(e) {
|
|
531
|
+
p = e;
|
|
532
|
+
},
|
|
533
|
+
enumerable: true,
|
|
534
|
+
configurable: true
|
|
535
|
+
});
|
|
536
|
+
function ReadStream(e, t) {
|
|
537
|
+
if (this instanceof ReadStream) return f.apply(this, arguments), this;
|
|
538
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
|
539
|
+
}
|
|
540
|
+
function ReadStream$open() {
|
|
541
|
+
var e = this;
|
|
542
|
+
open(e.path, e.flags, e.mode, function(t, r) {
|
|
543
|
+
if (t) {
|
|
544
|
+
if (e.autoClose) e.destroy();
|
|
545
|
+
e.emit("error", t);
|
|
546
|
+
} else {
|
|
547
|
+
e.fd = r;
|
|
548
|
+
e.emit("open", r);
|
|
549
|
+
e.read();
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
function WriteStream(e, t) {
|
|
554
|
+
if (this instanceof WriteStream) return u.apply(this, arguments), this;
|
|
555
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
556
|
+
}
|
|
557
|
+
function WriteStream$open() {
|
|
558
|
+
var e = this;
|
|
559
|
+
open(e.path, e.flags, e.mode, function(t, r) {
|
|
560
|
+
if (t) {
|
|
561
|
+
e.destroy();
|
|
562
|
+
e.emit("error", t);
|
|
563
|
+
} else {
|
|
564
|
+
e.fd = r;
|
|
565
|
+
e.emit("open", r);
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
function createReadStream(t, r) {
|
|
570
|
+
return new e.ReadStream(t, r);
|
|
571
|
+
}
|
|
572
|
+
function createWriteStream(t, r) {
|
|
573
|
+
return new e.WriteStream(t, r);
|
|
574
|
+
}
|
|
575
|
+
var d = e.open;
|
|
576
|
+
e.open = open;
|
|
577
|
+
function open(e, t, r, n) {
|
|
578
|
+
if ("function" == typeof r) n = r, r = null;
|
|
579
|
+
return go$open(e, t, r, n);
|
|
580
|
+
function go$open(e, t, r, n, i) {
|
|
581
|
+
return d(e, t, r, function(s, o) {
|
|
582
|
+
if (s && ("EMFILE" === s.code || "ENFILE" === s.code)) enqueue([
|
|
583
|
+
go$open,
|
|
584
|
+
[
|
|
585
|
+
e,
|
|
586
|
+
t,
|
|
587
|
+
r,
|
|
588
|
+
n
|
|
589
|
+
],
|
|
590
|
+
s,
|
|
591
|
+
i || Date.now(),
|
|
592
|
+
Date.now()
|
|
593
|
+
]);
|
|
594
|
+
else if ("function" == typeof n) n.apply(this, arguments);
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
return e;
|
|
599
|
+
}
|
|
600
|
+
function enqueue(e) {
|
|
601
|
+
f("ENQUEUE", e[0].name, e[1]);
|
|
602
|
+
n[a].push(e);
|
|
603
|
+
retry();
|
|
604
|
+
}
|
|
605
|
+
var h;
|
|
606
|
+
function resetQueue() {
|
|
607
|
+
var e = Date.now();
|
|
608
|
+
for(var t = 0; t < n[a].length; ++t)if (n[a][t].length > 2) {
|
|
609
|
+
n[a][t][3] = e;
|
|
610
|
+
n[a][t][4] = e;
|
|
611
|
+
}
|
|
612
|
+
retry();
|
|
613
|
+
}
|
|
614
|
+
function retry() {
|
|
615
|
+
clearTimeout(h);
|
|
616
|
+
h = void 0;
|
|
617
|
+
if (0 === n[a].length) return;
|
|
618
|
+
var e = n[a].shift();
|
|
619
|
+
var t = e[0];
|
|
620
|
+
var r = e[1];
|
|
621
|
+
var i = e[2];
|
|
622
|
+
var s = e[3];
|
|
623
|
+
var o = e[4];
|
|
624
|
+
if (void 0 === s) {
|
|
625
|
+
f("RETRY", t.name, r);
|
|
626
|
+
t.apply(null, r);
|
|
627
|
+
} else if (Date.now() - s >= 6e4) {
|
|
628
|
+
f("TIMEOUT", t.name, r);
|
|
629
|
+
var c = r.pop();
|
|
630
|
+
if ("function" == typeof c) c.call(null, i);
|
|
631
|
+
} else {
|
|
632
|
+
var l = Date.now() - o;
|
|
633
|
+
var u = Math.max(o - s, 1);
|
|
634
|
+
var p = Math.min(1.2 * u, 100);
|
|
635
|
+
if (l >= p) {
|
|
636
|
+
f("RETRY", t.name, r);
|
|
637
|
+
t.apply(null, r.concat([
|
|
638
|
+
s
|
|
639
|
+
]));
|
|
640
|
+
} else n[a].push(e);
|
|
641
|
+
}
|
|
642
|
+
if (void 0 === h) h = setTimeout(retry, 0);
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
876: (e, t, r)=>{
|
|
646
|
+
var n = r(781).Stream;
|
|
647
|
+
e.exports = legacy;
|
|
648
|
+
function legacy(e) {
|
|
649
|
+
return {
|
|
650
|
+
ReadStream: ReadStream,
|
|
651
|
+
WriteStream: WriteStream
|
|
652
|
+
};
|
|
653
|
+
function ReadStream(t, r) {
|
|
654
|
+
if (!(this instanceof ReadStream)) return new ReadStream(t, r);
|
|
655
|
+
n.call(this);
|
|
656
|
+
var i = this;
|
|
657
|
+
this.path = t;
|
|
658
|
+
this.fd = null;
|
|
659
|
+
this.readable = true;
|
|
660
|
+
this.paused = false;
|
|
661
|
+
this.flags = "r";
|
|
662
|
+
this.mode = 438;
|
|
663
|
+
this.bufferSize = 65536;
|
|
664
|
+
r = r || {};
|
|
665
|
+
var s = Object.keys(r);
|
|
666
|
+
for(var o = 0, c = s.length; o < c; o++){
|
|
667
|
+
var a = s[o];
|
|
668
|
+
this[a] = r[a];
|
|
669
|
+
}
|
|
670
|
+
if (this.encoding) this.setEncoding(this.encoding);
|
|
671
|
+
if (void 0 !== this.start) {
|
|
672
|
+
if ("number" != typeof this.start) throw TypeError("start must be a Number");
|
|
673
|
+
if (void 0 === this.end) this.end = 1 / 0;
|
|
674
|
+
else if ("number" != typeof this.end) throw TypeError("end must be a Number");
|
|
675
|
+
if (this.start > this.end) throw new Error("start must be <= end");
|
|
676
|
+
this.pos = this.start;
|
|
677
|
+
}
|
|
678
|
+
if (null !== this.fd) return void process.nextTick(function() {
|
|
679
|
+
i._read();
|
|
680
|
+
});
|
|
681
|
+
e.open(this.path, this.flags, this.mode, function(e, t) {
|
|
682
|
+
if (e) {
|
|
683
|
+
i.emit("error", e);
|
|
684
|
+
i.readable = false;
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
i.fd = t;
|
|
688
|
+
i.emit("open", t);
|
|
689
|
+
i._read();
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
function WriteStream(t, r) {
|
|
693
|
+
if (!(this instanceof WriteStream)) return new WriteStream(t, r);
|
|
694
|
+
n.call(this);
|
|
695
|
+
this.path = t;
|
|
696
|
+
this.fd = null;
|
|
697
|
+
this.writable = true;
|
|
698
|
+
this.flags = "w";
|
|
699
|
+
this.encoding = "binary";
|
|
700
|
+
this.mode = 438;
|
|
701
|
+
this.bytesWritten = 0;
|
|
702
|
+
r = r || {};
|
|
703
|
+
var i = Object.keys(r);
|
|
704
|
+
for(var s = 0, o = i.length; s < o; s++){
|
|
705
|
+
var c = i[s];
|
|
706
|
+
this[c] = r[c];
|
|
707
|
+
}
|
|
708
|
+
if (void 0 !== this.start) {
|
|
709
|
+
if ("number" != typeof this.start) throw TypeError("start must be a Number");
|
|
710
|
+
if (this.start < 0) throw new Error("start must be >= zero");
|
|
711
|
+
this.pos = this.start;
|
|
712
|
+
}
|
|
713
|
+
this.busy = false;
|
|
714
|
+
this._queue = [];
|
|
715
|
+
if (null === this.fd) {
|
|
716
|
+
this._open = e.open;
|
|
717
|
+
this._queue.push([
|
|
718
|
+
this._open,
|
|
719
|
+
this.path,
|
|
720
|
+
this.flags,
|
|
721
|
+
this.mode,
|
|
722
|
+
void 0
|
|
723
|
+
]);
|
|
724
|
+
this.flush();
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
738: (e, t, r)=>{
|
|
730
|
+
var n = r(57);
|
|
731
|
+
var i = process.cwd;
|
|
732
|
+
var s = null;
|
|
733
|
+
var o = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
734
|
+
process.cwd = function() {
|
|
735
|
+
if (!s) s = i.call(process);
|
|
736
|
+
return s;
|
|
737
|
+
};
|
|
738
|
+
try {
|
|
739
|
+
process.cwd();
|
|
740
|
+
} catch (e) {}
|
|
741
|
+
if ("function" == typeof process.chdir) {
|
|
742
|
+
var c = process.chdir;
|
|
743
|
+
process.chdir = function(e) {
|
|
744
|
+
s = null;
|
|
745
|
+
c.call(process, e);
|
|
746
|
+
};
|
|
747
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, c);
|
|
748
|
+
}
|
|
749
|
+
e.exports = patch;
|
|
750
|
+
function patch(e) {
|
|
751
|
+
if (n.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(e);
|
|
752
|
+
if (!e.lutimes) patchLutimes(e);
|
|
753
|
+
e.chown = chownFix(e.chown);
|
|
754
|
+
e.fchown = chownFix(e.fchown);
|
|
755
|
+
e.lchown = chownFix(e.lchown);
|
|
756
|
+
e.chmod = chmodFix(e.chmod);
|
|
757
|
+
e.fchmod = chmodFix(e.fchmod);
|
|
758
|
+
e.lchmod = chmodFix(e.lchmod);
|
|
759
|
+
e.chownSync = chownFixSync(e.chownSync);
|
|
760
|
+
e.fchownSync = chownFixSync(e.fchownSync);
|
|
761
|
+
e.lchownSync = chownFixSync(e.lchownSync);
|
|
762
|
+
e.chmodSync = chmodFixSync(e.chmodSync);
|
|
763
|
+
e.fchmodSync = chmodFixSync(e.fchmodSync);
|
|
764
|
+
e.lchmodSync = chmodFixSync(e.lchmodSync);
|
|
765
|
+
e.stat = statFix(e.stat);
|
|
766
|
+
e.fstat = statFix(e.fstat);
|
|
767
|
+
e.lstat = statFix(e.lstat);
|
|
768
|
+
e.statSync = statFixSync(e.statSync);
|
|
769
|
+
e.fstatSync = statFixSync(e.fstatSync);
|
|
770
|
+
e.lstatSync = statFixSync(e.lstatSync);
|
|
771
|
+
if (e.chmod && !e.lchmod) {
|
|
772
|
+
e.lchmod = function(e, t, r) {
|
|
773
|
+
if (r) process.nextTick(r);
|
|
774
|
+
};
|
|
775
|
+
e.lchmodSync = function() {};
|
|
776
|
+
}
|
|
777
|
+
if (e.chown && !e.lchown) {
|
|
778
|
+
e.lchown = function(e, t, r, n) {
|
|
779
|
+
if (n) process.nextTick(n);
|
|
780
|
+
};
|
|
781
|
+
e.lchownSync = function() {};
|
|
782
|
+
}
|
|
783
|
+
if ("win32" === o) e.rename = "function" != typeof e.rename ? e.rename : function(t) {
|
|
784
|
+
function rename(r, n, i) {
|
|
785
|
+
var s = Date.now();
|
|
786
|
+
var o = 0;
|
|
787
|
+
t(r, n, function CB(c) {
|
|
788
|
+
if (c && ("EACCES" === c.code || "EPERM" === c.code) && Date.now() - s < 6e4) {
|
|
789
|
+
setTimeout(function() {
|
|
790
|
+
e.stat(n, function(e, s) {
|
|
791
|
+
if (e && "ENOENT" === e.code) t(r, n, CB);
|
|
792
|
+
else i(c);
|
|
793
|
+
});
|
|
794
|
+
}, o);
|
|
795
|
+
if (o < 100) o += 10;
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
if (i) i(c);
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, t);
|
|
802
|
+
return rename;
|
|
803
|
+
}(e.rename);
|
|
804
|
+
e.read = "function" != typeof e.read ? e.read : function(t) {
|
|
805
|
+
function read(r, n, i, s, o, c) {
|
|
806
|
+
var a;
|
|
807
|
+
if (c && "function" == typeof c) {
|
|
808
|
+
var l = 0;
|
|
809
|
+
a = function(f, u, h) {
|
|
810
|
+
if (f && "EAGAIN" === f.code && l < 10) {
|
|
811
|
+
l++;
|
|
812
|
+
return t.call(e, r, n, i, s, o, a);
|
|
813
|
+
}
|
|
814
|
+
c.apply(this, arguments);
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
return t.call(e, r, n, i, s, o, a);
|
|
818
|
+
}
|
|
819
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(read, t);
|
|
820
|
+
return read;
|
|
821
|
+
}(e.read);
|
|
822
|
+
e.readSync = "function" != typeof e.readSync ? e.readSync : function(t) {
|
|
823
|
+
return function(r, n, i, s, o) {
|
|
824
|
+
var c = 0;
|
|
825
|
+
while(true)try {
|
|
826
|
+
return t.call(e, r, n, i, s, o);
|
|
827
|
+
} catch (e) {
|
|
828
|
+
if ("EAGAIN" === e.code && c < 10) {
|
|
829
|
+
c++;
|
|
830
|
+
continue;
|
|
831
|
+
}
|
|
832
|
+
throw e;
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
}(e.readSync);
|
|
836
|
+
function patchLchmod(e) {
|
|
837
|
+
e.lchmod = function(t, r, i) {
|
|
838
|
+
e.open(t, n.O_WRONLY | n.O_SYMLINK, r, function(t, n) {
|
|
839
|
+
if (t) {
|
|
840
|
+
if (i) i(t);
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
e.fchmod(n, r, function(t) {
|
|
844
|
+
e.close(n, function(e) {
|
|
845
|
+
if (i) i(t || e);
|
|
846
|
+
});
|
|
847
|
+
});
|
|
848
|
+
});
|
|
849
|
+
};
|
|
850
|
+
e.lchmodSync = function(t, r) {
|
|
851
|
+
var i = e.openSync(t, n.O_WRONLY | n.O_SYMLINK, r);
|
|
852
|
+
var s = true;
|
|
853
|
+
var o;
|
|
854
|
+
try {
|
|
855
|
+
o = e.fchmodSync(i, r);
|
|
856
|
+
s = false;
|
|
857
|
+
} finally{
|
|
858
|
+
if (s) try {
|
|
859
|
+
e.closeSync(i);
|
|
860
|
+
} catch (e) {}
|
|
861
|
+
else e.closeSync(i);
|
|
862
|
+
}
|
|
863
|
+
return o;
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
function patchLutimes(e) {
|
|
867
|
+
if (n.hasOwnProperty("O_SYMLINK") && e.futimes) {
|
|
868
|
+
e.lutimes = function(t, r, i, s) {
|
|
869
|
+
e.open(t, n.O_SYMLINK, function(t, n) {
|
|
870
|
+
if (t) {
|
|
871
|
+
if (s) s(t);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
e.futimes(n, r, i, function(t) {
|
|
875
|
+
e.close(n, function(e) {
|
|
876
|
+
if (s) s(t || e);
|
|
877
|
+
});
|
|
878
|
+
});
|
|
879
|
+
});
|
|
880
|
+
};
|
|
881
|
+
e.lutimesSync = function(t, r, i) {
|
|
882
|
+
var s = e.openSync(t, n.O_SYMLINK);
|
|
883
|
+
var o;
|
|
884
|
+
var c = true;
|
|
885
|
+
try {
|
|
886
|
+
o = e.futimesSync(s, r, i);
|
|
887
|
+
c = false;
|
|
888
|
+
} finally{
|
|
889
|
+
if (c) try {
|
|
890
|
+
e.closeSync(s);
|
|
891
|
+
} catch (e) {}
|
|
892
|
+
else e.closeSync(s);
|
|
893
|
+
}
|
|
894
|
+
return o;
|
|
895
|
+
};
|
|
896
|
+
} else if (e.futimes) {
|
|
897
|
+
e.lutimes = function(e, t, r, n) {
|
|
898
|
+
if (n) process.nextTick(n);
|
|
899
|
+
};
|
|
900
|
+
e.lutimesSync = function() {};
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
function chmodFix(t) {
|
|
904
|
+
if (!t) return t;
|
|
905
|
+
return function(r, n, i) {
|
|
906
|
+
return t.call(e, r, n, function(e) {
|
|
907
|
+
if (chownErOk(e)) e = null;
|
|
908
|
+
if (i) i.apply(this, arguments);
|
|
909
|
+
});
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
function chmodFixSync(t) {
|
|
913
|
+
if (!t) return t;
|
|
914
|
+
return function(r, n) {
|
|
915
|
+
try {
|
|
916
|
+
return t.call(e, r, n);
|
|
917
|
+
} catch (e) {
|
|
918
|
+
if (!chownErOk(e)) throw e;
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
function chownFix(t) {
|
|
923
|
+
if (!t) return t;
|
|
924
|
+
return function(r, n, i, s) {
|
|
925
|
+
return t.call(e, r, n, i, function(e) {
|
|
926
|
+
if (chownErOk(e)) e = null;
|
|
927
|
+
if (s) s.apply(this, arguments);
|
|
928
|
+
});
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
function chownFixSync(t) {
|
|
932
|
+
if (!t) return t;
|
|
933
|
+
return function(r, n, i) {
|
|
934
|
+
try {
|
|
935
|
+
return t.call(e, r, n, i);
|
|
936
|
+
} catch (e) {
|
|
937
|
+
if (!chownErOk(e)) throw e;
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
function statFix(t) {
|
|
942
|
+
if (!t) return t;
|
|
943
|
+
return function(r, n, i) {
|
|
944
|
+
if ("function" == typeof n) {
|
|
945
|
+
i = n;
|
|
946
|
+
n = null;
|
|
947
|
+
}
|
|
948
|
+
function callback(e, t) {
|
|
949
|
+
if (t) {
|
|
950
|
+
if (t.uid < 0) t.uid += 4294967296;
|
|
951
|
+
if (t.gid < 0) t.gid += 4294967296;
|
|
952
|
+
}
|
|
953
|
+
if (i) i.apply(this, arguments);
|
|
954
|
+
}
|
|
955
|
+
return n ? t.call(e, r, n, callback) : t.call(e, r, callback);
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
function statFixSync(t) {
|
|
959
|
+
if (!t) return t;
|
|
960
|
+
return function(r, n) {
|
|
961
|
+
var i = n ? t.call(e, r, n) : t.call(e, r);
|
|
962
|
+
if (i) {
|
|
963
|
+
if (i.uid < 0) i.uid += 4294967296;
|
|
964
|
+
if (i.gid < 0) i.gid += 4294967296;
|
|
965
|
+
}
|
|
966
|
+
return i;
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
function chownErOk(e) {
|
|
970
|
+
if (!e) return true;
|
|
971
|
+
if ("ENOSYS" === e.code) return true;
|
|
972
|
+
var t = !process.getuid || 0 !== process.getuid();
|
|
973
|
+
if (t) {
|
|
974
|
+
if ("EINVAL" === e.code || "EPERM" === e.code) return true;
|
|
975
|
+
}
|
|
976
|
+
return false;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
589: (e)=>{
|
|
981
|
+
"use strict";
|
|
982
|
+
e.exports = function(e) {
|
|
983
|
+
if (!e) return false;
|
|
984
|
+
return e instanceof Array || Array.isArray(e) || e.length >= 0 && e.splice instanceof Function;
|
|
985
|
+
};
|
|
986
|
+
},
|
|
987
|
+
9: (e)=>{
|
|
988
|
+
"use strict";
|
|
989
|
+
e.exports = parseJson;
|
|
990
|
+
function parseJson(e, t, r) {
|
|
991
|
+
r = r || 20;
|
|
992
|
+
try {
|
|
993
|
+
return JSON.parse(e, t);
|
|
994
|
+
} catch (t) {
|
|
995
|
+
if ("string" != typeof e) {
|
|
996
|
+
const t = Array.isArray(e) && 0 === e.length;
|
|
997
|
+
const r = "Cannot parse " + (t ? "an empty array" : String(e));
|
|
998
|
+
throw new TypeError(r);
|
|
999
|
+
}
|
|
1000
|
+
const n = t.message.match(/^Unexpected token.*position\s+(\d+)/i);
|
|
1001
|
+
const i = n ? +n[1] : t.message.match(/^Unexpected end of JSON.*/i) ? e.length - 1 : null;
|
|
1002
|
+
if (null != i) {
|
|
1003
|
+
const n = i <= r ? 0 : i - r;
|
|
1004
|
+
const s = i + r >= e.length ? e.length : i + r;
|
|
1005
|
+
t.message += ` while parsing near '${0 === n ? "" : "..."}${e.slice(n, s)}${s === e.length ? "" : "..."}'`;
|
|
1006
|
+
} else t.message += ` while parsing '${e.slice(0, 2 * r)}'`;
|
|
1007
|
+
throw t;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
324: (e, t, r)=>{
|
|
1012
|
+
"use strict";
|
|
1013
|
+
const n = r(17);
|
|
1014
|
+
const i = r(127);
|
|
1015
|
+
const s = r(308);
|
|
1016
|
+
const o = r(264);
|
|
1017
|
+
const c = r(119);
|
|
1018
|
+
const parse = (e, t)=>o(s(e), n.relative(".", t));
|
|
1019
|
+
e.exports = (e)=>c(i.readFile)(e, "utf8").then((t)=>parse(t, e));
|
|
1020
|
+
e.exports.sync = (e)=>parse(i.readFileSync(e, "utf8"), e);
|
|
1021
|
+
},
|
|
1022
|
+
69: (e, t, r)=>{
|
|
1023
|
+
"use strict";
|
|
1024
|
+
const n = r(17);
|
|
1025
|
+
const i = r(383);
|
|
1026
|
+
const s = r(367);
|
|
1027
|
+
e.exports = (e, t)=>{
|
|
1028
|
+
t = Object.assign({
|
|
1029
|
+
cwd: process.cwd()
|
|
1030
|
+
}, t);
|
|
1031
|
+
return s(e, (e)=>i(n.resolve(t.cwd, e)), t);
|
|
1032
|
+
};
|
|
1033
|
+
e.exports.sync = (e, t)=>{
|
|
1034
|
+
t = Object.assign({
|
|
1035
|
+
cwd: process.cwd()
|
|
1036
|
+
}, t);
|
|
1037
|
+
for (const r of e)if (i.sync(n.resolve(t.cwd, r))) return r;
|
|
1038
|
+
};
|
|
1039
|
+
},
|
|
1040
|
+
273: (e, t, r)=>{
|
|
1041
|
+
"use strict";
|
|
1042
|
+
const n = r(965);
|
|
1043
|
+
e.exports = (e)=>{
|
|
1044
|
+
if (e < 1) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
1045
|
+
const t = [];
|
|
1046
|
+
let r = 0;
|
|
1047
|
+
const next = ()=>{
|
|
1048
|
+
r--;
|
|
1049
|
+
if (t.length > 0) t.shift()();
|
|
1050
|
+
};
|
|
1051
|
+
return (i)=>new Promise((s, o)=>{
|
|
1052
|
+
const run = ()=>{
|
|
1053
|
+
r++;
|
|
1054
|
+
n(i).then((e)=>{
|
|
1055
|
+
s(e);
|
|
1056
|
+
next();
|
|
1057
|
+
}, (e)=>{
|
|
1058
|
+
o(e);
|
|
1059
|
+
next();
|
|
1060
|
+
});
|
|
1061
|
+
};
|
|
1062
|
+
if (r < e) run();
|
|
1063
|
+
else t.push(run);
|
|
1064
|
+
});
|
|
1065
|
+
};
|
|
1066
|
+
},
|
|
1067
|
+
367: (e, t, r)=>{
|
|
1068
|
+
"use strict";
|
|
1069
|
+
const n = r(273);
|
|
1070
|
+
class EndError extends Error {
|
|
1071
|
+
constructor(e){
|
|
1072
|
+
super();
|
|
1073
|
+
this.value = e;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
const finder = (e)=>Promise.all(e).then((e)=>true === e[1] && Promise.reject(new EndError(e[0])));
|
|
1077
|
+
e.exports = (e, t, r)=>{
|
|
1078
|
+
r = Object.assign({
|
|
1079
|
+
concurrency: 1 / 0,
|
|
1080
|
+
preserveOrder: true
|
|
1081
|
+
}, r);
|
|
1082
|
+
const i = n(r.concurrency);
|
|
1083
|
+
const s = Array.from(e).map((e)=>[
|
|
1084
|
+
e,
|
|
1085
|
+
i(()=>Promise.resolve(e).then(t))
|
|
1086
|
+
]);
|
|
1087
|
+
const o = n(r.preserveOrder ? 1 : 1 / 0);
|
|
1088
|
+
return Promise.all(s.map((e)=>o(()=>finder(e)))).then(()=>{}).catch((e)=>e instanceof EndError ? e.value : Promise.reject(e));
|
|
1089
|
+
};
|
|
1090
|
+
},
|
|
1091
|
+
965: (e)=>{
|
|
1092
|
+
"use strict";
|
|
1093
|
+
e.exports = (e)=>new Promise((t)=>{
|
|
1094
|
+
t(e());
|
|
1095
|
+
});
|
|
1096
|
+
},
|
|
1097
|
+
264: (e, t, r)=>{
|
|
1098
|
+
"use strict";
|
|
1099
|
+
const n = r(305);
|
|
1100
|
+
const i = r(9);
|
|
1101
|
+
const s = n("JSONError", {
|
|
1102
|
+
fileName: n.append("in %s")
|
|
1103
|
+
});
|
|
1104
|
+
e.exports = (e, t, r)=>{
|
|
1105
|
+
if ("string" == typeof t) {
|
|
1106
|
+
r = t;
|
|
1107
|
+
t = null;
|
|
1108
|
+
}
|
|
1109
|
+
try {
|
|
1110
|
+
try {
|
|
1111
|
+
return JSON.parse(e, t);
|
|
1112
|
+
} catch (r) {
|
|
1113
|
+
i(e, t);
|
|
1114
|
+
throw r;
|
|
1115
|
+
}
|
|
1116
|
+
} catch (e) {
|
|
1117
|
+
e.message = e.message.replace(/\n/g, "");
|
|
1118
|
+
const t = new s(e);
|
|
1119
|
+
if (r) t.fileName = r;
|
|
1120
|
+
throw t;
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
},
|
|
1124
|
+
383: (e, t, r)=>{
|
|
1125
|
+
"use strict";
|
|
1126
|
+
const n = r(147);
|
|
1127
|
+
e.exports = (e)=>new Promise((t)=>{
|
|
1128
|
+
n.access(e, (e)=>{
|
|
1129
|
+
t(!e);
|
|
1130
|
+
});
|
|
1131
|
+
});
|
|
1132
|
+
e.exports.sync = (e)=>{
|
|
1133
|
+
try {
|
|
1134
|
+
n.accessSync(e);
|
|
1135
|
+
return true;
|
|
1136
|
+
} catch (e) {
|
|
1137
|
+
return false;
|
|
1138
|
+
}
|
|
1139
|
+
};
|
|
1140
|
+
},
|
|
1141
|
+
119: (e)=>{
|
|
1142
|
+
"use strict";
|
|
1143
|
+
const processFn = (e, t)=>function() {
|
|
1144
|
+
const r = t.promiseModule;
|
|
1145
|
+
const n = new Array(arguments.length);
|
|
1146
|
+
for(let e = 0; e < arguments.length; e++)n[e] = arguments[e];
|
|
1147
|
+
return new r((r, i)=>{
|
|
1148
|
+
if (t.errorFirst) n.push(function(e, n) {
|
|
1149
|
+
if (t.multiArgs) {
|
|
1150
|
+
const t = new Array(arguments.length - 1);
|
|
1151
|
+
for(let e = 1; e < arguments.length; e++)t[e - 1] = arguments[e];
|
|
1152
|
+
if (e) {
|
|
1153
|
+
t.unshift(e);
|
|
1154
|
+
i(t);
|
|
1155
|
+
} else r(t);
|
|
1156
|
+
} else if (e) i(e);
|
|
1157
|
+
else r(n);
|
|
1158
|
+
});
|
|
1159
|
+
else n.push(function(e) {
|
|
1160
|
+
if (t.multiArgs) {
|
|
1161
|
+
const e = new Array(arguments.length - 1);
|
|
1162
|
+
for(let t = 0; t < arguments.length; t++)e[t] = arguments[t];
|
|
1163
|
+
r(e);
|
|
1164
|
+
} else r(e);
|
|
1165
|
+
});
|
|
1166
|
+
e.apply(this, n);
|
|
1167
|
+
});
|
|
1168
|
+
};
|
|
1169
|
+
e.exports = (e, t)=>{
|
|
1170
|
+
t = Object.assign({
|
|
1171
|
+
exclude: [
|
|
1172
|
+
/.+(Sync|Stream)$/
|
|
1173
|
+
],
|
|
1174
|
+
errorFirst: true,
|
|
1175
|
+
promiseModule: Promise
|
|
1176
|
+
}, t);
|
|
1177
|
+
const filter = (e)=>{
|
|
1178
|
+
const match = (t)=>"string" == typeof t ? e === t : t.test(e);
|
|
1179
|
+
return t.include ? t.include.some(match) : !t.exclude.some(match);
|
|
1180
|
+
};
|
|
1181
|
+
let r;
|
|
1182
|
+
r = "function" == typeof e ? function() {
|
|
1183
|
+
if (t.excludeMain) return e.apply(this, arguments);
|
|
1184
|
+
return processFn(e, t).apply(this, arguments);
|
|
1185
|
+
} : Object.create(Object.getPrototypeOf(e));
|
|
1186
|
+
for(const n in e){
|
|
1187
|
+
const i = e[n];
|
|
1188
|
+
r[n] = "function" == typeof i && filter(n) ? processFn(i, t) : i;
|
|
1189
|
+
}
|
|
1190
|
+
return r;
|
|
1191
|
+
};
|
|
1192
|
+
},
|
|
1193
|
+
817: (e, t, r)=>{
|
|
1194
|
+
"use strict";
|
|
1195
|
+
const n = r(17);
|
|
1196
|
+
const i = r(834);
|
|
1197
|
+
const s = r(324);
|
|
1198
|
+
const o = new WeakMap;
|
|
1199
|
+
const filepath = (e)=>o.get(e);
|
|
1200
|
+
const findNextCwd = (e)=>n.resolve(n.dirname(e), "..");
|
|
1201
|
+
const addFp = (e, t)=>{
|
|
1202
|
+
o.set(e, t);
|
|
1203
|
+
return e;
|
|
1204
|
+
};
|
|
1205
|
+
const pkgConf = (e, t)=>{
|
|
1206
|
+
if (!e) return Promise.reject(new TypeError("Expected a namespace"));
|
|
1207
|
+
t = t || {};
|
|
1208
|
+
return i("package.json", t.cwd ? {
|
|
1209
|
+
cwd: t.cwd
|
|
1210
|
+
} : {}).then((r)=>{
|
|
1211
|
+
if (!r) return addFp(Object.assign({}, t.defaults), r);
|
|
1212
|
+
return s(r).then((n)=>{
|
|
1213
|
+
if (t.skipOnFalse && false === n[e]) {
|
|
1214
|
+
const n = Object.assign({}, t, {
|
|
1215
|
+
cwd: findNextCwd(r)
|
|
1216
|
+
});
|
|
1217
|
+
return pkgConf(e, n);
|
|
1218
|
+
}
|
|
1219
|
+
return addFp(Object.assign({}, t.defaults, n[e]), r);
|
|
1220
|
+
});
|
|
1221
|
+
});
|
|
1222
|
+
};
|
|
1223
|
+
const sync = (e, t)=>{
|
|
1224
|
+
if (!e) throw new TypeError("Expected a namespace");
|
|
1225
|
+
t = t || {};
|
|
1226
|
+
const r = i.sync("package.json", t.cwd ? {
|
|
1227
|
+
cwd: t.cwd
|
|
1228
|
+
} : {});
|
|
1229
|
+
if (!r) return addFp(Object.assign({}, t.defaults), r);
|
|
1230
|
+
const n = s.sync(r);
|
|
1231
|
+
if (t.skipOnFalse && false === n[e]) {
|
|
1232
|
+
const n = Object.assign({}, t, {
|
|
1233
|
+
cwd: findNextCwd(r)
|
|
1234
|
+
});
|
|
1235
|
+
return sync(e, n);
|
|
1236
|
+
}
|
|
1237
|
+
return addFp(Object.assign({}, t.defaults, n[e]), r);
|
|
1238
|
+
};
|
|
1239
|
+
e.exports = pkgConf;
|
|
1240
|
+
e.exports.filepath = filepath;
|
|
1241
|
+
e.exports.sync = sync;
|
|
1242
|
+
},
|
|
1243
|
+
567: (e, t, r)=>{
|
|
1244
|
+
"use strict";
|
|
1245
|
+
const n = r(852);
|
|
1246
|
+
e.exports = Object.assign(new n, {
|
|
1247
|
+
Signale: n
|
|
1248
|
+
});
|
|
1249
|
+
},
|
|
1250
|
+
852: (e, t, r)=>{
|
|
1251
|
+
"use strict";
|
|
1252
|
+
const n = r(837);
|
|
1253
|
+
const i = r(17);
|
|
1254
|
+
const s = r(521);
|
|
1255
|
+
const o = r(234);
|
|
1256
|
+
const c = r(877);
|
|
1257
|
+
const a = r(817);
|
|
1258
|
+
const l = r(684);
|
|
1259
|
+
const f = r(616);
|
|
1260
|
+
const { green: u, grey: h, red: p, underline: d, yellow: g } = o;
|
|
1261
|
+
let m = false;
|
|
1262
|
+
const y = l.options.default;
|
|
1263
|
+
const b = l.name;
|
|
1264
|
+
class Signale {
|
|
1265
|
+
constructor(e = {}){
|
|
1266
|
+
this._interactive = e.interactive || false;
|
|
1267
|
+
this._config = Object.assign(this.packageConfiguration, e.config);
|
|
1268
|
+
this._customTypes = Object.assign({}, e.types);
|
|
1269
|
+
this._disabled = e.disabled || false;
|
|
1270
|
+
this._scopeName = e.scope || "";
|
|
1271
|
+
this._timers = e.timers || new Map;
|
|
1272
|
+
this._types = this._mergeTypes(f, this._customTypes);
|
|
1273
|
+
this._stream = e.stream || process.stdout;
|
|
1274
|
+
this._longestLabel = this._getLongestLabel();
|
|
1275
|
+
this._secrets = e.secrets || [];
|
|
1276
|
+
this._generalLogLevel = this._validateLogLevel(e.logLevel);
|
|
1277
|
+
Object.keys(this._types).forEach((e)=>{
|
|
1278
|
+
this[e] = this._logger.bind(this, e);
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
get _now() {
|
|
1282
|
+
return Date.now();
|
|
1283
|
+
}
|
|
1284
|
+
get scopeName() {
|
|
1285
|
+
return this._scopeName;
|
|
1286
|
+
}
|
|
1287
|
+
get currentOptions() {
|
|
1288
|
+
return Object.assign({}, {
|
|
1289
|
+
config: this._config,
|
|
1290
|
+
disabled: this._disabled,
|
|
1291
|
+
types: this._customTypes,
|
|
1292
|
+
interactive: this._interactive,
|
|
1293
|
+
timers: this._timers,
|
|
1294
|
+
stream: this._stream,
|
|
1295
|
+
secrets: this._secrets,
|
|
1296
|
+
logLevel: this._generalLogLevel
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
get date() {
|
|
1300
|
+
return (new Date).toLocaleDateString();
|
|
1301
|
+
}
|
|
1302
|
+
get timestamp() {
|
|
1303
|
+
return (new Date).toLocaleTimeString();
|
|
1304
|
+
}
|
|
1305
|
+
get filename() {
|
|
1306
|
+
const e = Error.prepareStackTrace;
|
|
1307
|
+
Error.prepareStackTrace = (e, t)=>t;
|
|
1308
|
+
const { stack: t } = new Error;
|
|
1309
|
+
Error.prepareStackTrace = e;
|
|
1310
|
+
const r = t.map((e)=>e.getFileName());
|
|
1311
|
+
const n = r.find((e)=>e !== r[0]);
|
|
1312
|
+
return n ? i.basename(n) : "anonymous";
|
|
1313
|
+
}
|
|
1314
|
+
get packageConfiguration() {
|
|
1315
|
+
return a.sync(b, {
|
|
1316
|
+
defaults: y
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
get _longestUnderlinedLabel() {
|
|
1320
|
+
return d(this._longestLabel);
|
|
1321
|
+
}
|
|
1322
|
+
get _logLevels() {
|
|
1323
|
+
return {
|
|
1324
|
+
info: 0,
|
|
1325
|
+
timer: 1,
|
|
1326
|
+
debug: 2,
|
|
1327
|
+
warn: 3,
|
|
1328
|
+
error: 4
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
set configuration(e) {
|
|
1332
|
+
this._config = Object.assign(this.packageConfiguration, e);
|
|
1333
|
+
}
|
|
1334
|
+
_arrayify(e) {
|
|
1335
|
+
return Array.isArray(e) ? e : [
|
|
1336
|
+
e
|
|
1337
|
+
];
|
|
1338
|
+
}
|
|
1339
|
+
_timeSpan(e) {
|
|
1340
|
+
return this._now - e;
|
|
1341
|
+
}
|
|
1342
|
+
_getLongestLabel() {
|
|
1343
|
+
const { _types: e } = this;
|
|
1344
|
+
const t = Object.keys(e).map((t)=>e[t].label);
|
|
1345
|
+
return t.reduce((e, t)=>e.length > t.length ? e : t);
|
|
1346
|
+
}
|
|
1347
|
+
_validateLogLevel(e) {
|
|
1348
|
+
return Object.keys(this._logLevels).includes(e) ? e : "info";
|
|
1349
|
+
}
|
|
1350
|
+
_mergeTypes(e, t) {
|
|
1351
|
+
const r = Object.assign({}, e);
|
|
1352
|
+
Object.keys(t).forEach((e)=>{
|
|
1353
|
+
r[e] = Object.assign({}, r[e], t[e]);
|
|
1354
|
+
});
|
|
1355
|
+
return r;
|
|
1356
|
+
}
|
|
1357
|
+
_filterSecrets(e) {
|
|
1358
|
+
const { _secrets: t } = this;
|
|
1359
|
+
if (0 === t.length) return e;
|
|
1360
|
+
let r = e;
|
|
1361
|
+
t.forEach((e)=>{
|
|
1362
|
+
r = r.replace(new RegExp(e, "g"), "[secure]");
|
|
1363
|
+
});
|
|
1364
|
+
return r;
|
|
1365
|
+
}
|
|
1366
|
+
_formatStream(e) {
|
|
1367
|
+
return this._arrayify(e);
|
|
1368
|
+
}
|
|
1369
|
+
_formatDate() {
|
|
1370
|
+
return `[${this.date}]`;
|
|
1371
|
+
}
|
|
1372
|
+
_formatFilename() {
|
|
1373
|
+
return `[${this.filename}]`;
|
|
1374
|
+
}
|
|
1375
|
+
_formatScopeName() {
|
|
1376
|
+
if (Array.isArray(this._scopeName)) {
|
|
1377
|
+
const e = this._scopeName.filter((e)=>0 !== e.length);
|
|
1378
|
+
return `${e.map((e)=>`[${e.trim()}]`).join(" ")}`;
|
|
1379
|
+
}
|
|
1380
|
+
return `[${this._scopeName}]`;
|
|
1381
|
+
}
|
|
1382
|
+
_formatTimestamp() {
|
|
1383
|
+
return `[${this.timestamp}]`;
|
|
1384
|
+
}
|
|
1385
|
+
_formatMessage(e) {
|
|
1386
|
+
return n.format(...this._arrayify(e));
|
|
1387
|
+
}
|
|
1388
|
+
_meta() {
|
|
1389
|
+
const e = [];
|
|
1390
|
+
if (this._config.displayDate) e.push(this._formatDate());
|
|
1391
|
+
if (this._config.displayTimestamp) e.push(this._formatTimestamp());
|
|
1392
|
+
if (this._config.displayFilename) e.push(this._formatFilename());
|
|
1393
|
+
if (0 !== this._scopeName.length && this._config.displayScope) e.push(this._formatScopeName());
|
|
1394
|
+
if (0 !== e.length) {
|
|
1395
|
+
e.push(`${c.pointerSmall}`);
|
|
1396
|
+
return e.map((e)=>h(e));
|
|
1397
|
+
}
|
|
1398
|
+
return e;
|
|
1399
|
+
}
|
|
1400
|
+
_hasAdditional({ suffix: e, prefix: t }, r) {
|
|
1401
|
+
return e || t ? "" : this._formatMessage(r);
|
|
1402
|
+
}
|
|
1403
|
+
_buildSignale(e, ...t) {
|
|
1404
|
+
let [r, n] = [
|
|
1405
|
+
{},
|
|
1406
|
+
{}
|
|
1407
|
+
];
|
|
1408
|
+
if (1 === t.length && "object" == typeof t[0] && null !== t[0]) if (t[0] instanceof Error) [r] = t;
|
|
1409
|
+
else {
|
|
1410
|
+
const [{ prefix: e, message: i, suffix: s }] = t;
|
|
1411
|
+
n = Object.assign({}, {
|
|
1412
|
+
suffix: s,
|
|
1413
|
+
prefix: e
|
|
1414
|
+
});
|
|
1415
|
+
r = i ? this._formatMessage(i) : this._hasAdditional(n, t);
|
|
1416
|
+
}
|
|
1417
|
+
else r = this._formatMessage(t);
|
|
1418
|
+
const i = this._meta();
|
|
1419
|
+
if (n.prefix) if (this._config.underlinePrefix) i.push(d(n.prefix));
|
|
1420
|
+
else i.push(n.prefix);
|
|
1421
|
+
if (this._config.displayBadge && e.badge) i.push(o[e.color](this._padEnd(e.badge, e.badge.length + 1)));
|
|
1422
|
+
if (this._config.displayLabel && e.label) {
|
|
1423
|
+
const t = this._config.uppercaseLabel ? e.label.toUpperCase() : e.label;
|
|
1424
|
+
if (this._config.underlineLabel) i.push(o[e.color](this._padEnd(d(t), this._longestUnderlinedLabel.length + 1)));
|
|
1425
|
+
else i.push(o[e.color](this._padEnd(t, this._longestLabel.length + 1)));
|
|
1426
|
+
}
|
|
1427
|
+
if (r instanceof Error && r.stack) {
|
|
1428
|
+
const [e, ...t] = r.stack.split("\n");
|
|
1429
|
+
if (this._config.underlineMessage) i.push(d(e));
|
|
1430
|
+
else i.push(e);
|
|
1431
|
+
i.push(h(t.map((e)=>e.replace(/^/, "\n")).join("")));
|
|
1432
|
+
return i.join(" ");
|
|
1433
|
+
}
|
|
1434
|
+
if (this._config.underlineMessage) i.push(d(r));
|
|
1435
|
+
else i.push(r);
|
|
1436
|
+
if (n.suffix) if (this._config.underlineSuffix) i.push(d(n.suffix));
|
|
1437
|
+
else i.push(n.suffix);
|
|
1438
|
+
return i.join(" ");
|
|
1439
|
+
}
|
|
1440
|
+
_write(e, t) {
|
|
1441
|
+
if (this._interactive && e.isTTY && m) {
|
|
1442
|
+
s.moveCursor(e, 0, -1);
|
|
1443
|
+
s.clearLine(e);
|
|
1444
|
+
s.cursorTo(e, 0);
|
|
1445
|
+
}
|
|
1446
|
+
e.write(t + "\n");
|
|
1447
|
+
m = this._interactive;
|
|
1448
|
+
}
|
|
1449
|
+
_log(e, t = this._stream, r) {
|
|
1450
|
+
if (this.isEnabled() && this._logLevels[r] >= this._logLevels[this._generalLogLevel]) this._formatStream(t).forEach((t)=>{
|
|
1451
|
+
this._write(t, e);
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
_logger(e, ...t) {
|
|
1455
|
+
const { stream: r, logLevel: n } = this._types[e];
|
|
1456
|
+
const i = this._buildSignale(this._types[e], ...t);
|
|
1457
|
+
this._log(this._filterSecrets(i), r, this._validateLogLevel(n));
|
|
1458
|
+
}
|
|
1459
|
+
_padEnd(e, t) {
|
|
1460
|
+
e = String(e);
|
|
1461
|
+
t = parseInt(t, 10) || 0;
|
|
1462
|
+
if (e.length >= t) return e;
|
|
1463
|
+
if (String.prototype.padEnd) return e.padEnd(t);
|
|
1464
|
+
t -= e.length;
|
|
1465
|
+
return e + " ".repeat(t);
|
|
1466
|
+
}
|
|
1467
|
+
addSecrets(e) {
|
|
1468
|
+
if (!Array.isArray(e)) throw new TypeError("Argument must be an array.");
|
|
1469
|
+
this._secrets.push(...e);
|
|
1470
|
+
}
|
|
1471
|
+
clearSecrets() {
|
|
1472
|
+
this._secrets = [];
|
|
1473
|
+
}
|
|
1474
|
+
config(e) {
|
|
1475
|
+
this.configuration = e;
|
|
1476
|
+
}
|
|
1477
|
+
disable() {
|
|
1478
|
+
this._disabled = true;
|
|
1479
|
+
}
|
|
1480
|
+
enable() {
|
|
1481
|
+
this._disabled = false;
|
|
1482
|
+
}
|
|
1483
|
+
isEnabled() {
|
|
1484
|
+
return !this._disabled;
|
|
1485
|
+
}
|
|
1486
|
+
scope(...e) {
|
|
1487
|
+
if (0 === e.length) throw new Error("No scope name was defined.");
|
|
1488
|
+
return new Signale(Object.assign(this.currentOptions, {
|
|
1489
|
+
scope: e
|
|
1490
|
+
}));
|
|
1491
|
+
}
|
|
1492
|
+
unscope() {
|
|
1493
|
+
this._scopeName = "";
|
|
1494
|
+
}
|
|
1495
|
+
time(e) {
|
|
1496
|
+
if (!e) e = `timer_${this._timers.size}`;
|
|
1497
|
+
this._timers.set(e, this._now);
|
|
1498
|
+
const t = this._meta();
|
|
1499
|
+
t.push(u(this._padEnd(this._types.start.badge, 2)));
|
|
1500
|
+
if (this._config.underlineLabel) t.push(u(this._padEnd(d(e), this._longestUnderlinedLabel.length + 1)));
|
|
1501
|
+
else t.push(u(this._padEnd(e, this._longestLabel.length + 1)));
|
|
1502
|
+
t.push("Initialized timer...");
|
|
1503
|
+
this._log(t.join(" "), this._stream, "timer");
|
|
1504
|
+
return e;
|
|
1505
|
+
}
|
|
1506
|
+
timeEnd(e) {
|
|
1507
|
+
if (!e && this._timers.size) {
|
|
1508
|
+
const is = (e)=>e.includes("timer_");
|
|
1509
|
+
e = [
|
|
1510
|
+
...this._timers.keys()
|
|
1511
|
+
].reduceRight((e, t)=>is(e) ? e : is(t) ? t : null);
|
|
1512
|
+
}
|
|
1513
|
+
if (this._timers.has(e)) {
|
|
1514
|
+
const t = this._timeSpan(this._timers.get(e));
|
|
1515
|
+
this._timers.delete(e);
|
|
1516
|
+
const r = this._meta();
|
|
1517
|
+
r.push(p(this._padEnd(this._types.pause.badge, 2)));
|
|
1518
|
+
if (this._config.underlineLabel) r.push(p(this._padEnd(d(e), this._longestUnderlinedLabel.length + 1)));
|
|
1519
|
+
else r.push(p(this._padEnd(e, this._longestLabel.length + 1)));
|
|
1520
|
+
r.push("Timer run for:");
|
|
1521
|
+
r.push(g(t < 1e3 ? t + "ms" : (t / 1e3).toFixed(2) + "s"));
|
|
1522
|
+
this._log(r.join(" "), this._stream, "timer");
|
|
1523
|
+
return {
|
|
1524
|
+
label: e,
|
|
1525
|
+
span: t
|
|
1526
|
+
};
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
e.exports = Signale;
|
|
1531
|
+
},
|
|
1532
|
+
616: (e, t, r)=>{
|
|
1533
|
+
"use strict";
|
|
1534
|
+
const n = r(877);
|
|
1535
|
+
e.exports = {
|
|
1536
|
+
error: {
|
|
1537
|
+
badge: n.cross,
|
|
1538
|
+
color: "red",
|
|
1539
|
+
label: "error",
|
|
1540
|
+
logLevel: "error"
|
|
1541
|
+
},
|
|
1542
|
+
fatal: {
|
|
1543
|
+
badge: n.cross,
|
|
1544
|
+
color: "red",
|
|
1545
|
+
label: "fatal",
|
|
1546
|
+
logLevel: "error"
|
|
1547
|
+
},
|
|
1548
|
+
fav: {
|
|
1549
|
+
badge: n("❤"),
|
|
1550
|
+
color: "magenta",
|
|
1551
|
+
label: "favorite",
|
|
1552
|
+
logLevel: "info"
|
|
1553
|
+
},
|
|
1554
|
+
info: {
|
|
1555
|
+
badge: n.info,
|
|
1556
|
+
color: "blue",
|
|
1557
|
+
label: "info",
|
|
1558
|
+
logLevel: "info"
|
|
1559
|
+
},
|
|
1560
|
+
star: {
|
|
1561
|
+
badge: n.star,
|
|
1562
|
+
color: "yellow",
|
|
1563
|
+
label: "star",
|
|
1564
|
+
logLevel: "info"
|
|
1565
|
+
},
|
|
1566
|
+
success: {
|
|
1567
|
+
badge: n.tick,
|
|
1568
|
+
color: "green",
|
|
1569
|
+
label: "success",
|
|
1570
|
+
logLevel: "info"
|
|
1571
|
+
},
|
|
1572
|
+
wait: {
|
|
1573
|
+
badge: n.ellipsis,
|
|
1574
|
+
color: "blue",
|
|
1575
|
+
label: "waiting",
|
|
1576
|
+
logLevel: "info"
|
|
1577
|
+
},
|
|
1578
|
+
warn: {
|
|
1579
|
+
badge: n.warning,
|
|
1580
|
+
color: "yellow",
|
|
1581
|
+
label: "warning",
|
|
1582
|
+
logLevel: "warn"
|
|
1583
|
+
},
|
|
1584
|
+
complete: {
|
|
1585
|
+
badge: n.checkboxOn,
|
|
1586
|
+
color: "cyan",
|
|
1587
|
+
label: "complete",
|
|
1588
|
+
logLevel: "info"
|
|
1589
|
+
},
|
|
1590
|
+
pending: {
|
|
1591
|
+
badge: n.checkboxOff,
|
|
1592
|
+
color: "magenta",
|
|
1593
|
+
label: "pending",
|
|
1594
|
+
logLevel: "info"
|
|
1595
|
+
},
|
|
1596
|
+
note: {
|
|
1597
|
+
badge: n.bullet,
|
|
1598
|
+
color: "blue",
|
|
1599
|
+
label: "note",
|
|
1600
|
+
logLevel: "info"
|
|
1601
|
+
},
|
|
1602
|
+
start: {
|
|
1603
|
+
badge: n.play,
|
|
1604
|
+
color: "green",
|
|
1605
|
+
label: "start",
|
|
1606
|
+
logLevel: "info"
|
|
1607
|
+
},
|
|
1608
|
+
pause: {
|
|
1609
|
+
badge: n.squareSmallFilled,
|
|
1610
|
+
color: "yellow",
|
|
1611
|
+
label: "pause",
|
|
1612
|
+
logLevel: "info"
|
|
1613
|
+
},
|
|
1614
|
+
debug: {
|
|
1615
|
+
badge: n("⬤"),
|
|
1616
|
+
color: "red",
|
|
1617
|
+
label: "debug",
|
|
1618
|
+
logLevel: "debug"
|
|
1619
|
+
},
|
|
1620
|
+
await: {
|
|
1621
|
+
badge: n.ellipsis,
|
|
1622
|
+
color: "blue",
|
|
1623
|
+
label: "awaiting",
|
|
1624
|
+
logLevel: "info"
|
|
1625
|
+
},
|
|
1626
|
+
watch: {
|
|
1627
|
+
badge: n.ellipsis,
|
|
1628
|
+
color: "yellow",
|
|
1629
|
+
label: "watching",
|
|
1630
|
+
logLevel: "info"
|
|
1631
|
+
},
|
|
1632
|
+
log: {
|
|
1633
|
+
badge: "",
|
|
1634
|
+
color: "",
|
|
1635
|
+
label: "",
|
|
1636
|
+
logLevel: "info"
|
|
1637
|
+
}
|
|
1638
|
+
};
|
|
1639
|
+
},
|
|
1640
|
+
308: (e)=>{
|
|
1641
|
+
"use strict";
|
|
1642
|
+
e.exports = (e)=>{
|
|
1643
|
+
if ("string" != typeof e) throw new TypeError("Expected a string, got " + typeof e);
|
|
1644
|
+
if (65279 === e.charCodeAt(0)) return e.slice(1);
|
|
1645
|
+
return e;
|
|
1646
|
+
};
|
|
1647
|
+
},
|
|
1648
|
+
234: (e)=>{
|
|
1649
|
+
"use strict";
|
|
1650
|
+
e.exports = require("../chalk");
|
|
1651
|
+
},
|
|
1652
|
+
684: (e)=>{
|
|
1653
|
+
"use strict";
|
|
1654
|
+
e.exports = require("./package.json");
|
|
1655
|
+
},
|
|
1656
|
+
491: (e)=>{
|
|
1657
|
+
"use strict";
|
|
1658
|
+
e.exports = require("assert");
|
|
1659
|
+
},
|
|
1660
|
+
57: (e)=>{
|
|
1661
|
+
"use strict";
|
|
1662
|
+
e.exports = require("constants");
|
|
1663
|
+
},
|
|
1664
|
+
147: (e)=>{
|
|
1665
|
+
"use strict";
|
|
1666
|
+
e.exports = require("fs");
|
|
1667
|
+
},
|
|
1668
|
+
17: (e)=>{
|
|
1669
|
+
"use strict";
|
|
1670
|
+
e.exports = require("path");
|
|
1671
|
+
},
|
|
1672
|
+
521: (e)=>{
|
|
1673
|
+
"use strict";
|
|
1674
|
+
e.exports = require("readline");
|
|
1675
|
+
},
|
|
1676
|
+
781: (e)=>{
|
|
1677
|
+
"use strict";
|
|
1678
|
+
e.exports = require("stream");
|
|
1679
|
+
},
|
|
1680
|
+
837: (e)=>{
|
|
1681
|
+
"use strict";
|
|
1682
|
+
e.exports = require("util");
|
|
1683
|
+
}
|
|
1684
|
+
};
|
|
1685
|
+
var t = {};
|
|
1686
|
+
function __nccwpck_require__(r) {
|
|
1687
|
+
var n = t[r];
|
|
1688
|
+
if (void 0 !== n) return n.exports;
|
|
1689
|
+
var i = t[r] = {
|
|
1690
|
+
exports: {}
|
|
1691
|
+
};
|
|
1692
|
+
var s = true;
|
|
1693
|
+
try {
|
|
1694
|
+
e[r](i, i.exports, __nccwpck_require__);
|
|
1695
|
+
s = false;
|
|
1696
|
+
} finally{
|
|
1697
|
+
if (s) delete t[r];
|
|
1698
|
+
}
|
|
1699
|
+
return i.exports;
|
|
1700
|
+
}
|
|
1701
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
1702
|
+
var r = __nccwpck_require__(567);
|
|
1703
|
+
module.exports = r;
|
|
1704
|
+
})();
|