@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,2222 @@
|
|
|
1
|
+
(()=>{
|
|
2
|
+
var e = {
|
|
3
|
+
571: (e, t, r)=>{
|
|
4
|
+
"use strict";
|
|
5
|
+
const n = r(127);
|
|
6
|
+
const i = r(17);
|
|
7
|
+
const o = r(971).mkdirsSync;
|
|
8
|
+
const c = r(309).utimesMillisSync;
|
|
9
|
+
const s = r(883);
|
|
10
|
+
function copySync(e, t, r) {
|
|
11
|
+
if ("function" == typeof r) r = {
|
|
12
|
+
filter: r
|
|
13
|
+
};
|
|
14
|
+
r = r || {};
|
|
15
|
+
r.clobber = "clobber" in r ? !!r.clobber : true;
|
|
16
|
+
r.overwrite = "overwrite" in r ? !!r.overwrite : r.clobber;
|
|
17
|
+
if (r.preserveTimestamps && "ia32" === process.arch) console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`);
|
|
18
|
+
const { srcStat: n, destStat: i } = s.checkPathsSync(e, t, "copy", r);
|
|
19
|
+
s.checkParentPathsSync(e, n, t, "copy");
|
|
20
|
+
return handleFilterAndCopy(i, e, t, r);
|
|
21
|
+
}
|
|
22
|
+
function handleFilterAndCopy(e, t, r, c) {
|
|
23
|
+
if (c.filter && !c.filter(t, r)) return;
|
|
24
|
+
const s = i.dirname(r);
|
|
25
|
+
if (!n.existsSync(s)) o(s);
|
|
26
|
+
return getStats(e, t, r, c);
|
|
27
|
+
}
|
|
28
|
+
function startCopy(e, t, r, n) {
|
|
29
|
+
if (n.filter && !n.filter(t, r)) return;
|
|
30
|
+
return getStats(e, t, r, n);
|
|
31
|
+
}
|
|
32
|
+
function getStats(e, t, r, i) {
|
|
33
|
+
const o = i.dereference ? n.statSync : n.lstatSync;
|
|
34
|
+
const c = o(t);
|
|
35
|
+
if (c.isDirectory()) return onDir(c, e, t, r, i);
|
|
36
|
+
if (c.isFile() || c.isCharacterDevice() || c.isBlockDevice()) return onFile(c, e, t, r, i);
|
|
37
|
+
if (c.isSymbolicLink()) return onLink(e, t, r, i);
|
|
38
|
+
if (c.isSocket()) throw new Error(`Cannot copy a socket file: ${t}`);
|
|
39
|
+
if (c.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${t}`);
|
|
40
|
+
throw new Error(`Unknown file: ${t}`);
|
|
41
|
+
}
|
|
42
|
+
function onFile(e, t, r, n, i) {
|
|
43
|
+
if (!t) return copyFile(e, r, n, i);
|
|
44
|
+
return mayCopyFile(e, r, n, i);
|
|
45
|
+
}
|
|
46
|
+
function mayCopyFile(e, t, r, i) {
|
|
47
|
+
if (i.overwrite) {
|
|
48
|
+
n.unlinkSync(r);
|
|
49
|
+
return copyFile(e, t, r, i);
|
|
50
|
+
}
|
|
51
|
+
if (i.errorOnExist) throw new Error(`'${r}' already exists`);
|
|
52
|
+
}
|
|
53
|
+
function copyFile(e, t, r, i) {
|
|
54
|
+
n.copyFileSync(t, r);
|
|
55
|
+
if (i.preserveTimestamps) handleTimestamps(e.mode, t, r);
|
|
56
|
+
return setDestMode(r, e.mode);
|
|
57
|
+
}
|
|
58
|
+
function handleTimestamps(e, t, r) {
|
|
59
|
+
if (fileIsNotWritable(e)) makeFileWritable(r, e);
|
|
60
|
+
return setDestTimestamps(t, r);
|
|
61
|
+
}
|
|
62
|
+
function fileIsNotWritable(e) {
|
|
63
|
+
return (128 & e) === 0;
|
|
64
|
+
}
|
|
65
|
+
function makeFileWritable(e, t) {
|
|
66
|
+
return setDestMode(e, 128 | t);
|
|
67
|
+
}
|
|
68
|
+
function setDestMode(e, t) {
|
|
69
|
+
return n.chmodSync(e, t);
|
|
70
|
+
}
|
|
71
|
+
function setDestTimestamps(e, t) {
|
|
72
|
+
const r = n.statSync(e);
|
|
73
|
+
return c(t, r.atime, r.mtime);
|
|
74
|
+
}
|
|
75
|
+
function onDir(e, t, r, n, i) {
|
|
76
|
+
if (!t) return mkDirAndCopy(e.mode, r, n, i);
|
|
77
|
+
return copyDir(r, n, i);
|
|
78
|
+
}
|
|
79
|
+
function mkDirAndCopy(e, t, r, i) {
|
|
80
|
+
n.mkdirSync(r);
|
|
81
|
+
copyDir(t, r, i);
|
|
82
|
+
return setDestMode(r, e);
|
|
83
|
+
}
|
|
84
|
+
function copyDir(e, t, r) {
|
|
85
|
+
n.readdirSync(e).forEach((n)=>copyDirItem(n, e, t, r));
|
|
86
|
+
}
|
|
87
|
+
function copyDirItem(e, t, r, n) {
|
|
88
|
+
const o = i.join(t, e);
|
|
89
|
+
const c = i.join(r, e);
|
|
90
|
+
const { destStat: a } = s.checkPathsSync(o, c, "copy", n);
|
|
91
|
+
return startCopy(a, o, c, n);
|
|
92
|
+
}
|
|
93
|
+
function onLink(e, t, r, o) {
|
|
94
|
+
let c = n.readlinkSync(t);
|
|
95
|
+
if (o.dereference) c = i.resolve(process.cwd(), c);
|
|
96
|
+
if (!e) return n.symlinkSync(c, r);
|
|
97
|
+
{
|
|
98
|
+
let e;
|
|
99
|
+
try {
|
|
100
|
+
e = n.readlinkSync(r);
|
|
101
|
+
} catch (e) {
|
|
102
|
+
if ("EINVAL" === e.code || "UNKNOWN" === e.code) return n.symlinkSync(c, r);
|
|
103
|
+
throw e;
|
|
104
|
+
}
|
|
105
|
+
if (o.dereference) e = i.resolve(process.cwd(), e);
|
|
106
|
+
if (s.isSrcSubdir(c, e)) throw new Error(`Cannot copy '${c}' to a subdirectory of itself, '${e}'.`);
|
|
107
|
+
if (n.statSync(r).isDirectory() && s.isSrcSubdir(e, c)) throw new Error(`Cannot overwrite '${e}' with '${c}'.`);
|
|
108
|
+
return copyLink(c, r);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function copyLink(e, t) {
|
|
112
|
+
n.unlinkSync(t);
|
|
113
|
+
return n.symlinkSync(e, t);
|
|
114
|
+
}
|
|
115
|
+
e.exports = copySync;
|
|
116
|
+
},
|
|
117
|
+
987: (e, t, r)=>{
|
|
118
|
+
"use strict";
|
|
119
|
+
const n = r(127);
|
|
120
|
+
const i = r(17);
|
|
121
|
+
const o = r(971).mkdirs;
|
|
122
|
+
const c = r(725).pathExists;
|
|
123
|
+
const s = r(309).utimesMillis;
|
|
124
|
+
const a = r(883);
|
|
125
|
+
function copy(e, t, r, n) {
|
|
126
|
+
if ("function" != typeof r || n) {
|
|
127
|
+
if ("function" == typeof r) r = {
|
|
128
|
+
filter: r
|
|
129
|
+
};
|
|
130
|
+
} else {
|
|
131
|
+
n = r;
|
|
132
|
+
r = {};
|
|
133
|
+
}
|
|
134
|
+
n = n || function() {};
|
|
135
|
+
r = r || {};
|
|
136
|
+
r.clobber = "clobber" in r ? !!r.clobber : true;
|
|
137
|
+
r.overwrite = "overwrite" in r ? !!r.overwrite : r.clobber;
|
|
138
|
+
if (r.preserveTimestamps && "ia32" === process.arch) console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`);
|
|
139
|
+
a.checkPaths(e, t, "copy", r, (i, o)=>{
|
|
140
|
+
if (i) return n(i);
|
|
141
|
+
const { srcStat: c, destStat: s } = o;
|
|
142
|
+
a.checkParentPaths(e, c, t, "copy", (i)=>{
|
|
143
|
+
if (i) return n(i);
|
|
144
|
+
if (r.filter) return handleFilter(checkParentDir, s, e, t, r, n);
|
|
145
|
+
return checkParentDir(s, e, t, r, n);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function checkParentDir(e, t, r, n, s) {
|
|
150
|
+
const a = i.dirname(r);
|
|
151
|
+
c(a, (i, c)=>{
|
|
152
|
+
if (i) return s(i);
|
|
153
|
+
if (c) return getStats(e, t, r, n, s);
|
|
154
|
+
o(a, (i)=>{
|
|
155
|
+
if (i) return s(i);
|
|
156
|
+
return getStats(e, t, r, n, s);
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function handleFilter(e, t, r, n, i, o) {
|
|
161
|
+
Promise.resolve(i.filter(r, n)).then((c)=>{
|
|
162
|
+
if (c) return e(t, r, n, i, o);
|
|
163
|
+
return o();
|
|
164
|
+
}, (e)=>o(e));
|
|
165
|
+
}
|
|
166
|
+
function startCopy(e, t, r, n, i) {
|
|
167
|
+
if (n.filter) return handleFilter(getStats, e, t, r, n, i);
|
|
168
|
+
return getStats(e, t, r, n, i);
|
|
169
|
+
}
|
|
170
|
+
function getStats(e, t, r, i, o) {
|
|
171
|
+
const c = i.dereference ? n.stat : n.lstat;
|
|
172
|
+
c(t, (n, c)=>{
|
|
173
|
+
if (n) return o(n);
|
|
174
|
+
if (c.isDirectory()) return onDir(c, e, t, r, i, o);
|
|
175
|
+
if (c.isFile() || c.isCharacterDevice() || c.isBlockDevice()) return onFile(c, e, t, r, i, o);
|
|
176
|
+
if (c.isSymbolicLink()) return onLink(e, t, r, i, o);
|
|
177
|
+
if (c.isSocket()) return o(new Error(`Cannot copy a socket file: ${t}`));
|
|
178
|
+
if (c.isFIFO()) return o(new Error(`Cannot copy a FIFO pipe: ${t}`));
|
|
179
|
+
return o(new Error(`Unknown file: ${t}`));
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function onFile(e, t, r, n, i, o) {
|
|
183
|
+
if (!t) return copyFile(e, r, n, i, o);
|
|
184
|
+
return mayCopyFile(e, r, n, i, o);
|
|
185
|
+
}
|
|
186
|
+
function mayCopyFile(e, t, r, i, o) {
|
|
187
|
+
if (i.overwrite) n.unlink(r, (n)=>{
|
|
188
|
+
if (n) return o(n);
|
|
189
|
+
return copyFile(e, t, r, i, o);
|
|
190
|
+
});
|
|
191
|
+
else if (i.errorOnExist) return o(new Error(`'${r}' already exists`));
|
|
192
|
+
else return o();
|
|
193
|
+
}
|
|
194
|
+
function copyFile(e, t, r, i, o) {
|
|
195
|
+
n.copyFile(t, r, (n)=>{
|
|
196
|
+
if (n) return o(n);
|
|
197
|
+
if (i.preserveTimestamps) return handleTimestampsAndMode(e.mode, t, r, o);
|
|
198
|
+
return setDestMode(r, e.mode, o);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function handleTimestampsAndMode(e, t, r, n) {
|
|
202
|
+
if (fileIsNotWritable(e)) return makeFileWritable(r, e, (i)=>{
|
|
203
|
+
if (i) return n(i);
|
|
204
|
+
return setDestTimestampsAndMode(e, t, r, n);
|
|
205
|
+
});
|
|
206
|
+
return setDestTimestampsAndMode(e, t, r, n);
|
|
207
|
+
}
|
|
208
|
+
function fileIsNotWritable(e) {
|
|
209
|
+
return (128 & e) === 0;
|
|
210
|
+
}
|
|
211
|
+
function makeFileWritable(e, t, r) {
|
|
212
|
+
return setDestMode(e, 128 | t, r);
|
|
213
|
+
}
|
|
214
|
+
function setDestTimestampsAndMode(e, t, r, n) {
|
|
215
|
+
setDestTimestamps(t, r, (t)=>{
|
|
216
|
+
if (t) return n(t);
|
|
217
|
+
return setDestMode(r, e, n);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function setDestMode(e, t, r) {
|
|
221
|
+
return n.chmod(e, t, r);
|
|
222
|
+
}
|
|
223
|
+
function setDestTimestamps(e, t, r) {
|
|
224
|
+
n.stat(e, (e, n)=>{
|
|
225
|
+
if (e) return r(e);
|
|
226
|
+
return s(t, n.atime, n.mtime, r);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function onDir(e, t, r, n, i, o) {
|
|
230
|
+
if (!t) return mkDirAndCopy(e.mode, r, n, i, o);
|
|
231
|
+
return copyDir(r, n, i, o);
|
|
232
|
+
}
|
|
233
|
+
function mkDirAndCopy(e, t, r, i, o) {
|
|
234
|
+
n.mkdir(r, (n)=>{
|
|
235
|
+
if (n) return o(n);
|
|
236
|
+
copyDir(t, r, i, (t)=>{
|
|
237
|
+
if (t) return o(t);
|
|
238
|
+
return setDestMode(r, e, o);
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
function copyDir(e, t, r, i) {
|
|
243
|
+
n.readdir(e, (n, o)=>{
|
|
244
|
+
if (n) return i(n);
|
|
245
|
+
return copyDirItems(o, e, t, r, i);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
function copyDirItems(e, t, r, n, i) {
|
|
249
|
+
const o = e.pop();
|
|
250
|
+
if (!o) return i();
|
|
251
|
+
return copyDirItem(e, o, t, r, n, i);
|
|
252
|
+
}
|
|
253
|
+
function copyDirItem(e, t, r, n, o, c) {
|
|
254
|
+
const s = i.join(r, t);
|
|
255
|
+
const u = i.join(n, t);
|
|
256
|
+
a.checkPaths(s, u, "copy", o, (t, i)=>{
|
|
257
|
+
if (t) return c(t);
|
|
258
|
+
const { destStat: a } = i;
|
|
259
|
+
startCopy(a, s, u, o, (t)=>{
|
|
260
|
+
if (t) return c(t);
|
|
261
|
+
return copyDirItems(e, r, n, o, c);
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
function onLink(e, t, r, o, c) {
|
|
266
|
+
n.readlink(t, (t, s)=>{
|
|
267
|
+
if (t) return c(t);
|
|
268
|
+
if (o.dereference) s = i.resolve(process.cwd(), s);
|
|
269
|
+
if (!e) return n.symlink(s, r, c);
|
|
270
|
+
n.readlink(r, (t, u)=>{
|
|
271
|
+
if (t) {
|
|
272
|
+
if ("EINVAL" === t.code || "UNKNOWN" === t.code) return n.symlink(s, r, c);
|
|
273
|
+
return c(t);
|
|
274
|
+
}
|
|
275
|
+
if (o.dereference) u = i.resolve(process.cwd(), u);
|
|
276
|
+
if (a.isSrcSubdir(s, u)) return c(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${u}'.`));
|
|
277
|
+
if (e.isDirectory() && a.isSrcSubdir(u, s)) return c(new Error(`Cannot overwrite '${u}' with '${s}'.`));
|
|
278
|
+
return copyLink(s, r, c);
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
function copyLink(e, t, r) {
|
|
283
|
+
n.unlink(t, (i)=>{
|
|
284
|
+
if (i) return r(i);
|
|
285
|
+
return n.symlink(e, t, r);
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
e.exports = copy;
|
|
289
|
+
},
|
|
290
|
+
2: (e, t, r)=>{
|
|
291
|
+
"use strict";
|
|
292
|
+
const n = r(5).fromCallback;
|
|
293
|
+
e.exports = {
|
|
294
|
+
copy: n(r(987)),
|
|
295
|
+
copySync: r(571)
|
|
296
|
+
};
|
|
297
|
+
},
|
|
298
|
+
708: (e, t, r)=>{
|
|
299
|
+
"use strict";
|
|
300
|
+
const n = r(5).fromPromise;
|
|
301
|
+
const i = r(812);
|
|
302
|
+
const o = r(17);
|
|
303
|
+
const c = r(971);
|
|
304
|
+
const s = r(95);
|
|
305
|
+
const a = n(async function(e) {
|
|
306
|
+
let t;
|
|
307
|
+
try {
|
|
308
|
+
t = await i.readdir(e);
|
|
309
|
+
} catch {
|
|
310
|
+
return c.mkdirs(e);
|
|
311
|
+
}
|
|
312
|
+
return Promise.all(t.map((t)=>s.remove(o.join(e, t))));
|
|
313
|
+
});
|
|
314
|
+
function emptyDirSync(e) {
|
|
315
|
+
let t;
|
|
316
|
+
try {
|
|
317
|
+
t = i.readdirSync(e);
|
|
318
|
+
} catch {
|
|
319
|
+
return c.mkdirsSync(e);
|
|
320
|
+
}
|
|
321
|
+
t.forEach((t)=>{
|
|
322
|
+
t = o.join(e, t);
|
|
323
|
+
s.removeSync(t);
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
e.exports = {
|
|
327
|
+
emptyDirSync: emptyDirSync,
|
|
328
|
+
emptydirSync: emptyDirSync,
|
|
329
|
+
emptyDir: a,
|
|
330
|
+
emptydir: a
|
|
331
|
+
};
|
|
332
|
+
},
|
|
333
|
+
102: (e, t, r)=>{
|
|
334
|
+
"use strict";
|
|
335
|
+
const n = r(5).fromCallback;
|
|
336
|
+
const i = r(17);
|
|
337
|
+
const o = r(127);
|
|
338
|
+
const c = r(971);
|
|
339
|
+
function createFile(e, t) {
|
|
340
|
+
function makeFile() {
|
|
341
|
+
o.writeFile(e, "", (e)=>{
|
|
342
|
+
if (e) return t(e);
|
|
343
|
+
t();
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
o.stat(e, (r, n)=>{
|
|
347
|
+
if (!r && n.isFile()) return t();
|
|
348
|
+
const s = i.dirname(e);
|
|
349
|
+
o.stat(s, (e, r)=>{
|
|
350
|
+
if (e) {
|
|
351
|
+
if ("ENOENT" === e.code) return c.mkdirs(s, (e)=>{
|
|
352
|
+
if (e) return t(e);
|
|
353
|
+
makeFile();
|
|
354
|
+
});
|
|
355
|
+
return t(e);
|
|
356
|
+
}
|
|
357
|
+
if (r.isDirectory()) makeFile();
|
|
358
|
+
else o.readdir(s, (e)=>{
|
|
359
|
+
if (e) return t(e);
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function createFileSync(e) {
|
|
365
|
+
let t;
|
|
366
|
+
try {
|
|
367
|
+
t = o.statSync(e);
|
|
368
|
+
} catch {}
|
|
369
|
+
if (t && t.isFile()) return;
|
|
370
|
+
const r = i.dirname(e);
|
|
371
|
+
try {
|
|
372
|
+
if (!o.statSync(r).isDirectory()) o.readdirSync(r);
|
|
373
|
+
} catch (e) {
|
|
374
|
+
if (e && "ENOENT" === e.code) c.mkdirsSync(r);
|
|
375
|
+
else throw e;
|
|
376
|
+
}
|
|
377
|
+
o.writeFileSync(e, "");
|
|
378
|
+
}
|
|
379
|
+
e.exports = {
|
|
380
|
+
createFile: n(createFile),
|
|
381
|
+
createFileSync: createFileSync
|
|
382
|
+
};
|
|
383
|
+
},
|
|
384
|
+
726: (e, t, r)=>{
|
|
385
|
+
"use strict";
|
|
386
|
+
const { createFile: n, createFileSync: i } = r(102);
|
|
387
|
+
const { createLink: o, createLinkSync: c } = r(161);
|
|
388
|
+
const { createSymlink: s, createSymlinkSync: a } = r(294);
|
|
389
|
+
e.exports = {
|
|
390
|
+
createFile: n,
|
|
391
|
+
createFileSync: i,
|
|
392
|
+
ensureFile: n,
|
|
393
|
+
ensureFileSync: i,
|
|
394
|
+
createLink: o,
|
|
395
|
+
createLinkSync: c,
|
|
396
|
+
ensureLink: o,
|
|
397
|
+
ensureLinkSync: c,
|
|
398
|
+
createSymlink: s,
|
|
399
|
+
createSymlinkSync: a,
|
|
400
|
+
ensureSymlink: s,
|
|
401
|
+
ensureSymlinkSync: a
|
|
402
|
+
};
|
|
403
|
+
},
|
|
404
|
+
161: (e, t, r)=>{
|
|
405
|
+
"use strict";
|
|
406
|
+
const n = r(5).fromCallback;
|
|
407
|
+
const i = r(17);
|
|
408
|
+
const o = r(127);
|
|
409
|
+
const c = r(971);
|
|
410
|
+
const s = r(725).pathExists;
|
|
411
|
+
const { areIdentical: a } = r(883);
|
|
412
|
+
function createLink(e, t, r) {
|
|
413
|
+
function makeLink(e, t) {
|
|
414
|
+
o.link(e, t, (e)=>{
|
|
415
|
+
if (e) return r(e);
|
|
416
|
+
r(null);
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
o.lstat(t, (n, u)=>{
|
|
420
|
+
o.lstat(e, (n, o)=>{
|
|
421
|
+
if (n) {
|
|
422
|
+
n.message = n.message.replace("lstat", "ensureLink");
|
|
423
|
+
return r(n);
|
|
424
|
+
}
|
|
425
|
+
if (u && a(o, u)) return r(null);
|
|
426
|
+
const f = i.dirname(t);
|
|
427
|
+
s(f, (n, i)=>{
|
|
428
|
+
if (n) return r(n);
|
|
429
|
+
if (i) return makeLink(e, t);
|
|
430
|
+
c.mkdirs(f, (n)=>{
|
|
431
|
+
if (n) return r(n);
|
|
432
|
+
makeLink(e, t);
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
function createLinkSync(e, t) {
|
|
439
|
+
let r;
|
|
440
|
+
try {
|
|
441
|
+
r = o.lstatSync(t);
|
|
442
|
+
} catch {}
|
|
443
|
+
try {
|
|
444
|
+
const t = o.lstatSync(e);
|
|
445
|
+
if (r && a(t, r)) return;
|
|
446
|
+
} catch (e) {
|
|
447
|
+
e.message = e.message.replace("lstat", "ensureLink");
|
|
448
|
+
throw e;
|
|
449
|
+
}
|
|
450
|
+
const n = i.dirname(t);
|
|
451
|
+
const s = o.existsSync(n);
|
|
452
|
+
if (s) return o.linkSync(e, t);
|
|
453
|
+
c.mkdirsSync(n);
|
|
454
|
+
return o.linkSync(e, t);
|
|
455
|
+
}
|
|
456
|
+
e.exports = {
|
|
457
|
+
createLink: n(createLink),
|
|
458
|
+
createLinkSync: createLinkSync
|
|
459
|
+
};
|
|
460
|
+
},
|
|
461
|
+
332: (e, t, r)=>{
|
|
462
|
+
"use strict";
|
|
463
|
+
const n = r(17);
|
|
464
|
+
const i = r(127);
|
|
465
|
+
const o = r(725).pathExists;
|
|
466
|
+
function symlinkPaths(e, t, r) {
|
|
467
|
+
if (n.isAbsolute(e)) return i.lstat(e, (t)=>{
|
|
468
|
+
if (t) {
|
|
469
|
+
t.message = t.message.replace("lstat", "ensureSymlink");
|
|
470
|
+
return r(t);
|
|
471
|
+
}
|
|
472
|
+
return r(null, {
|
|
473
|
+
toCwd: e,
|
|
474
|
+
toDst: e
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
{
|
|
478
|
+
const c = n.dirname(t);
|
|
479
|
+
const s = n.join(c, e);
|
|
480
|
+
return o(s, (t, o)=>{
|
|
481
|
+
if (t) return r(t);
|
|
482
|
+
if (o) return r(null, {
|
|
483
|
+
toCwd: s,
|
|
484
|
+
toDst: e
|
|
485
|
+
});
|
|
486
|
+
return i.lstat(e, (t)=>{
|
|
487
|
+
if (t) {
|
|
488
|
+
t.message = t.message.replace("lstat", "ensureSymlink");
|
|
489
|
+
return r(t);
|
|
490
|
+
}
|
|
491
|
+
return r(null, {
|
|
492
|
+
toCwd: e,
|
|
493
|
+
toDst: n.relative(c, e)
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
function symlinkPathsSync(e, t) {
|
|
500
|
+
let r;
|
|
501
|
+
if (n.isAbsolute(e)) {
|
|
502
|
+
r = i.existsSync(e);
|
|
503
|
+
if (!r) throw new Error("absolute srcpath does not exist");
|
|
504
|
+
return {
|
|
505
|
+
toCwd: e,
|
|
506
|
+
toDst: e
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
{
|
|
510
|
+
const o = n.dirname(t);
|
|
511
|
+
const c = n.join(o, e);
|
|
512
|
+
r = i.existsSync(c);
|
|
513
|
+
if (r) return {
|
|
514
|
+
toCwd: c,
|
|
515
|
+
toDst: e
|
|
516
|
+
};
|
|
517
|
+
r = i.existsSync(e);
|
|
518
|
+
if (!r) throw new Error("relative srcpath does not exist");
|
|
519
|
+
return {
|
|
520
|
+
toCwd: e,
|
|
521
|
+
toDst: n.relative(o, e)
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
e.exports = {
|
|
526
|
+
symlinkPaths: symlinkPaths,
|
|
527
|
+
symlinkPathsSync: symlinkPathsSync
|
|
528
|
+
};
|
|
529
|
+
},
|
|
530
|
+
894: (e, t, r)=>{
|
|
531
|
+
"use strict";
|
|
532
|
+
const n = r(127);
|
|
533
|
+
function symlinkType(e, t, r) {
|
|
534
|
+
r = "function" == typeof t ? t : r;
|
|
535
|
+
t = "function" == typeof t ? false : t;
|
|
536
|
+
if (t) return r(null, t);
|
|
537
|
+
n.lstat(e, (e, n)=>{
|
|
538
|
+
if (e) return r(null, "file");
|
|
539
|
+
t = n && n.isDirectory() ? "dir" : "file";
|
|
540
|
+
r(null, t);
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
function symlinkTypeSync(e, t) {
|
|
544
|
+
let r;
|
|
545
|
+
if (t) return t;
|
|
546
|
+
try {
|
|
547
|
+
r = n.lstatSync(e);
|
|
548
|
+
} catch {
|
|
549
|
+
return "file";
|
|
550
|
+
}
|
|
551
|
+
return r && r.isDirectory() ? "dir" : "file";
|
|
552
|
+
}
|
|
553
|
+
e.exports = {
|
|
554
|
+
symlinkType: symlinkType,
|
|
555
|
+
symlinkTypeSync: symlinkTypeSync
|
|
556
|
+
};
|
|
557
|
+
},
|
|
558
|
+
294: (e, t, r)=>{
|
|
559
|
+
"use strict";
|
|
560
|
+
const n = r(5).fromCallback;
|
|
561
|
+
const i = r(17);
|
|
562
|
+
const o = r(812);
|
|
563
|
+
const c = r(971);
|
|
564
|
+
const s = c.mkdirs;
|
|
565
|
+
const a = c.mkdirsSync;
|
|
566
|
+
const u = r(332);
|
|
567
|
+
const f = u.symlinkPaths;
|
|
568
|
+
const l = u.symlinkPathsSync;
|
|
569
|
+
const y = r(894);
|
|
570
|
+
const d = y.symlinkType;
|
|
571
|
+
const m = y.symlinkTypeSync;
|
|
572
|
+
const p = r(725).pathExists;
|
|
573
|
+
const { areIdentical: h } = r(883);
|
|
574
|
+
function createSymlink(e, t, r, n) {
|
|
575
|
+
n = "function" == typeof r ? r : n;
|
|
576
|
+
r = "function" == typeof r ? false : r;
|
|
577
|
+
o.lstat(t, (i, c)=>{
|
|
578
|
+
if (!i && c.isSymbolicLink()) Promise.all([
|
|
579
|
+
o.stat(e),
|
|
580
|
+
o.stat(t)
|
|
581
|
+
]).then(([i, o])=>{
|
|
582
|
+
if (h(i, o)) return n(null);
|
|
583
|
+
_createSymlink(e, t, r, n);
|
|
584
|
+
});
|
|
585
|
+
else _createSymlink(e, t, r, n);
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
function _createSymlink(e, t, r, n) {
|
|
589
|
+
f(e, t, (c, a)=>{
|
|
590
|
+
if (c) return n(c);
|
|
591
|
+
e = a.toDst;
|
|
592
|
+
d(a.toCwd, r, (r, c)=>{
|
|
593
|
+
if (r) return n(r);
|
|
594
|
+
const a = i.dirname(t);
|
|
595
|
+
p(a, (r, i)=>{
|
|
596
|
+
if (r) return n(r);
|
|
597
|
+
if (i) return o.symlink(e, t, c, n);
|
|
598
|
+
s(a, (r)=>{
|
|
599
|
+
if (r) return n(r);
|
|
600
|
+
o.symlink(e, t, c, n);
|
|
601
|
+
});
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
function createSymlinkSync(e, t, r) {
|
|
607
|
+
let n;
|
|
608
|
+
try {
|
|
609
|
+
n = o.lstatSync(t);
|
|
610
|
+
} catch {}
|
|
611
|
+
if (n && n.isSymbolicLink()) {
|
|
612
|
+
const r = o.statSync(e);
|
|
613
|
+
const n = o.statSync(t);
|
|
614
|
+
if (h(r, n)) return;
|
|
615
|
+
}
|
|
616
|
+
const c = l(e, t);
|
|
617
|
+
e = c.toDst;
|
|
618
|
+
r = m(c.toCwd, r);
|
|
619
|
+
const s = i.dirname(t);
|
|
620
|
+
const u = o.existsSync(s);
|
|
621
|
+
if (u) return o.symlinkSync(e, t, r);
|
|
622
|
+
a(s);
|
|
623
|
+
return o.symlinkSync(e, t, r);
|
|
624
|
+
}
|
|
625
|
+
e.exports = {
|
|
626
|
+
createSymlink: n(createSymlink),
|
|
627
|
+
createSymlinkSync: createSymlinkSync
|
|
628
|
+
};
|
|
629
|
+
},
|
|
630
|
+
812: (e, t, r)=>{
|
|
631
|
+
"use strict";
|
|
632
|
+
const n = r(5).fromCallback;
|
|
633
|
+
const i = r(127);
|
|
634
|
+
const o = [
|
|
635
|
+
"access",
|
|
636
|
+
"appendFile",
|
|
637
|
+
"chmod",
|
|
638
|
+
"chown",
|
|
639
|
+
"close",
|
|
640
|
+
"copyFile",
|
|
641
|
+
"fchmod",
|
|
642
|
+
"fchown",
|
|
643
|
+
"fdatasync",
|
|
644
|
+
"fstat",
|
|
645
|
+
"fsync",
|
|
646
|
+
"ftruncate",
|
|
647
|
+
"futimes",
|
|
648
|
+
"lchmod",
|
|
649
|
+
"lchown",
|
|
650
|
+
"link",
|
|
651
|
+
"lstat",
|
|
652
|
+
"mkdir",
|
|
653
|
+
"mkdtemp",
|
|
654
|
+
"open",
|
|
655
|
+
"opendir",
|
|
656
|
+
"readdir",
|
|
657
|
+
"readFile",
|
|
658
|
+
"readlink",
|
|
659
|
+
"realpath",
|
|
660
|
+
"rename",
|
|
661
|
+
"rm",
|
|
662
|
+
"rmdir",
|
|
663
|
+
"stat",
|
|
664
|
+
"symlink",
|
|
665
|
+
"truncate",
|
|
666
|
+
"unlink",
|
|
667
|
+
"utimes",
|
|
668
|
+
"writeFile"
|
|
669
|
+
].filter((e)=>"function" == typeof i[e]);
|
|
670
|
+
Object.assign(t, i);
|
|
671
|
+
o.forEach((e)=>{
|
|
672
|
+
t[e] = n(i[e]);
|
|
673
|
+
});
|
|
674
|
+
t.realpath.native = n(i.realpath.native);
|
|
675
|
+
t.exists = function(e, t) {
|
|
676
|
+
if ("function" == typeof t) return i.exists(e, t);
|
|
677
|
+
return new Promise((t)=>i.exists(e, t));
|
|
678
|
+
};
|
|
679
|
+
t.read = function(e, t, r, n, o, c) {
|
|
680
|
+
if ("function" == typeof c) return i.read(e, t, r, n, o, c);
|
|
681
|
+
return new Promise((c, s)=>{
|
|
682
|
+
i.read(e, t, r, n, o, (e, t, r)=>{
|
|
683
|
+
if (e) return s(e);
|
|
684
|
+
c({
|
|
685
|
+
bytesRead: t,
|
|
686
|
+
buffer: r
|
|
687
|
+
});
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
};
|
|
691
|
+
t.write = function(e, t, ...r) {
|
|
692
|
+
if ("function" == typeof r[r.length - 1]) return i.write(e, t, ...r);
|
|
693
|
+
return new Promise((n, o)=>{
|
|
694
|
+
i.write(e, t, ...r, (e, t, r)=>{
|
|
695
|
+
if (e) return o(e);
|
|
696
|
+
n({
|
|
697
|
+
bytesWritten: t,
|
|
698
|
+
buffer: r
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
});
|
|
702
|
+
};
|
|
703
|
+
if ("function" == typeof i.writev) t.writev = function(e, t, ...r) {
|
|
704
|
+
if ("function" == typeof r[r.length - 1]) return i.writev(e, t, ...r);
|
|
705
|
+
return new Promise((n, o)=>{
|
|
706
|
+
i.writev(e, t, ...r, (e, t, r)=>{
|
|
707
|
+
if (e) return o(e);
|
|
708
|
+
n({
|
|
709
|
+
bytesWritten: t,
|
|
710
|
+
buffers: r
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
},
|
|
716
|
+
81: (e, t, r)=>{
|
|
717
|
+
"use strict";
|
|
718
|
+
e.exports = {
|
|
719
|
+
...r(812),
|
|
720
|
+
...r(2),
|
|
721
|
+
...r(708),
|
|
722
|
+
...r(726),
|
|
723
|
+
...r(779),
|
|
724
|
+
...r(971),
|
|
725
|
+
...r(511),
|
|
726
|
+
...r(701),
|
|
727
|
+
...r(725),
|
|
728
|
+
...r(95)
|
|
729
|
+
};
|
|
730
|
+
},
|
|
731
|
+
779: (e, t, r)=>{
|
|
732
|
+
"use strict";
|
|
733
|
+
const n = r(5).fromPromise;
|
|
734
|
+
const i = r(901);
|
|
735
|
+
i.outputJson = n(r(410));
|
|
736
|
+
i.outputJsonSync = r(925);
|
|
737
|
+
i.outputJSON = i.outputJson;
|
|
738
|
+
i.outputJSONSync = i.outputJsonSync;
|
|
739
|
+
i.writeJSON = i.writeJson;
|
|
740
|
+
i.writeJSONSync = i.writeJsonSync;
|
|
741
|
+
i.readJSON = i.readJson;
|
|
742
|
+
i.readJSONSync = i.readJsonSync;
|
|
743
|
+
e.exports = i;
|
|
744
|
+
},
|
|
745
|
+
901: (e, t, r)=>{
|
|
746
|
+
"use strict";
|
|
747
|
+
const n = r(654);
|
|
748
|
+
e.exports = {
|
|
749
|
+
readJson: n.readFile,
|
|
750
|
+
readJsonSync: n.readFileSync,
|
|
751
|
+
writeJson: n.writeFile,
|
|
752
|
+
writeJsonSync: n.writeFileSync
|
|
753
|
+
};
|
|
754
|
+
},
|
|
755
|
+
925: (e, t, r)=>{
|
|
756
|
+
"use strict";
|
|
757
|
+
const { stringify: n } = r(208);
|
|
758
|
+
const { outputFileSync: i } = r(701);
|
|
759
|
+
function outputJsonSync(e, t, r) {
|
|
760
|
+
const o = n(t, r);
|
|
761
|
+
i(e, o, r);
|
|
762
|
+
}
|
|
763
|
+
e.exports = outputJsonSync;
|
|
764
|
+
},
|
|
765
|
+
410: (e, t, r)=>{
|
|
766
|
+
"use strict";
|
|
767
|
+
const { stringify: n } = r(208);
|
|
768
|
+
const { outputFile: i } = r(701);
|
|
769
|
+
async function outputJson(e, t, r = {}) {
|
|
770
|
+
const o = n(t, r);
|
|
771
|
+
await i(e, o, r);
|
|
772
|
+
}
|
|
773
|
+
e.exports = outputJson;
|
|
774
|
+
},
|
|
775
|
+
971: (e, t, r)=>{
|
|
776
|
+
"use strict";
|
|
777
|
+
const n = r(5).fromPromise;
|
|
778
|
+
const { makeDir: i, makeDirSync: o } = r(284);
|
|
779
|
+
const c = n(i);
|
|
780
|
+
e.exports = {
|
|
781
|
+
mkdirs: c,
|
|
782
|
+
mkdirsSync: o,
|
|
783
|
+
mkdirp: c,
|
|
784
|
+
mkdirpSync: o,
|
|
785
|
+
ensureDir: c,
|
|
786
|
+
ensureDirSync: o
|
|
787
|
+
};
|
|
788
|
+
},
|
|
789
|
+
284: (e, t, r)=>{
|
|
790
|
+
"use strict";
|
|
791
|
+
const n = r(812);
|
|
792
|
+
const { checkPath: i } = r(216);
|
|
793
|
+
const getMode = (e)=>{
|
|
794
|
+
const t = {
|
|
795
|
+
mode: 511
|
|
796
|
+
};
|
|
797
|
+
if ("number" == typeof e) return e;
|
|
798
|
+
return ({
|
|
799
|
+
...t,
|
|
800
|
+
...e
|
|
801
|
+
}).mode;
|
|
802
|
+
};
|
|
803
|
+
e.exports.makeDir = async (e, t)=>{
|
|
804
|
+
i(e);
|
|
805
|
+
return n.mkdir(e, {
|
|
806
|
+
mode: getMode(t),
|
|
807
|
+
recursive: true
|
|
808
|
+
});
|
|
809
|
+
};
|
|
810
|
+
e.exports.makeDirSync = (e, t)=>{
|
|
811
|
+
i(e);
|
|
812
|
+
return n.mkdirSync(e, {
|
|
813
|
+
mode: getMode(t),
|
|
814
|
+
recursive: true
|
|
815
|
+
});
|
|
816
|
+
};
|
|
817
|
+
},
|
|
818
|
+
216: (e, t, r)=>{
|
|
819
|
+
"use strict";
|
|
820
|
+
const n = r(17);
|
|
821
|
+
e.exports.checkPath = function(e) {
|
|
822
|
+
if ("win32" === process.platform) {
|
|
823
|
+
const t = /[<>:"|?*]/.test(e.replace(n.parse(e).root, ""));
|
|
824
|
+
if (t) {
|
|
825
|
+
const t = new Error(`Path contains invalid characters: ${e}`);
|
|
826
|
+
t.code = "EINVAL";
|
|
827
|
+
throw t;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
},
|
|
832
|
+
511: (e, t, r)=>{
|
|
833
|
+
"use strict";
|
|
834
|
+
const n = r(5).fromCallback;
|
|
835
|
+
e.exports = {
|
|
836
|
+
move: n(r(795)),
|
|
837
|
+
moveSync: r(429)
|
|
838
|
+
};
|
|
839
|
+
},
|
|
840
|
+
429: (e, t, r)=>{
|
|
841
|
+
"use strict";
|
|
842
|
+
const n = r(127);
|
|
843
|
+
const i = r(17);
|
|
844
|
+
const o = r(2).copySync;
|
|
845
|
+
const c = r(95).removeSync;
|
|
846
|
+
const s = r(971).mkdirpSync;
|
|
847
|
+
const a = r(883);
|
|
848
|
+
function moveSync(e, t, r) {
|
|
849
|
+
r = r || {};
|
|
850
|
+
const n = r.overwrite || r.clobber || false;
|
|
851
|
+
const { srcStat: o, isChangingCase: c = false } = a.checkPathsSync(e, t, "move", r);
|
|
852
|
+
a.checkParentPathsSync(e, o, t, "move");
|
|
853
|
+
if (!isParentRoot(t)) s(i.dirname(t));
|
|
854
|
+
return doRename(e, t, n, c);
|
|
855
|
+
}
|
|
856
|
+
function isParentRoot(e) {
|
|
857
|
+
const t = i.dirname(e);
|
|
858
|
+
const r = i.parse(t);
|
|
859
|
+
return r.root === t;
|
|
860
|
+
}
|
|
861
|
+
function doRename(e, t, r, i) {
|
|
862
|
+
if (i) return rename(e, t, r);
|
|
863
|
+
if (r) {
|
|
864
|
+
c(t);
|
|
865
|
+
return rename(e, t, r);
|
|
866
|
+
}
|
|
867
|
+
if (n.existsSync(t)) throw new Error("dest already exists.");
|
|
868
|
+
return rename(e, t, r);
|
|
869
|
+
}
|
|
870
|
+
function rename(e, t, r) {
|
|
871
|
+
try {
|
|
872
|
+
n.renameSync(e, t);
|
|
873
|
+
} catch (n) {
|
|
874
|
+
if ("EXDEV" !== n.code) throw n;
|
|
875
|
+
return moveAcrossDevice(e, t, r);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
function moveAcrossDevice(e, t, r) {
|
|
879
|
+
const n = {
|
|
880
|
+
overwrite: r,
|
|
881
|
+
errorOnExist: true
|
|
882
|
+
};
|
|
883
|
+
o(e, t, n);
|
|
884
|
+
return c(e);
|
|
885
|
+
}
|
|
886
|
+
e.exports = moveSync;
|
|
887
|
+
},
|
|
888
|
+
795: (e, t, r)=>{
|
|
889
|
+
"use strict";
|
|
890
|
+
const n = r(127);
|
|
891
|
+
const i = r(17);
|
|
892
|
+
const o = r(2).copy;
|
|
893
|
+
const c = r(95).remove;
|
|
894
|
+
const s = r(971).mkdirp;
|
|
895
|
+
const a = r(725).pathExists;
|
|
896
|
+
const u = r(883);
|
|
897
|
+
function move(e, t, r, n) {
|
|
898
|
+
if ("function" == typeof r) {
|
|
899
|
+
n = r;
|
|
900
|
+
r = {};
|
|
901
|
+
}
|
|
902
|
+
const o = r.overwrite || r.clobber || false;
|
|
903
|
+
u.checkPaths(e, t, "move", r, (r, c)=>{
|
|
904
|
+
if (r) return n(r);
|
|
905
|
+
const { srcStat: a, isChangingCase: f = false } = c;
|
|
906
|
+
u.checkParentPaths(e, a, t, "move", (r)=>{
|
|
907
|
+
if (r) return n(r);
|
|
908
|
+
if (isParentRoot(t)) return doRename(e, t, o, f, n);
|
|
909
|
+
s(i.dirname(t), (r)=>{
|
|
910
|
+
if (r) return n(r);
|
|
911
|
+
return doRename(e, t, o, f, n);
|
|
912
|
+
});
|
|
913
|
+
});
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
function isParentRoot(e) {
|
|
917
|
+
const t = i.dirname(e);
|
|
918
|
+
const r = i.parse(t);
|
|
919
|
+
return r.root === t;
|
|
920
|
+
}
|
|
921
|
+
function doRename(e, t, r, n, i) {
|
|
922
|
+
if (n) return rename(e, t, r, i);
|
|
923
|
+
if (r) return c(t, (n)=>{
|
|
924
|
+
if (n) return i(n);
|
|
925
|
+
return rename(e, t, r, i);
|
|
926
|
+
});
|
|
927
|
+
a(t, (n, o)=>{
|
|
928
|
+
if (n) return i(n);
|
|
929
|
+
if (o) return i(new Error("dest already exists."));
|
|
930
|
+
return rename(e, t, r, i);
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
function rename(e, t, r, i) {
|
|
934
|
+
n.rename(e, t, (n)=>{
|
|
935
|
+
if (!n) return i();
|
|
936
|
+
if ("EXDEV" !== n.code) return i(n);
|
|
937
|
+
return moveAcrossDevice(e, t, r, i);
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
function moveAcrossDevice(e, t, r, n) {
|
|
941
|
+
const i = {
|
|
942
|
+
overwrite: r,
|
|
943
|
+
errorOnExist: true
|
|
944
|
+
};
|
|
945
|
+
o(e, t, i, (t)=>{
|
|
946
|
+
if (t) return n(t);
|
|
947
|
+
return c(e, n);
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
e.exports = move;
|
|
951
|
+
},
|
|
952
|
+
701: (e, t, r)=>{
|
|
953
|
+
"use strict";
|
|
954
|
+
const n = r(5).fromCallback;
|
|
955
|
+
const i = r(127);
|
|
956
|
+
const o = r(17);
|
|
957
|
+
const c = r(971);
|
|
958
|
+
const s = r(725).pathExists;
|
|
959
|
+
function outputFile(e, t, r, n) {
|
|
960
|
+
if ("function" == typeof r) {
|
|
961
|
+
n = r;
|
|
962
|
+
r = "utf8";
|
|
963
|
+
}
|
|
964
|
+
const a = o.dirname(e);
|
|
965
|
+
s(a, (o, s)=>{
|
|
966
|
+
if (o) return n(o);
|
|
967
|
+
if (s) return i.writeFile(e, t, r, n);
|
|
968
|
+
c.mkdirs(a, (o)=>{
|
|
969
|
+
if (o) return n(o);
|
|
970
|
+
i.writeFile(e, t, r, n);
|
|
971
|
+
});
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
function outputFileSync(e, ...t) {
|
|
975
|
+
const r = o.dirname(e);
|
|
976
|
+
if (i.existsSync(r)) return i.writeFileSync(e, ...t);
|
|
977
|
+
c.mkdirsSync(r);
|
|
978
|
+
i.writeFileSync(e, ...t);
|
|
979
|
+
}
|
|
980
|
+
e.exports = {
|
|
981
|
+
outputFile: n(outputFile),
|
|
982
|
+
outputFileSync: outputFileSync
|
|
983
|
+
};
|
|
984
|
+
},
|
|
985
|
+
725: (e, t, r)=>{
|
|
986
|
+
"use strict";
|
|
987
|
+
const n = r(5).fromPromise;
|
|
988
|
+
const i = r(812);
|
|
989
|
+
function pathExists(e) {
|
|
990
|
+
return i.access(e).then(()=>true).catch(()=>false);
|
|
991
|
+
}
|
|
992
|
+
e.exports = {
|
|
993
|
+
pathExists: n(pathExists),
|
|
994
|
+
pathExistsSync: i.existsSync
|
|
995
|
+
};
|
|
996
|
+
},
|
|
997
|
+
95: (e, t, r)=>{
|
|
998
|
+
"use strict";
|
|
999
|
+
const n = r(127);
|
|
1000
|
+
const i = r(5).fromCallback;
|
|
1001
|
+
const o = r(193);
|
|
1002
|
+
function remove(e, t) {
|
|
1003
|
+
if (n.rm) return n.rm(e, {
|
|
1004
|
+
recursive: true,
|
|
1005
|
+
force: true
|
|
1006
|
+
}, t);
|
|
1007
|
+
o(e, t);
|
|
1008
|
+
}
|
|
1009
|
+
function removeSync(e) {
|
|
1010
|
+
if (n.rmSync) return n.rmSync(e, {
|
|
1011
|
+
recursive: true,
|
|
1012
|
+
force: true
|
|
1013
|
+
});
|
|
1014
|
+
o.sync(e);
|
|
1015
|
+
}
|
|
1016
|
+
e.exports = {
|
|
1017
|
+
remove: i(remove),
|
|
1018
|
+
removeSync: removeSync
|
|
1019
|
+
};
|
|
1020
|
+
},
|
|
1021
|
+
193: (e, t, r)=>{
|
|
1022
|
+
"use strict";
|
|
1023
|
+
const n = r(127);
|
|
1024
|
+
const i = r(17);
|
|
1025
|
+
const o = r(491);
|
|
1026
|
+
const c = "win32" === process.platform;
|
|
1027
|
+
function defaults(e) {
|
|
1028
|
+
const t = [
|
|
1029
|
+
"unlink",
|
|
1030
|
+
"chmod",
|
|
1031
|
+
"stat",
|
|
1032
|
+
"lstat",
|
|
1033
|
+
"rmdir",
|
|
1034
|
+
"readdir"
|
|
1035
|
+
];
|
|
1036
|
+
t.forEach((t)=>{
|
|
1037
|
+
e[t] = e[t] || n[t];
|
|
1038
|
+
t += "Sync";
|
|
1039
|
+
e[t] = e[t] || n[t];
|
|
1040
|
+
});
|
|
1041
|
+
e.maxBusyTries = e.maxBusyTries || 3;
|
|
1042
|
+
}
|
|
1043
|
+
function rimraf(e, t, r) {
|
|
1044
|
+
let n = 0;
|
|
1045
|
+
if ("function" == typeof t) {
|
|
1046
|
+
r = t;
|
|
1047
|
+
t = {};
|
|
1048
|
+
}
|
|
1049
|
+
o(e, "rimraf: missing path");
|
|
1050
|
+
o.strictEqual(typeof e, "string", "rimraf: path should be a string");
|
|
1051
|
+
o.strictEqual(typeof r, "function", "rimraf: callback function required");
|
|
1052
|
+
o(t, "rimraf: invalid options argument provided");
|
|
1053
|
+
o.strictEqual(typeof t, "object", "rimraf: options should be object");
|
|
1054
|
+
defaults(t);
|
|
1055
|
+
rimraf_(e, t, function CB(i) {
|
|
1056
|
+
if (i) {
|
|
1057
|
+
if (("EBUSY" === i.code || "ENOTEMPTY" === i.code || "EPERM" === i.code) && n < t.maxBusyTries) {
|
|
1058
|
+
n++;
|
|
1059
|
+
const r = 100 * n;
|
|
1060
|
+
return setTimeout(()=>rimraf_(e, t, CB), r);
|
|
1061
|
+
}
|
|
1062
|
+
if ("ENOENT" === i.code) i = null;
|
|
1063
|
+
}
|
|
1064
|
+
r(i);
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
function rimraf_(e, t, r) {
|
|
1068
|
+
o(e);
|
|
1069
|
+
o(t);
|
|
1070
|
+
o("function" == typeof r);
|
|
1071
|
+
t.lstat(e, (n, i)=>{
|
|
1072
|
+
if (n && "ENOENT" === n.code) return r(null);
|
|
1073
|
+
if (n && "EPERM" === n.code && c) return fixWinEPERM(e, t, n, r);
|
|
1074
|
+
if (i && i.isDirectory()) return rmdir(e, t, n, r);
|
|
1075
|
+
t.unlink(e, (n)=>{
|
|
1076
|
+
if (n) {
|
|
1077
|
+
if ("ENOENT" === n.code) return r(null);
|
|
1078
|
+
if ("EPERM" === n.code) return c ? fixWinEPERM(e, t, n, r) : rmdir(e, t, n, r);
|
|
1079
|
+
if ("EISDIR" === n.code) return rmdir(e, t, n, r);
|
|
1080
|
+
}
|
|
1081
|
+
return r(n);
|
|
1082
|
+
});
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
function fixWinEPERM(e, t, r, n) {
|
|
1086
|
+
o(e);
|
|
1087
|
+
o(t);
|
|
1088
|
+
o("function" == typeof n);
|
|
1089
|
+
t.chmod(e, 438, (i)=>{
|
|
1090
|
+
if (i) n("ENOENT" === i.code ? null : r);
|
|
1091
|
+
else t.stat(e, (i, o)=>{
|
|
1092
|
+
if (i) n("ENOENT" === i.code ? null : r);
|
|
1093
|
+
else if (o.isDirectory()) rmdir(e, t, r, n);
|
|
1094
|
+
else t.unlink(e, n);
|
|
1095
|
+
});
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
function fixWinEPERMSync(e, t, r) {
|
|
1099
|
+
let n;
|
|
1100
|
+
o(e);
|
|
1101
|
+
o(t);
|
|
1102
|
+
try {
|
|
1103
|
+
t.chmodSync(e, 438);
|
|
1104
|
+
} catch (e) {
|
|
1105
|
+
if ("ENOENT" === e.code) return;
|
|
1106
|
+
throw r;
|
|
1107
|
+
}
|
|
1108
|
+
try {
|
|
1109
|
+
n = t.statSync(e);
|
|
1110
|
+
} catch (e) {
|
|
1111
|
+
if ("ENOENT" === e.code) return;
|
|
1112
|
+
throw r;
|
|
1113
|
+
}
|
|
1114
|
+
if (n.isDirectory()) rmdirSync(e, t, r);
|
|
1115
|
+
else t.unlinkSync(e);
|
|
1116
|
+
}
|
|
1117
|
+
function rmdir(e, t, r, n) {
|
|
1118
|
+
o(e);
|
|
1119
|
+
o(t);
|
|
1120
|
+
o("function" == typeof n);
|
|
1121
|
+
t.rmdir(e, (i)=>{
|
|
1122
|
+
if (i && ("ENOTEMPTY" === i.code || "EEXIST" === i.code || "EPERM" === i.code)) rmkids(e, t, n);
|
|
1123
|
+
else i && "ENOTDIR" === i.code ? n(r) : n(i);
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
function rmkids(e, t, r) {
|
|
1127
|
+
o(e);
|
|
1128
|
+
o(t);
|
|
1129
|
+
o("function" == typeof r);
|
|
1130
|
+
t.readdir(e, (n, o)=>{
|
|
1131
|
+
if (n) return r(n);
|
|
1132
|
+
let c = o.length;
|
|
1133
|
+
let s;
|
|
1134
|
+
if (0 === c) return t.rmdir(e, r);
|
|
1135
|
+
o.forEach((n)=>{
|
|
1136
|
+
rimraf(i.join(e, n), t, (n)=>{
|
|
1137
|
+
if (s) return;
|
|
1138
|
+
if (n) return r(s = n);
|
|
1139
|
+
if (0 === --c) t.rmdir(e, r);
|
|
1140
|
+
});
|
|
1141
|
+
});
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
function rimrafSync(e, t) {
|
|
1145
|
+
let r;
|
|
1146
|
+
t = t || {};
|
|
1147
|
+
defaults(t);
|
|
1148
|
+
o(e, "rimraf: missing path");
|
|
1149
|
+
o.strictEqual(typeof e, "string", "rimraf: path should be a string");
|
|
1150
|
+
o(t, "rimraf: missing options");
|
|
1151
|
+
o.strictEqual(typeof t, "object", "rimraf: options should be object");
|
|
1152
|
+
try {
|
|
1153
|
+
r = t.lstatSync(e);
|
|
1154
|
+
} catch (r) {
|
|
1155
|
+
if ("ENOENT" === r.code) return;
|
|
1156
|
+
if ("EPERM" === r.code && c) fixWinEPERMSync(e, t, r);
|
|
1157
|
+
}
|
|
1158
|
+
try {
|
|
1159
|
+
if (r && r.isDirectory()) rmdirSync(e, t, null);
|
|
1160
|
+
else t.unlinkSync(e);
|
|
1161
|
+
} catch (r) {
|
|
1162
|
+
if ("ENOENT" === r.code) return;
|
|
1163
|
+
if ("EPERM" === r.code) return c ? fixWinEPERMSync(e, t, r) : rmdirSync(e, t, r);
|
|
1164
|
+
if ("EISDIR" !== r.code) throw r;
|
|
1165
|
+
rmdirSync(e, t, r);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
function rmdirSync(e, t, r) {
|
|
1169
|
+
o(e);
|
|
1170
|
+
o(t);
|
|
1171
|
+
try {
|
|
1172
|
+
t.rmdirSync(e);
|
|
1173
|
+
} catch (n) {
|
|
1174
|
+
if ("ENOTDIR" === n.code) throw r;
|
|
1175
|
+
if ("ENOTEMPTY" === n.code || "EEXIST" === n.code || "EPERM" === n.code) rmkidsSync(e, t);
|
|
1176
|
+
else if ("ENOENT" !== n.code) throw n;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
function rmkidsSync(e, t) {
|
|
1180
|
+
o(e);
|
|
1181
|
+
o(t);
|
|
1182
|
+
t.readdirSync(e).forEach((r)=>rimrafSync(i.join(e, r), t));
|
|
1183
|
+
if (c) {
|
|
1184
|
+
const r = Date.now();
|
|
1185
|
+
do try {
|
|
1186
|
+
const r = t.rmdirSync(e, t);
|
|
1187
|
+
return r;
|
|
1188
|
+
} catch {}
|
|
1189
|
+
while (Date.now() - r < 500);
|
|
1190
|
+
} else {
|
|
1191
|
+
const r = t.rmdirSync(e, t);
|
|
1192
|
+
return r;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
e.exports = rimraf;
|
|
1196
|
+
rimraf.sync = rimrafSync;
|
|
1197
|
+
},
|
|
1198
|
+
883: (e, t, r)=>{
|
|
1199
|
+
"use strict";
|
|
1200
|
+
const n = r(812);
|
|
1201
|
+
const i = r(17);
|
|
1202
|
+
const o = r(837);
|
|
1203
|
+
function getStats(e, t, r) {
|
|
1204
|
+
const i = r.dereference ? (e)=>n.stat(e, {
|
|
1205
|
+
bigint: true
|
|
1206
|
+
}) : (e)=>n.lstat(e, {
|
|
1207
|
+
bigint: true
|
|
1208
|
+
});
|
|
1209
|
+
return Promise.all([
|
|
1210
|
+
i(e),
|
|
1211
|
+
i(t).catch((e)=>{
|
|
1212
|
+
if ("ENOENT" === e.code) return null;
|
|
1213
|
+
throw e;
|
|
1214
|
+
})
|
|
1215
|
+
]).then(([e, t])=>({
|
|
1216
|
+
srcStat: e,
|
|
1217
|
+
destStat: t
|
|
1218
|
+
}));
|
|
1219
|
+
}
|
|
1220
|
+
function getStatsSync(e, t, r) {
|
|
1221
|
+
let i;
|
|
1222
|
+
const o = r.dereference ? (e)=>n.statSync(e, {
|
|
1223
|
+
bigint: true
|
|
1224
|
+
}) : (e)=>n.lstatSync(e, {
|
|
1225
|
+
bigint: true
|
|
1226
|
+
});
|
|
1227
|
+
const c = o(e);
|
|
1228
|
+
try {
|
|
1229
|
+
i = o(t);
|
|
1230
|
+
} catch (e) {
|
|
1231
|
+
if ("ENOENT" === e.code) return {
|
|
1232
|
+
srcStat: c,
|
|
1233
|
+
destStat: null
|
|
1234
|
+
};
|
|
1235
|
+
throw e;
|
|
1236
|
+
}
|
|
1237
|
+
return {
|
|
1238
|
+
srcStat: c,
|
|
1239
|
+
destStat: i
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
function checkPaths(e, t, r, n, c) {
|
|
1243
|
+
o.callbackify(getStats)(e, t, n, (n, o)=>{
|
|
1244
|
+
if (n) return c(n);
|
|
1245
|
+
const { srcStat: s, destStat: a } = o;
|
|
1246
|
+
if (a) {
|
|
1247
|
+
if (areIdentical(s, a)) {
|
|
1248
|
+
const n = i.basename(e);
|
|
1249
|
+
const o = i.basename(t);
|
|
1250
|
+
if ("move" === r && n !== o && n.toLowerCase() === o.toLowerCase()) return c(null, {
|
|
1251
|
+
srcStat: s,
|
|
1252
|
+
destStat: a,
|
|
1253
|
+
isChangingCase: true
|
|
1254
|
+
});
|
|
1255
|
+
return c(new Error("Source and destination must not be the same."));
|
|
1256
|
+
}
|
|
1257
|
+
if (s.isDirectory() && !a.isDirectory()) return c(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));
|
|
1258
|
+
if (!s.isDirectory() && a.isDirectory()) return c(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`));
|
|
1259
|
+
}
|
|
1260
|
+
if (s.isDirectory() && isSrcSubdir(e, t)) return c(new Error(errMsg(e, t, r)));
|
|
1261
|
+
return c(null, {
|
|
1262
|
+
srcStat: s,
|
|
1263
|
+
destStat: a
|
|
1264
|
+
});
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
function checkPathsSync(e, t, r, n) {
|
|
1268
|
+
const { srcStat: o, destStat: c } = getStatsSync(e, t, n);
|
|
1269
|
+
if (c) {
|
|
1270
|
+
if (areIdentical(o, c)) {
|
|
1271
|
+
const n = i.basename(e);
|
|
1272
|
+
const s = i.basename(t);
|
|
1273
|
+
if ("move" === r && n !== s && n.toLowerCase() === s.toLowerCase()) return {
|
|
1274
|
+
srcStat: o,
|
|
1275
|
+
destStat: c,
|
|
1276
|
+
isChangingCase: true
|
|
1277
|
+
};
|
|
1278
|
+
throw new Error("Source and destination must not be the same.");
|
|
1279
|
+
}
|
|
1280
|
+
if (o.isDirectory() && !c.isDirectory()) throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);
|
|
1281
|
+
if (!o.isDirectory() && c.isDirectory()) throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`);
|
|
1282
|
+
}
|
|
1283
|
+
if (o.isDirectory() && isSrcSubdir(e, t)) throw new Error(errMsg(e, t, r));
|
|
1284
|
+
return {
|
|
1285
|
+
srcStat: o,
|
|
1286
|
+
destStat: c
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
function checkParentPaths(e, t, r, o, c) {
|
|
1290
|
+
const s = i.resolve(i.dirname(e));
|
|
1291
|
+
const a = i.resolve(i.dirname(r));
|
|
1292
|
+
if (a === s || a === i.parse(a).root) return c();
|
|
1293
|
+
n.stat(a, {
|
|
1294
|
+
bigint: true
|
|
1295
|
+
}, (n, i)=>{
|
|
1296
|
+
if (n) {
|
|
1297
|
+
if ("ENOENT" === n.code) return c();
|
|
1298
|
+
return c(n);
|
|
1299
|
+
}
|
|
1300
|
+
if (areIdentical(t, i)) return c(new Error(errMsg(e, r, o)));
|
|
1301
|
+
return checkParentPaths(e, t, a, o, c);
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
function checkParentPathsSync(e, t, r, o) {
|
|
1305
|
+
const c = i.resolve(i.dirname(e));
|
|
1306
|
+
const s = i.resolve(i.dirname(r));
|
|
1307
|
+
if (s === c || s === i.parse(s).root) return;
|
|
1308
|
+
let a;
|
|
1309
|
+
try {
|
|
1310
|
+
a = n.statSync(s, {
|
|
1311
|
+
bigint: true
|
|
1312
|
+
});
|
|
1313
|
+
} catch (e) {
|
|
1314
|
+
if ("ENOENT" === e.code) return;
|
|
1315
|
+
throw e;
|
|
1316
|
+
}
|
|
1317
|
+
if (areIdentical(t, a)) throw new Error(errMsg(e, r, o));
|
|
1318
|
+
return checkParentPathsSync(e, t, s, o);
|
|
1319
|
+
}
|
|
1320
|
+
function areIdentical(e, t) {
|
|
1321
|
+
return t.ino && t.dev && t.ino === e.ino && t.dev === e.dev;
|
|
1322
|
+
}
|
|
1323
|
+
function isSrcSubdir(e, t) {
|
|
1324
|
+
const r = i.resolve(e).split(i.sep).filter((e)=>e);
|
|
1325
|
+
const n = i.resolve(t).split(i.sep).filter((e)=>e);
|
|
1326
|
+
return r.reduce((e, t, r)=>e && n[r] === t, true);
|
|
1327
|
+
}
|
|
1328
|
+
function errMsg(e, t, r) {
|
|
1329
|
+
return `Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`;
|
|
1330
|
+
}
|
|
1331
|
+
e.exports = {
|
|
1332
|
+
checkPaths: checkPaths,
|
|
1333
|
+
checkPathsSync: checkPathsSync,
|
|
1334
|
+
checkParentPaths: checkParentPaths,
|
|
1335
|
+
checkParentPathsSync: checkParentPathsSync,
|
|
1336
|
+
isSrcSubdir: isSrcSubdir,
|
|
1337
|
+
areIdentical: areIdentical
|
|
1338
|
+
};
|
|
1339
|
+
},
|
|
1340
|
+
309: (e, t, r)=>{
|
|
1341
|
+
"use strict";
|
|
1342
|
+
const n = r(127);
|
|
1343
|
+
function utimesMillis(e, t, r, i) {
|
|
1344
|
+
n.open(e, "r+", (e, o)=>{
|
|
1345
|
+
if (e) return i(e);
|
|
1346
|
+
n.futimes(o, t, r, (e)=>{
|
|
1347
|
+
n.close(o, (t)=>{
|
|
1348
|
+
if (i) i(e || t);
|
|
1349
|
+
});
|
|
1350
|
+
});
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
function utimesMillisSync(e, t, r) {
|
|
1354
|
+
const i = n.openSync(e, "r+");
|
|
1355
|
+
n.futimesSync(i, t, r);
|
|
1356
|
+
return n.closeSync(i);
|
|
1357
|
+
}
|
|
1358
|
+
e.exports = {
|
|
1359
|
+
utimesMillis: utimesMillis,
|
|
1360
|
+
utimesMillisSync: utimesMillisSync
|
|
1361
|
+
};
|
|
1362
|
+
},
|
|
1363
|
+
132: (e)=>{
|
|
1364
|
+
"use strict";
|
|
1365
|
+
e.exports = clone;
|
|
1366
|
+
var t = Object.getPrototypeOf || function(e) {
|
|
1367
|
+
return e.__proto__;
|
|
1368
|
+
};
|
|
1369
|
+
function clone(e) {
|
|
1370
|
+
if (null === e || "object" != typeof e) return e;
|
|
1371
|
+
if (e instanceof Object) var r = {
|
|
1372
|
+
__proto__: t(e)
|
|
1373
|
+
};
|
|
1374
|
+
else var r = Object.create(null);
|
|
1375
|
+
Object.getOwnPropertyNames(e).forEach(function(t) {
|
|
1376
|
+
Object.defineProperty(r, t, Object.getOwnPropertyDescriptor(e, t));
|
|
1377
|
+
});
|
|
1378
|
+
return r;
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
127: (e, t, r)=>{
|
|
1382
|
+
var n = r(147);
|
|
1383
|
+
var i = r(367);
|
|
1384
|
+
var o = r(876);
|
|
1385
|
+
var c = r(132);
|
|
1386
|
+
var s = r(837);
|
|
1387
|
+
var a;
|
|
1388
|
+
var u;
|
|
1389
|
+
if ("function" == typeof Symbol && "function" == typeof Symbol.for) {
|
|
1390
|
+
a = Symbol.for("graceful-fs.queue");
|
|
1391
|
+
u = Symbol.for("graceful-fs.previous");
|
|
1392
|
+
} else {
|
|
1393
|
+
a = "___graceful-fs.queue";
|
|
1394
|
+
u = "___graceful-fs.previous";
|
|
1395
|
+
}
|
|
1396
|
+
function noop() {}
|
|
1397
|
+
function publishQueue(e, t) {
|
|
1398
|
+
Object.defineProperty(e, a, {
|
|
1399
|
+
get: function() {
|
|
1400
|
+
return t;
|
|
1401
|
+
}
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1404
|
+
var f = noop;
|
|
1405
|
+
if (s.debuglog) f = s.debuglog("gfs4");
|
|
1406
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) f = function() {
|
|
1407
|
+
var e = s.format.apply(s, arguments);
|
|
1408
|
+
e = "GFS4: " + e.split(/\n/).join("\nGFS4: ");
|
|
1409
|
+
console.error(e);
|
|
1410
|
+
};
|
|
1411
|
+
if (!n[a]) {
|
|
1412
|
+
var l = global[a] || [];
|
|
1413
|
+
publishQueue(n, l);
|
|
1414
|
+
n.close = function(e) {
|
|
1415
|
+
function close(t, r) {
|
|
1416
|
+
return e.call(n, t, function(e) {
|
|
1417
|
+
if (!e) resetQueue();
|
|
1418
|
+
if ("function" == typeof r) r.apply(this, arguments);
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
Object.defineProperty(close, u, {
|
|
1422
|
+
value: e
|
|
1423
|
+
});
|
|
1424
|
+
return close;
|
|
1425
|
+
}(n.close);
|
|
1426
|
+
n.closeSync = function(e) {
|
|
1427
|
+
function closeSync(t) {
|
|
1428
|
+
e.apply(n, arguments);
|
|
1429
|
+
resetQueue();
|
|
1430
|
+
}
|
|
1431
|
+
Object.defineProperty(closeSync, u, {
|
|
1432
|
+
value: e
|
|
1433
|
+
});
|
|
1434
|
+
return closeSync;
|
|
1435
|
+
}(n.closeSync);
|
|
1436
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
1437
|
+
f(n[a]);
|
|
1438
|
+
r(491).equal(n[a].length, 0);
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
if (!global[a]) publishQueue(global, n[a]);
|
|
1442
|
+
e.exports = patch(c(n));
|
|
1443
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !n.__patched) {
|
|
1444
|
+
e.exports = patch(n);
|
|
1445
|
+
n.__patched = true;
|
|
1446
|
+
}
|
|
1447
|
+
function patch(e) {
|
|
1448
|
+
i(e);
|
|
1449
|
+
e.gracefulify = patch;
|
|
1450
|
+
e.createReadStream = createReadStream;
|
|
1451
|
+
e.createWriteStream = createWriteStream;
|
|
1452
|
+
var t = e.readFile;
|
|
1453
|
+
e.readFile = readFile;
|
|
1454
|
+
function readFile(e, r, n) {
|
|
1455
|
+
if ("function" == typeof r) n = r, r = null;
|
|
1456
|
+
return go$readFile(e, r, n);
|
|
1457
|
+
function go$readFile(e, r, n, i) {
|
|
1458
|
+
return t(e, r, function(t) {
|
|
1459
|
+
if (t && ("EMFILE" === t.code || "ENFILE" === t.code)) enqueue([
|
|
1460
|
+
go$readFile,
|
|
1461
|
+
[
|
|
1462
|
+
e,
|
|
1463
|
+
r,
|
|
1464
|
+
n
|
|
1465
|
+
],
|
|
1466
|
+
t,
|
|
1467
|
+
i || Date.now(),
|
|
1468
|
+
Date.now()
|
|
1469
|
+
]);
|
|
1470
|
+
else if ("function" == typeof n) n.apply(this, arguments);
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
var r = e.writeFile;
|
|
1475
|
+
e.writeFile = writeFile;
|
|
1476
|
+
function writeFile(e, t, n, i) {
|
|
1477
|
+
if ("function" == typeof n) i = n, n = null;
|
|
1478
|
+
return go$writeFile(e, t, n, i);
|
|
1479
|
+
function go$writeFile(e, t, n, i, o) {
|
|
1480
|
+
return r(e, t, n, function(r) {
|
|
1481
|
+
if (r && ("EMFILE" === r.code || "ENFILE" === r.code)) enqueue([
|
|
1482
|
+
go$writeFile,
|
|
1483
|
+
[
|
|
1484
|
+
e,
|
|
1485
|
+
t,
|
|
1486
|
+
n,
|
|
1487
|
+
i
|
|
1488
|
+
],
|
|
1489
|
+
r,
|
|
1490
|
+
o || Date.now(),
|
|
1491
|
+
Date.now()
|
|
1492
|
+
]);
|
|
1493
|
+
else if ("function" == typeof i) i.apply(this, arguments);
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
var n = e.appendFile;
|
|
1498
|
+
if (n) e.appendFile = appendFile;
|
|
1499
|
+
function appendFile(e, t, r, i) {
|
|
1500
|
+
if ("function" == typeof r) i = r, r = null;
|
|
1501
|
+
return go$appendFile(e, t, r, i);
|
|
1502
|
+
function go$appendFile(e, t, r, i, o) {
|
|
1503
|
+
return n(e, t, r, function(n) {
|
|
1504
|
+
if (n && ("EMFILE" === n.code || "ENFILE" === n.code)) enqueue([
|
|
1505
|
+
go$appendFile,
|
|
1506
|
+
[
|
|
1507
|
+
e,
|
|
1508
|
+
t,
|
|
1509
|
+
r,
|
|
1510
|
+
i
|
|
1511
|
+
],
|
|
1512
|
+
n,
|
|
1513
|
+
o || Date.now(),
|
|
1514
|
+
Date.now()
|
|
1515
|
+
]);
|
|
1516
|
+
else if ("function" == typeof i) i.apply(this, arguments);
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
var c = e.copyFile;
|
|
1521
|
+
if (c) e.copyFile = copyFile;
|
|
1522
|
+
function copyFile(e, t, r, n) {
|
|
1523
|
+
if ("function" == typeof r) {
|
|
1524
|
+
n = r;
|
|
1525
|
+
r = 0;
|
|
1526
|
+
}
|
|
1527
|
+
return go$copyFile(e, t, r, n);
|
|
1528
|
+
function go$copyFile(e, t, r, n, i) {
|
|
1529
|
+
return c(e, t, r, function(o) {
|
|
1530
|
+
if (o && ("EMFILE" === o.code || "ENFILE" === o.code)) enqueue([
|
|
1531
|
+
go$copyFile,
|
|
1532
|
+
[
|
|
1533
|
+
e,
|
|
1534
|
+
t,
|
|
1535
|
+
r,
|
|
1536
|
+
n
|
|
1537
|
+
],
|
|
1538
|
+
o,
|
|
1539
|
+
i || Date.now(),
|
|
1540
|
+
Date.now()
|
|
1541
|
+
]);
|
|
1542
|
+
else if ("function" == typeof n) n.apply(this, arguments);
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
var s = e.readdir;
|
|
1547
|
+
e.readdir = readdir;
|
|
1548
|
+
var a = /^v[0-5]\./;
|
|
1549
|
+
function readdir(e, t, r) {
|
|
1550
|
+
if ("function" == typeof t) r = t, t = null;
|
|
1551
|
+
var n = a.test(process.version) ? function(e, t, r, n) {
|
|
1552
|
+
return s(e, fs$readdirCallback(e, t, r, n));
|
|
1553
|
+
} : function(e, t, r, n) {
|
|
1554
|
+
return s(e, t, fs$readdirCallback(e, t, r, n));
|
|
1555
|
+
};
|
|
1556
|
+
return n(e, t, r);
|
|
1557
|
+
function fs$readdirCallback(e, t, r, i) {
|
|
1558
|
+
return function(o, c) {
|
|
1559
|
+
if (o && ("EMFILE" === o.code || "ENFILE" === o.code)) enqueue([
|
|
1560
|
+
n,
|
|
1561
|
+
[
|
|
1562
|
+
e,
|
|
1563
|
+
t,
|
|
1564
|
+
r
|
|
1565
|
+
],
|
|
1566
|
+
o,
|
|
1567
|
+
i || Date.now(),
|
|
1568
|
+
Date.now()
|
|
1569
|
+
]);
|
|
1570
|
+
else {
|
|
1571
|
+
if (c && c.sort) c.sort();
|
|
1572
|
+
if ("function" == typeof r) r.call(this, o, c);
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
if ("v0.8" === process.version.substr(0, 4)) {
|
|
1578
|
+
var u = o(e);
|
|
1579
|
+
ReadStream = u.ReadStream;
|
|
1580
|
+
WriteStream = u.WriteStream;
|
|
1581
|
+
}
|
|
1582
|
+
var f = e.ReadStream;
|
|
1583
|
+
if (f) {
|
|
1584
|
+
ReadStream.prototype = Object.create(f.prototype);
|
|
1585
|
+
ReadStream.prototype.open = ReadStream$open;
|
|
1586
|
+
}
|
|
1587
|
+
var l = e.WriteStream;
|
|
1588
|
+
if (l) {
|
|
1589
|
+
WriteStream.prototype = Object.create(l.prototype);
|
|
1590
|
+
WriteStream.prototype.open = WriteStream$open;
|
|
1591
|
+
}
|
|
1592
|
+
Object.defineProperty(e, "ReadStream", {
|
|
1593
|
+
get: function() {
|
|
1594
|
+
return ReadStream;
|
|
1595
|
+
},
|
|
1596
|
+
set: function(e) {
|
|
1597
|
+
ReadStream = e;
|
|
1598
|
+
},
|
|
1599
|
+
enumerable: true,
|
|
1600
|
+
configurable: true
|
|
1601
|
+
});
|
|
1602
|
+
Object.defineProperty(e, "WriteStream", {
|
|
1603
|
+
get: function() {
|
|
1604
|
+
return WriteStream;
|
|
1605
|
+
},
|
|
1606
|
+
set: function(e) {
|
|
1607
|
+
WriteStream = e;
|
|
1608
|
+
},
|
|
1609
|
+
enumerable: true,
|
|
1610
|
+
configurable: true
|
|
1611
|
+
});
|
|
1612
|
+
var y = ReadStream;
|
|
1613
|
+
Object.defineProperty(e, "FileReadStream", {
|
|
1614
|
+
get: function() {
|
|
1615
|
+
return y;
|
|
1616
|
+
},
|
|
1617
|
+
set: function(e) {
|
|
1618
|
+
y = e;
|
|
1619
|
+
},
|
|
1620
|
+
enumerable: true,
|
|
1621
|
+
configurable: true
|
|
1622
|
+
});
|
|
1623
|
+
var d = WriteStream;
|
|
1624
|
+
Object.defineProperty(e, "FileWriteStream", {
|
|
1625
|
+
get: function() {
|
|
1626
|
+
return d;
|
|
1627
|
+
},
|
|
1628
|
+
set: function(e) {
|
|
1629
|
+
d = e;
|
|
1630
|
+
},
|
|
1631
|
+
enumerable: true,
|
|
1632
|
+
configurable: true
|
|
1633
|
+
});
|
|
1634
|
+
function ReadStream(e, t) {
|
|
1635
|
+
if (this instanceof ReadStream) return f.apply(this, arguments), this;
|
|
1636
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
|
1637
|
+
}
|
|
1638
|
+
function ReadStream$open() {
|
|
1639
|
+
var e = this;
|
|
1640
|
+
open(e.path, e.flags, e.mode, function(t, r) {
|
|
1641
|
+
if (t) {
|
|
1642
|
+
if (e.autoClose) e.destroy();
|
|
1643
|
+
e.emit("error", t);
|
|
1644
|
+
} else {
|
|
1645
|
+
e.fd = r;
|
|
1646
|
+
e.emit("open", r);
|
|
1647
|
+
e.read();
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
function WriteStream(e, t) {
|
|
1652
|
+
if (this instanceof WriteStream) return l.apply(this, arguments), this;
|
|
1653
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
1654
|
+
}
|
|
1655
|
+
function WriteStream$open() {
|
|
1656
|
+
var e = this;
|
|
1657
|
+
open(e.path, e.flags, e.mode, function(t, r) {
|
|
1658
|
+
if (t) {
|
|
1659
|
+
e.destroy();
|
|
1660
|
+
e.emit("error", t);
|
|
1661
|
+
} else {
|
|
1662
|
+
e.fd = r;
|
|
1663
|
+
e.emit("open", r);
|
|
1664
|
+
}
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
function createReadStream(t, r) {
|
|
1668
|
+
return new e.ReadStream(t, r);
|
|
1669
|
+
}
|
|
1670
|
+
function createWriteStream(t, r) {
|
|
1671
|
+
return new e.WriteStream(t, r);
|
|
1672
|
+
}
|
|
1673
|
+
var m = e.open;
|
|
1674
|
+
e.open = open;
|
|
1675
|
+
function open(e, t, r, n) {
|
|
1676
|
+
if ("function" == typeof r) n = r, r = null;
|
|
1677
|
+
return go$open(e, t, r, n);
|
|
1678
|
+
function go$open(e, t, r, n, i) {
|
|
1679
|
+
return m(e, t, r, function(o, c) {
|
|
1680
|
+
if (o && ("EMFILE" === o.code || "ENFILE" === o.code)) enqueue([
|
|
1681
|
+
go$open,
|
|
1682
|
+
[
|
|
1683
|
+
e,
|
|
1684
|
+
t,
|
|
1685
|
+
r,
|
|
1686
|
+
n
|
|
1687
|
+
],
|
|
1688
|
+
o,
|
|
1689
|
+
i || Date.now(),
|
|
1690
|
+
Date.now()
|
|
1691
|
+
]);
|
|
1692
|
+
else if ("function" == typeof n) n.apply(this, arguments);
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
return e;
|
|
1697
|
+
}
|
|
1698
|
+
function enqueue(e) {
|
|
1699
|
+
f("ENQUEUE", e[0].name, e[1]);
|
|
1700
|
+
n[a].push(e);
|
|
1701
|
+
retry();
|
|
1702
|
+
}
|
|
1703
|
+
var y;
|
|
1704
|
+
function resetQueue() {
|
|
1705
|
+
var e = Date.now();
|
|
1706
|
+
for(var t = 0; t < n[a].length; ++t)if (n[a][t].length > 2) {
|
|
1707
|
+
n[a][t][3] = e;
|
|
1708
|
+
n[a][t][4] = e;
|
|
1709
|
+
}
|
|
1710
|
+
retry();
|
|
1711
|
+
}
|
|
1712
|
+
function retry() {
|
|
1713
|
+
clearTimeout(y);
|
|
1714
|
+
y = void 0;
|
|
1715
|
+
if (0 === n[a].length) return;
|
|
1716
|
+
var e = n[a].shift();
|
|
1717
|
+
var t = e[0];
|
|
1718
|
+
var r = e[1];
|
|
1719
|
+
var i = e[2];
|
|
1720
|
+
var o = e[3];
|
|
1721
|
+
var c = e[4];
|
|
1722
|
+
if (void 0 === o) {
|
|
1723
|
+
f("RETRY", t.name, r);
|
|
1724
|
+
t.apply(null, r);
|
|
1725
|
+
} else if (Date.now() - o >= 6e4) {
|
|
1726
|
+
f("TIMEOUT", t.name, r);
|
|
1727
|
+
var s = r.pop();
|
|
1728
|
+
if ("function" == typeof s) s.call(null, i);
|
|
1729
|
+
} else {
|
|
1730
|
+
var u = Date.now() - c;
|
|
1731
|
+
var l = Math.max(c - o, 1);
|
|
1732
|
+
var d = Math.min(1.2 * l, 100);
|
|
1733
|
+
if (u >= d) {
|
|
1734
|
+
f("RETRY", t.name, r);
|
|
1735
|
+
t.apply(null, r.concat([
|
|
1736
|
+
o
|
|
1737
|
+
]));
|
|
1738
|
+
} else n[a].push(e);
|
|
1739
|
+
}
|
|
1740
|
+
if (void 0 === y) y = setTimeout(retry, 0);
|
|
1741
|
+
}
|
|
1742
|
+
},
|
|
1743
|
+
876: (e, t, r)=>{
|
|
1744
|
+
var n = r(781).Stream;
|
|
1745
|
+
e.exports = legacy;
|
|
1746
|
+
function legacy(e) {
|
|
1747
|
+
return {
|
|
1748
|
+
ReadStream: ReadStream,
|
|
1749
|
+
WriteStream: WriteStream
|
|
1750
|
+
};
|
|
1751
|
+
function ReadStream(t, r) {
|
|
1752
|
+
if (!(this instanceof ReadStream)) return new ReadStream(t, r);
|
|
1753
|
+
n.call(this);
|
|
1754
|
+
var i = this;
|
|
1755
|
+
this.path = t;
|
|
1756
|
+
this.fd = null;
|
|
1757
|
+
this.readable = true;
|
|
1758
|
+
this.paused = false;
|
|
1759
|
+
this.flags = "r";
|
|
1760
|
+
this.mode = 438;
|
|
1761
|
+
this.bufferSize = 65536;
|
|
1762
|
+
r = r || {};
|
|
1763
|
+
var o = Object.keys(r);
|
|
1764
|
+
for(var c = 0, s = o.length; c < s; c++){
|
|
1765
|
+
var a = o[c];
|
|
1766
|
+
this[a] = r[a];
|
|
1767
|
+
}
|
|
1768
|
+
if (this.encoding) this.setEncoding(this.encoding);
|
|
1769
|
+
if (void 0 !== this.start) {
|
|
1770
|
+
if ("number" != typeof this.start) throw TypeError("start must be a Number");
|
|
1771
|
+
if (void 0 === this.end) this.end = 1 / 0;
|
|
1772
|
+
else if ("number" != typeof this.end) throw TypeError("end must be a Number");
|
|
1773
|
+
if (this.start > this.end) throw new Error("start must be <= end");
|
|
1774
|
+
this.pos = this.start;
|
|
1775
|
+
}
|
|
1776
|
+
if (null !== this.fd) return void process.nextTick(function() {
|
|
1777
|
+
i._read();
|
|
1778
|
+
});
|
|
1779
|
+
e.open(this.path, this.flags, this.mode, function(e, t) {
|
|
1780
|
+
if (e) {
|
|
1781
|
+
i.emit("error", e);
|
|
1782
|
+
i.readable = false;
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1785
|
+
i.fd = t;
|
|
1786
|
+
i.emit("open", t);
|
|
1787
|
+
i._read();
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
function WriteStream(t, r) {
|
|
1791
|
+
if (!(this instanceof WriteStream)) return new WriteStream(t, r);
|
|
1792
|
+
n.call(this);
|
|
1793
|
+
this.path = t;
|
|
1794
|
+
this.fd = null;
|
|
1795
|
+
this.writable = true;
|
|
1796
|
+
this.flags = "w";
|
|
1797
|
+
this.encoding = "binary";
|
|
1798
|
+
this.mode = 438;
|
|
1799
|
+
this.bytesWritten = 0;
|
|
1800
|
+
r = r || {};
|
|
1801
|
+
var i = Object.keys(r);
|
|
1802
|
+
for(var o = 0, c = i.length; o < c; o++){
|
|
1803
|
+
var s = i[o];
|
|
1804
|
+
this[s] = r[s];
|
|
1805
|
+
}
|
|
1806
|
+
if (void 0 !== this.start) {
|
|
1807
|
+
if ("number" != typeof this.start) throw TypeError("start must be a Number");
|
|
1808
|
+
if (this.start < 0) throw new Error("start must be >= zero");
|
|
1809
|
+
this.pos = this.start;
|
|
1810
|
+
}
|
|
1811
|
+
this.busy = false;
|
|
1812
|
+
this._queue = [];
|
|
1813
|
+
if (null === this.fd) {
|
|
1814
|
+
this._open = e.open;
|
|
1815
|
+
this._queue.push([
|
|
1816
|
+
this._open,
|
|
1817
|
+
this.path,
|
|
1818
|
+
this.flags,
|
|
1819
|
+
this.mode,
|
|
1820
|
+
void 0
|
|
1821
|
+
]);
|
|
1822
|
+
this.flush();
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1827
|
+
367: (e, t, r)=>{
|
|
1828
|
+
var n = r(57);
|
|
1829
|
+
var i = process.cwd;
|
|
1830
|
+
var o = null;
|
|
1831
|
+
var c = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
1832
|
+
process.cwd = function() {
|
|
1833
|
+
if (!o) o = i.call(process);
|
|
1834
|
+
return o;
|
|
1835
|
+
};
|
|
1836
|
+
try {
|
|
1837
|
+
process.cwd();
|
|
1838
|
+
} catch (e) {}
|
|
1839
|
+
if ("function" == typeof process.chdir) {
|
|
1840
|
+
var s = process.chdir;
|
|
1841
|
+
process.chdir = function(e) {
|
|
1842
|
+
o = null;
|
|
1843
|
+
s.call(process, e);
|
|
1844
|
+
};
|
|
1845
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, s);
|
|
1846
|
+
}
|
|
1847
|
+
e.exports = patch;
|
|
1848
|
+
function patch(e) {
|
|
1849
|
+
if (n.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(e);
|
|
1850
|
+
if (!e.lutimes) patchLutimes(e);
|
|
1851
|
+
e.chown = chownFix(e.chown);
|
|
1852
|
+
e.fchown = chownFix(e.fchown);
|
|
1853
|
+
e.lchown = chownFix(e.lchown);
|
|
1854
|
+
e.chmod = chmodFix(e.chmod);
|
|
1855
|
+
e.fchmod = chmodFix(e.fchmod);
|
|
1856
|
+
e.lchmod = chmodFix(e.lchmod);
|
|
1857
|
+
e.chownSync = chownFixSync(e.chownSync);
|
|
1858
|
+
e.fchownSync = chownFixSync(e.fchownSync);
|
|
1859
|
+
e.lchownSync = chownFixSync(e.lchownSync);
|
|
1860
|
+
e.chmodSync = chmodFixSync(e.chmodSync);
|
|
1861
|
+
e.fchmodSync = chmodFixSync(e.fchmodSync);
|
|
1862
|
+
e.lchmodSync = chmodFixSync(e.lchmodSync);
|
|
1863
|
+
e.stat = statFix(e.stat);
|
|
1864
|
+
e.fstat = statFix(e.fstat);
|
|
1865
|
+
e.lstat = statFix(e.lstat);
|
|
1866
|
+
e.statSync = statFixSync(e.statSync);
|
|
1867
|
+
e.fstatSync = statFixSync(e.fstatSync);
|
|
1868
|
+
e.lstatSync = statFixSync(e.lstatSync);
|
|
1869
|
+
if (e.chmod && !e.lchmod) {
|
|
1870
|
+
e.lchmod = function(e, t, r) {
|
|
1871
|
+
if (r) process.nextTick(r);
|
|
1872
|
+
};
|
|
1873
|
+
e.lchmodSync = function() {};
|
|
1874
|
+
}
|
|
1875
|
+
if (e.chown && !e.lchown) {
|
|
1876
|
+
e.lchown = function(e, t, r, n) {
|
|
1877
|
+
if (n) process.nextTick(n);
|
|
1878
|
+
};
|
|
1879
|
+
e.lchownSync = function() {};
|
|
1880
|
+
}
|
|
1881
|
+
if ("win32" === c) e.rename = "function" != typeof e.rename ? e.rename : function(t) {
|
|
1882
|
+
function rename(r, n, i) {
|
|
1883
|
+
var o = Date.now();
|
|
1884
|
+
var c = 0;
|
|
1885
|
+
t(r, n, function CB(s) {
|
|
1886
|
+
if (s && ("EACCES" === s.code || "EPERM" === s.code) && Date.now() - o < 6e4) {
|
|
1887
|
+
setTimeout(function() {
|
|
1888
|
+
e.stat(n, function(e, o) {
|
|
1889
|
+
if (e && "ENOENT" === e.code) t(r, n, CB);
|
|
1890
|
+
else i(s);
|
|
1891
|
+
});
|
|
1892
|
+
}, c);
|
|
1893
|
+
if (c < 100) c += 10;
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
if (i) i(s);
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, t);
|
|
1900
|
+
return rename;
|
|
1901
|
+
}(e.rename);
|
|
1902
|
+
e.read = "function" != typeof e.read ? e.read : function(t) {
|
|
1903
|
+
function read(r, n, i, o, c, s) {
|
|
1904
|
+
var a;
|
|
1905
|
+
if (s && "function" == typeof s) {
|
|
1906
|
+
var u = 0;
|
|
1907
|
+
a = function(f, l, y) {
|
|
1908
|
+
if (f && "EAGAIN" === f.code && u < 10) {
|
|
1909
|
+
u++;
|
|
1910
|
+
return t.call(e, r, n, i, o, c, a);
|
|
1911
|
+
}
|
|
1912
|
+
s.apply(this, arguments);
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
return t.call(e, r, n, i, o, c, a);
|
|
1916
|
+
}
|
|
1917
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(read, t);
|
|
1918
|
+
return read;
|
|
1919
|
+
}(e.read);
|
|
1920
|
+
e.readSync = "function" != typeof e.readSync ? e.readSync : function(t) {
|
|
1921
|
+
return function(r, n, i, o, c) {
|
|
1922
|
+
var s = 0;
|
|
1923
|
+
while(true)try {
|
|
1924
|
+
return t.call(e, r, n, i, o, c);
|
|
1925
|
+
} catch (e) {
|
|
1926
|
+
if ("EAGAIN" === e.code && s < 10) {
|
|
1927
|
+
s++;
|
|
1928
|
+
continue;
|
|
1929
|
+
}
|
|
1930
|
+
throw e;
|
|
1931
|
+
}
|
|
1932
|
+
};
|
|
1933
|
+
}(e.readSync);
|
|
1934
|
+
function patchLchmod(e) {
|
|
1935
|
+
e.lchmod = function(t, r, i) {
|
|
1936
|
+
e.open(t, n.O_WRONLY | n.O_SYMLINK, r, function(t, n) {
|
|
1937
|
+
if (t) {
|
|
1938
|
+
if (i) i(t);
|
|
1939
|
+
return;
|
|
1940
|
+
}
|
|
1941
|
+
e.fchmod(n, r, function(t) {
|
|
1942
|
+
e.close(n, function(e) {
|
|
1943
|
+
if (i) i(t || e);
|
|
1944
|
+
});
|
|
1945
|
+
});
|
|
1946
|
+
});
|
|
1947
|
+
};
|
|
1948
|
+
e.lchmodSync = function(t, r) {
|
|
1949
|
+
var i = e.openSync(t, n.O_WRONLY | n.O_SYMLINK, r);
|
|
1950
|
+
var o = true;
|
|
1951
|
+
var c;
|
|
1952
|
+
try {
|
|
1953
|
+
c = e.fchmodSync(i, r);
|
|
1954
|
+
o = false;
|
|
1955
|
+
} finally{
|
|
1956
|
+
if (o) try {
|
|
1957
|
+
e.closeSync(i);
|
|
1958
|
+
} catch (e) {}
|
|
1959
|
+
else e.closeSync(i);
|
|
1960
|
+
}
|
|
1961
|
+
return c;
|
|
1962
|
+
};
|
|
1963
|
+
}
|
|
1964
|
+
function patchLutimes(e) {
|
|
1965
|
+
if (n.hasOwnProperty("O_SYMLINK") && e.futimes) {
|
|
1966
|
+
e.lutimes = function(t, r, i, o) {
|
|
1967
|
+
e.open(t, n.O_SYMLINK, function(t, n) {
|
|
1968
|
+
if (t) {
|
|
1969
|
+
if (o) o(t);
|
|
1970
|
+
return;
|
|
1971
|
+
}
|
|
1972
|
+
e.futimes(n, r, i, function(t) {
|
|
1973
|
+
e.close(n, function(e) {
|
|
1974
|
+
if (o) o(t || e);
|
|
1975
|
+
});
|
|
1976
|
+
});
|
|
1977
|
+
});
|
|
1978
|
+
};
|
|
1979
|
+
e.lutimesSync = function(t, r, i) {
|
|
1980
|
+
var o = e.openSync(t, n.O_SYMLINK);
|
|
1981
|
+
var c;
|
|
1982
|
+
var s = true;
|
|
1983
|
+
try {
|
|
1984
|
+
c = e.futimesSync(o, r, i);
|
|
1985
|
+
s = false;
|
|
1986
|
+
} finally{
|
|
1987
|
+
if (s) try {
|
|
1988
|
+
e.closeSync(o);
|
|
1989
|
+
} catch (e) {}
|
|
1990
|
+
else e.closeSync(o);
|
|
1991
|
+
}
|
|
1992
|
+
return c;
|
|
1993
|
+
};
|
|
1994
|
+
} else if (e.futimes) {
|
|
1995
|
+
e.lutimes = function(e, t, r, n) {
|
|
1996
|
+
if (n) process.nextTick(n);
|
|
1997
|
+
};
|
|
1998
|
+
e.lutimesSync = function() {};
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
function chmodFix(t) {
|
|
2002
|
+
if (!t) return t;
|
|
2003
|
+
return function(r, n, i) {
|
|
2004
|
+
return t.call(e, r, n, function(e) {
|
|
2005
|
+
if (chownErOk(e)) e = null;
|
|
2006
|
+
if (i) i.apply(this, arguments);
|
|
2007
|
+
});
|
|
2008
|
+
};
|
|
2009
|
+
}
|
|
2010
|
+
function chmodFixSync(t) {
|
|
2011
|
+
if (!t) return t;
|
|
2012
|
+
return function(r, n) {
|
|
2013
|
+
try {
|
|
2014
|
+
return t.call(e, r, n);
|
|
2015
|
+
} catch (e) {
|
|
2016
|
+
if (!chownErOk(e)) throw e;
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
function chownFix(t) {
|
|
2021
|
+
if (!t) return t;
|
|
2022
|
+
return function(r, n, i, o) {
|
|
2023
|
+
return t.call(e, r, n, i, function(e) {
|
|
2024
|
+
if (chownErOk(e)) e = null;
|
|
2025
|
+
if (o) o.apply(this, arguments);
|
|
2026
|
+
});
|
|
2027
|
+
};
|
|
2028
|
+
}
|
|
2029
|
+
function chownFixSync(t) {
|
|
2030
|
+
if (!t) return t;
|
|
2031
|
+
return function(r, n, i) {
|
|
2032
|
+
try {
|
|
2033
|
+
return t.call(e, r, n, i);
|
|
2034
|
+
} catch (e) {
|
|
2035
|
+
if (!chownErOk(e)) throw e;
|
|
2036
|
+
}
|
|
2037
|
+
};
|
|
2038
|
+
}
|
|
2039
|
+
function statFix(t) {
|
|
2040
|
+
if (!t) return t;
|
|
2041
|
+
return function(r, n, i) {
|
|
2042
|
+
if ("function" == typeof n) {
|
|
2043
|
+
i = n;
|
|
2044
|
+
n = null;
|
|
2045
|
+
}
|
|
2046
|
+
function callback(e, t) {
|
|
2047
|
+
if (t) {
|
|
2048
|
+
if (t.uid < 0) t.uid += 4294967296;
|
|
2049
|
+
if (t.gid < 0) t.gid += 4294967296;
|
|
2050
|
+
}
|
|
2051
|
+
if (i) i.apply(this, arguments);
|
|
2052
|
+
}
|
|
2053
|
+
return n ? t.call(e, r, n, callback) : t.call(e, r, callback);
|
|
2054
|
+
};
|
|
2055
|
+
}
|
|
2056
|
+
function statFixSync(t) {
|
|
2057
|
+
if (!t) return t;
|
|
2058
|
+
return function(r, n) {
|
|
2059
|
+
var i = n ? t.call(e, r, n) : t.call(e, r);
|
|
2060
|
+
if (i) {
|
|
2061
|
+
if (i.uid < 0) i.uid += 4294967296;
|
|
2062
|
+
if (i.gid < 0) i.gid += 4294967296;
|
|
2063
|
+
}
|
|
2064
|
+
return i;
|
|
2065
|
+
};
|
|
2066
|
+
}
|
|
2067
|
+
function chownErOk(e) {
|
|
2068
|
+
if (!e) return true;
|
|
2069
|
+
if ("ENOSYS" === e.code) return true;
|
|
2070
|
+
var t = !process.getuid || 0 !== process.getuid();
|
|
2071
|
+
if (t) {
|
|
2072
|
+
if ("EINVAL" === e.code || "EPERM" === e.code) return true;
|
|
2073
|
+
}
|
|
2074
|
+
return false;
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
},
|
|
2078
|
+
654: (e, t, r)=>{
|
|
2079
|
+
let n;
|
|
2080
|
+
try {
|
|
2081
|
+
n = r(127);
|
|
2082
|
+
} catch (e) {
|
|
2083
|
+
n = r(147);
|
|
2084
|
+
}
|
|
2085
|
+
const i = r(5);
|
|
2086
|
+
const { stringify: o, stripBom: c } = r(208);
|
|
2087
|
+
async function _readFile(e, t = {}) {
|
|
2088
|
+
if ("string" == typeof t) t = {
|
|
2089
|
+
encoding: t
|
|
2090
|
+
};
|
|
2091
|
+
const r = t.fs || n;
|
|
2092
|
+
const o = "throws" in t ? t.throws : true;
|
|
2093
|
+
let s = await i.fromCallback(r.readFile)(e, t);
|
|
2094
|
+
s = c(s);
|
|
2095
|
+
let a;
|
|
2096
|
+
try {
|
|
2097
|
+
a = JSON.parse(s, t ? t.reviver : null);
|
|
2098
|
+
} catch (t) {
|
|
2099
|
+
if (!o) return null;
|
|
2100
|
+
t.message = `${e}: ${t.message}`;
|
|
2101
|
+
throw t;
|
|
2102
|
+
}
|
|
2103
|
+
return a;
|
|
2104
|
+
}
|
|
2105
|
+
const s = i.fromPromise(_readFile);
|
|
2106
|
+
function readFileSync(e, t = {}) {
|
|
2107
|
+
if ("string" == typeof t) t = {
|
|
2108
|
+
encoding: t
|
|
2109
|
+
};
|
|
2110
|
+
const r = t.fs || n;
|
|
2111
|
+
const i = "throws" in t ? t.throws : true;
|
|
2112
|
+
try {
|
|
2113
|
+
let n = r.readFileSync(e, t);
|
|
2114
|
+
n = c(n);
|
|
2115
|
+
return JSON.parse(n, t.reviver);
|
|
2116
|
+
} catch (t) {
|
|
2117
|
+
if (!i) return null;
|
|
2118
|
+
t.message = `${e}: ${t.message}`;
|
|
2119
|
+
throw t;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
async function _writeFile(e, t, r = {}) {
|
|
2123
|
+
const c = r.fs || n;
|
|
2124
|
+
const s = o(t, r);
|
|
2125
|
+
await i.fromCallback(c.writeFile)(e, s, r);
|
|
2126
|
+
}
|
|
2127
|
+
const a = i.fromPromise(_writeFile);
|
|
2128
|
+
function writeFileSync(e, t, r = {}) {
|
|
2129
|
+
const i = r.fs || n;
|
|
2130
|
+
const c = o(t, r);
|
|
2131
|
+
return i.writeFileSync(e, c, r);
|
|
2132
|
+
}
|
|
2133
|
+
const u = {
|
|
2134
|
+
readFile: s,
|
|
2135
|
+
readFileSync: readFileSync,
|
|
2136
|
+
writeFile: a,
|
|
2137
|
+
writeFileSync: writeFileSync
|
|
2138
|
+
};
|
|
2139
|
+
e.exports = u;
|
|
2140
|
+
},
|
|
2141
|
+
208: (e)=>{
|
|
2142
|
+
function stringify(e, { EOL: t = "\n", finalEOL: r = true, replacer: n = null, spaces: i } = {}) {
|
|
2143
|
+
const o = r ? t : "";
|
|
2144
|
+
const c = JSON.stringify(e, n, i);
|
|
2145
|
+
return c.replace(/\n/g, t) + o;
|
|
2146
|
+
}
|
|
2147
|
+
function stripBom(e) {
|
|
2148
|
+
if (Buffer.isBuffer(e)) e = e.toString("utf8");
|
|
2149
|
+
return e.replace(/^\uFEFF/, "");
|
|
2150
|
+
}
|
|
2151
|
+
e.exports = {
|
|
2152
|
+
stringify: stringify,
|
|
2153
|
+
stripBom: stripBom
|
|
2154
|
+
};
|
|
2155
|
+
},
|
|
2156
|
+
5: (e, t)=>{
|
|
2157
|
+
"use strict";
|
|
2158
|
+
t.fromCallback = function(e) {
|
|
2159
|
+
return Object.defineProperty(function(...t) {
|
|
2160
|
+
if ("function" != typeof t[t.length - 1]) return new Promise((r, n)=>{
|
|
2161
|
+
e.call(this, ...t, (e, t)=>null != e ? n(e) : r(t));
|
|
2162
|
+
});
|
|
2163
|
+
e.apply(this, t);
|
|
2164
|
+
}, "name", {
|
|
2165
|
+
value: e.name
|
|
2166
|
+
});
|
|
2167
|
+
};
|
|
2168
|
+
t.fromPromise = function(e) {
|
|
2169
|
+
return Object.defineProperty(function(...t) {
|
|
2170
|
+
const r = t[t.length - 1];
|
|
2171
|
+
if ("function" != typeof r) return e.apply(this, t);
|
|
2172
|
+
e.apply(this, t.slice(0, -1)).then((e)=>r(null, e), r);
|
|
2173
|
+
}, "name", {
|
|
2174
|
+
value: e.name
|
|
2175
|
+
});
|
|
2176
|
+
};
|
|
2177
|
+
},
|
|
2178
|
+
491: (e)=>{
|
|
2179
|
+
"use strict";
|
|
2180
|
+
e.exports = require("assert");
|
|
2181
|
+
},
|
|
2182
|
+
57: (e)=>{
|
|
2183
|
+
"use strict";
|
|
2184
|
+
e.exports = require("constants");
|
|
2185
|
+
},
|
|
2186
|
+
147: (e)=>{
|
|
2187
|
+
"use strict";
|
|
2188
|
+
e.exports = require("fs");
|
|
2189
|
+
},
|
|
2190
|
+
17: (e)=>{
|
|
2191
|
+
"use strict";
|
|
2192
|
+
e.exports = require("path");
|
|
2193
|
+
},
|
|
2194
|
+
781: (e)=>{
|
|
2195
|
+
"use strict";
|
|
2196
|
+
e.exports = require("stream");
|
|
2197
|
+
},
|
|
2198
|
+
837: (e)=>{
|
|
2199
|
+
"use strict";
|
|
2200
|
+
e.exports = require("util");
|
|
2201
|
+
}
|
|
2202
|
+
};
|
|
2203
|
+
var t = {};
|
|
2204
|
+
function __nccwpck_require__(r) {
|
|
2205
|
+
var n = t[r];
|
|
2206
|
+
if (void 0 !== n) return n.exports;
|
|
2207
|
+
var i = t[r] = {
|
|
2208
|
+
exports: {}
|
|
2209
|
+
};
|
|
2210
|
+
var o = true;
|
|
2211
|
+
try {
|
|
2212
|
+
e[r](i, i.exports, __nccwpck_require__);
|
|
2213
|
+
o = false;
|
|
2214
|
+
} finally{
|
|
2215
|
+
if (o) delete t[r];
|
|
2216
|
+
}
|
|
2217
|
+
return i.exports;
|
|
2218
|
+
}
|
|
2219
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
2220
|
+
var r = __nccwpck_require__(81);
|
|
2221
|
+
module.exports = r;
|
|
2222
|
+
})();
|