@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,5 @@
|
|
|
1
|
+
export { createMatchPath, matchFromAbsolutePaths, MatchPath, } from "./match-path-sync";
|
|
2
|
+
export { createMatchPathAsync, matchFromAbsolutePathsAsync, MatchPathAsync, } from "./match-path-async";
|
|
3
|
+
export { register } from "./register";
|
|
4
|
+
export { loadConfig, ConfigLoaderResult, ConfigLoaderSuccessResult, ConfigLoaderFailResult, } from "./config-loader";
|
|
5
|
+
export { ReadJsonSync, ReadJsonAsync, FileExistsSync, FileExistsAsync, } from "./filesystem";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface MappingEntry {
|
|
2
|
+
readonly pattern: string;
|
|
3
|
+
readonly paths: ReadonlyArray<string>;
|
|
4
|
+
}
|
|
5
|
+
export interface Paths {
|
|
6
|
+
readonly [key: string]: ReadonlyArray<string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Converts an absolute baseUrl and paths to an array of absolute mapping entries.
|
|
10
|
+
* The array is sorted by longest prefix.
|
|
11
|
+
* Having an array with entries allows us to keep a sorting order rather than
|
|
12
|
+
* sort by keys each time we use the mappings.
|
|
13
|
+
*
|
|
14
|
+
* @param absoluteBaseUrl
|
|
15
|
+
* @param paths
|
|
16
|
+
* @param addMatchAll
|
|
17
|
+
*/
|
|
18
|
+
export declare function getAbsoluteMappingEntries(absoluteBaseUrl: string, paths: Paths, addMatchAll: boolean): ReadonlyArray<MappingEntry>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as MappingEntry from "./mapping-entry";
|
|
2
|
+
import * as Filesystem from "./filesystem";
|
|
3
|
+
/**
|
|
4
|
+
* Function that can match a path async
|
|
5
|
+
*/
|
|
6
|
+
export interface MatchPathAsync {
|
|
7
|
+
(requestedModule: string, readJson: Filesystem.ReadJsonAsync | undefined, fileExists: Filesystem.FileExistsAsync | undefined, extensions: ReadonlyArray<string> | undefined, callback: MatchPathAsyncCallback): void;
|
|
8
|
+
}
|
|
9
|
+
export interface MatchPathAsyncCallback {
|
|
10
|
+
(err?: Error, path?: string): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* See the sync version for docs.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createMatchPathAsync(absoluteBaseUrl: string, paths: {
|
|
16
|
+
[key: string]: Array<string>;
|
|
17
|
+
}, mainFields?: (string | string[])[], addMatchAll?: boolean): MatchPathAsync;
|
|
18
|
+
/**
|
|
19
|
+
* See the sync version for docs.
|
|
20
|
+
*/
|
|
21
|
+
export declare function matchFromAbsolutePathsAsync(absolutePathMappings: ReadonlyArray<MappingEntry.MappingEntry>, requestedModule: string, readJson: Filesystem.ReadJsonAsync | undefined, fileExists: Filesystem.FileExistsAsync | undefined, extensions: readonly string[] | undefined, callback: MatchPathAsyncCallback, mainFields?: (string | string[])[]): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as Filesystem from "./filesystem";
|
|
2
|
+
import * as MappingEntry from "./mapping-entry";
|
|
3
|
+
/**
|
|
4
|
+
* Function that can match a path
|
|
5
|
+
*/
|
|
6
|
+
export interface MatchPath {
|
|
7
|
+
(requestedModule: string, readJson?: Filesystem.ReadJsonSync, fileExists?: (name: string) => boolean, extensions?: ReadonlyArray<string>): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates a function that can resolve paths according to tsconfig paths property.
|
|
11
|
+
*
|
|
12
|
+
* @param absoluteBaseUrl Absolute version of baseUrl as specified in tsconfig.
|
|
13
|
+
* @param paths The paths as specified in tsconfig.
|
|
14
|
+
* @param mainFields A list of package.json field names to try when resolving module files. Select a nested field using an array of field names.
|
|
15
|
+
* @param addMatchAll Add a match-all "*" rule if none is present
|
|
16
|
+
* @returns a function that can resolve paths.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createMatchPath(absoluteBaseUrl: string, paths: {
|
|
19
|
+
[key: string]: Array<string>;
|
|
20
|
+
}, mainFields?: (string | string[])[], addMatchAll?: boolean): MatchPath;
|
|
21
|
+
/**
|
|
22
|
+
* Finds a path from tsconfig that matches a module load request.
|
|
23
|
+
*
|
|
24
|
+
* @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form.
|
|
25
|
+
* @param requestedModule The required module name.
|
|
26
|
+
* @param readJson Function that can read json from a path (useful for testing).
|
|
27
|
+
* @param fileExists Function that checks for existence of a file at a path (useful for testing).
|
|
28
|
+
* @param extensions File extensions to probe for (useful for testing).
|
|
29
|
+
* @param mainFields A list of package.json field names to try when resolving module files. Select a nested field using an array of field names.
|
|
30
|
+
* @returns the found path, or undefined if no path was found.
|
|
31
|
+
*/
|
|
32
|
+
export declare function matchFromAbsolutePaths(absolutePathMappings: ReadonlyArray<MappingEntry.MappingEntry>, requestedModule: string, readJson?: Filesystem.ReadJsonSync, fileExists?: Filesystem.FileExistsSync, extensions?: Array<string>, mainFields?: (string | string[])[]): string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExplicitParams } from "./config-loader";
|
|
2
|
+
export interface RegisterParams extends ExplicitParams {
|
|
3
|
+
/**
|
|
4
|
+
* Defaults to `--project` CLI flag or `process.cwd()`
|
|
5
|
+
*/
|
|
6
|
+
cwd?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Installs a custom module load function that can adhere to paths in tsconfig.
|
|
10
|
+
* Returns a function to undo paths registration.
|
|
11
|
+
*/
|
|
12
|
+
export declare function register(params?: RegisterParams): () => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MappingEntry } from "./mapping-entry";
|
|
2
|
+
export interface TryPath {
|
|
3
|
+
readonly type: "file" | "extension" | "index" | "package";
|
|
4
|
+
readonly path: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Builds a list of all physical paths to try by:
|
|
8
|
+
* 1. Check for file named exactly as request.
|
|
9
|
+
* 2. Check for files named as request ending in any of the extensions.
|
|
10
|
+
* 3. Check for file specified in package.json's main property.
|
|
11
|
+
* 4. Check for files named as request ending in "index" with any of the extensions.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getPathsToTry(extensions: ReadonlyArray<string>, absolutePathMappings: ReadonlyArray<MappingEntry>, requestedModule: string): ReadonlyArray<TryPath> | undefined;
|
|
14
|
+
export declare function getStrippedPath(tryPath: TryPath): string;
|
|
15
|
+
export declare function exhaustiveTypeException(check: never): never;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typing for the parts of tsconfig that we care about
|
|
3
|
+
*/
|
|
4
|
+
export interface Tsconfig {
|
|
5
|
+
extends?: string;
|
|
6
|
+
compilerOptions?: {
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
paths?: {
|
|
9
|
+
[key: string]: Array<string>;
|
|
10
|
+
};
|
|
11
|
+
strict?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface TsConfigLoaderResult {
|
|
15
|
+
tsConfigPath: string | undefined;
|
|
16
|
+
baseUrl: string | undefined;
|
|
17
|
+
paths: {
|
|
18
|
+
[key: string]: Array<string>;
|
|
19
|
+
} | undefined;
|
|
20
|
+
}
|
|
21
|
+
export interface TsConfigLoaderParams {
|
|
22
|
+
getEnv: (key: string) => string | undefined;
|
|
23
|
+
cwd: string;
|
|
24
|
+
loadSync?(cwd: string, filename?: string, baseUrl?: string): TsConfigLoaderResult;
|
|
25
|
+
}
|
|
26
|
+
export declare function tsConfigLoader({ getEnv, cwd, loadSync, }: TsConfigLoaderParams): TsConfigLoaderResult;
|
|
27
|
+
export declare function walkForTsConfig(directory: string, readdirSync?: (path: string) => string[]): string | undefined;
|
|
28
|
+
export declare function loadTsconfig(configFilePath: string, existsSync?: (path: string) => boolean, readFileSync?: (filename: string) => string): Tsconfig | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Jonas Kello
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"tsconfig-paths","author":"Jonas Kello","version":"4.1.1","license":"MIT","types":"lib/index.d.ts"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
(()=>{
|
|
2
|
+
var e = {
|
|
3
|
+
472: (e, t, r)=>{
|
|
4
|
+
var n = "2.0.1";
|
|
5
|
+
var i, u, a, f, l, s, o, c, h, p, _, x = [].slice, d = [].indexOf || function(e) {
|
|
6
|
+
for(var t = 0, r = this.length; t < r; t++)if (t in this && this[t] === e) return t;
|
|
7
|
+
return -1;
|
|
8
|
+
}, m = {}.hasOwnProperty;
|
|
9
|
+
o = r(17);
|
|
10
|
+
a = function(e) {
|
|
11
|
+
return "function" == typeof e;
|
|
12
|
+
};
|
|
13
|
+
f = function(e) {
|
|
14
|
+
return "string" == typeof e || !!e && "object" == typeof e && "[object String]" === Object.prototype.toString.call(e);
|
|
15
|
+
};
|
|
16
|
+
_ = t;
|
|
17
|
+
_.VERSION = null != n ? n : "NO-VERSION";
|
|
18
|
+
p = function(e) {
|
|
19
|
+
e = e.replace(/\\/g, "/");
|
|
20
|
+
e = e.replace(/(?<!^)\/+/g, "/");
|
|
21
|
+
return e;
|
|
22
|
+
};
|
|
23
|
+
for(c in o){
|
|
24
|
+
h = o[c];
|
|
25
|
+
if (a(h)) _[c] = function(e) {
|
|
26
|
+
return function() {
|
|
27
|
+
var t, r;
|
|
28
|
+
t = 1 <= arguments.length ? x.call(arguments, 0) : [];
|
|
29
|
+
t = t.map(function(e) {
|
|
30
|
+
if (f(e)) return p(e);
|
|
31
|
+
return e;
|
|
32
|
+
});
|
|
33
|
+
r = o[e].apply(o, t);
|
|
34
|
+
if (f(r)) return p(r);
|
|
35
|
+
return r;
|
|
36
|
+
};
|
|
37
|
+
}(c);
|
|
38
|
+
else _[c] = h;
|
|
39
|
+
}
|
|
40
|
+
_.sep = "/";
|
|
41
|
+
u = {
|
|
42
|
+
toUnix: p,
|
|
43
|
+
normalizeSafe: function(e) {
|
|
44
|
+
var t;
|
|
45
|
+
e = p(e);
|
|
46
|
+
t = _.normalize(e);
|
|
47
|
+
if (!e.startsWith("./") || t.startsWith("./") || t.startsWith("..")) {
|
|
48
|
+
if (e.startsWith("//") && !t.startsWith("//")) t = e.startsWith("//./") ? "//." + t : "/" + t;
|
|
49
|
+
} else t = "./" + t;
|
|
50
|
+
return t;
|
|
51
|
+
},
|
|
52
|
+
normalizeTrim: function(e) {
|
|
53
|
+
e = _.normalizeSafe(e);
|
|
54
|
+
if (e.endsWith("/")) return e.slice(0, +(e.length - 2) + 1 || 9e9);
|
|
55
|
+
return e;
|
|
56
|
+
},
|
|
57
|
+
joinSafe: function() {
|
|
58
|
+
var e, t, r;
|
|
59
|
+
e = 1 <= arguments.length ? x.call(arguments, 0) : [];
|
|
60
|
+
r = _.join.apply(null, e);
|
|
61
|
+
if (e.length > 0) {
|
|
62
|
+
t = p(e[0]);
|
|
63
|
+
if (!t.startsWith("./") || r.startsWith("./") || r.startsWith("..")) {
|
|
64
|
+
if (t.startsWith("//") && !r.startsWith("//")) r = t.startsWith("//./") ? "//." + r : "/" + r;
|
|
65
|
+
} else r = "./" + r;
|
|
66
|
+
}
|
|
67
|
+
return r;
|
|
68
|
+
},
|
|
69
|
+
addExt: function(e, t) {
|
|
70
|
+
if (!t) return e;
|
|
71
|
+
if ("." !== t[0]) t = "." + t;
|
|
72
|
+
return e + (e.endsWith(t) ? "" : t);
|
|
73
|
+
},
|
|
74
|
+
trimExt: function(e, t, r) {
|
|
75
|
+
var n;
|
|
76
|
+
if (null == r) r = 7;
|
|
77
|
+
n = _.extname(e);
|
|
78
|
+
if (l(n, t, r)) return e.slice(0, +(e.length - n.length - 1) + 1 || 9e9);
|
|
79
|
+
return e;
|
|
80
|
+
},
|
|
81
|
+
removeExt: function(e, t) {
|
|
82
|
+
if (!t) return e;
|
|
83
|
+
t = "." === t[0] ? t : "." + t;
|
|
84
|
+
if (_.extname(e) === t) return _.trimExt(e, [], t.length);
|
|
85
|
+
return e;
|
|
86
|
+
},
|
|
87
|
+
changeExt: function(e, t, r, n) {
|
|
88
|
+
if (null == n) n = 7;
|
|
89
|
+
return _.trimExt(e, r, n) + (t ? "." === t[0] ? t : "." + t : "");
|
|
90
|
+
},
|
|
91
|
+
defaultExt: function(e, t, r, n) {
|
|
92
|
+
var i;
|
|
93
|
+
if (null == n) n = 7;
|
|
94
|
+
i = _.extname(e);
|
|
95
|
+
if (l(i, r, n)) return e;
|
|
96
|
+
return _.addExt(e, t);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
l = function(e, t, r) {
|
|
100
|
+
if (null == t) t = [];
|
|
101
|
+
return e && e.length <= r && d.call(t.map(function(e) {
|
|
102
|
+
return (e && "." !== e[0] ? "." : "") + e;
|
|
103
|
+
}), e) < 0;
|
|
104
|
+
};
|
|
105
|
+
for(s in u)if (m.call(u, s)) {
|
|
106
|
+
i = u[s];
|
|
107
|
+
if (void 0 !== _[s]) throw new Error("path." + s + " already exists.");
|
|
108
|
+
_[s] = i;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
17: (e)=>{
|
|
112
|
+
"use strict";
|
|
113
|
+
e.exports = require("path");
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
var t = {};
|
|
117
|
+
function __nccwpck_require__(r) {
|
|
118
|
+
var n = t[r];
|
|
119
|
+
if (void 0 !== n) return n.exports;
|
|
120
|
+
var i = t[r] = {
|
|
121
|
+
exports: {}
|
|
122
|
+
};
|
|
123
|
+
var u = true;
|
|
124
|
+
try {
|
|
125
|
+
e[r](i, i.exports, __nccwpck_require__);
|
|
126
|
+
u = false;
|
|
127
|
+
} finally{
|
|
128
|
+
if (u) delete t[r];
|
|
129
|
+
}
|
|
130
|
+
return i.exports;
|
|
131
|
+
}
|
|
132
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
133
|
+
var r = __nccwpck_require__(472);
|
|
134
|
+
module.exports = r;
|
|
135
|
+
})();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright(c) 2014-2020 Angelos Pikoulas (agelos.pikoulas@gmail.com)
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
|
4
|
+
obtaining a copy of this software and associated documentation
|
|
5
|
+
files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use,
|
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the
|
|
9
|
+
Software is furnished to do so, subject to the following
|
|
10
|
+
conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"upath","author":{"name":"Angelos Pikoulas","email":"agelos.pikoulas@gmail.com"},"version":"2.0.1","license":"MIT","types":"./upath.d.ts"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
declare namespace upath {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A parsed path object generated by path.parse() or consumed by path.format().
|
|
5
|
+
*/
|
|
6
|
+
export interface ParsedPath {
|
|
7
|
+
/**
|
|
8
|
+
* The root of the path such as '/' or 'c:\'
|
|
9
|
+
*/
|
|
10
|
+
root: string;
|
|
11
|
+
/**
|
|
12
|
+
* The full directory path such as '/home/user/dir' or 'c:\path\dir'
|
|
13
|
+
*/
|
|
14
|
+
dir: string;
|
|
15
|
+
/**
|
|
16
|
+
* The file name including extension (if any) such as 'index.html'
|
|
17
|
+
*/
|
|
18
|
+
base: string;
|
|
19
|
+
/**
|
|
20
|
+
* The file extension (if any) such as '.html'
|
|
21
|
+
*/
|
|
22
|
+
ext: string;
|
|
23
|
+
/**
|
|
24
|
+
* The file name without extension (if any) such as 'index'
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Version of the library
|
|
31
|
+
*/
|
|
32
|
+
export var VERSION: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Just converts all `to/` and consolidates duplicates, without performing any normalization.
|
|
36
|
+
*
|
|
37
|
+
* @param p string path to convert to unix.
|
|
38
|
+
*/
|
|
39
|
+
export function toUnix(p: string): string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Exactly like path.normalize(path), but it keeps the first meaningful ./.
|
|
43
|
+
*
|
|
44
|
+
* Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
|
|
45
|
+
*
|
|
46
|
+
* @param p string path to normalize.
|
|
47
|
+
*/
|
|
48
|
+
export function normalizeSafe(p: string): string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Exactly like path.normalizeSafe(path), but it trims any useless ending /.
|
|
52
|
+
*
|
|
53
|
+
* @param p string path to normalize
|
|
54
|
+
*/
|
|
55
|
+
export function normalizeTrim(p: string): string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Exactly like path.join(), but it keeps the first meaningful ./.
|
|
59
|
+
*
|
|
60
|
+
* Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
|
|
61
|
+
*
|
|
62
|
+
* @param paths string paths to join
|
|
63
|
+
*/
|
|
64
|
+
export function joinSafe(...p: any[]): string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Adds .ext to filename, but only if it doesn't already have the exact extension.
|
|
68
|
+
*
|
|
69
|
+
* @param file string filename to add extension to
|
|
70
|
+
* @param ext string extension to add
|
|
71
|
+
*/
|
|
72
|
+
export function addExt(file: string, ext: string): string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Trims a filename's extension.
|
|
76
|
+
*
|
|
77
|
+
* Extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
|
|
78
|
+
*
|
|
79
|
+
* An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not trimmed.
|
|
80
|
+
*
|
|
81
|
+
* @param filename string filename to trim it's extension
|
|
82
|
+
* @param ignoreExts array extensions to ignore
|
|
83
|
+
* @param maxSize number max length of the extension
|
|
84
|
+
*/
|
|
85
|
+
export function trimExt(filename: string, ignoreExts?: string[], maxSize?: number): string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Removes the specific ext extension from filename, if it has it. Otherwise it leaves it as is. As in all upath functions, it be .ext or ext.
|
|
89
|
+
*
|
|
90
|
+
* @param file string filename to remove extension to
|
|
91
|
+
* @param ext string extension to remove
|
|
92
|
+
*/
|
|
93
|
+
export function removeExt(filename: string, ext: string): string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Changes a filename's extension to ext. If it has no (valid) extension, it adds it.
|
|
97
|
+
*
|
|
98
|
+
* Valid extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
|
|
99
|
+
*
|
|
100
|
+
* An Array of ignoreExts (eg ['.min']) prevents these from being considered as extension, thus are not changed - the new extension is added instead.
|
|
101
|
+
*
|
|
102
|
+
* @param filename string filename to change it's extension
|
|
103
|
+
* @param ext string extension to change to
|
|
104
|
+
* @param ignoreExts array extensions to ignore
|
|
105
|
+
* @param maxSize number max length of the extension
|
|
106
|
+
*/
|
|
107
|
+
export function changeExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Adds .ext to filename, only if it doesn't already have any old extension.
|
|
111
|
+
*
|
|
112
|
+
* (Old) extensions are considered to be up to maxSize chars long, counting the dot (defaults to 7).
|
|
113
|
+
*
|
|
114
|
+
* An Array of ignoreExts (eg ['.min']) will force adding default .ext even if one of these is present.
|
|
115
|
+
*
|
|
116
|
+
* @param filename string filename to default to it's extension
|
|
117
|
+
* @param ext string extension to default to
|
|
118
|
+
* @param ignoreExts array extensions to ignore
|
|
119
|
+
* @param maxSize number max length of the extension
|
|
120
|
+
*/
|
|
121
|
+
export function defaultExt(filename: string, ext: string, ignoreExts?: string[], maxSize?: number): string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Normalize a string path, reducing '..' and '.' parts.
|
|
125
|
+
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
|
|
126
|
+
*
|
|
127
|
+
* @param p string path to normalize.
|
|
128
|
+
*/
|
|
129
|
+
export function normalize(p: string): string;
|
|
130
|
+
/**
|
|
131
|
+
* Join all arguments together and normalize the resulting path.
|
|
132
|
+
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
|
|
133
|
+
*
|
|
134
|
+
* @param paths string paths to join.
|
|
135
|
+
*/
|
|
136
|
+
export function join(...paths: any[]): string;
|
|
137
|
+
/**
|
|
138
|
+
* Join all arguments together and normalize the resulting path.
|
|
139
|
+
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
|
|
140
|
+
*
|
|
141
|
+
* @param paths string paths to join.
|
|
142
|
+
*/
|
|
143
|
+
export function join(...paths: string[]): string;
|
|
144
|
+
/**
|
|
145
|
+
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
|
146
|
+
*
|
|
147
|
+
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
|
|
148
|
+
*
|
|
149
|
+
* If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.
|
|
150
|
+
*
|
|
151
|
+
* @param pathSegments string paths to join. Non-string arguments are ignored.
|
|
152
|
+
*/
|
|
153
|
+
export function resolve(...pathSegments: any[]): string;
|
|
154
|
+
/**
|
|
155
|
+
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
|
|
156
|
+
*
|
|
157
|
+
* @param path path to test.
|
|
158
|
+
*/
|
|
159
|
+
export function isAbsolute(path: string): boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Solve the relative path from {from} to {to}.
|
|
162
|
+
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
|
|
163
|
+
*
|
|
164
|
+
* @param from
|
|
165
|
+
* @param to
|
|
166
|
+
*/
|
|
167
|
+
export function relative(from: string, to: string): string;
|
|
168
|
+
/**
|
|
169
|
+
* Return the directory name of a path. Similar to the Unix dirname command.
|
|
170
|
+
*
|
|
171
|
+
* @param p the path to evaluate.
|
|
172
|
+
*/
|
|
173
|
+
export function dirname(p: string): string;
|
|
174
|
+
/**
|
|
175
|
+
* Return the last portion of a path. Similar to the Unix basename command.
|
|
176
|
+
* Often used to extract the file name from a fully qualified path.
|
|
177
|
+
*
|
|
178
|
+
* @param p the path to evaluate.
|
|
179
|
+
* @param ext optionally, an extension to remove from the result.
|
|
180
|
+
*/
|
|
181
|
+
export function basename(p: string, ext?: string): string;
|
|
182
|
+
/**
|
|
183
|
+
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
|
|
184
|
+
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
|
|
185
|
+
*
|
|
186
|
+
* @param p the path to evaluate.
|
|
187
|
+
*/
|
|
188
|
+
export function extname(p: string): string;
|
|
189
|
+
/**
|
|
190
|
+
* The platform-specific file separator. '\\' or '/'.
|
|
191
|
+
*/
|
|
192
|
+
export var sep: string;
|
|
193
|
+
/**
|
|
194
|
+
* The platform-specific file delimiter. ';' or ':'.
|
|
195
|
+
*/
|
|
196
|
+
export var delimiter: string;
|
|
197
|
+
/**
|
|
198
|
+
* Returns an object from a path string - the opposite of format().
|
|
199
|
+
*
|
|
200
|
+
* @param pathString path to evaluate.
|
|
201
|
+
*/
|
|
202
|
+
export function parse(pathString: string): ParsedPath;
|
|
203
|
+
/**
|
|
204
|
+
* Returns a path string from an object - the opposite of parse().
|
|
205
|
+
*
|
|
206
|
+
* @param pathString path to evaluate.
|
|
207
|
+
*/
|
|
208
|
+
export function format(pathObject: ParsedPath): string;
|
|
209
|
+
|
|
210
|
+
export module posix {
|
|
211
|
+
export function normalize(p: string): string;
|
|
212
|
+
export function join(...paths: any[]): string;
|
|
213
|
+
export function resolve(...pathSegments: any[]): string;
|
|
214
|
+
export function isAbsolute(p: string): boolean;
|
|
215
|
+
export function relative(from: string, to: string): string;
|
|
216
|
+
export function dirname(p: string): string;
|
|
217
|
+
export function basename(p: string, ext?: string): string;
|
|
218
|
+
export function extname(p: string): string;
|
|
219
|
+
export var sep: string;
|
|
220
|
+
export var delimiter: string;
|
|
221
|
+
export function parse(p: string): ParsedPath;
|
|
222
|
+
export function format(pP: ParsedPath): string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export module win32 {
|
|
226
|
+
export function normalize(p: string): string;
|
|
227
|
+
export function join(...paths: any[]): string;
|
|
228
|
+
export function resolve(...pathSegments: any[]): string;
|
|
229
|
+
export function isAbsolute(p: string): boolean;
|
|
230
|
+
export function relative(from: string, to: string): string;
|
|
231
|
+
export function dirname(p: string): string;
|
|
232
|
+
export function basename(p: string, ext?: string): string;
|
|
233
|
+
export function extname(p: string): string;
|
|
234
|
+
export var sep: string;
|
|
235
|
+
export var delimiter: string;
|
|
236
|
+
export function parse(p: string): ParsedPath;
|
|
237
|
+
export function format(pP: ParsedPath): string;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export = upath;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Type definitions for url-join 4.0
|
|
2
|
+
// Project: https://github.com/jfromaniello/url-join
|
|
3
|
+
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
|
4
|
+
// Mike Deverell <https://github.com/devrelm>
|
|
5
|
+
// BendingBender <https://github.com/BendingBender>
|
|
6
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Join all arguments together and normalize the resulting url.
|
|
10
|
+
* This works similar to `path.join` but you shouldn't use `path.join` for urls since it works
|
|
11
|
+
* differently depending on the operating system and also doesn't work for some cases.
|
|
12
|
+
*/
|
|
13
|
+
declare function urljoin(...parts: string[]): string;
|
|
14
|
+
declare function urljoin(parts: string[]): string;
|
|
15
|
+
|
|
16
|
+
export = urljoin;
|
|
17
|
+
export as namespace urljoin;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
(()=>{
|
|
2
|
+
var e = {
|
|
3
|
+
670: function(e) {
|
|
4
|
+
(function(r, i, t) {
|
|
5
|
+
if (e.exports) e.exports = t();
|
|
6
|
+
else if ("function" == typeof define && define.amd) define(t);
|
|
7
|
+
else i[r] = t();
|
|
8
|
+
})("urljoin", this, function() {
|
|
9
|
+
function normalize(e) {
|
|
10
|
+
var r = [];
|
|
11
|
+
if (0 === e.length) return "";
|
|
12
|
+
if ("string" != typeof e[0]) throw new TypeError("Url must be a string. Received " + e[0]);
|
|
13
|
+
if (e[0].match(/^[^/:]+:\/*$/) && e.length > 1) {
|
|
14
|
+
var i = e.shift();
|
|
15
|
+
e[0] = i + e[0];
|
|
16
|
+
}
|
|
17
|
+
if (e[0].match(/^file:\/\/\//)) e[0] = e[0].replace(/^([^/:]+):\/*/, "$1:///");
|
|
18
|
+
else e[0] = e[0].replace(/^([^/:]+):\/*/, "$1://");
|
|
19
|
+
for(var t = 0; t < e.length; t++){
|
|
20
|
+
var n = e[t];
|
|
21
|
+
if ("string" != typeof n) throw new TypeError("Url must be a string. Received " + n);
|
|
22
|
+
if ("" !== n) {
|
|
23
|
+
if (t > 0) n = n.replace(/^[\/]+/, "");
|
|
24
|
+
n = t < e.length - 1 ? n.replace(/[\/]+$/, "") : n.replace(/[\/]+$/, "/");
|
|
25
|
+
r.push(n);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
var a = r.join("/");
|
|
29
|
+
a = a.replace(/\/(\?|&|#[^!])/g, "$1");
|
|
30
|
+
var f = a.split("?");
|
|
31
|
+
a = f.shift() + (f.length > 0 ? "?" : "") + f.join("&");
|
|
32
|
+
return a;
|
|
33
|
+
}
|
|
34
|
+
return function() {
|
|
35
|
+
var e;
|
|
36
|
+
e = "object" == typeof arguments[0] ? arguments[0] : [].slice.call(arguments);
|
|
37
|
+
return normalize(e);
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var r = {};
|
|
43
|
+
function __nccwpck_require__(i) {
|
|
44
|
+
var t = r[i];
|
|
45
|
+
if (void 0 !== t) return t.exports;
|
|
46
|
+
var n = r[i] = {
|
|
47
|
+
exports: {}
|
|
48
|
+
};
|
|
49
|
+
var a = true;
|
|
50
|
+
try {
|
|
51
|
+
e[i].call(n.exports, n, n.exports, __nccwpck_require__);
|
|
52
|
+
a = false;
|
|
53
|
+
} finally{
|
|
54
|
+
if (a) delete r[i];
|
|
55
|
+
}
|
|
56
|
+
return n.exports;
|
|
57
|
+
}
|
|
58
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
59
|
+
var i = __nccwpck_require__(670);
|
|
60
|
+
module.exports = i;
|
|
61
|
+
})();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 José F. Romaniello
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|