@modern-js/utils 2.12.1-alpha.3 → 2.13.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/CHANGELOG.md +2 -0
- package/dist/{cjs/alias.js → alias.js} +15 -4
- package/dist/{cjs/analyzeProject.js → analyzeProject.js} +25 -5
- package/dist/{cjs/babel.js → babel.js} +16 -9
- package/dist/{cjs/compatRequire.js → compatRequire.js} +17 -4
- package/dist/compiled.d.ts +43 -0
- package/dist/{types/debug.d.ts → debug.d.ts} +1 -1
- package/dist/{cjs/emptyDir.js → emptyDir.js} +24 -4
- package/dist/{cjs/getEntryOptions.js → getEntryOptions.js} +15 -1
- package/dist/{cjs/getPackageManager.js → getPackageManager.js} +41 -19
- package/dist/{cjs/getPort.js → getPort.js} +24 -4
- package/dist/{cjs/getServerConfig.js → getServerConfig.js} +22 -2
- package/dist/{types/logger.d.ts → logger.d.ts} +1 -1
- package/dist/{cjs/logger.js → logger.js} +16 -5
- package/dist/{cjs/monorepo.js → monorepo.js} +15 -4
- package/dist/nodeEnv.js +81 -0
- package/dist/{cjs/path.js → path.js} +1 -1
- package/dist/{cjs/pathSerializer.js → pathSerializer.js} +1 -1
- package/dist/{cjs/react.js → react.js} +15 -4
- package/dist/{cjs/runtimeExports.js → runtimeExports.js} +1 -1
- package/dist/{cjs/universal → universal}/nestedRoutes.js +19 -2
- package/dist/{cjs/version.js → version.js} +40 -7
- package/dist/{cjs/watch.js → watch.js} +29 -9
- package/package.json +23 -55
- package/dist/cjs/nodeEnv.js +0 -55
- package/dist/compiled/address/index.js +0 -1
- package/dist/compiled/address/lib/address.d.ts +0 -28
- package/dist/compiled/address/package.json +0 -1
- package/dist/compiled/ajv/codegen.js +0 -1
- package/dist/compiled/ajv/index.js +0 -9
- package/dist/compiled/ajv/license +0 -22
- package/dist/compiled/ajv/package.json +0 -1
- package/dist/compiled/ajv/types/ajv.d.ts +0 -16
- package/dist/compiled/ajv/types/compile/codegen/code.d.ts +0 -40
- package/dist/compiled/ajv/types/compile/codegen/index.d.ts +0 -79
- package/dist/compiled/ajv/types/compile/codegen/scope.d.ts +0 -79
- package/dist/compiled/ajv/types/compile/errors.d.ts +0 -13
- package/dist/compiled/ajv/types/compile/index.d.ts +0 -80
- package/dist/compiled/ajv/types/compile/ref_error.d.ts +0 -6
- package/dist/compiled/ajv/types/compile/resolve.d.ts +0 -12
- package/dist/compiled/ajv/types/compile/rules.d.ts +0 -28
- package/dist/compiled/ajv/types/compile/util.d.ts +0 -40
- package/dist/compiled/ajv/types/compile/validate/index.d.ts +0 -42
- package/dist/compiled/ajv/types/compile/validate/subschema.d.ts +0 -47
- package/dist/compiled/ajv/types/core.d.ts +0 -173
- package/dist/compiled/ajv/types/runtime/validation_error.d.ts +0 -7
- package/dist/compiled/ajv/types/types/index.d.ts +0 -183
- package/dist/compiled/ajv/types/types/json-schema.d.ts +0 -124
- package/dist/compiled/ajv/types/types/jtd-schema.d.ts +0 -169
- package/dist/compiled/ajv/types/vocabularies/errors.d.ts +0 -1
- package/dist/compiled/ajv/uri-js.d.ts +0 -59
- package/dist/compiled/ajv-keywords/index.d.ts +0 -1
- package/dist/compiled/ajv-keywords/index.js +0 -1
- package/dist/compiled/ajv-keywords/license +0 -21
- package/dist/compiled/ajv-keywords/package.json +0 -1
- package/dist/compiled/better-ajv-errors/index.d.ts +0 -1
- package/dist/compiled/better-ajv-errors/index.js +0 -1
- package/dist/compiled/better-ajv-errors/license +0 -13
- package/dist/compiled/better-ajv-errors/package.json +0 -1
- package/dist/compiled/browserslist/index.d.ts +0 -178
- package/dist/compiled/browserslist/index.js +0 -1
- package/dist/compiled/browserslist/license +0 -20
- package/dist/compiled/browserslist/package.json +0 -1
- package/dist/compiled/chalk/index.d.ts +0 -415
- package/dist/compiled/chalk/index.js +0 -1
- package/dist/compiled/chalk/license +0 -9
- package/dist/compiled/chalk/package.json +0 -1
- package/dist/compiled/chokidar/anymatch/index.d.ts +0 -19
- package/dist/compiled/chokidar/fsevents.node +0 -0
- package/dist/compiled/chokidar/index.js +0 -40
- package/dist/compiled/chokidar/license +0 -21
- package/dist/compiled/chokidar/package.json +0 -1
- package/dist/compiled/chokidar/types/index.d.ts +0 -188
- package/dist/compiled/commander/index.js +0 -1
- package/dist/compiled/commander/license +0 -22
- package/dist/compiled/commander/package.json +0 -1
- package/dist/compiled/commander/typings/index.d.ts +0 -890
- package/dist/compiled/debug/index.d.ts +0 -54
- package/dist/compiled/debug/index.js +0 -1
- package/dist/compiled/debug/license +0 -20
- package/dist/compiled/debug/ms/index.d.ts +0 -25
- package/dist/compiled/debug/package.json +0 -1
- package/dist/compiled/dotenv/index.js +0 -1
- package/dist/compiled/dotenv/license +0 -23
- package/dist/compiled/dotenv/package.json +0 -1
- package/dist/compiled/dotenv/types/index.d.ts +0 -59
- package/dist/compiled/dotenv-expand/index.d.ts +0 -15
- package/dist/compiled/dotenv-expand/index.js +0 -1
- package/dist/compiled/dotenv-expand/license +0 -24
- package/dist/compiled/dotenv-expand/package.json +0 -1
- package/dist/compiled/execa/index.d.ts +0 -564
- package/dist/compiled/execa/index.js +0 -1
- package/dist/compiled/execa/license +0 -9
- package/dist/compiled/execa/package.json +0 -1
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +0 -20
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +0 -12
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +0 -7
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +0 -20
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +0 -20
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +0 -13
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +0 -12
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +0 -4
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +0 -16
- package/dist/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +0 -4
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +0 -14
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +0 -12
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +0 -30
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +0 -6
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +0 -30
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +0 -8
- package/dist/compiled/fast-glob/index.js +0 -37
- package/dist/compiled/fast-glob/license +0 -21
- package/dist/compiled/fast-glob/out/index.d.ts +0 -27
- package/dist/compiled/fast-glob/out/managers/tasks.d.ts +0 -22
- package/dist/compiled/fast-glob/out/settings.d.ts +0 -164
- package/dist/compiled/fast-glob/out/types/index.d.ts +0 -31
- package/dist/compiled/fast-glob/package.json +0 -1
- package/dist/compiled/filesize/filesize.d.ts +0 -131
- package/dist/compiled/filesize/index.js +0 -9
- package/dist/compiled/filesize/license +0 -28
- package/dist/compiled/filesize/package.json +0 -1
- package/dist/compiled/fs-extra/index.d.ts +0 -563
- package/dist/compiled/fs-extra/index.js +0 -1
- package/dist/compiled/fs-extra/license +0 -15
- package/dist/compiled/fs-extra/package.json +0 -1
- package/dist/compiled/glob/index.d.ts +0 -91
- package/dist/compiled/glob/index.js +0 -1
- package/dist/compiled/glob/license +0 -21
- package/dist/compiled/glob/minimatch/index.d.ts +0 -204
- package/dist/compiled/glob/package.json +0 -1
- package/dist/compiled/globby/index.d.ts +0 -186
- package/dist/compiled/globby/index.js +0 -1
- package/dist/compiled/globby/license +0 -9
- package/dist/compiled/globby/package.json +0 -1
- package/dist/compiled/gzip-size/index.d.ts +0 -96
- package/dist/compiled/gzip-size/index.js +0 -1
- package/dist/compiled/gzip-size/license +0 -9
- package/dist/compiled/gzip-size/package.json +0 -1
- package/dist/compiled/import-lazy/index.d.ts +0 -26
- package/dist/compiled/import-lazy/index.js +0 -1
- package/dist/compiled/import-lazy/license +0 -9
- package/dist/compiled/import-lazy/package.json +0 -1
- package/dist/compiled/inquirer/index.d.ts +0 -997
- package/dist/compiled/inquirer/index.js +0 -9
- package/dist/compiled/inquirer/lib/objects/choice.d.ts +0 -65
- package/dist/compiled/inquirer/lib/objects/choices.d.ts +0 -206
- package/dist/compiled/inquirer/lib/objects/separator.d.ts +0 -37
- package/dist/compiled/inquirer/lib/ui/baseUI.d.ts +0 -37
- package/dist/compiled/inquirer/lib/ui/bottom-bar.d.ts +0 -65
- package/dist/compiled/inquirer/lib/ui/prompt.d.ts +0 -104
- package/dist/compiled/inquirer/license +0 -22
- package/dist/compiled/inquirer/package.json +0 -1
- package/dist/compiled/inquirer/through/index.d.ts +0 -25
- package/dist/compiled/js-yaml/index.d.ts +0 -154
- package/dist/compiled/js-yaml/index.js +0 -1
- package/dist/compiled/js-yaml/license +0 -21
- package/dist/compiled/js-yaml/package.json +0 -1
- package/dist/compiled/json5/index.js +0 -1
- package/dist/compiled/json5/lib/index.d.ts +0 -4
- package/dist/compiled/json5/lib/parse.d.ts +0 -15
- package/dist/compiled/json5/lib/stringify.d.ts +0 -89
- package/dist/compiled/json5/package.json +0 -1
- package/dist/compiled/lodash/common/array.d.ts +0 -2126
- package/dist/compiled/lodash/common/collection.d.ts +0 -1930
- package/dist/compiled/lodash/common/common.d.ts +0 -280
- package/dist/compiled/lodash/common/date.d.ts +0 -23
- package/dist/compiled/lodash/common/function.d.ts +0 -1446
- package/dist/compiled/lodash/common/lang.d.ts +0 -1693
- package/dist/compiled/lodash/common/math.d.ts +0 -405
- package/dist/compiled/lodash/common/number.d.ts +0 -131
- package/dist/compiled/lodash/common/object.d.ts +0 -2519
- package/dist/compiled/lodash/common/seq.d.ts +0 -210
- package/dist/compiled/lodash/common/string.d.ts +0 -788
- package/dist/compiled/lodash/common/util.d.ts +0 -1220
- package/dist/compiled/lodash/index.d.ts +0 -46
- package/dist/compiled/lodash/index.js +0 -5
- package/dist/compiled/lodash/license +0 -47
- package/dist/compiled/lodash/package.json +0 -1
- package/dist/compiled/mime-types/index.d.ts +0 -14
- package/dist/compiled/mime-types/index.js +0 -14
- package/dist/compiled/mime-types/license +0 -23
- package/dist/compiled/mime-types/package.json +0 -1
- package/dist/compiled/minimist/index.d.ts +0 -95
- package/dist/compiled/minimist/index.js +0 -1
- package/dist/compiled/minimist/license +0 -18
- package/dist/compiled/minimist/package.json +0 -1
- package/dist/compiled/nanoid/index.d.ts +0 -91
- package/dist/compiled/nanoid/index.js +0 -1
- package/dist/compiled/nanoid/license +0 -20
- package/dist/compiled/nanoid/package.json +0 -1
- package/dist/compiled/ora/cli-spinners/index.d.ts +0 -125
- package/dist/compiled/ora/index.d.ts +0 -277
- package/dist/compiled/ora/index.js +0 -3
- package/dist/compiled/ora/license +0 -9
- package/dist/compiled/ora/package.json +0 -1
- package/dist/compiled/pkg-up/index.d.ts +0 -48
- package/dist/compiled/pkg-up/index.js +0 -1
- package/dist/compiled/pkg-up/license +0 -9
- package/dist/compiled/pkg-up/package.json +0 -1
- package/dist/compiled/recursive-readdir/index.d.ts +0 -21
- package/dist/compiled/recursive-readdir/index.js +0 -1
- package/dist/compiled/recursive-readdir/license +0 -21
- package/dist/compiled/recursive-readdir/package.json +0 -1
- package/dist/compiled/schema-utils3/index.d.ts +0 -1
- package/dist/compiled/schema-utils3/index.js +0 -3
- package/dist/compiled/schema-utils3/license +0 -20
- package/dist/compiled/schema-utils3/package.json +0 -1
- package/dist/compiled/semver/classes/comparator.d.ts +0 -17
- package/dist/compiled/semver/classes/range.d.ts +0 -21
- package/dist/compiled/semver/classes/semver.d.ts +0 -62
- package/dist/compiled/semver/functions/clean.d.ts +0 -8
- package/dist/compiled/semver/functions/cmp.d.ts +0 -16
- package/dist/compiled/semver/functions/coerce.d.ts +0 -12
- package/dist/compiled/semver/functions/compare-build.d.ts +0 -16
- package/dist/compiled/semver/functions/compare-loose.d.ts +0 -5
- package/dist/compiled/semver/functions/compare.d.ts +0 -20
- package/dist/compiled/semver/functions/diff.d.ts +0 -13
- package/dist/compiled/semver/functions/eq.d.ts +0 -9
- package/dist/compiled/semver/functions/gt.d.ts +0 -9
- package/dist/compiled/semver/functions/gte.d.ts +0 -9
- package/dist/compiled/semver/functions/inc.d.ts +0 -15
- package/dist/compiled/semver/functions/lt.d.ts +0 -9
- package/dist/compiled/semver/functions/lte.d.ts +0 -8
- package/dist/compiled/semver/functions/major.d.ts +0 -9
- package/dist/compiled/semver/functions/minor.d.ts +0 -9
- package/dist/compiled/semver/functions/neq.d.ts +0 -9
- package/dist/compiled/semver/functions/parse.d.ts +0 -12
- package/dist/compiled/semver/functions/patch.d.ts +0 -9
- package/dist/compiled/semver/functions/prerelease.d.ts +0 -12
- package/dist/compiled/semver/functions/rcompare.d.ts +0 -15
- package/dist/compiled/semver/functions/rsort.d.ts +0 -9
- package/dist/compiled/semver/functions/satisfies.d.ts +0 -14
- package/dist/compiled/semver/functions/sort.d.ts +0 -9
- package/dist/compiled/semver/functions/valid.d.ts +0 -11
- package/dist/compiled/semver/index.d.ts +0 -133
- package/dist/compiled/semver/index.js +0 -1
- package/dist/compiled/semver/internals/identifiers.d.ts +0 -13
- package/dist/compiled/semver/license +0 -15
- package/dist/compiled/semver/package.json +0 -1
- package/dist/compiled/semver/ranges/gtr.d.ts +0 -14
- package/dist/compiled/semver/ranges/intersects.d.ts +0 -13
- package/dist/compiled/semver/ranges/ltr.d.ts +0 -14
- package/dist/compiled/semver/ranges/max-satisfying.d.ts +0 -14
- package/dist/compiled/semver/ranges/min-satisfying.d.ts +0 -14
- package/dist/compiled/semver/ranges/min-version.d.ts +0 -10
- package/dist/compiled/semver/ranges/outside.d.ts +0 -15
- package/dist/compiled/semver/ranges/simplify.d.ts +0 -14
- package/dist/compiled/semver/ranges/subset.d.ts +0 -13
- package/dist/compiled/semver/ranges/to-comparators.d.ts +0 -9
- package/dist/compiled/semver/ranges/valid.d.ts +0 -12
- package/dist/compiled/signale/index.d.ts +0 -162
- package/dist/compiled/signale/index.js +0 -1
- package/dist/compiled/signale/package.json +0 -1
- package/dist/compiled/slash/index.d.ts +0 -25
- package/dist/compiled/slash/index.js +0 -1
- package/dist/compiled/slash/license +0 -9
- package/dist/compiled/slash/package.json +0 -1
- package/dist/compiled/strip-ansi/index.d.ts +0 -17
- package/dist/compiled/strip-ansi/index.js +0 -1
- package/dist/compiled/strip-ansi/license +0 -9
- package/dist/compiled/strip-ansi/package.json +0 -1
- package/dist/compiled/tsconfig-paths/index.js +0 -1
- package/dist/compiled/tsconfig-paths/lib/config-loader.d.ts +0 -33
- package/dist/compiled/tsconfig-paths/lib/filesystem.d.ts +0 -34
- package/dist/compiled/tsconfig-paths/lib/index.d.ts +0 -5
- package/dist/compiled/tsconfig-paths/lib/mapping-entry.d.ts +0 -18
- package/dist/compiled/tsconfig-paths/lib/match-path-async.d.ts +0 -21
- package/dist/compiled/tsconfig-paths/lib/match-path-sync.d.ts +0 -32
- package/dist/compiled/tsconfig-paths/lib/register.d.ts +0 -12
- package/dist/compiled/tsconfig-paths/lib/try-path.d.ts +0 -15
- package/dist/compiled/tsconfig-paths/lib/tsconfig-loader.d.ts +0 -28
- package/dist/compiled/tsconfig-paths/license +0 -21
- package/dist/compiled/tsconfig-paths/package.json +0 -1
- package/dist/compiled/upath/index.js +0 -1
- package/dist/compiled/upath/license +0 -22
- package/dist/compiled/upath/package.json +0 -1
- package/dist/compiled/upath/upath.d.ts +0 -241
- package/dist/compiled/url-join/index.d.ts +0 -17
- package/dist/compiled/url-join/index.js +0 -1
- package/dist/compiled/url-join/license +0 -21
- package/dist/compiled/url-join/package.json +0 -1
- package/dist/compiled/webpack-chain/index.js +0 -1
- package/dist/compiled/webpack-chain/license +0 -373
- package/dist/compiled/webpack-chain/package.json +0 -1
- package/dist/compiled/webpack-chain/types/index.d.ts +0 -388
- package/dist/compiled/webpack-dev-middleware/index.js +0 -7
- package/dist/compiled/webpack-dev-middleware/license +0 -20
- package/dist/compiled/webpack-dev-middleware/package.json +0 -1
- package/dist/compiled/webpack-dev-middleware/types/index.d.ts +0 -262
- package/dist/esm/FileSizeReporter.js +0 -180
- package/dist/esm/alias.js +0 -83
- package/dist/esm/analyzeProject.js +0 -168
- package/dist/esm/applyOptionsChain.js +0 -26
- package/dist/esm/babel.js +0 -169
- package/dist/esm/chainId.js +0 -92
- package/dist/esm/clearConsole.js +0 -6
- package/dist/esm/commands.js +0 -17
- package/dist/esm/compatRequire.js +0 -68
- package/dist/esm/compiled.js +0 -34
- package/dist/esm/constants.js +0 -317
- package/dist/esm/debug.js +0 -5
- package/dist/esm/emptyDir.js +0 -158
- package/dist/esm/ensureAbsolutePath.js +0 -5
- package/dist/esm/ensureArray.js +0 -9
- package/dist/esm/findExists.js +0 -27
- package/dist/esm/generateMetaTags.js +0 -40
- package/dist/esm/getBrowserslist.js +0 -12
- package/dist/esm/getCoreJsVersion.js +0 -57
- package/dist/esm/getEntryOptions.js +0 -45
- package/dist/esm/getPackageManager.js +0 -187
- package/dist/esm/getPort.js +0 -215
- package/dist/esm/getServerConfig.js +0 -145
- package/dist/esm/getTargetDir.js +0 -6
- package/dist/esm/import.js +0 -8
- package/dist/esm/index.js +0 -44
- package/dist/esm/is/index.js +0 -85
- package/dist/esm/is/nodeEnv.js +0 -16
- package/dist/esm/is/platform.js +0 -7
- package/dist/esm/is/type.js +0 -25
- package/dist/esm/logger.js +0 -207
- package/dist/esm/monorepo.js +0 -109
- package/dist/esm/nodeEnv.js +0 -258
- package/dist/esm/path.js +0 -85
- package/dist/esm/pathSerializer.js +0 -85
- package/dist/esm/plugin.js +0 -45
- package/dist/esm/prettyInstructions.js +0 -96
- package/dist/esm/printBuildError.js +0 -24
- package/dist/esm/react.js +0 -43
- package/dist/esm/readTsConfig.js +0 -10
- package/dist/esm/removeSlash.js +0 -10
- package/dist/esm/resolve.js +0 -42
- package/dist/esm/routes.js +0 -19
- package/dist/esm/runtimeExports.js +0 -65
- package/dist/esm/ssr.js +0 -3
- package/dist/esm/storage.js +0 -36
- package/dist/esm/testUtils.js +0 -13
- package/dist/esm/types.js +0 -1
- package/dist/esm/universal/constants.js +0 -3
- package/dist/esm/universal/formatWebpack.js +0 -108
- package/dist/esm/universal/nestedRoutes.js +0 -174
- package/dist/esm/universal/remixRouter.js +0 -1
- package/dist/esm/universal/serialize.js +0 -7
- package/dist/esm/version.js +0 -193
- package/dist/esm/wait.js +0 -7
- package/dist/esm/watch.js +0 -230
- package/dist/esm-node/FileSizeReporter.js +0 -133
- package/dist/esm-node/alias.js +0 -61
- package/dist/esm-node/analyzeProject.js +0 -17
- package/dist/esm-node/applyOptionsChain.js +0 -35
- package/dist/esm-node/babel.js +0 -105
- package/dist/esm-node/chainId.js +0 -173
- package/dist/esm-node/clearConsole.js +0 -8
- package/dist/esm-node/commands.js +0 -22
- package/dist/esm-node/compatRequire.js +0 -42
- package/dist/esm-node/compiled.js +0 -77
- package/dist/esm-node/constants.js +0 -264
- package/dist/esm-node/debug.js +0 -5
- package/dist/esm-node/emptyDir.js +0 -9
- package/dist/esm-node/ensureAbsolutePath.js +0 -5
- package/dist/esm-node/ensureArray.js +0 -9
- package/dist/esm-node/findExists.js +0 -12
- package/dist/esm-node/generateMetaTags.js +0 -38
- package/dist/esm-node/getBrowserslist.js +0 -7
- package/dist/esm-node/getCoreJsVersion.js +0 -13
- package/dist/esm-node/getEntryOptions.js +0 -17
- package/dist/esm-node/getPackageManager.js +0 -32
- package/dist/esm-node/getPort.js +0 -59
- package/dist/esm-node/getServerConfig.js +0 -14
- package/dist/esm-node/getTargetDir.js +0 -8
- package/dist/esm-node/import.js +0 -9
- package/dist/esm-node/index.js +0 -44
- package/dist/esm-node/is/index.js +0 -71
- package/dist/esm-node/is/nodeEnv.js +0 -12
- package/dist/esm-node/is/platform.js +0 -6
- package/dist/esm-node/is/type.js +0 -34
- package/dist/esm-node/logger.js +0 -100
- package/dist/esm-node/monorepo.js +0 -87
- package/dist/esm-node/nodeEnv.js +0 -30
- package/dist/esm-node/path.js +0 -50
- package/dist/esm-node/pathSerializer.js +0 -46
- package/dist/esm-node/plugin.js +0 -23
- package/dist/esm-node/prettyInstructions.js +0 -77
- package/dist/esm-node/printBuildError.js +0 -34
- package/dist/esm-node/react.js +0 -20
- package/dist/esm-node/readTsConfig.js +0 -13
- package/dist/esm-node/removeSlash.js +0 -8
- package/dist/esm-node/resolve.js +0 -38
- package/dist/esm-node/routes.js +0 -24
- package/dist/esm-node/runtimeExports.js +0 -40
- package/dist/esm-node/ssr.js +0 -6
- package/dist/esm-node/storage.js +0 -42
- package/dist/esm-node/testUtils.js +0 -15
- package/dist/esm-node/types.js +0 -0
- package/dist/esm-node/universal/constants.js +0 -6
- package/dist/esm-node/universal/formatWebpack.js +0 -77
- package/dist/esm-node/universal/nestedRoutes.js +0 -93
- package/dist/esm-node/universal/remixRouter.js +0 -1
- package/dist/esm-node/universal/serialize.js +0 -7
- package/dist/esm-node/version.js +0 -25
- package/dist/esm-node/wait.js +0 -6
- package/dist/esm-node/watch.js +0 -36
- package/dist/types/compiled.d.ts +0 -43
- /package/dist/{types/FileSizeReporter.d.ts → FileSizeReporter.d.ts} +0 -0
- /package/dist/{cjs/FileSizeReporter.js → FileSizeReporter.js} +0 -0
- /package/dist/{types/alias.d.ts → alias.d.ts} +0 -0
- /package/dist/{types/analyzeProject.d.ts → analyzeProject.d.ts} +0 -0
- /package/dist/{types/applyOptionsChain.d.ts → applyOptionsChain.d.ts} +0 -0
- /package/dist/{cjs/applyOptionsChain.js → applyOptionsChain.js} +0 -0
- /package/dist/{types/babel.d.ts → babel.d.ts} +0 -0
- /package/dist/{types/chainId.d.ts → chainId.d.ts} +0 -0
- /package/dist/{cjs/chainId.js → chainId.js} +0 -0
- /package/dist/{types/clearConsole.d.ts → clearConsole.d.ts} +0 -0
- /package/dist/{cjs/clearConsole.js → clearConsole.js} +0 -0
- /package/dist/{types/commands.d.ts → commands.d.ts} +0 -0
- /package/dist/{cjs/commands.js → commands.js} +0 -0
- /package/dist/{types/compatRequire.d.ts → compatRequire.d.ts} +0 -0
- /package/dist/{cjs/compiled.js → compiled.js} +0 -0
- /package/dist/{types/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{cjs/constants.js → constants.js} +0 -0
- /package/dist/{cjs/debug.js → debug.js} +0 -0
- /package/dist/{types/emptyDir.d.ts → emptyDir.d.ts} +0 -0
- /package/dist/{types/ensureAbsolutePath.d.ts → ensureAbsolutePath.d.ts} +0 -0
- /package/dist/{cjs/ensureAbsolutePath.js → ensureAbsolutePath.js} +0 -0
- /package/dist/{types/ensureArray.d.ts → ensureArray.d.ts} +0 -0
- /package/dist/{cjs/ensureArray.js → ensureArray.js} +0 -0
- /package/dist/{types/findExists.d.ts → findExists.d.ts} +0 -0
- /package/dist/{cjs/findExists.js → findExists.js} +0 -0
- /package/dist/{types/generateMetaTags.d.ts → generateMetaTags.d.ts} +0 -0
- /package/dist/{cjs/generateMetaTags.js → generateMetaTags.js} +0 -0
- /package/dist/{types/getBrowserslist.d.ts → getBrowserslist.d.ts} +0 -0
- /package/dist/{cjs/getBrowserslist.js → getBrowserslist.js} +0 -0
- /package/dist/{types/getCoreJsVersion.d.ts → getCoreJsVersion.d.ts} +0 -0
- /package/dist/{cjs/getCoreJsVersion.js → getCoreJsVersion.js} +0 -0
- /package/dist/{types/getEntryOptions.d.ts → getEntryOptions.d.ts} +0 -0
- /package/dist/{types/getPackageManager.d.ts → getPackageManager.d.ts} +0 -0
- /package/dist/{types/getPort.d.ts → getPort.d.ts} +0 -0
- /package/dist/{types/getServerConfig.d.ts → getServerConfig.d.ts} +0 -0
- /package/dist/{types/getTargetDir.d.ts → getTargetDir.d.ts} +0 -0
- /package/dist/{cjs/getTargetDir.js → getTargetDir.js} +0 -0
- /package/dist/{types/import.d.ts → import.d.ts} +0 -0
- /package/dist/{cjs/import.js → import.js} +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{cjs/index.js → index.js} +0 -0
- /package/dist/{types/is → is}/index.d.ts +0 -0
- /package/dist/{cjs/is → is}/index.js +0 -0
- /package/dist/{types/is → is}/nodeEnv.d.ts +0 -0
- /package/dist/{cjs/is → is}/nodeEnv.js +0 -0
- /package/dist/{types/is → is}/platform.d.ts +0 -0
- /package/dist/{cjs/is → is}/platform.js +0 -0
- /package/dist/{types/is → is}/type.d.ts +0 -0
- /package/dist/{cjs/is → is}/type.js +0 -0
- /package/dist/{types/monorepo.d.ts → monorepo.d.ts} +0 -0
- /package/dist/{types/nodeEnv.d.ts → nodeEnv.d.ts} +0 -0
- /package/dist/{types/path.d.ts → path.d.ts} +0 -0
- /package/dist/{types/pathSerializer.d.ts → pathSerializer.d.ts} +0 -0
- /package/dist/{types/plugin.d.ts → plugin.d.ts} +0 -0
- /package/dist/{cjs/plugin.js → plugin.js} +0 -0
- /package/dist/{types/prettyInstructions.d.ts → prettyInstructions.d.ts} +0 -0
- /package/dist/{cjs/prettyInstructions.js → prettyInstructions.js} +0 -0
- /package/dist/{types/printBuildError.d.ts → printBuildError.d.ts} +0 -0
- /package/dist/{cjs/printBuildError.js → printBuildError.js} +0 -0
- /package/dist/{types/react.d.ts → react.d.ts} +0 -0
- /package/dist/{types/readTsConfig.d.ts → readTsConfig.d.ts} +0 -0
- /package/dist/{cjs/readTsConfig.js → readTsConfig.js} +0 -0
- /package/dist/{types/removeSlash.d.ts → removeSlash.d.ts} +0 -0
- /package/dist/{cjs/removeSlash.js → removeSlash.js} +0 -0
- /package/dist/{types/resolve.d.ts → resolve.d.ts} +0 -0
- /package/dist/{cjs/resolve.js → resolve.js} +0 -0
- /package/dist/{types/routes.d.ts → routes.d.ts} +0 -0
- /package/dist/{cjs/routes.js → routes.js} +0 -0
- /package/dist/{types/runtimeExports.d.ts → runtimeExports.d.ts} +0 -0
- /package/dist/{types/ssr.d.ts → ssr.d.ts} +0 -0
- /package/dist/{cjs/ssr.js → ssr.js} +0 -0
- /package/dist/{types/storage.d.ts → storage.d.ts} +0 -0
- /package/dist/{cjs/storage.js → storage.js} +0 -0
- /package/dist/{types/testUtils.d.ts → testUtils.d.ts} +0 -0
- /package/dist/{cjs/testUtils.js → testUtils.js} +0 -0
- /package/dist/{types/types.d.ts → types.d.ts} +0 -0
- /package/dist/{cjs/types.js → types.js} +0 -0
- /package/dist/{types/universal → universal}/constants.d.ts +0 -0
- /package/dist/{cjs/universal → universal}/constants.js +0 -0
- /package/dist/{types/universal → universal}/formatWebpack.d.ts +0 -0
- /package/dist/{cjs/universal → universal}/formatWebpack.js +0 -0
- /package/dist/{types/universal → universal}/nestedRoutes.d.ts +0 -0
- /package/dist/{types/universal → universal}/remixRouter.d.ts +0 -0
- /package/dist/{cjs/universal → universal}/remixRouter.js +0 -0
- /package/dist/{types/universal → universal}/serialize.d.ts +0 -0
- /package/dist/{cjs/universal → universal}/serialize.js +0 -0
- /package/dist/{types/version.d.ts → version.d.ts} +0 -0
- /package/dist/{types/wait.d.ts → wait.d.ts} +0 -0
- /package/dist/{cjs/wait.js → wait.js} +0 -0
- /package/dist/{types/watch.d.ts → watch.d.ts} +0 -0
package/dist/esm/path.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
function _arrayLikeToArray(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _arrayWithoutHoles(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
|
-
}
|
|
9
|
-
function _iterableToArray(iter) {
|
|
10
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
|
-
}
|
|
12
|
-
function _nonIterableSpread() {
|
|
13
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
|
-
}
|
|
15
|
-
function _toConsumableArray(arr) {
|
|
16
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
|
-
}
|
|
18
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
19
|
-
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
21
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
|
-
}
|
|
26
|
-
import path from "path";
|
|
27
|
-
import os from "os";
|
|
28
|
-
import fs from "fs";
|
|
29
|
-
import { nanoid, upath, lodash as _ } from "./compiled";
|
|
30
|
-
var isPathString = function(test) {
|
|
31
|
-
return path.posix.basename(test) !== test || path.win32.basename(test) !== test;
|
|
32
|
-
};
|
|
33
|
-
var isRelativePath = function(test) {
|
|
34
|
-
return /^\.\.?($|[\\/])/.test(test);
|
|
35
|
-
};
|
|
36
|
-
var normalizeOutputPath = function(s) {
|
|
37
|
-
return s.replace(/\\/g, "\\\\");
|
|
38
|
-
};
|
|
39
|
-
var normalizeToPosixPath = function(p) {
|
|
40
|
-
return upath.normalizeSafe(path.normalize(p || "")).replace(/^([a-zA-Z]+):/, function(_2, m) {
|
|
41
|
-
return "/".concat(m.toLowerCase());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var getTemplatePath = function(prefix) {
|
|
45
|
-
var _path;
|
|
46
|
-
var tmpRoot = fs.realpathSync(os.tmpdir());
|
|
47
|
-
var parts = [
|
|
48
|
-
tmpRoot
|
|
49
|
-
];
|
|
50
|
-
prefix && parts.push(prefix);
|
|
51
|
-
parts.push(nanoid());
|
|
52
|
-
return (_path = path).resolve.apply(_path, _toConsumableArray(parts));
|
|
53
|
-
};
|
|
54
|
-
function compilePathMatcherRegExp(match) {
|
|
55
|
-
if (typeof match !== "string") {
|
|
56
|
-
return match;
|
|
57
|
-
}
|
|
58
|
-
var escaped = _.escapeRegExp(match);
|
|
59
|
-
return new RegExp("(?<=\\W|^)".concat(escaped, "(?=\\W|$)"));
|
|
60
|
-
}
|
|
61
|
-
var _joinPathParts = function(_part, i, parts) {
|
|
62
|
-
return _(parts).filter(function(part) {
|
|
63
|
-
return ![
|
|
64
|
-
"/",
|
|
65
|
-
"\\"
|
|
66
|
-
].includes(part);
|
|
67
|
-
}).tap(function(parts2) {
|
|
68
|
-
return parts2.unshift("");
|
|
69
|
-
}).slice(0, i + 2).join("/");
|
|
70
|
-
};
|
|
71
|
-
function upwardPaths(start) {
|
|
72
|
-
return _(start).split(/[/\\]/).filter(Boolean).map(_joinPathParts).reverse().push("/").value();
|
|
73
|
-
}
|
|
74
|
-
function getRealTemporaryDirectory() {
|
|
75
|
-
var ret = null;
|
|
76
|
-
try {
|
|
77
|
-
ret = os.tmpdir();
|
|
78
|
-
ret = fs.realpathSync(ret);
|
|
79
|
-
} catch (e) {}
|
|
80
|
-
return ret;
|
|
81
|
-
}
|
|
82
|
-
function splitPathString(str) {
|
|
83
|
-
return str.split(/[\\/]/);
|
|
84
|
-
}
|
|
85
|
-
export { _joinPathParts, compilePathMatcherRegExp, getRealTemporaryDirectory, getTemplatePath, isPathString, isRelativePath, normalizeOutputPath, normalizeToPosixPath, splitPathString, upwardPaths };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
function _arrayLikeToArray(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _arrayWithoutHoles(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
|
-
}
|
|
9
|
-
function _iterableToArray(iter) {
|
|
10
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
|
-
}
|
|
12
|
-
function _nonIterableSpread() {
|
|
13
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
|
-
}
|
|
15
|
-
function _toConsumableArray(arr) {
|
|
16
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
|
-
}
|
|
18
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
19
|
-
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
21
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
|
-
}
|
|
26
|
-
import os from "os";
|
|
27
|
-
import _ from "../compiled/lodash";
|
|
28
|
-
import { compilePathMatcherRegExp, normalizeToPosixPath, getRealTemporaryDirectory, splitPathString, upwardPaths } from "./path";
|
|
29
|
-
var matchUpwardPathsAsUnknown = function(p) {
|
|
30
|
-
return _(upwardPaths(normalizeToPosixPath(p))).map(function(match) {
|
|
31
|
-
return {
|
|
32
|
-
match: match,
|
|
33
|
-
mark: "unknown"
|
|
34
|
-
};
|
|
35
|
-
}).slice(1, -1).value();
|
|
36
|
-
};
|
|
37
|
-
function applyPathMatcher(matcher, str) {
|
|
38
|
-
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
39
|
-
var regex = compilePathMatcherRegExp(matcher.match);
|
|
40
|
-
var replacer = function(substring) {
|
|
41
|
-
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
42
|
-
args[_key - 1] = arguments[_key];
|
|
43
|
-
}
|
|
44
|
-
var _matcher;
|
|
45
|
-
if (options.minPartials && splitPathString(substring).length < options.minPartials) {
|
|
46
|
-
return substring;
|
|
47
|
-
}
|
|
48
|
-
var ret = typeof matcher.mark === "string" ? matcher.mark : (_matcher = matcher).mark.apply(_matcher, [
|
|
49
|
-
substring
|
|
50
|
-
].concat(_toConsumableArray(args)));
|
|
51
|
-
return "<".concat(_.snakeCase(ret).toUpperCase(), ">");
|
|
52
|
-
};
|
|
53
|
-
return str.replace(regex, replacer);
|
|
54
|
-
}
|
|
55
|
-
function applyMatcherReplacement(matchers, str) {
|
|
56
|
-
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
57
|
-
return matchers.reduce(function(ret, matcher) {
|
|
58
|
-
return applyPathMatcher(matcher, ret, options);
|
|
59
|
-
}, str);
|
|
60
|
-
}
|
|
61
|
-
var createDefaultPathMatchers = function(root) {
|
|
62
|
-
var _ret;
|
|
63
|
-
var ret = [
|
|
64
|
-
{
|
|
65
|
-
match: RegExp("(?<=\\/)(\\.pnpm\\/.+?\\/node_modules)(?=\\/)"),
|
|
66
|
-
mark: "pnpmInner"
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
var tmpdir = getRealTemporaryDirectory();
|
|
70
|
-
tmpdir && ret.push({
|
|
71
|
-
match: tmpdir,
|
|
72
|
-
mark: "temp"
|
|
73
|
-
});
|
|
74
|
-
ret.push({
|
|
75
|
-
match: os.tmpdir(),
|
|
76
|
-
mark: "temp"
|
|
77
|
-
});
|
|
78
|
-
ret.push({
|
|
79
|
-
match: os.homedir(),
|
|
80
|
-
mark: "home"
|
|
81
|
-
});
|
|
82
|
-
(_ret = ret).push.apply(_ret, _toConsumableArray(matchUpwardPathsAsUnknown(root)));
|
|
83
|
-
return ret;
|
|
84
|
-
};
|
|
85
|
-
export { applyMatcherReplacement, applyPathMatcher, createDefaultPathMatchers, matchUpwardPathsAsUnknown };
|
package/dist/esm/plugin.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
function _arrayLikeToArray(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _arrayWithoutHoles(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
|
-
}
|
|
9
|
-
function _iterableToArray(iter) {
|
|
10
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
|
-
}
|
|
12
|
-
function _nonIterableSpread() {
|
|
13
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
|
-
}
|
|
15
|
-
function _toConsumableArray(arr) {
|
|
16
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
|
-
}
|
|
18
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
19
|
-
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
21
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
|
-
}
|
|
26
|
-
import { INTERNAL_CLI_PLUGINS } from "./constants";
|
|
27
|
-
import { isDepExists } from "./is";
|
|
28
|
-
function getInternalPlugins(appDirectory) {
|
|
29
|
-
var internalPlugins = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : INTERNAL_CLI_PLUGINS;
|
|
30
|
-
return _toConsumableArray(Object.keys(internalPlugins).filter(function(name) {
|
|
31
|
-
var config = internalPlugins[name];
|
|
32
|
-
if (typeof config !== "string" && config.forced === true) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
return isDepExists(appDirectory, name);
|
|
36
|
-
}).map(function(name) {
|
|
37
|
-
var config = internalPlugins[name];
|
|
38
|
-
if (typeof config !== "string") {
|
|
39
|
-
return config.path;
|
|
40
|
-
} else {
|
|
41
|
-
return config;
|
|
42
|
-
}
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
export { getInternalPlugins };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
function _arrayLikeToArray(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _arrayWithoutHoles(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
|
-
}
|
|
9
|
-
function _iterableToArray(iter) {
|
|
10
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
|
-
}
|
|
12
|
-
function _nonIterableSpread() {
|
|
13
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
|
-
}
|
|
15
|
-
function _toConsumableArray(arr) {
|
|
16
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
|
-
}
|
|
18
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
19
|
-
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
21
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
|
-
}
|
|
26
|
-
import os from "os";
|
|
27
|
-
import { chalk } from "./compiled";
|
|
28
|
-
import { isDev, isSingleEntry } from "./is";
|
|
29
|
-
var normalizeUrl = function(url) {
|
|
30
|
-
return url.replace(/([^:]\/)\/+/g, "$1");
|
|
31
|
-
};
|
|
32
|
-
var getIpv4Interfaces = function() {
|
|
33
|
-
var interfaces = os.networkInterfaces();
|
|
34
|
-
var ipv4Interfaces = [];
|
|
35
|
-
Object.keys(interfaces).forEach(function(key) {
|
|
36
|
-
interfaces[key].forEach(function(detail) {
|
|
37
|
-
var familyV4Value = typeof detail.family === "string" ? "IPv4" : 4;
|
|
38
|
-
if (detail.family === familyV4Value) {
|
|
39
|
-
ipv4Interfaces.push(detail);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
return ipv4Interfaces;
|
|
44
|
-
};
|
|
45
|
-
var getAddressUrls = function() {
|
|
46
|
-
var protocol = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "http", port = arguments.length > 1 ? arguments[1] : void 0;
|
|
47
|
-
var ipv4Interfaces = getIpv4Interfaces();
|
|
48
|
-
return ipv4Interfaces.reduce(function(memo, detail) {
|
|
49
|
-
var label = "Network: ";
|
|
50
|
-
var url = "".concat(protocol, "://").concat(detail.address, ":").concat(port);
|
|
51
|
-
if (detail.address.includes("localhost") || detail.internal) {
|
|
52
|
-
label = "Local: ";
|
|
53
|
-
url = "".concat(protocol, "://localhost:").concat(port);
|
|
54
|
-
}
|
|
55
|
-
memo.push({
|
|
56
|
-
label: label,
|
|
57
|
-
url: url
|
|
58
|
-
});
|
|
59
|
-
return memo;
|
|
60
|
-
}, []);
|
|
61
|
-
};
|
|
62
|
-
var prettyInstructions = function(appContext, config) {
|
|
63
|
-
var entrypoints = appContext.entrypoints, serverRoutes = appContext.serverRoutes, port = appContext.port, apiOnly = appContext.apiOnly, checkedEntries = appContext.checkedEntries;
|
|
64
|
-
var urls = getAddressUrls(config.dev.https && isDev() ? "https" : "http", port);
|
|
65
|
-
var routes = !apiOnly ? serverRoutes.filter(function(route) {
|
|
66
|
-
return route.entryName;
|
|
67
|
-
}) : serverRoutes;
|
|
68
|
-
var message = "App running at:\n\n";
|
|
69
|
-
if (isSingleEntry(entrypoints) || apiOnly) {
|
|
70
|
-
message += urls.map(function(param) {
|
|
71
|
-
var label = param.label, url = param.url;
|
|
72
|
-
return " ".concat(chalk.bold("> ".concat(label.padEnd(10)))).concat(chalk.cyanBright(normalizeUrl("".concat(url, "/").concat(routes[0].urlPath))), "\n");
|
|
73
|
-
}).join("");
|
|
74
|
-
} else {
|
|
75
|
-
var _Math;
|
|
76
|
-
var maxNameLength = (_Math = Math).max.apply(_Math, _toConsumableArray(routes.map(function(r) {
|
|
77
|
-
return r.entryName.length;
|
|
78
|
-
})));
|
|
79
|
-
urls.forEach(function(param) {
|
|
80
|
-
var label = param.label, url = param.url;
|
|
81
|
-
message += " ".concat(chalk.bold("> ".concat(label)), "\n");
|
|
82
|
-
routes.forEach(function(param) {
|
|
83
|
-
var entryName = param.entryName, urlPath = param.urlPath, isSSR = param.isSSR;
|
|
84
|
-
if (!checkedEntries.includes(entryName)) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
message += " ".concat(chalk.yellowBright(isSSR ? "λ" : "○"), " ").concat(chalk.yellowBright(entryName.padEnd(maxNameLength + 8))).concat(chalk.cyanBright(normalizeUrl("".concat(url, "/").concat(urlPath))), "\n");
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
message += "\n";
|
|
91
|
-
message += chalk.cyanBright(" λ (Server) server-side renders at runtime\n");
|
|
92
|
-
message += chalk.cyanBright(" ○ (Static) client-side renders as static HTML\n");
|
|
93
|
-
}
|
|
94
|
-
return message;
|
|
95
|
-
};
|
|
96
|
-
export { getAddressUrls, getIpv4Interfaces, prettyInstructions };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { chalk } from "./compiled";
|
|
2
|
-
import { logger } from "./logger";
|
|
3
|
-
function printBuildError(err) {
|
|
4
|
-
var message = err != null && err.message;
|
|
5
|
-
var stack = err != null && err.stack;
|
|
6
|
-
if (stack && typeof message === "string" && message.indexOf("from Terser") !== -1) {
|
|
7
|
-
try {
|
|
8
|
-
var matched = /(.+)\[(.+):(.+),(.+)\]\[.+\]/.exec(stack);
|
|
9
|
-
if (!matched) {
|
|
10
|
-
throw new Error("Using errors for control flow is bad.");
|
|
11
|
-
}
|
|
12
|
-
var problemPath = matched[2];
|
|
13
|
-
var line = matched[3];
|
|
14
|
-
var column = matched[4];
|
|
15
|
-
logger.error("Failed to minify the code from this file: \n\n ".concat(chalk.yellow(" ".concat(problemPath, ":").concat(line).concat(column !== "0" ? ":" + column : "")), "\n"));
|
|
16
|
-
} catch (ignored) {
|
|
17
|
-
logger.error("Failed to minify the bundle. ".concat(err, "\n"));
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
logger.error((message || err) + "\n");
|
|
21
|
-
}
|
|
22
|
-
logger.log();
|
|
23
|
-
}
|
|
24
|
-
export { printBuildError };
|
package/dist/esm/react.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _objectSpread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_defineProperty(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
import path from "path";
|
|
30
|
-
import { fs, semver } from ".";
|
|
31
|
-
var isBeyondReact17 = function(cwd) {
|
|
32
|
-
var pkgPath = path.join(cwd, "package.json");
|
|
33
|
-
if (!fs.existsSync(pkgPath)) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
var pkgInfo = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
37
|
-
var deps = _objectSpread({}, pkgInfo.devDependencies, pkgInfo.dependencies);
|
|
38
|
-
if (typeof deps.react !== "string") {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
return semver.satisfies(semver.minVersion(deps.react), ">=17.0.0");
|
|
42
|
-
};
|
|
43
|
-
export { isBeyondReact17 };
|
package/dist/esm/readTsConfig.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { fs, json5 } from "./compiled";
|
|
3
|
-
var readTsConfig = function(root) {
|
|
4
|
-
return readTsConfigByFile(path.resolve(root, "./tsconfig.json"));
|
|
5
|
-
};
|
|
6
|
-
var readTsConfigByFile = function(filename) {
|
|
7
|
-
var content = fs.readFileSync(path.resolve(filename), "utf-8");
|
|
8
|
-
return json5.parse(content);
|
|
9
|
-
};
|
|
10
|
-
export { readTsConfig, readTsConfigByFile };
|
package/dist/esm/removeSlash.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var removeLeadingSlash = function(s) {
|
|
2
|
-
return s.replace(/^\/+/, "");
|
|
3
|
-
};
|
|
4
|
-
var removeTailSlash = function(s) {
|
|
5
|
-
return s.replace(/\/+$/, "");
|
|
6
|
-
};
|
|
7
|
-
var removeSlash = function(s) {
|
|
8
|
-
return removeLeadingSlash(removeTailSlash(s));
|
|
9
|
-
};
|
|
10
|
-
export { removeLeadingSlash, removeSlash, removeTailSlash };
|
package/dist/esm/resolve.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ensureArray } from "./ensureArray";
|
|
2
|
-
var tryResolve = function(name, resolvePath) {
|
|
3
|
-
var filePath = "";
|
|
4
|
-
try {
|
|
5
|
-
filePath = require.resolve(name, {
|
|
6
|
-
paths: [
|
|
7
|
-
resolvePath
|
|
8
|
-
]
|
|
9
|
-
});
|
|
10
|
-
delete require.cache[filePath];
|
|
11
|
-
} catch (err) {
|
|
12
|
-
if (err.code === "MODULE_NOT_FOUND") {
|
|
13
|
-
throw new Error("Can not find module ".concat(name, "."));
|
|
14
|
-
}
|
|
15
|
-
throw err;
|
|
16
|
-
}
|
|
17
|
-
return filePath;
|
|
18
|
-
};
|
|
19
|
-
var isPackageInstalled = function(name, resolvePaths) {
|
|
20
|
-
try {
|
|
21
|
-
require.resolve(name, {
|
|
22
|
-
paths: ensureArray(resolvePaths)
|
|
23
|
-
});
|
|
24
|
-
return true;
|
|
25
|
-
} catch (err) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var getAntdMajorVersion = function(appDirectory) {
|
|
30
|
-
try {
|
|
31
|
-
var pkgJsonPath = require.resolve("antd/package.json", {
|
|
32
|
-
paths: [
|
|
33
|
-
appDirectory
|
|
34
|
-
]
|
|
35
|
-
});
|
|
36
|
-
var version = require(pkgJsonPath).version;
|
|
37
|
-
return Number(version.split(".")[0]);
|
|
38
|
-
} catch (err) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
export { getAntdMajorVersion, isPackageInstalled, tryResolve };
|
package/dist/esm/routes.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { normalizeToPosixPath } from "./path";
|
|
3
|
-
import { MAIN_ENTRY_NAME } from "./constants";
|
|
4
|
-
var getPathWithoutExt = function(filename) {
|
|
5
|
-
var extname = path.extname(filename);
|
|
6
|
-
return filename.slice(0, -extname.length);
|
|
7
|
-
};
|
|
8
|
-
var getRouteId = function(componentPath, routesDir, entryName) {
|
|
9
|
-
var relativePath = normalizeToPosixPath(path.relative(routesDir, componentPath));
|
|
10
|
-
var pathWithoutExt = getPathWithoutExt(relativePath);
|
|
11
|
-
var id = "";
|
|
12
|
-
if (entryName === MAIN_ENTRY_NAME) {
|
|
13
|
-
id = pathWithoutExt;
|
|
14
|
-
} else {
|
|
15
|
-
id = "".concat(entryName, "_").concat(pathWithoutExt);
|
|
16
|
-
}
|
|
17
|
-
return id;
|
|
18
|
-
};
|
|
19
|
-
export { getPathWithoutExt, getRouteId };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
function _arrayLikeToArray(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _arrayWithoutHoles(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
|
-
}
|
|
9
|
-
function _iterableToArray(iter) {
|
|
10
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
|
-
}
|
|
12
|
-
function _nonIterableSpread() {
|
|
13
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
|
-
}
|
|
15
|
-
function _toConsumableArray(arr) {
|
|
16
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
|
-
}
|
|
18
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
19
|
-
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
21
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
|
-
}
|
|
26
|
-
import path from "path";
|
|
27
|
-
import { fs } from "./compiled";
|
|
28
|
-
import { normalizeOutputPath } from "./path";
|
|
29
|
-
var memo = function(fn) {
|
|
30
|
-
var cache = /* @__PURE__ */ new Map();
|
|
31
|
-
return function() {
|
|
32
|
-
for(var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++){
|
|
33
|
-
params[_key] = arguments[_key];
|
|
34
|
-
}
|
|
35
|
-
var stringifiedParams = JSON.stringify(params);
|
|
36
|
-
var cachedResult = cache.get(stringifiedParams);
|
|
37
|
-
if (cachedResult) {
|
|
38
|
-
return cachedResult;
|
|
39
|
-
}
|
|
40
|
-
var res = fn.apply(void 0, _toConsumableArray(params));
|
|
41
|
-
cache.set(stringifiedParams, res);
|
|
42
|
-
return res;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
var createRuntimeExportsUtils = memo(function() {
|
|
46
|
-
var pwd = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", namespace = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "index";
|
|
47
|
-
var entryExportFile = path.join(pwd, ".runtime-exports/".concat(namespace, ".js"));
|
|
48
|
-
var addExport = function(statement) {
|
|
49
|
-
statement = normalizeOutputPath(statement);
|
|
50
|
-
try {
|
|
51
|
-
fs.ensureFileSync(entryExportFile);
|
|
52
|
-
if (!fs.readFileSync(entryExportFile, "utf8").includes(statement)) {
|
|
53
|
-
fs.appendFileSync(entryExportFile, "".concat(statement, "\n"));
|
|
54
|
-
}
|
|
55
|
-
} catch (e) {}
|
|
56
|
-
};
|
|
57
|
-
var getPath = function() {
|
|
58
|
-
return entryExportFile;
|
|
59
|
-
};
|
|
60
|
-
return {
|
|
61
|
-
addExport: addExport,
|
|
62
|
-
getPath: getPath
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
export { createRuntimeExportsUtils };
|
package/dist/esm/ssr.js
DELETED
package/dist/esm/storage.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as ah from "async_hooks";
|
|
2
|
-
var createStorage = function() {
|
|
3
|
-
var storage;
|
|
4
|
-
if (typeof ah.AsyncLocalStorage !== "undefined") {
|
|
5
|
-
storage = new ah.AsyncLocalStorage();
|
|
6
|
-
}
|
|
7
|
-
var run = function(context, cb) {
|
|
8
|
-
if (!storage) {
|
|
9
|
-
throw new Error("Unable to use async_hook, please confirm the node version >= 12.17\n ");
|
|
10
|
-
}
|
|
11
|
-
return new Promise(function(resolve, reject) {
|
|
12
|
-
storage.run(context, function() {
|
|
13
|
-
try {
|
|
14
|
-
return resolve(cb());
|
|
15
|
-
} catch (error) {
|
|
16
|
-
return reject(error);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var useContext = function() {
|
|
22
|
-
if (!storage) {
|
|
23
|
-
throw new Error("Unable to use async_hook, please confirm the node version >= 12.17\n ");
|
|
24
|
-
}
|
|
25
|
-
var context = storage.getStore();
|
|
26
|
-
if (!context) {
|
|
27
|
-
throw new Error("Can't call useContext out of scope, make sure @modern-js/utils is a single version in node_modules");
|
|
28
|
-
}
|
|
29
|
-
return context;
|
|
30
|
-
};
|
|
31
|
-
return {
|
|
32
|
-
run: run,
|
|
33
|
-
useContext: useContext
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export { createStorage };
|
package/dist/esm/testUtils.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var initSnapshotSerializer = function(root) {
|
|
2
|
-
expect.addSnapshotSerializer({
|
|
3
|
-
test: function(val) {
|
|
4
|
-
return typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root));
|
|
5
|
-
},
|
|
6
|
-
print: function(val) {
|
|
7
|
-
return(// eslint-disable-next-line no-nested-ternary
|
|
8
|
-
typeof val === "string" ? // eslint-disable-next-line no-nested-ternary
|
|
9
|
-
val.includes("node_modules") ? '"'.concat(val.replace(/.+node_modules/, "").replace(/\\/g, "/"), '"') : val.includes("modern.js") ? '"'.concat(val.replace(/.+modern\.js/, "").replace(/\\/g, "/"), '"') : '"'.concat(val.replace(root, "").replace(/\\/g, "/"), '"') : val);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
export { initSnapshotSerializer };
|
package/dist/esm/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|