@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,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* mime-db
|
|
3
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
4
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*!
|
|
9
|
+
* mime-types
|
|
10
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
11
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
12
|
+
* MIT Licensed
|
|
13
|
+
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
|
4
|
+
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
7
|
+
a copy of this software and associated documentation files (the
|
|
8
|
+
'Software'), to deal in the Software without restriction, including
|
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
12
|
+
the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be
|
|
15
|
+
included in all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
19
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
20
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
21
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
22
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
23
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"mime-types","version":"2.1.35","license":"MIT"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// Type definitions for minimist 1.2
|
|
2
|
+
// Project: https://github.com/substack/minimist
|
|
3
|
+
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
|
4
|
+
// Necroskillz <https://github.com/Necroskillz>
|
|
5
|
+
// kamranayub <https://github.com/kamranayub>
|
|
6
|
+
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
7
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Return an argument object populated with the array arguments from args
|
|
11
|
+
*
|
|
12
|
+
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
|
|
13
|
+
* @param [opts] An optional options object to customize the parsing
|
|
14
|
+
*/
|
|
15
|
+
declare function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Return an argument object populated with the array arguments from args. Strongly-typed
|
|
19
|
+
* to be the intersect of type T with minimist.ParsedArgs.
|
|
20
|
+
*
|
|
21
|
+
* `T` The type that will be intersected with minimist.ParsedArgs to represent the argument object
|
|
22
|
+
*
|
|
23
|
+
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
|
|
24
|
+
* @param [opts] An optional options object to customize the parsing
|
|
25
|
+
*/
|
|
26
|
+
declare function minimist<T>(args?: string[], opts?: minimist.Opts): T & minimist.ParsedArgs;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Return an argument object populated with the array arguments from args. Strongly-typed
|
|
30
|
+
* to be the the type T which should extend minimist.ParsedArgs
|
|
31
|
+
*
|
|
32
|
+
* `T` The type that extends minimist.ParsedArgs and represents the argument object
|
|
33
|
+
*
|
|
34
|
+
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
|
|
35
|
+
* @param [opts] An optional options object to customize the parsing
|
|
36
|
+
*/
|
|
37
|
+
declare function minimist<T extends minimist.ParsedArgs>(args?: string[], opts?: minimist.Opts): T;
|
|
38
|
+
|
|
39
|
+
declare namespace minimist {
|
|
40
|
+
interface Opts {
|
|
41
|
+
/**
|
|
42
|
+
* A string or array of strings argument names to always treat as strings
|
|
43
|
+
*/
|
|
44
|
+
string?: string | string[] | undefined;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A boolean, string or array of strings to always treat as booleans. If true will treat
|
|
48
|
+
* all double hyphenated arguments without equals signs as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
|
|
49
|
+
*/
|
|
50
|
+
boolean?: boolean | string | string[] | undefined;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* An object mapping string names to strings or arrays of string argument names to use as aliases
|
|
54
|
+
*/
|
|
55
|
+
alias?: { [key: string]: string | string[] } | undefined;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* An object mapping string argument names to default values
|
|
59
|
+
*/
|
|
60
|
+
default?: { [key: string]: any } | undefined;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* When true, populate argv._ with everything after the first non-option
|
|
64
|
+
*/
|
|
65
|
+
stopEarly?: boolean | undefined;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* A function which is invoked with a command line parameter not defined in the opts
|
|
69
|
+
* configuration object. If the function returns false, the unknown option is not added to argv
|
|
70
|
+
*/
|
|
71
|
+
unknown?: ((arg: string) => boolean) | undefined;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* When true, populate argv._ with everything before the -- and argv['--'] with everything after the --.
|
|
75
|
+
* Note that with -- set, parsing for arguments still stops after the `--`.
|
|
76
|
+
*/
|
|
77
|
+
'--'?: boolean | undefined;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface ParsedArgs {
|
|
81
|
+
[arg: string]: any;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* If opts['--'] is true, populated with everything after the --
|
|
85
|
+
*/
|
|
86
|
+
'--'?: string[] | undefined;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Contains all the arguments that didn't have an option associated with them
|
|
90
|
+
*/
|
|
91
|
+
_: string[];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export = minimist;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
(()=>{
|
|
2
|
+
var e = {
|
|
3
|
+
319: (e)=>{
|
|
4
|
+
e.exports = function(e, t) {
|
|
5
|
+
if (!t) t = {};
|
|
6
|
+
var r = {
|
|
7
|
+
bools: {},
|
|
8
|
+
strings: {},
|
|
9
|
+
unknownFn: null
|
|
10
|
+
};
|
|
11
|
+
if ("function" == typeof t["unknown"]) r.unknownFn = t["unknown"];
|
|
12
|
+
if ("boolean" == typeof t["boolean"] && t["boolean"]) r.allBools = true;
|
|
13
|
+
else [].concat(t["boolean"]).filter(Boolean).forEach(function(e) {
|
|
14
|
+
r.bools[e] = true;
|
|
15
|
+
});
|
|
16
|
+
var n = {};
|
|
17
|
+
Object.keys(t.alias || {}).forEach(function(e) {
|
|
18
|
+
n[e] = [].concat(t.alias[e]);
|
|
19
|
+
n[e].forEach(function(t) {
|
|
20
|
+
n[t] = [
|
|
21
|
+
e
|
|
22
|
+
].concat(n[e].filter(function(e) {
|
|
23
|
+
return t !== e;
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
[].concat(t.string).filter(Boolean).forEach(function(e) {
|
|
28
|
+
r.strings[e] = true;
|
|
29
|
+
if (n[e]) r.strings[n[e]] = true;
|
|
30
|
+
});
|
|
31
|
+
var o = t["default"] || {};
|
|
32
|
+
var s = {
|
|
33
|
+
_: []
|
|
34
|
+
};
|
|
35
|
+
Object.keys(r.bools).forEach(function(e) {
|
|
36
|
+
setArg(e, void 0 === o[e] ? false : o[e]);
|
|
37
|
+
});
|
|
38
|
+
var i = [];
|
|
39
|
+
if (-1 !== e.indexOf("--")) {
|
|
40
|
+
i = e.slice(e.indexOf("--") + 1);
|
|
41
|
+
e = e.slice(0, e.indexOf("--"));
|
|
42
|
+
}
|
|
43
|
+
function argDefined(e, t) {
|
|
44
|
+
return r.allBools && /^--[^=]+$/.test(t) || r.strings[e] || r.bools[e] || n[e];
|
|
45
|
+
}
|
|
46
|
+
function setArg(e, t, o) {
|
|
47
|
+
if (o && r.unknownFn && !argDefined(e, o)) {
|
|
48
|
+
if (false === r.unknownFn(o)) return;
|
|
49
|
+
}
|
|
50
|
+
var i = !r.strings[e] && isNumber(t) ? Number(t) : t;
|
|
51
|
+
setKey(s, e.split("."), i);
|
|
52
|
+
(n[e] || []).forEach(function(e) {
|
|
53
|
+
setKey(s, e.split("."), i);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function setKey(e, t, n) {
|
|
57
|
+
var o = e;
|
|
58
|
+
for(var s = 0; s < t.length - 1; s++){
|
|
59
|
+
var i = t[s];
|
|
60
|
+
if (isConstructorOrProto(o, i)) return;
|
|
61
|
+
if (void 0 === o[i]) o[i] = {};
|
|
62
|
+
if (o[i] === Object.prototype || o[i] === Number.prototype || o[i] === String.prototype) o[i] = {};
|
|
63
|
+
if (o[i] === Array.prototype) o[i] = [];
|
|
64
|
+
o = o[i];
|
|
65
|
+
}
|
|
66
|
+
var i = t[t.length - 1];
|
|
67
|
+
if (isConstructorOrProto(o, i)) return;
|
|
68
|
+
if (o === Object.prototype || o === Number.prototype || o === String.prototype) o = {};
|
|
69
|
+
if (o === Array.prototype) o = [];
|
|
70
|
+
if (void 0 === o[i] || r.bools[i] || "boolean" == typeof o[i]) o[i] = n;
|
|
71
|
+
else if (Array.isArray(o[i])) o[i].push(n);
|
|
72
|
+
else o[i] = [
|
|
73
|
+
o[i],
|
|
74
|
+
n
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
function aliasIsBoolean(e) {
|
|
78
|
+
return n[e].some(function(e) {
|
|
79
|
+
return r.bools[e];
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
for(var a = 0; a < e.length; a++){
|
|
83
|
+
var f = e[a];
|
|
84
|
+
if (/^--.+=/.test(f)) {
|
|
85
|
+
var u = f.match(/^--([^=]+)=([\s\S]*)$/);
|
|
86
|
+
var l = u[1];
|
|
87
|
+
var c = u[2];
|
|
88
|
+
if (r.bools[l]) c = "false" !== c;
|
|
89
|
+
setArg(l, c, f);
|
|
90
|
+
} else if (/^--no-.+/.test(f)) {
|
|
91
|
+
var l = f.match(/^--no-(.+)/)[1];
|
|
92
|
+
setArg(l, false, f);
|
|
93
|
+
} else if (/^--.+/.test(f)) {
|
|
94
|
+
var l = f.match(/^--(.+)/)[1];
|
|
95
|
+
var p = e[a + 1];
|
|
96
|
+
if (void 0 === p || /^-/.test(p) || r.bools[l] || r.allBools || (n[l] ? aliasIsBoolean(l) : false)) if (/^(true|false)$/.test(p)) {
|
|
97
|
+
setArg(l, "true" === p, f);
|
|
98
|
+
a++;
|
|
99
|
+
} else setArg(l, r.strings[l] ? "" : true, f);
|
|
100
|
+
else {
|
|
101
|
+
setArg(l, p, f);
|
|
102
|
+
a++;
|
|
103
|
+
}
|
|
104
|
+
} else if (/^-[^-]+/.test(f)) {
|
|
105
|
+
var b = f.slice(1, -1).split("");
|
|
106
|
+
var _ = false;
|
|
107
|
+
for(var g = 0; g < b.length; g++){
|
|
108
|
+
var p = f.slice(g + 2);
|
|
109
|
+
if ("-" === p) {
|
|
110
|
+
setArg(b[g], p, f);
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (/[A-Za-z]/.test(b[g]) && /=/.test(p)) {
|
|
114
|
+
setArg(b[g], p.split("=")[1], f);
|
|
115
|
+
_ = true;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
if (/[A-Za-z]/.test(b[g]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(p)) {
|
|
119
|
+
setArg(b[g], p, f);
|
|
120
|
+
_ = true;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
if (b[g + 1] && b[g + 1].match(/\W/)) {
|
|
124
|
+
setArg(b[g], f.slice(g + 2), f);
|
|
125
|
+
_ = true;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
setArg(b[g], r.strings[b[g]] ? "" : true, f);
|
|
129
|
+
}
|
|
130
|
+
var l = f.slice(-1)[0];
|
|
131
|
+
if (!_ && "-" !== l) if (!e[a + 1] || /^(-|--)[^-]/.test(e[a + 1]) || r.bools[l] || (n[l] ? aliasIsBoolean(l) : false)) if (e[a + 1] && /^(true|false)$/.test(e[a + 1])) {
|
|
132
|
+
setArg(l, "true" === e[a + 1], f);
|
|
133
|
+
a++;
|
|
134
|
+
} else setArg(l, r.strings[l] ? "" : true, f);
|
|
135
|
+
else {
|
|
136
|
+
setArg(l, e[a + 1], f);
|
|
137
|
+
a++;
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
if (!r.unknownFn || false !== r.unknownFn(f)) s._.push(r.strings["_"] || !isNumber(f) ? f : Number(f));
|
|
141
|
+
if (t.stopEarly) {
|
|
142
|
+
s._.push.apply(s._, e.slice(a + 1));
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
Object.keys(o).forEach(function(e) {
|
|
148
|
+
if (!hasKey(s, e.split("."))) {
|
|
149
|
+
setKey(s, e.split("."), o[e]);
|
|
150
|
+
(n[e] || []).forEach(function(t) {
|
|
151
|
+
setKey(s, t.split("."), o[e]);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
if (t["--"]) {
|
|
156
|
+
s["--"] = new Array;
|
|
157
|
+
i.forEach(function(e) {
|
|
158
|
+
s["--"].push(e);
|
|
159
|
+
});
|
|
160
|
+
} else i.forEach(function(e) {
|
|
161
|
+
s._.push(e);
|
|
162
|
+
});
|
|
163
|
+
return s;
|
|
164
|
+
};
|
|
165
|
+
function hasKey(e, t) {
|
|
166
|
+
var r = e;
|
|
167
|
+
t.slice(0, -1).forEach(function(e) {
|
|
168
|
+
r = r[e] || {};
|
|
169
|
+
});
|
|
170
|
+
var n = t[t.length - 1];
|
|
171
|
+
return n in r;
|
|
172
|
+
}
|
|
173
|
+
function isNumber(e) {
|
|
174
|
+
if ("number" == typeof e) return true;
|
|
175
|
+
if (/^0x[0-9a-f]+$/i.test(e)) return true;
|
|
176
|
+
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e);
|
|
177
|
+
}
|
|
178
|
+
function isConstructorOrProto(e, t) {
|
|
179
|
+
return "constructor" === t && "function" == typeof e[t] || "__proto__" === t;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var t = {};
|
|
184
|
+
function __nccwpck_require__(r) {
|
|
185
|
+
var n = t[r];
|
|
186
|
+
if (void 0 !== n) return n.exports;
|
|
187
|
+
var o = t[r] = {
|
|
188
|
+
exports: {}
|
|
189
|
+
};
|
|
190
|
+
var s = true;
|
|
191
|
+
try {
|
|
192
|
+
e[r](o, o.exports, __nccwpck_require__);
|
|
193
|
+
s = false;
|
|
194
|
+
} finally{
|
|
195
|
+
if (s) delete t[r];
|
|
196
|
+
}
|
|
197
|
+
return o.exports;
|
|
198
|
+
}
|
|
199
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
200
|
+
var r = __nccwpck_require__(319);
|
|
201
|
+
module.exports = r;
|
|
202
|
+
})();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
This software is released under the MIT license:
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
7
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
+
subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"minimist","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"version":"1.2.6","license":"MIT"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate secure URL-friendly unique ID.
|
|
3
|
+
*
|
|
4
|
+
* By default, the ID will have 21 symbols to have a collision probability
|
|
5
|
+
* similar to UUID v4.
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* import { nanoid } from './nanoid'
|
|
9
|
+
* model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @param size Size of the ID. The default size is 21.
|
|
13
|
+
* @returns A random string.
|
|
14
|
+
*/
|
|
15
|
+
export function nanoid(size?: number): string
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Generate secure unique ID with custom alphabet.
|
|
19
|
+
*
|
|
20
|
+
* Alphabet must contain 256 symbols or less. Otherwise, the generator
|
|
21
|
+
* will not be secure.
|
|
22
|
+
*
|
|
23
|
+
* @param alphabet Alphabet used to generate the ID.
|
|
24
|
+
* @param defaultSize Size of the ID. The default size is 21.
|
|
25
|
+
* @returns A random string generator.
|
|
26
|
+
*
|
|
27
|
+
* ```js
|
|
28
|
+
* const { customAlphabet } = require('nanoid')
|
|
29
|
+
* const nanoid = customAlphabet('0123456789абвгдеё', 5)
|
|
30
|
+
* nanoid() //=> "8ё56а"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export function customAlphabet(
|
|
34
|
+
alphabet: string,
|
|
35
|
+
defaultSize?: number
|
|
36
|
+
): (size?: number) => string
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Generate unique ID with custom random generator and alphabet.
|
|
40
|
+
*
|
|
41
|
+
* Alphabet must contain 256 symbols or less. Otherwise, the generator
|
|
42
|
+
* will not be secure.
|
|
43
|
+
*
|
|
44
|
+
* ```js
|
|
45
|
+
* import { customRandom } from './nanoid/format'
|
|
46
|
+
*
|
|
47
|
+
* const nanoid = customRandom('abcdef', 5, size => {
|
|
48
|
+
* const random = []
|
|
49
|
+
* for (let i = 0; i < size; i++) {
|
|
50
|
+
* random.push(randomByte())
|
|
51
|
+
* }
|
|
52
|
+
* return random
|
|
53
|
+
* })
|
|
54
|
+
*
|
|
55
|
+
* nanoid() //=> "fbaef"
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @param alphabet Alphabet used to generate a random string.
|
|
59
|
+
* @param size Size of the random string.
|
|
60
|
+
* @param random A random bytes generator.
|
|
61
|
+
* @returns A random string generator.
|
|
62
|
+
*/
|
|
63
|
+
export function customRandom(
|
|
64
|
+
alphabet: string,
|
|
65
|
+
size: number,
|
|
66
|
+
random: (bytes: number) => Uint8Array
|
|
67
|
+
): () => string
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* URL safe symbols.
|
|
71
|
+
*
|
|
72
|
+
* ```js
|
|
73
|
+
* import { urlAlphabet } from './nanoid'
|
|
74
|
+
* const nanoid = customAlphabet(urlAlphabet, 10)
|
|
75
|
+
* nanoid() //=> "Uakgb_J5m9"
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export const urlAlphabet: string
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Generate an array of random bytes collected from hardware noise.
|
|
82
|
+
*
|
|
83
|
+
* ```js
|
|
84
|
+
* import { customRandom, random } from './nanoid'
|
|
85
|
+
* const nanoid = customRandom("abcdef", 5, random)
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @param bytes Size of the array.
|
|
89
|
+
* @returns An array of random bytes.
|
|
90
|
+
*/
|
|
91
|
+
export function random(bytes: number): Uint8Array
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
(()=>{
|
|
2
|
+
var e = {
|
|
3
|
+
982: (e)=>{
|
|
4
|
+
"use strict";
|
|
5
|
+
e.exports = require("crypto");
|
|
6
|
+
},
|
|
7
|
+
812: (e, r, t)=>{
|
|
8
|
+
let l = t(982);
|
|
9
|
+
let { urlAlphabet: a } = t(132);
|
|
10
|
+
const n = 128;
|
|
11
|
+
let _, u;
|
|
12
|
+
let fillPool = (e)=>{
|
|
13
|
+
if (!_ || _.length < e) {
|
|
14
|
+
_ = Buffer.allocUnsafe(e * n);
|
|
15
|
+
l.randomFillSync(_);
|
|
16
|
+
u = 0;
|
|
17
|
+
} else if (u + e > _.length) {
|
|
18
|
+
l.randomFillSync(_);
|
|
19
|
+
u = 0;
|
|
20
|
+
}
|
|
21
|
+
u += e;
|
|
22
|
+
};
|
|
23
|
+
let random = (e)=>{
|
|
24
|
+
fillPool(e |= 0);
|
|
25
|
+
return _.subarray(u - e, u);
|
|
26
|
+
};
|
|
27
|
+
let customRandom = (e, r, t)=>{
|
|
28
|
+
let l = (2 << 31 - Math.clz32(e.length - 1 | 1)) - 1;
|
|
29
|
+
let a = Math.ceil(1.6 * l * r / e.length);
|
|
30
|
+
return (n = r)=>{
|
|
31
|
+
let _ = "";
|
|
32
|
+
while(true){
|
|
33
|
+
let r = t(a);
|
|
34
|
+
let u = a;
|
|
35
|
+
while(u--){
|
|
36
|
+
_ += e[r[u] & l] || "";
|
|
37
|
+
if (_.length === n) return _;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
let customAlphabet = (e, r = 21)=>customRandom(e, r, random);
|
|
43
|
+
let nanoid = (e = 21)=>{
|
|
44
|
+
fillPool(e |= 0);
|
|
45
|
+
let r = "";
|
|
46
|
+
for(let t = u - e; t < u; t++)r += a[63 & _[t]];
|
|
47
|
+
return r;
|
|
48
|
+
};
|
|
49
|
+
e.exports = {
|
|
50
|
+
nanoid: nanoid,
|
|
51
|
+
customAlphabet: customAlphabet,
|
|
52
|
+
customRandom: customRandom,
|
|
53
|
+
urlAlphabet: a,
|
|
54
|
+
random: random
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
132: (e)=>{
|
|
58
|
+
let r = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
59
|
+
e.exports = {
|
|
60
|
+
urlAlphabet: r
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var r = {};
|
|
65
|
+
function __nccwpck_require__(t) {
|
|
66
|
+
var l = r[t];
|
|
67
|
+
if (void 0 !== l) return l.exports;
|
|
68
|
+
var a = r[t] = {
|
|
69
|
+
exports: {}
|
|
70
|
+
};
|
|
71
|
+
var n = true;
|
|
72
|
+
try {
|
|
73
|
+
e[t](a, a.exports, __nccwpck_require__);
|
|
74
|
+
n = false;
|
|
75
|
+
} finally{
|
|
76
|
+
if (n) delete r[t];
|
|
77
|
+
}
|
|
78
|
+
return a.exports;
|
|
79
|
+
}
|
|
80
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
81
|
+
var t = __nccwpck_require__(812);
|
|
82
|
+
module.exports = t;
|
|
83
|
+
})();
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { createRequire as e } from "module";
|
|
2
|
+
var t = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
t.d = (e, r)=>{
|
|
5
|
+
for(var l in r)if (t.o(r, l) && !t.o(e, l)) Object.defineProperty(e, l, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: r[l]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
t.o = (e, t)=>Object.prototype.hasOwnProperty.call(e, t);
|
|
13
|
+
})();
|
|
14
|
+
if (void 0 !== t) t.ab = new URL(".", import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
|
|
15
|
+
var r = {};
|
|
16
|
+
t.d(r, {
|
|
17
|
+
d_: ()=>customAlphabet,
|
|
18
|
+
NM: ()=>customRandom,
|
|
19
|
+
Ak: ()=>nanoid,
|
|
20
|
+
yT: ()=>random,
|
|
21
|
+
xO: ()=>a
|
|
22
|
+
});
|
|
23
|
+
const l = e(import.meta.url)("crypto");
|
|
24
|
+
let a = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
25
|
+
const n = 128;
|
|
26
|
+
let o, i;
|
|
27
|
+
let fillPool = (e)=>{
|
|
28
|
+
if (!o || o.length < e) {
|
|
29
|
+
o = Buffer.allocUnsafe(e * n);
|
|
30
|
+
l.randomFillSync(o);
|
|
31
|
+
i = 0;
|
|
32
|
+
} else if (i + e > o.length) {
|
|
33
|
+
l.randomFillSync(o);
|
|
34
|
+
i = 0;
|
|
35
|
+
}
|
|
36
|
+
i += e;
|
|
37
|
+
};
|
|
38
|
+
let random = (e)=>{
|
|
39
|
+
fillPool(e |= 0);
|
|
40
|
+
return o.subarray(i - e, i);
|
|
41
|
+
};
|
|
42
|
+
let customRandom = (e, t, r)=>{
|
|
43
|
+
let l = (2 << 31 - Math.clz32(e.length - 1 | 1)) - 1;
|
|
44
|
+
let a = Math.ceil(1.6 * l * t / e.length);
|
|
45
|
+
return (n = t)=>{
|
|
46
|
+
let o = "";
|
|
47
|
+
while(true){
|
|
48
|
+
let t = r(a);
|
|
49
|
+
let i = a;
|
|
50
|
+
while(i--){
|
|
51
|
+
o += e[t[i] & l] || "";
|
|
52
|
+
if (o.length === n) return o;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
let customAlphabet = (e, t = 21)=>customRandom(e, t, random);
|
|
58
|
+
let nanoid = (e = 21)=>{
|
|
59
|
+
fillPool(e |= 0);
|
|
60
|
+
let t = "";
|
|
61
|
+
for(let r = i - e; r < i; r++)t += a[63 & o[r]];
|
|
62
|
+
return t;
|
|
63
|
+
};
|
|
64
|
+
var m = r.d_;
|
|
65
|
+
var u = r.NM;
|
|
66
|
+
var c = r.Ak;
|
|
67
|
+
var f = r.yT;
|
|
68
|
+
var s = r.xO;
|
|
69
|
+
export { m as customAlphabet, u as customRandom, c as nanoid, f as random, s as urlAlphabet };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright 2017 Andrey Sitnik <andrey@sitnik.ru>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
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, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"nanoid","author":"Andrey Sitnik <andrey@sitnik.ru>","version":"3.3.11","funding":[{"type":"github","url":"https://github.com/sponsors/ai"}],"license":"MIT","types":"./index.d.ts","main":"index.js","module":"index.mjs"}
|