@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,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
getReactVersion: ()=>getReactVersion,
|
|
37
|
+
isApiOnly: ()=>isApiOnly,
|
|
38
|
+
isBeyondReact17: ()=>isBeyondReact17,
|
|
39
|
+
isDepExists: ()=>isDepExists,
|
|
40
|
+
isPackageInstalled: ()=>isPackageInstalled,
|
|
41
|
+
isReact18: ()=>isReact18,
|
|
42
|
+
isSupportAutomaticJsx: ()=>isSupportAutomaticJsx,
|
|
43
|
+
isTypescript: ()=>isTypescript,
|
|
44
|
+
isVersionBeyond17: ()=>isVersionBeyond17,
|
|
45
|
+
isWebOnly: ()=>isWebOnly
|
|
46
|
+
});
|
|
47
|
+
const external_path_namespaceObject = require("path");
|
|
48
|
+
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
49
|
+
const index_js_namespaceObject = require("../../../compiled/pkg-up/index.js");
|
|
50
|
+
var index_js_default = /*#__PURE__*/ __webpack_require__.n(index_js_namespaceObject);
|
|
51
|
+
const external_compiled_js_namespaceObject = require("../../compiled.js");
|
|
52
|
+
const external_commands_js_namespaceObject = require("../commands.js");
|
|
53
|
+
const external_common_js_namespaceObject = require("../common.js");
|
|
54
|
+
const external_ensure_js_namespaceObject = require("../ensure.js");
|
|
55
|
+
const external_require_js_namespaceObject = require("../require.js");
|
|
56
|
+
const debug = (0, external_common_js_namespaceObject.createDebugger)('judge-depExists');
|
|
57
|
+
const isDepExists = (appDirectory, name)=>{
|
|
58
|
+
const pkgPath = external_path_default().resolve(appDirectory, './package.json');
|
|
59
|
+
if (!external_compiled_js_namespaceObject.fs.existsSync(pkgPath)) {
|
|
60
|
+
debug("can't find package.json under: %s", appDirectory);
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const json = external_compiled_js_namespaceObject.fs.readJSONSync(pkgPath);
|
|
64
|
+
const { dependencies = {}, devDependencies = {} } = json;
|
|
65
|
+
return dependencies.hasOwnProperty(name) || devDependencies.hasOwnProperty(name);
|
|
66
|
+
};
|
|
67
|
+
const isPackageInstalled = (name, resolvePaths)=>{
|
|
68
|
+
try {
|
|
69
|
+
(0, external_require_js_namespaceObject.tryResolve)(name, ...(0, external_ensure_js_namespaceObject.ensureArray)(resolvePaths));
|
|
70
|
+
return true;
|
|
71
|
+
} catch (err) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const isApiOnly = async (appDirectory, entryDir, apiDir)=>{
|
|
76
|
+
const existApi = await external_compiled_js_namespaceObject.fs.pathExists(apiDir ?? external_path_default().join(appDirectory, 'api'));
|
|
77
|
+
const existSrc = await external_compiled_js_namespaceObject.fs.pathExists(external_path_default().join(appDirectory, entryDir ?? 'src'));
|
|
78
|
+
const options = (0, external_compiled_js_namespaceObject.minimist)((0, external_commands_js_namespaceObject.getArgv)());
|
|
79
|
+
if (options['api-only']) return true;
|
|
80
|
+
return existApi && !existSrc;
|
|
81
|
+
};
|
|
82
|
+
const isWebOnly = async ()=>{
|
|
83
|
+
const options = (0, external_compiled_js_namespaceObject.minimist)((0, external_commands_js_namespaceObject.getArgv)());
|
|
84
|
+
return Boolean(options['web-only']);
|
|
85
|
+
};
|
|
86
|
+
const isVersionBeyond17 = (version)=>external_compiled_js_namespaceObject.semver.gte(external_compiled_js_namespaceObject.semver.minVersion(version), '17.0.0');
|
|
87
|
+
const getReactVersion = (cwd)=>{
|
|
88
|
+
const pkgPath = index_js_default().sync({
|
|
89
|
+
cwd
|
|
90
|
+
});
|
|
91
|
+
if (!pkgPath) return false;
|
|
92
|
+
const pkgInfo = JSON.parse(external_compiled_js_namespaceObject.fs.readFileSync(pkgPath, 'utf8'));
|
|
93
|
+
const deps = {
|
|
94
|
+
...pkgInfo.devDependencies,
|
|
95
|
+
...pkgInfo.dependencies
|
|
96
|
+
};
|
|
97
|
+
if ('string' != typeof deps.react) return false;
|
|
98
|
+
try {
|
|
99
|
+
const reactPath = (0, external_require_js_namespaceObject.tryResolve)('react/package.json', cwd);
|
|
100
|
+
const reactVersion = JSON.parse(external_compiled_js_namespaceObject.fs.readFileSync(reactPath, 'utf8')).version;
|
|
101
|
+
return reactVersion;
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.error('Failed to resolve React version:', error);
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const isBeyondReact17 = (cwd)=>{
|
|
108
|
+
const reactVersion = getReactVersion(cwd);
|
|
109
|
+
if (!reactVersion) return false;
|
|
110
|
+
return isVersionBeyond17(reactVersion);
|
|
111
|
+
};
|
|
112
|
+
const isSupportAutomaticJsx = (cwd)=>{
|
|
113
|
+
const reactVersion = getReactVersion(cwd);
|
|
114
|
+
if (!reactVersion) return false;
|
|
115
|
+
return external_compiled_js_namespaceObject.semver.satisfies(external_compiled_js_namespaceObject.semver.minVersion(reactVersion), '>=16.14.0');
|
|
116
|
+
};
|
|
117
|
+
const isReact18 = (cwd = process.cwd())=>{
|
|
118
|
+
const reactVersion = getReactVersion(cwd);
|
|
119
|
+
if (!reactVersion) return false;
|
|
120
|
+
return external_compiled_js_namespaceObject.semver.gte(external_compiled_js_namespaceObject.semver.minVersion(reactVersion), '18.0.0');
|
|
121
|
+
};
|
|
122
|
+
const isTypescript = (root)=>external_compiled_js_namespaceObject.fs.existsSync(external_path_default().resolve(root, './tsconfig.json'));
|
|
123
|
+
exports.getReactVersion = __webpack_exports__.getReactVersion;
|
|
124
|
+
exports.isApiOnly = __webpack_exports__.isApiOnly;
|
|
125
|
+
exports.isBeyondReact17 = __webpack_exports__.isBeyondReact17;
|
|
126
|
+
exports.isDepExists = __webpack_exports__.isDepExists;
|
|
127
|
+
exports.isPackageInstalled = __webpack_exports__.isPackageInstalled;
|
|
128
|
+
exports.isReact18 = __webpack_exports__.isReact18;
|
|
129
|
+
exports.isSupportAutomaticJsx = __webpack_exports__.isSupportAutomaticJsx;
|
|
130
|
+
exports.isTypescript = __webpack_exports__.isTypescript;
|
|
131
|
+
exports.isVersionBeyond17 = __webpack_exports__.isVersionBeyond17;
|
|
132
|
+
exports.isWebOnly = __webpack_exports__.isWebOnly;
|
|
133
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
134
|
+
"getReactVersion",
|
|
135
|
+
"isApiOnly",
|
|
136
|
+
"isBeyondReact17",
|
|
137
|
+
"isDepExists",
|
|
138
|
+
"isPackageInstalled",
|
|
139
|
+
"isReact18",
|
|
140
|
+
"isSupportAutomaticJsx",
|
|
141
|
+
"isTypescript",
|
|
142
|
+
"isVersionBeyond17",
|
|
143
|
+
"isWebOnly"
|
|
144
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
145
|
+
Object.defineProperty(exports, '__esModule', {
|
|
146
|
+
value: true
|
|
147
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
isArray: ()=>isArray,
|
|
28
|
+
isEmpty: ()=>isEmpty,
|
|
29
|
+
isFunction: ()=>isFunction,
|
|
30
|
+
isObject: ()=>isObject,
|
|
31
|
+
isPlainObject: ()=>isPlainObject,
|
|
32
|
+
isPromise: ()=>isPromise,
|
|
33
|
+
isRegExp: ()=>isRegExp,
|
|
34
|
+
isString: ()=>isString,
|
|
35
|
+
isUndefined: ()=>isUndefined
|
|
36
|
+
});
|
|
37
|
+
function isString(str) {
|
|
38
|
+
return 'string' == typeof str;
|
|
39
|
+
}
|
|
40
|
+
function isUndefined(obj) {
|
|
41
|
+
return void 0 === obj;
|
|
42
|
+
}
|
|
43
|
+
function isArray(obj) {
|
|
44
|
+
return Array.isArray(obj);
|
|
45
|
+
}
|
|
46
|
+
function isFunction(func) {
|
|
47
|
+
return 'function' == typeof func;
|
|
48
|
+
}
|
|
49
|
+
function isObject(obj) {
|
|
50
|
+
return null !== obj && 'object' == typeof obj;
|
|
51
|
+
}
|
|
52
|
+
function isPlainObject(obj) {
|
|
53
|
+
return isObject(obj) && '[object Object]' === Object.prototype.toString.call(obj);
|
|
54
|
+
}
|
|
55
|
+
function isPromise(obj) {
|
|
56
|
+
return Boolean(obj) && ('object' == typeof obj || 'function' == typeof obj) && 'function' == typeof obj.then;
|
|
57
|
+
}
|
|
58
|
+
function isRegExp(obj) {
|
|
59
|
+
return '[object RegExp]' === Object.prototype.toString.call(obj);
|
|
60
|
+
}
|
|
61
|
+
const isEmpty = (o)=>0 === Object.entries(o).length && o.constructor === Object;
|
|
62
|
+
exports.isArray = __webpack_exports__.isArray;
|
|
63
|
+
exports.isEmpty = __webpack_exports__.isEmpty;
|
|
64
|
+
exports.isFunction = __webpack_exports__.isFunction;
|
|
65
|
+
exports.isObject = __webpack_exports__.isObject;
|
|
66
|
+
exports.isPlainObject = __webpack_exports__.isPlainObject;
|
|
67
|
+
exports.isPromise = __webpack_exports__.isPromise;
|
|
68
|
+
exports.isRegExp = __webpack_exports__.isRegExp;
|
|
69
|
+
exports.isString = __webpack_exports__.isString;
|
|
70
|
+
exports.isUndefined = __webpack_exports__.isUndefined;
|
|
71
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
72
|
+
"isArray",
|
|
73
|
+
"isEmpty",
|
|
74
|
+
"isFunction",
|
|
75
|
+
"isObject",
|
|
76
|
+
"isPlainObject",
|
|
77
|
+
"isPromise",
|
|
78
|
+
"isRegExp",
|
|
79
|
+
"isString",
|
|
80
|
+
"isUndefined"
|
|
81
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
82
|
+
Object.defineProperty(exports, '__esModule', {
|
|
83
|
+
value: true
|
|
84
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createLogger: ()=>external_rslog_namespaceObject.createLogger,
|
|
28
|
+
logger: ()=>external_rslog_namespaceObject.logger
|
|
29
|
+
});
|
|
30
|
+
const external_rslog_namespaceObject = require("rslog");
|
|
31
|
+
exports.createLogger = __webpack_exports__.createLogger;
|
|
32
|
+
exports.logger = __webpack_exports__.logger;
|
|
33
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
34
|
+
"createLogger",
|
|
35
|
+
"logger"
|
|
36
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
37
|
+
Object.defineProperty(exports, '__esModule', {
|
|
38
|
+
value: true
|
|
39
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
JS_LIKE_EXTENSION_RE: ()=>JS_LIKE_EXTENSION_RE,
|
|
37
|
+
SOURCE_EXTENSIONS: ()=>SOURCE_EXTENSIONS,
|
|
38
|
+
findMatchedSourcePath: ()=>findMatchedSourcePath,
|
|
39
|
+
findSourceEntry: ()=>findSourceEntry
|
|
40
|
+
});
|
|
41
|
+
const external_node_fs_namespaceObject = require("node:fs");
|
|
42
|
+
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
43
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
44
|
+
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
45
|
+
const SOURCE_EXTENSIONS = [
|
|
46
|
+
'.ts',
|
|
47
|
+
'.js'
|
|
48
|
+
];
|
|
49
|
+
const JS_LIKE_EXTENSION_RE = /\.(?:c|m)?js$/;
|
|
50
|
+
const isFile = (filepath)=>external_node_fs_default().existsSync(filepath) && external_node_fs_default().statSync(filepath).isFile();
|
|
51
|
+
const findSourceEntry = (resolvedPath)=>{
|
|
52
|
+
const ext = external_node_path_default().extname(resolvedPath);
|
|
53
|
+
if (ext) {
|
|
54
|
+
if (isFile(resolvedPath)) return resolvedPath;
|
|
55
|
+
if (JS_LIKE_EXTENSION_RE.test(resolvedPath)) {
|
|
56
|
+
const tsPath = `${resolvedPath.slice(0, -ext.length)}.ts`;
|
|
57
|
+
if (isFile(tsPath)) return tsPath;
|
|
58
|
+
}
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
for (const candidateExt of SOURCE_EXTENSIONS){
|
|
62
|
+
const filePath = `${resolvedPath}${candidateExt}`;
|
|
63
|
+
if (isFile(filePath)) return filePath;
|
|
64
|
+
}
|
|
65
|
+
for (const candidateExt of SOURCE_EXTENSIONS){
|
|
66
|
+
const indexPath = external_node_path_default().join(resolvedPath, `index${candidateExt}`);
|
|
67
|
+
if (isFile(indexPath)) return indexPath;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const findMatchedSourcePath = (matchPath, specifier)=>{
|
|
71
|
+
let matchedPath = matchPath(specifier, void 0, void 0, SOURCE_EXTENSIONS);
|
|
72
|
+
if (!matchedPath && JS_LIKE_EXTENSION_RE.test(specifier)) matchedPath = matchPath(specifier.replace(JS_LIKE_EXTENSION_RE, ''), void 0, void 0, SOURCE_EXTENSIONS);
|
|
73
|
+
return matchedPath;
|
|
74
|
+
};
|
|
75
|
+
exports.JS_LIKE_EXTENSION_RE = __webpack_exports__.JS_LIKE_EXTENSION_RE;
|
|
76
|
+
exports.SOURCE_EXTENSIONS = __webpack_exports__.SOURCE_EXTENSIONS;
|
|
77
|
+
exports.findMatchedSourcePath = __webpack_exports__.findMatchedSourcePath;
|
|
78
|
+
exports.findSourceEntry = __webpack_exports__.findSourceEntry;
|
|
79
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
80
|
+
"JS_LIKE_EXTENSION_RE",
|
|
81
|
+
"SOURCE_EXTENSIONS",
|
|
82
|
+
"findMatchedSourcePath",
|
|
83
|
+
"findSourceEntry"
|
|
84
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
85
|
+
Object.defineProperty(exports, '__esModule', {
|
|
86
|
+
value: true
|
|
87
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
findMonorepoRoot: ()=>findMonorepoRoot,
|
|
37
|
+
getMonorepoPackages: ()=>getMonorepoPackages,
|
|
38
|
+
isLerna: ()=>isLerna,
|
|
39
|
+
isMonorepo: ()=>isMonorepo,
|
|
40
|
+
isPnpmWorkspaces: ()=>isPnpmWorkspaces,
|
|
41
|
+
isYarnWorkspaces: ()=>isYarnWorkspaces
|
|
42
|
+
});
|
|
43
|
+
const external_fs_namespaceObject = require("fs");
|
|
44
|
+
var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
|
|
45
|
+
const external_path_namespaceObject = require("path");
|
|
46
|
+
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
47
|
+
const external_compiled_js_namespaceObject = require("../compiled.js");
|
|
48
|
+
const PACKAGE_MAX_DEPTH = 5;
|
|
49
|
+
const WORKSPACE_FILES = {
|
|
50
|
+
YARN: 'package.json',
|
|
51
|
+
PNPM: 'pnpm-workspace.yaml',
|
|
52
|
+
LERNA: 'lerna.json'
|
|
53
|
+
};
|
|
54
|
+
const isLerna = (root)=>external_fs_default().existsSync(external_path_default().join(root, WORKSPACE_FILES.LERNA));
|
|
55
|
+
const isYarnWorkspaces = (root)=>{
|
|
56
|
+
const pkg = external_path_default().join(root, WORKSPACE_FILES.YARN);
|
|
57
|
+
if (!external_fs_default().existsSync(pkg)) return false;
|
|
58
|
+
const json = JSON.parse(external_fs_default().readFileSync(pkg, 'utf8'));
|
|
59
|
+
return Boolean(json.workspaces?.packages);
|
|
60
|
+
};
|
|
61
|
+
const isPnpmWorkspaces = (root)=>external_fs_default().existsSync(external_path_default().join(root, WORKSPACE_FILES.PNPM));
|
|
62
|
+
const isMonorepo = (root)=>isLerna(root) || isYarnWorkspaces(root) || isPnpmWorkspaces(root);
|
|
63
|
+
const findMonorepoRoot = (appDirectory, maxDepth = PACKAGE_MAX_DEPTH)=>{
|
|
64
|
+
let inMonorepo = false;
|
|
65
|
+
let monorepoRoot = appDirectory;
|
|
66
|
+
for(let depth = 0; depth < maxDepth; depth++){
|
|
67
|
+
if (isMonorepo(appDirectory)) {
|
|
68
|
+
inMonorepo = true;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
monorepoRoot = external_path_default().dirname(appDirectory);
|
|
72
|
+
}
|
|
73
|
+
return inMonorepo ? monorepoRoot : void 0;
|
|
74
|
+
};
|
|
75
|
+
const getMonorepoPackages = (root)=>{
|
|
76
|
+
let packages = [];
|
|
77
|
+
if (isYarnWorkspaces(root)) {
|
|
78
|
+
const json = JSON.parse(external_fs_default().readFileSync(external_path_default().join(root, 'package.json'), 'utf8'));
|
|
79
|
+
({ packages } = json.workspaces);
|
|
80
|
+
} else if (isLerna(root)) {
|
|
81
|
+
const json = JSON.parse(external_fs_default().readFileSync(external_path_default().resolve(root, 'lerna.json'), 'utf8'));
|
|
82
|
+
({ packages } = json);
|
|
83
|
+
} else ({ packages } = external_compiled_js_namespaceObject.yaml.load(external_fs_default().readFileSync(external_path_default().join(root, WORKSPACE_FILES.PNPM), 'utf8')));
|
|
84
|
+
if (packages) return packages.map((name)=>external_compiled_js_namespaceObject.glob.sync(external_path_default().join(root, `${name}/`), {
|
|
85
|
+
ignore: [
|
|
86
|
+
'**/node_modules/**'
|
|
87
|
+
]
|
|
88
|
+
})).reduce((acc, val)=>acc.concat(val), []).filter((filepath)=>external_fs_default().existsSync(external_path_default().resolve(filepath, 'package.json'))).map((filepath)=>({
|
|
89
|
+
path: filepath,
|
|
90
|
+
name: JSON.parse(external_fs_default().readFileSync(external_path_default().resolve(filepath, 'package.json'), 'utf8')).name
|
|
91
|
+
}));
|
|
92
|
+
return [];
|
|
93
|
+
};
|
|
94
|
+
exports.findMonorepoRoot = __webpack_exports__.findMonorepoRoot;
|
|
95
|
+
exports.getMonorepoPackages = __webpack_exports__.getMonorepoPackages;
|
|
96
|
+
exports.isLerna = __webpack_exports__.isLerna;
|
|
97
|
+
exports.isMonorepo = __webpack_exports__.isMonorepo;
|
|
98
|
+
exports.isPnpmWorkspaces = __webpack_exports__.isPnpmWorkspaces;
|
|
99
|
+
exports.isYarnWorkspaces = __webpack_exports__.isYarnWorkspaces;
|
|
100
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
101
|
+
"findMonorepoRoot",
|
|
102
|
+
"getMonorepoPackages",
|
|
103
|
+
"isLerna",
|
|
104
|
+
"isMonorepo",
|
|
105
|
+
"isPnpmWorkspaces",
|
|
106
|
+
"isYarnWorkspaces"
|
|
107
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
108
|
+
Object.defineProperty(exports, '__esModule', {
|
|
109
|
+
value: true
|
|
110
|
+
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
canUseNpm: ()=>canUseNpm,
|
|
28
|
+
canUsePnpm: ()=>canUsePnpm,
|
|
29
|
+
canUseYarn: ()=>canUseYarn,
|
|
30
|
+
getPnpmVersion: ()=>getPnpmVersion,
|
|
31
|
+
removeModuleSyncFromExports: ()=>removeModuleSyncFromExports
|
|
32
|
+
});
|
|
33
|
+
const external_compiled_js_namespaceObject = require("../compiled.js");
|
|
34
|
+
async function getPnpmVersion() {
|
|
35
|
+
const { stdout } = await (0, external_compiled_js_namespaceObject.execa)('pnpm', [
|
|
36
|
+
'--version'
|
|
37
|
+
]);
|
|
38
|
+
return stdout;
|
|
39
|
+
}
|
|
40
|
+
async function canUseNpm() {
|
|
41
|
+
try {
|
|
42
|
+
await (0, external_compiled_js_namespaceObject.execa)('npm', [
|
|
43
|
+
'--version'
|
|
44
|
+
], {
|
|
45
|
+
env: process.env
|
|
46
|
+
});
|
|
47
|
+
return true;
|
|
48
|
+
} catch (e) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async function canUseYarn() {
|
|
53
|
+
try {
|
|
54
|
+
await (0, external_compiled_js_namespaceObject.execa)('yarn', [
|
|
55
|
+
'--version'
|
|
56
|
+
], {
|
|
57
|
+
env: process.env
|
|
58
|
+
});
|
|
59
|
+
return true;
|
|
60
|
+
} catch (e) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function canUsePnpm() {
|
|
65
|
+
try {
|
|
66
|
+
await (0, external_compiled_js_namespaceObject.execa)('pnpm', [
|
|
67
|
+
'--version'
|
|
68
|
+
], {
|
|
69
|
+
env: process.env
|
|
70
|
+
});
|
|
71
|
+
return true;
|
|
72
|
+
} catch (e) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function removeModuleSyncFromExports(exports1) {
|
|
77
|
+
if ('object' != typeof exports1 || null === exports1) return exports1;
|
|
78
|
+
if (Array.isArray(exports1)) return exports1.map(removeModuleSyncFromExports);
|
|
79
|
+
const result = {};
|
|
80
|
+
for (const [key, value] of Object.entries(exports1))if ('module-sync' !== key) result[key] = removeModuleSyncFromExports(value);
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
exports.canUseNpm = __webpack_exports__.canUseNpm;
|
|
84
|
+
exports.canUsePnpm = __webpack_exports__.canUsePnpm;
|
|
85
|
+
exports.canUseYarn = __webpack_exports__.canUseYarn;
|
|
86
|
+
exports.getPnpmVersion = __webpack_exports__.getPnpmVersion;
|
|
87
|
+
exports.removeModuleSyncFromExports = __webpack_exports__.removeModuleSyncFromExports;
|
|
88
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
89
|
+
"canUseNpm",
|
|
90
|
+
"canUsePnpm",
|
|
91
|
+
"canUseYarn",
|
|
92
|
+
"getPnpmVersion",
|
|
93
|
+
"removeModuleSyncFromExports"
|
|
94
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
95
|
+
Object.defineProperty(exports, '__esModule', {
|
|
96
|
+
value: true
|
|
97
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
formatImportPath: ()=>formatImportPath,
|
|
37
|
+
getRealTemporaryDirectory: ()=>getRealTemporaryDirectory,
|
|
38
|
+
getTemplatePath: ()=>getTemplatePath,
|
|
39
|
+
isPathString: ()=>isPathString,
|
|
40
|
+
isRelativePath: ()=>isRelativePath,
|
|
41
|
+
normalizeOutputPath: ()=>normalizeOutputPath,
|
|
42
|
+
normalizeToPosixPath: ()=>normalizeToPosixPath,
|
|
43
|
+
removeLeadingSlash: ()=>removeLeadingSlash,
|
|
44
|
+
removeSlash: ()=>removeSlash,
|
|
45
|
+
removeTailSlash: ()=>removeTailSlash,
|
|
46
|
+
splitPathString: ()=>splitPathString
|
|
47
|
+
});
|
|
48
|
+
const external_fs_namespaceObject = require("fs");
|
|
49
|
+
var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
|
|
50
|
+
const external_os_namespaceObject = require("os");
|
|
51
|
+
var external_os_default = /*#__PURE__*/ __webpack_require__.n(external_os_namespaceObject);
|
|
52
|
+
const external_path_namespaceObject = require("path");
|
|
53
|
+
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
54
|
+
const external_compiled_js_namespaceObject = require("../compiled.js");
|
|
55
|
+
const isPathString = (test)=>external_path_default().posix.basename(test) !== test || external_path_default().win32.basename(test) !== test;
|
|
56
|
+
const isRelativePath = (test)=>/^\.\.?($|[\\/])/.test(test);
|
|
57
|
+
const normalizeOutputPath = (s)=>s.replace(/\\/g, '\\\\');
|
|
58
|
+
const normalizeToPosixPath = (p)=>external_compiled_js_namespaceObject.upath.normalizeSafe(external_path_default().normalize(p || '')).replace(/^([a-zA-Z]+):/, (_, m)=>`/${m.toLowerCase()}`);
|
|
59
|
+
const getTemplatePath = (prefix)=>{
|
|
60
|
+
const tmpRoot = external_fs_default().realpathSync(external_os_default().tmpdir());
|
|
61
|
+
const parts = [
|
|
62
|
+
tmpRoot
|
|
63
|
+
];
|
|
64
|
+
prefix && parts.push(prefix);
|
|
65
|
+
parts.push((0, external_compiled_js_namespaceObject.nanoid)());
|
|
66
|
+
return external_path_default().resolve(...parts);
|
|
67
|
+
};
|
|
68
|
+
function getRealTemporaryDirectory() {
|
|
69
|
+
let ret = null;
|
|
70
|
+
try {
|
|
71
|
+
ret = external_os_default().tmpdir();
|
|
72
|
+
ret = external_fs_default().realpathSync(ret);
|
|
73
|
+
} catch {}
|
|
74
|
+
return ret;
|
|
75
|
+
}
|
|
76
|
+
function splitPathString(str) {
|
|
77
|
+
return str.split(/[\\/]/);
|
|
78
|
+
}
|
|
79
|
+
const removeLeadingSlash = (s)=>s.replace(/^\/+/, '');
|
|
80
|
+
const removeTailSlash = (s)=>s.replace(/\/+$/, '');
|
|
81
|
+
const removeSlash = (s)=>removeLeadingSlash(removeTailSlash(s));
|
|
82
|
+
function formatImportPath(str) {
|
|
83
|
+
return str.replace(/\\/g, '/');
|
|
84
|
+
}
|
|
85
|
+
exports.formatImportPath = __webpack_exports__.formatImportPath;
|
|
86
|
+
exports.getRealTemporaryDirectory = __webpack_exports__.getRealTemporaryDirectory;
|
|
87
|
+
exports.getTemplatePath = __webpack_exports__.getTemplatePath;
|
|
88
|
+
exports.isPathString = __webpack_exports__.isPathString;
|
|
89
|
+
exports.isRelativePath = __webpack_exports__.isRelativePath;
|
|
90
|
+
exports.normalizeOutputPath = __webpack_exports__.normalizeOutputPath;
|
|
91
|
+
exports.normalizeToPosixPath = __webpack_exports__.normalizeToPosixPath;
|
|
92
|
+
exports.removeLeadingSlash = __webpack_exports__.removeLeadingSlash;
|
|
93
|
+
exports.removeSlash = __webpack_exports__.removeSlash;
|
|
94
|
+
exports.removeTailSlash = __webpack_exports__.removeTailSlash;
|
|
95
|
+
exports.splitPathString = __webpack_exports__.splitPathString;
|
|
96
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
97
|
+
"formatImportPath",
|
|
98
|
+
"getRealTemporaryDirectory",
|
|
99
|
+
"getTemplatePath",
|
|
100
|
+
"isPathString",
|
|
101
|
+
"isRelativePath",
|
|
102
|
+
"normalizeOutputPath",
|
|
103
|
+
"normalizeToPosixPath",
|
|
104
|
+
"removeLeadingSlash",
|
|
105
|
+
"removeSlash",
|
|
106
|
+
"removeTailSlash",
|
|
107
|
+
"splitPathString"
|
|
108
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
109
|
+
Object.defineProperty(exports, '__esModule', {
|
|
110
|
+
value: true
|
|
111
|
+
});
|